generated-configure.sh revision 1783:096dd665a6ff
154359Sroberto#!/bin/bash
254359Sroberto#
354359Sroberto# ##########################################################
454359Sroberto# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
554359Sroberto# ##########################################################
654359Sroberto#
7280849Scy#! /bin/sh
854359Sroberto# Guess values for system-dependent variables and create Makefiles.
9280849Scy# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10280849Scy#
11280849Scy# Report bugs to <build-dev@openjdk.java.net>.
12280849Scy#
13280849Scy#
14280849Scy# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15182007Sroberto#
16280849Scy#
1754359Sroberto# This configure script is free software; the Free Software Foundation
18182007Sroberto# gives unlimited permission to copy, distribute and modify it.
19182007Sroberto## -------------------- ##
2082498Sroberto## M4sh Initialization. ##
2182498Sroberto## -------------------- ##
2282498Sroberto
2382498Sroberto# Be more Bourne compatible
2482498SrobertoDUALCASE=1; export DUALCASE # for MKS sh
2582498Srobertoif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
2654359Sroberto  emulate sh
2782498Sroberto  NULLCMD=:
2882498Sroberto  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2982498Sroberto  # is contrary to our usage.  Disable this feature.
3054359Sroberto  alias -g '${1+"$@"}'='"$@"'
3182498Sroberto  setopt NO_GLOB_SUBST
3282498Srobertoelse
3382498Sroberto  case `(set -o) 2>/dev/null` in #(
3482498Sroberto  *posix*) :
3582498Sroberto    set -o posix ;; #(
3682498Sroberto  *) :
3754359Sroberto     ;;
3882498Srobertoesac
3982498Srobertofi
4082498Sroberto
4182498Sroberto
4254359Srobertoas_nl='
4382498Sroberto'
4482498Srobertoexport as_nl
4582498Sroberto# Printing a long string crashes Solaris 7 /usr/bin/printf.
4682498Srobertoas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4754359Srobertoas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4882498Srobertoas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4982498Sroberto# Prefer a ksh shell builtin over an external printf program on Solaris,
5082498Sroberto# but without wasting forks for bash or zsh.
5182498Srobertoif test -z "$BASH_VERSION$ZSH_VERSION" \
5282498Sroberto    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
5354359Sroberto  as_echo='print -r --'
5482498Sroberto  as_echo_n='print -rn --'
5582498Srobertoelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
5682498Sroberto  as_echo='printf %s\n'
5782498Sroberto  as_echo_n='printf %s'
5882498Srobertoelse
5954359Sroberto  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6082498Sroberto    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6182498Sroberto    as_echo_n='/usr/ucb/echo -n'
6282498Sroberto  else
6382498Sroberto    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6482498Sroberto    as_echo_n_body='eval
6582498Sroberto      arg=$1;
6682498Sroberto      case $arg in #(
6782498Sroberto      *"$as_nl"*)
6882498Sroberto	expr "X$arg" : "X\\(.*\\)$as_nl";
6982498Sroberto	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7082498Sroberto      esac;
7182498Sroberto      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7282498Sroberto    '
7382498Sroberto    export as_echo_n_body
7454359Sroberto    as_echo_n='sh -c $as_echo_n_body as_echo'
7554359Sroberto  fi
7654359Sroberto  export as_echo_body
7782498Sroberto  as_echo='sh -c $as_echo_body as_echo'
7854359Srobertofi
7954359Sroberto
8054359Sroberto# The user is always right.
8154359Srobertoif test "${PATH_SEPARATOR+set}" != set; then
8254359Sroberto  PATH_SEPARATOR=:
8354359Sroberto  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8454359Sroberto    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8554359Sroberto      PATH_SEPARATOR=';'
8654359Sroberto  }
8754359Srobertofi
8854359Sroberto
8954359Sroberto
9054359Sroberto# IFS
9154359Sroberto# We need space, tab and new line, in precisely that order.  Quoting is
9254359Sroberto# there to prevent editors from complaining about space-tab.
9354359Sroberto# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9454359Sroberto# splitting by setting IFS to empty value.)
9554359SrobertoIFS=" ""	$as_nl"
9654359Sroberto
9754359Sroberto# Find who we are.  Look in the path if we contain no directory separator.
98132451Srobertoas_myself=
99132451Srobertocase $0 in #((
100132451Sroberto  *[\\/]* ) as_myself=$0 ;;
101132451Sroberto  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102132451Srobertofor as_dir in $PATH
103280849Scydo
104280849Scy  IFS=$as_save_IFS
105132451Sroberto  test -z "$as_dir" && as_dir=.
106132451Sroberto    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107132451Sroberto  done
108280849ScyIFS=$as_save_IFS
109280849Scy
110132451Sroberto     ;;
111132451Srobertoesac
112132451Sroberto# We did not find ourselves, most probably we were run as `sh COMMAND'
113132451Sroberto# in which case we are not to be found in the path.
114132451Srobertoif test "x$as_myself" = x; then
115132451Sroberto  as_myself=$0
11654359Srobertofi
117132451Srobertoif test ! -f "$as_myself"; then
118132451Sroberto  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119132451Sroberto  exit 1
120132451Srobertofi
121182007Sroberto
122182007Sroberto# Unset variables that we do not need and which cause bugs (e.g. in
123280849Scy# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124280849Scy# suppresses any "Segmentation fault" message there.  '((' could
125132451Sroberto# trigger a bug in pdksh 5.2.14.
12682498Srobertofor as_var in BASH_ENV ENV MAIL MAILPATH
127182007Srobertodo eval test x\${$as_var+set} = xset \
128132451Sroberto  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129182007Srobertodone
130280849ScyPS1='$ '
131362716ScyPS2='> '
13282498SrobertoPS4='+ '
13354359Sroberto
134132451Sroberto# NLS nuisances.
135132451SrobertoLC_ALL=C
136182007Srobertoexport LC_ALL
137280849ScyLANGUAGE=C
138132451Srobertoexport LANGUAGE
139132451Sroberto
140132451Sroberto# CDPATH.
141280849Scy(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142132451Sroberto
143182007Sroberto# Use a proper internal environment variable to ensure we don't fall
144132451Sroberto  # into an infinite loop, continuously re-executing ourselves.
145132451Sroberto  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
14682498Sroberto    _as_can_reexec=no; export _as_can_reexec;
14782498Sroberto    # We cannot yet assume a decent shell, so we have to provide a
14882498Sroberto# neutralization value for shells without unset; and this also
14982498Sroberto# works around shells that cannot unset nonexistent variables.
15082498Sroberto# Preserve -v and -x to the replacement shell.
15182498SrobertoBASH_ENV=/dev/null
152280849ScyENV=/dev/null
15382498Sroberto(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
15482498Srobertocase $- in # ((((
15554359Sroberto  *v*x* | *x*v* ) as_opts=-vx ;;
15654359Sroberto  *v* ) as_opts=-v ;;
15754359Sroberto  *x* ) as_opts=-x ;;
15854359Sroberto  * ) as_opts= ;;
159280849Scyesac
16054359Srobertoexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161280849Scy# Admittedly, this is quite paranoid, since all the known shells bail
16254359Sroberto# out after a failed `exec'.
16382498Sroberto$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
16482498Srobertoas_fn_exit 255
165280849Scy  fi
16654359Sroberto  # We don't want this to propagate to other subprocesses.
16754359Sroberto          { _as_can_reexec=; unset _as_can_reexec;}
168280849Scyif test "x$CONFIG_SHELL" = x; then
169280849Scy  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170280849Scy  emulate sh
171280849Scy  NULLCMD=:
172280849Scy  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
17354359Sroberto  # is contrary to our usage.  Disable this feature.
174280849Scy  alias -g '\${1+\"\$@\"}'='\"\$@\"'
17554359Sroberto  setopt NO_GLOB_SUBST
176280849Scyelse
177280849Scy  case \`(set -o) 2>/dev/null\` in #(
178298695Sdelphij  *posix*) :
179280849Scy    set -o posix ;; #(
180280849Scy  *) :
181280849Scy     ;;
182280849Scyesac
183280849Scyfi
184280849Scy"
185280849Scy  as_required="as_fn_return () { (exit \$1); }
186280849Scyas_fn_success () { as_fn_return 0; }
187280849Scyas_fn_failure () { as_fn_return 1; }
188280849Scyas_fn_ret_success () { return 0; }
189280849Scyas_fn_ret_failure () { return 1; }
190280849Scy
191280849Scyexitcode=0
192280849Scyas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193280849Scyas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194280849Scyas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195280849Scyas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196280849Scyif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197280849Scy
198280849Scyelse
199280849Scy  exitcode=1; echo positional parameters were not saved.
20054359Srobertofi
20154359Srobertotest x\$exitcode = x0 || exit 1
20254359Srobertotest -x / || exit 1"
20354359Sroberto  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
20454359Sroberto  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205182007Sroberto  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206182007Sroberto  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207182007Srobertotest \$(( 1 + 1 )) = 2 || exit 1"
208182007Sroberto  if (eval "$as_required") 2>/dev/null; then :
209182007Sroberto  as_have_required=yes
210280849Scyelse
211182007Sroberto  as_have_required=no
212280849Scyfi
213280849Scy  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214280849Scy
215280849Scyelse
216280849Scy  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21754359Srobertoas_found=false
21882498Srobertofor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21954359Srobertodo
22054359Sroberto  IFS=$as_save_IFS
22154359Sroberto  test -z "$as_dir" && as_dir=.
222182007Sroberto  as_found=:
223182007Sroberto  case $as_dir in #(
22454359Sroberto	 /*)
225182007Sroberto	   for as_base in sh bash ksh sh5; do
226182007Sroberto	     # Try only shells that exist, to save several forks.
22754359Sroberto	     as_shell=$as_dir/$as_base
22882498Sroberto	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229280849Scy		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230182007Sroberto  CONFIG_SHELL=$as_shell as_have_required=yes
231280849Scy		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232280849Scy  break 2
233280849Scyfi
234182007Srobertofi
235182007Sroberto	   done;;
236182007Sroberto       esac
237182007Sroberto  as_found=false
238182007Srobertodone
239182007Sroberto$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240182007Sroberto	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241182007Sroberto  CONFIG_SHELL=$SHELL as_have_required=yes
242182007Srobertofi; }
243182007SrobertoIFS=$as_save_IFS
24454359Sroberto
24554359Sroberto
246298695Sdelphij      if test "x$CONFIG_SHELL" != x; then :
247298695Sdelphij  export CONFIG_SHELL
248298695Sdelphij             # We cannot yet assume a decent shell, so we have to provide a
249298695Sdelphij# neutralization value for shells without unset; and this also
250298695Sdelphij# works around shells that cannot unset nonexistent variables.
251298695Sdelphij# Preserve -v and -x to the replacement shell.
252298695SdelphijBASH_ENV=/dev/null
25382498SrobertoENV=/dev/null
25482498Sroberto(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
25554359Srobertocase $- in # ((((
25654359Sroberto  *v*x* | *x*v* ) as_opts=-vx ;;
25754359Sroberto  *v* ) as_opts=-v ;;
258280849Scy  *x* ) as_opts=-x ;;
259280849Scy  * ) as_opts= ;;
260280849Scyesac
261280849Scyexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262280849Scy# Admittedly, this is quite paranoid, since all the known shells bail
263280849Scy# out after a failed `exec'.
264280849Scy$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265280849Scyexit 255
266280849Scyfi
26782498Sroberto
26882498Sroberto    if test x$as_have_required = xno; then :
26982498Sroberto  $as_echo "$0: This script requires a shell more modern than all"
27082498Sroberto  $as_echo "$0: the shells that I found on your system."
27182498Sroberto  if test x${ZSH_VERSION+set} = xset ; then
27282498Sroberto    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
27382498Sroberto    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
27482498Sroberto  else
27582498Sroberto    $as_echo "$0: Please tell bug-autoconf@gnu.org and
27682498Sroberto$0: build-dev@openjdk.java.net about your system, including
277280849Scy$0: any error possibly output before this message. Then
278280849Scy$0: install a modern shell, or manually run the script
27954359Sroberto$0: under such a shell if you do have one."
28082498Sroberto  fi
28182498Sroberto  exit 1
28282498Srobertofi
283182007Srobertofi
28482498Srobertofi
28582498SrobertoSHELL=${CONFIG_SHELL-/bin/sh}
28682498Srobertoexport SHELL
28782498Sroberto# Unset more variables known to interfere with behavior of common tools.
288182007SrobertoCLICOLOR_FORCE= GREP_OPTIONS=
28954359Srobertounset CLICOLOR_FORCE GREP_OPTIONS
29082498Sroberto
29182498Sroberto## --------------------- ##
29282498Sroberto## M4sh Shell Functions. ##
29382498Sroberto## --------------------- ##
29482498Sroberto# as_fn_unset VAR
29582498Sroberto# ---------------
296182007Sroberto# Portably unset VAR.
29782498Srobertoas_fn_unset ()
298280849Scy{
299280849Scy  { eval $1=; unset $1;}
30082498Sroberto}
30182498Srobertoas_unset=as_fn_unset
30282498Sroberto
30382498Sroberto# as_fn_set_status STATUS
30482498Sroberto# -----------------------
30582498Sroberto# Set $? to STATUS, without forking.
30682498Srobertoas_fn_set_status ()
307280849Scy{
308280849Scy  return $1
309280849Scy} # as_fn_set_status
31082498Sroberto
31182498Sroberto# as_fn_exit STATUS
312132451Sroberto# -----------------
313132451Sroberto# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314132451Srobertoas_fn_exit ()
315132451Sroberto{
316280849Scy  set +e
31782498Sroberto  as_fn_set_status $1
318280849Scy  exit $1
319132451Sroberto} # as_fn_exit
320280849Scy
321280849Scy# as_fn_mkdir_p
322280849Scy# -------------
323280849Scy# Create "$as_dir" as a directory, including parents if necessary.
324132451Srobertoas_fn_mkdir_p ()
325132451Sroberto{
326280849Scy
327132451Sroberto  case $as_dir in #(
32882498Sroberto  -*) as_dir=./$as_dir;;
32982498Sroberto  esac
33082498Sroberto  test -d "$as_dir" || eval $as_mkdir_p || {
33182498Sroberto    as_dirs=
33282498Sroberto    while :; do
333132451Sroberto      case $as_dir in #(
334132451Sroberto      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335280849Scy      *) as_qdir=$as_dir;;
33682498Sroberto      esac
337280849Scy      as_dirs="'$as_qdir' $as_dirs"
33882498Sroberto      as_dir=`$as_dirname -- "$as_dir" ||
33982498Sroberto$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34082498Sroberto	 X"$as_dir" : 'X\(//\)[^/]' \| \
34182498Sroberto	 X"$as_dir" : 'X\(//\)$' \| \
34282498Sroberto	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343280849Scy$as_echo X"$as_dir" |
34482498Sroberto    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345280849Scy	    s//\1/
34682498Sroberto	    q
347280849Scy	  }
348280849Scy	  /^X\(\/\/\)[^/].*/{
349280849Scy	    s//\1/
350280849Scy	    q
35182498Sroberto	  }
35282498Sroberto	  /^X\(\/\/\)$/{
35382498Sroberto	    s//\1/
35482498Sroberto	    q
35582498Sroberto	  }
35682498Sroberto	  /^X\(\/\).*/{
35782498Sroberto	    s//\1/
358280849Scy	    q
359280849Scy	  }
360280849Scy	  s/.*/./; q'`
361294554Sdelphij      test -d "$as_dir" && break
362358659Scy    done
36382498Sroberto    test -z "$as_dirs" || eval "mkdir $as_dirs"
36482498Sroberto  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36582498Sroberto
36682498Sroberto
367280849Scy} # as_fn_mkdir_p
368280849Scy
36982498Sroberto# as_fn_executable_p FILE
37082498Sroberto# -----------------------
371280849Scy# Test if FILE is an executable regular file.
372280849Scyas_fn_executable_p ()
373280849Scy{
374280849Scy  test -f "$1" && test -x "$1"
375280849Scy} # as_fn_executable_p
376280849Scy# as_fn_append VAR VALUE
377280849Scy# ----------------------
378280849Scy# Append the text in VALUE to the end of the definition contained in VAR. Take
379280849Scy# advantage of any shell optimizations that allow amortized linear growth over
380280849Scy# repeated appends, instead of the typical quadratic growth present in naive
381280849Scy# implementations.
38282498Srobertoif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
38382498Sroberto  eval 'as_fn_append ()
38482498Sroberto  {
385280849Scy    eval $1+=\$2
386280849Scy  }'
387280849Scyelse
38882498Sroberto  as_fn_append ()
38982498Sroberto  {
390182007Sroberto    eval $1=\$$1\$2
39154359Sroberto  }
39282498Srobertofi # as_fn_append
39354359Sroberto
39482498Sroberto# as_fn_arith ARG...
395309007Sdelphij# ------------------
396294554Sdelphij# Perform arithmetic evaluation on the ARGs, and store the result in the
39782498Sroberto# global $as_val. Take advantage of shells that can avoid forks. The arguments
39882498Sroberto# must be portable across $(()) and expr.
39982498Srobertoif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
40082498Sroberto  eval 'as_fn_arith ()
401280849Scy  {
402280849Scy    as_val=$(( $* ))
403298695Sdelphij  }'
404280849Scyelse
405280849Scy  as_fn_arith ()
406280849Scy  {
407280849Scy    as_val=`expr "$@" || test $? -eq 1`
40854359Sroberto  }
40954359Srobertofi # as_fn_arith
41054359Sroberto
41154359Sroberto
41254359Sroberto# as_fn_error STATUS ERROR [LINENO LOG_FD]
41354359Sroberto# ----------------------------------------
41454359Sroberto# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
41554359Sroberto# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
41654359Sroberto# script with STATUS, using 1 if that was 0.
41754359Srobertoas_fn_error ()
41854359Sroberto{
419182007Sroberto  as_status=$1; test $as_status -eq 0 && as_status=1
420182007Sroberto  if test "$4"; then
421182007Sroberto    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422182007Sroberto    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423309007Sdelphij  fi
424132451Sroberto  $as_echo "$as_me: error: $2" >&2
425182007Sroberto  as_fn_exit $as_status
426182007Sroberto} # as_fn_error
42754359Sroberto
42854359Srobertoif expr a : '\(a\)' >/dev/null 2>&1 &&
42954359Sroberto   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430182007Sroberto  as_expr=expr
431182007Srobertoelse
432182007Sroberto  as_expr=false
433182007Srobertofi
434182007Sroberto
435182007Srobertoif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436309007Sdelphij  as_basename=basename
437182007Srobertoelse
438182007Sroberto  as_basename=false
43954359Srobertofi
44054359Sroberto
44154359Srobertoif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
44254359Sroberto  as_dirname=dirname
443132451Srobertoelse
44454359Sroberto  as_dirname=false
44554359Srobertofi
44682498Sroberto
44754359Srobertoas_me=`$as_basename -- "$0" ||
44854359Sroberto$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449282408Scy	 X"$0" : 'X\(//\)$' \| \
45054359Sroberto	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
45182498Sroberto$as_echo X/"$0" |
452280849Scy    sed '/^.*\/\([^/][^/]*\)\/*$/{
45382498Sroberto	    s//\1/
454280849Scy	    q
455280849Scy	  }
456280849Scy	  /^X\/\(\/\/\)$/{
457280849Scy	    s//\1/
458280849Scy	    q
459280849Scy	  }
460280849Scy	  /^X\/\(\/\).*/{
461280849Scy	    s//\1/
462280849Scy	    q
463280849Scy	  }
464280849Scy	  s/.*/./; q'`
465280849Scy
466280849Scy# Avoid depending upon Character Ranges.
467282408Scyas_cr_letters='abcdefghijklmnopqrstuvwxyz'
468280849Scyas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469282408Scyas_cr_Letters=$as_cr_letters$as_cr_LETTERS
470358659Scyas_cr_digits='0123456789'
47154359Srobertoas_cr_alnum=$as_cr_Letters$as_cr_digits
47254359Sroberto
47354359Sroberto
47454359Sroberto  as_lineno_1=$LINENO as_lineno_1a=$LINENO
47554359Sroberto  as_lineno_2=$LINENO as_lineno_2a=$LINENO
47654359Sroberto  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
47754359Sroberto  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
47854359Sroberto  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479280849Scy  sed -n '
480132451Sroberto    p
481132451Sroberto    /[$]LINENO/=
482132451Sroberto  ' <$as_myself |
48382498Sroberto    sed '
48482498Sroberto      s/[$]LINENO.*/&-/
48554359Sroberto      t lineno
48654359Sroberto      b
48754359Sroberto      :lineno
48854359Sroberto      N
48954359Sroberto      :loop
49054359Sroberto      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
49154359Sroberto      t loop
49256746Sroberto      s/-\n.*//
49354359Sroberto    ' >$as_me.lineno &&
494132451Sroberto  chmod +x "$as_me.lineno" ||
49556746Sroberto    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
49654359Sroberto
49754359Sroberto  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
49854359Sroberto  # already done that, so ensure we don't try to do so again and fall
49954359Sroberto  # in an infinite loop.  This has already happened in practice.
50054359Sroberto  _as_can_reexec=no; export _as_can_reexec
50154359Sroberto  # Don't try to exec as it changes $[0], causing all sort of problems
50254359Sroberto  # (the dirname of $[0] is not the place where we might find the
50354359Sroberto  # original and so on.  Autoconf is especially sensitive to this).
50454359Sroberto  . "./$as_me.lineno"
50554359Sroberto  # Exit status is that of the last command.
506182007Sroberto  exit
50754359Sroberto}
50854359Sroberto
50954359SrobertoECHO_C= ECHO_N= ECHO_T=
51054359Srobertocase `echo -n x` in #(((((
511182007Sroberto-n*)
512182007Sroberto  case `echo 'xy\c'` in
51354359Sroberto  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514132451Sroberto  xy)  ECHO_C='\c';;
51554359Sroberto  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51654359Sroberto       ECHO_T='	';;
51754359Sroberto  esac;;
51854359Sroberto*)
519132451Sroberto  ECHO_N='-n';;
520132451Srobertoesac
521132451Sroberto
52256746Srobertorm -f conf$$ conf$$.exe conf$$.file
52356746Srobertoif test -d conf$$.dir; then
52456746Sroberto  rm -f conf$$.dir/conf$$.file
525132451Srobertoelse
52682498Sroberto  rm -f conf$$.dir
527106163Sroberto  mkdir conf$$.dir 2>/dev/null
528106424Srobertofi
529106424Srobertoif (echo >conf$$.file) 2>/dev/null; then
530106424Sroberto  if ln -s conf$$.file conf$$ 2>/dev/null; then
531132451Sroberto    as_ln_s='ln -s'
532280849Scy    # ... but there are two gotchas:
533280849Scy    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534280849Scy    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53554359Sroberto    # In both cases, we have to default to `cp -pR'.
536132451Sroberto    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53754359Sroberto      as_ln_s='cp -pR'
53854359Sroberto  elif ln conf$$.file conf$$ 2>/dev/null; then
53954359Sroberto    as_ln_s=ln
54054359Sroberto  else
54154359Sroberto    as_ln_s='cp -pR'
54254359Sroberto  fi
54354359Srobertoelse
54454359Sroberto  as_ln_s='cp -pR'
54554359Srobertofi
546280849Scyrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54782498Srobertormdir conf$$.dir 2>/dev/null
54882498Sroberto
54982498Srobertoif mkdir -p . 2>/dev/null; then
550280849Scy  as_mkdir_p='mkdir -p "$as_dir"'
551280849Scyelse
552280849Scy  test -d ./-p && rmdir ./-p
553280849Scy  as_mkdir_p=false
55482498Srobertofi
55582498Sroberto
55682498Srobertoas_test_x='test -x'
55754359Srobertoas_executable_p=as_fn_executable_p
558330106Sdelphij
559330106Sdelphij# Sed expression to map a string onto a valid CPP name.
560330106Sdelphijas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561330106Sdelphij
562280849Scy# Sed expression to map a string onto a valid variable name.
563330106Sdelphijas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564330106Sdelphij
56554359Sroberto
56654359Srobertotest -n "$DJDIR" || exec 7<&0 </dev/null
56754359Srobertoexec 6>&1
568280849Scy
56982498Sroberto# Name of the host.
57082498Sroberto# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
57182498Sroberto# so uname gets run too.
572280849Scyac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
57382498Sroberto
57482498Sroberto#
575280849Scy# Initializations.
576280849Scy#
577280849Scyac_default_prefix=/usr/local
578280849Scyac_clean_files=
579280849Scyac_config_libobj_dir=.
580280849ScyLIBOBJS=
581280849Scycross_compiling=no
58254359Srobertosubdirs=
583280849ScyMFLAGS=
584280849ScyMAKEFLAGS=
585280849Scy
586280849Scy# Identity of this package.
587280849ScyPACKAGE_NAME='OpenJDK'
58854359SrobertoPACKAGE_TARNAME='openjdk'
58954359SrobertoPACKAGE_VERSION='jdk9'
59054359SrobertoPACKAGE_STRING='OpenJDK jdk9'
59154359SrobertoPACKAGE_BUGREPORT='build-dev@openjdk.java.net'
59254359SrobertoPACKAGE_URL='http://openjdk.java.net'
59354359Sroberto
59454359Sroberto# Factoring default headers for most tests.
59554359Srobertoac_includes_default="\
59654359Sroberto#include <stdio.h>
59754359Sroberto#ifdef HAVE_SYS_TYPES_H
598280849Scy# include <sys/types.h>
599280849Scy#endif
60054359Sroberto#ifdef HAVE_SYS_STAT_H
601280849Scy# include <sys/stat.h>
602280849Scy#endif
60354359Sroberto#ifdef STDC_HEADERS
60454359Sroberto# include <stdlib.h>
60554359Sroberto# include <stddef.h>
60654359Sroberto#else
60754359Sroberto# ifdef HAVE_STDLIB_H
60854359Sroberto#  include <stdlib.h>
60954359Sroberto# endif
61054359Sroberto#endif
61154359Sroberto#ifdef HAVE_STRING_H
61254359Sroberto# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
61354359Sroberto#  include <memory.h>
61454359Sroberto# endif
615338530Sdelphij# include <string.h>
61682498Sroberto#endif
617338530Sdelphij#ifdef HAVE_STRINGS_H
618338530Sdelphij# include <strings.h>
619338530Sdelphij#endif
620338530Sdelphij#ifdef HAVE_INTTYPES_H
621338530Sdelphij# include <inttypes.h>
622338530Sdelphij#endif
623338530Sdelphij#ifdef HAVE_STDINT_H
624338530Sdelphij# include <stdint.h>
625338530Sdelphij#endif
626338530Sdelphij#ifdef HAVE_UNISTD_H
627338530Sdelphij# include <unistd.h>
62882498Sroberto#endif"
62982498Sroberto
630132451Srobertoac_subst_vars='LTLIBOBJS
631132451SrobertoLIBOBJS
63254359SrobertoCFLAGS_CCACHE
63354359SrobertoCCACHE
63482498SrobertoUSE_PRECOMPILED_HEADER
63554359SrobertoENABLE_JAVAC_SERVER
63682498SrobertoENABLE_SJAVAC
637280849ScySJAVAC_SERVER_JAVA_FLAGS
638280849ScySJAVAC_SERVER_JAVA
639280849ScyJAVA_TOOL_FLAGS_SMALL
640280849ScyJAVA_FLAGS_SMALL
641280849ScyJAVA_FLAGS_BIG
642280849ScyJAVA_FLAGS
643280849ScyJOBS
644280849ScyMEMORY_SIZE
645280849ScyNUM_CORES
646280849ScyENABLE_INTREE_EC
647280849ScySALIB_NAME
648280849ScyHOTSPOT_MAKE_ARGS
649280849ScyLIBZIP_CAN_USE_MMAP
650280849ScyLIBDL
651280849ScyLIBM
65254359SrobertoUSE_EXTERNAL_LCMS
65382498SrobertoLCMS_LIBS
65482498SrobertoLCMS_CFLAGS
65582498SrobertoUSE_EXTERNAL_LIBZ
656280849ScyUSE_EXTERNAL_LIBPNG
657280849ScyPNG_LIBS
658280849ScyPNG_CFLAGS
659280849ScyUSE_EXTERNAL_LIBGIF
660280849ScyUSE_EXTERNAL_LIBJPEG
661280849ScyLLVM_LIBS
662280849ScyLLVM_LDFLAGS
663280849ScyLLVM_CFLAGS
664280849ScyLLVM_CONFIG
665280849ScyLIBFFI_LIBS
666280849ScyLIBFFI_CFLAGS
667280849ScyALSA_LIBS
668280849ScyALSA_CFLAGS
669280849ScyFREETYPE_BUNDLE_LIB_PATH
670280849ScyFREETYPE_LIBS
67154359SrobertoFREETYPE_CFLAGS
67254359SrobertoCUPS_CFLAGS
67354359SrobertoX_EXTRA_LIBS
67454359SrobertoX_LIBS
67582498SrobertoX_PRE_LIBS
676280849ScyX_CFLAGS
677280849ScyXMKMF
678280849ScyMSVCP_DLL
679280849ScyMSVCR_DLL
680280849ScyLIBCXX
681280849ScySTATIC_CXX_SETTING
68254359SrobertoFIXPATH
68354359SrobertoGCOV_ENABLED
68454359SrobertoZIP_DEBUGINFO_FILES
68554359SrobertoENABLE_DEBUG_SYMBOLS
68654359SrobertoCFLAGS_WARNINGS_ARE_ERRORS
68754359SrobertoDISABLE_WARNING_PREFIX
68854359SrobertoHOTSPOT_SET_WARNINGS_AS_ERRORS
68954359SrobertoWARNINGS_AS_ERRORS
69054359SrobertoCOMPILER_SUPPORTS_TARGET_BITS_FLAG
69182498SrobertoZERO_ARCHFLAG
69282498SrobertoLDFLAGS_TESTEXE
69354359SrobertoLDFLAGS_TESTLIB
694280849ScyLDFLAGS_CXX_JDK
695280849ScyJDKEXE_LIBS
696280849ScyJDKLIB_LIBS
69754359SrobertoLDFLAGS_JDKEXE
69854359SrobertoLDFLAGS_JDKLIB
69954359SrobertoCXXFLAGS_TESTEXE
70054359SrobertoCXXFLAGS_TESTLIB
70154359SrobertoCFLAGS_TESTEXE
70254359SrobertoCFLAGS_TESTLIB
70354359SrobertoCXXFLAGS_JDKEXE
70454359SrobertoCXXFLAGS_JDKLIB
70554359SrobertoCFLAGS_JDKEXE
70654359SrobertoCFLAGS_JDKLIB
70754359SrobertoMACOSX_VERSION_MIN
70854359SrobertoCXX_O_FLAG_NONE
70954359SrobertoCXX_O_FLAG_DEBUG
71054359SrobertoCXX_O_FLAG_NORM
71154359SrobertoCXX_O_FLAG_HI
71254359SrobertoCXX_O_FLAG_HIGHEST
71354359SrobertoC_O_FLAG_NONE
71454359SrobertoC_O_FLAG_DEBUG
71554359SrobertoC_O_FLAG_NORM
71654359SrobertoC_O_FLAG_HI
71754359SrobertoC_O_FLAG_HIGHEST
71854359SrobertoCXXFLAGS_DEBUG_SYMBOLS
71954359SrobertoCFLAGS_DEBUG_SYMBOLS
72054359SrobertoCXX_FLAG_DEPS
72182498SrobertoC_FLAG_DEPS
72282498SrobertoSET_SHARED_LIBRARY_MAPFILE
723132451SrobertoSET_SHARED_LIBRARY_NAME
724182007SrobertoSET_SHARED_LIBRARY_ORIGIN
725182007SrobertoSET_EXECUTABLE_ORIGIN
726182007SrobertoCXX_FLAG_REORDER
727182007SrobertoC_FLAG_REORDER
728182007SrobertoRC_FLAGS
729182007SrobertoAR_OUT_OPTION
730182007SrobertoLD_OUT_OPTION
731182007SrobertoEXE_OUT_OPTION
732280849ScyCC_OUT_OPTION
733182007SrobertoSTRIPFLAGS
734182007SrobertoARFLAGS
735182007SrobertoCOMPILER_TARGET_BITS_FLAG
736280849ScyJT_HOME
737280849ScyJTREGEXE
738294554SdelphijUSING_BROKEN_SUSE_LD
739294554SdelphijPACKAGE_PATH
740294554SdelphijUSE_CLANG
741301247SdelphijHOTSPOT_LD
742309007SdelphijHOTSPOT_CXX
74354359SrobertoHOTSPOT_RC
74454359SrobertoHOTSPOT_MT
74554359SrobertoBUILD_LD
74654359SrobertoBUILD_CXX
747280849ScyBUILD_CC
748280849ScyBUILD_SYSROOT_LDFLAGS
749282408ScyBUILD_SYSROOT_CFLAGS
750309007Sdelphijac_ct_OBJDUMP
751282408ScyOBJDUMP
752282408Scyac_ct_OBJCOPY
753282408ScyOBJCOPY
754282408Scyac_ct_NM
755282408Scyac_ct_STRIP
756282408ScyGNM
757282408ScyNM
758282408ScySTRIP
759282408ScyMSBUILD
760282408ScyDUMPBIN
761282408ScyRC
76254359SrobertoMT
76354359SrobertoLIPO
76454359Srobertoac_ct_AR
76554359SrobertoAR
76654359SrobertoAS
76754359SrobertoLDCXX
76854359SrobertoLD
769280849ScyCXXCPP
77054359SrobertoCPP
771132451Srobertoac_ct_CXX
77254359SrobertoCXXFLAGS
77354359SrobertoCXX
77454359Srobertoac_ct_PROPER_COMPILER_CXX
77554359SrobertoPROPER_COMPILER_CXX
77654359SrobertoTOOLCHAIN_PATH_CXX
77782498SrobertoPOTENTIAL_CXX
77854359SrobertoOBJEXT
77954359SrobertoEXEEXT
78054359Srobertoac_ct_CC
781280849ScyCPPFLAGS
78254359SrobertoLDFLAGS
783280849ScyCFLAGS
784280849ScyCC
785280849Scyac_ct_PROPER_COMPILER_CC
786280849ScyPROPER_COMPILER_CC
787280849ScyTOOLCHAIN_PATH_CC
788280849ScyPOTENTIAL_CC
789280849ScyVS_LIB
790280849ScyVS_INCLUDE
791280849ScyVS_PATH
792280849ScyCYGWIN_LINK
793280849ScySYSROOT_LDFLAGS
79454359SrobertoSYSROOT_CFLAGS
79554359SrobertoLEGACY_EXTRA_LDFLAGS
79682498SrobertoLEGACY_EXTRA_CXXFLAGS
797280849ScyLEGACY_EXTRA_CFLAGS
798280849ScyEXE_SUFFIX
79982498SrobertoOBJ_SUFFIX
800280849ScySTATIC_LIBRARY
801280849ScySHARED_LIBRARY
802280849ScySTATIC_LIBRARY_SUFFIX
803280849ScySHARED_LIBRARY_SUFFIX
804280849ScyLIBRARY_PREFIX
805280849ScyTOOLCHAIN_TYPE
806280849ScyBUILD_HOTSPOT
80754359SrobertoHOTSPOT_DIST
808280849ScyBUILD_OUTPUT
809280849ScyJDK_TOPDIR
810280849ScyNASHORN_TOPDIR
811280849ScyHOTSPOT_TOPDIR
812280849ScyJAXWS_TOPDIR
813280849ScyJAXP_TOPDIR
814280849ScyCORBA_TOPDIR
815280849ScyLANGTOOLS_TOPDIR
816280849ScyBOOT_JDK_BITS
817280849ScyJAVAC_FLAGS
818280849ScyBOOT_JDK_SOURCETARGET
819280849ScyJARSIGNER
820280849ScyJAR
82154359SrobertoJAVAH
82254359SrobertoJAVAC
823280849ScyJAVA
824280849ScyBOOT_JDK
825280849ScyJAVA_CHECK
82654359SrobertoJAVAC_CHECK
82754359SrobertoVERSION_IS_GA
82854359SrobertoVERSION_SHORT
829280849ScyVERSION_STRING
830280849ScyVERSION_NUMBER_FOUR_POSITIONS
831280849ScyVERSION_NUMBER
832280849ScyVERSION_OPT
83354359SrobertoVERSION_BUILD
834280849ScyVERSION_PRE
835280849ScyVERSION_PATCH
836280849ScyVERSION_SECURITY
837280849ScyVERSION_MINOR
838280849ScyVERSION_MAJOR
839280849ScyMACOSX_BUNDLE_ID_BASE
840280849ScyMACOSX_BUNDLE_NAME_BASE
841330106SdelphijCOMPANY_NAME
842330106SdelphijJDK_RC_PLATFORM_NAME
843330106SdelphijPRODUCT_SUFFIX
844330106SdelphijPRODUCT_NAME
845330106SdelphijLAUNCHER_NAME
846358659ScyCOPYRIGHT_YEAR
847330106SdelphijCOMPRESS_JARS
848280849ScyUNLIMITED_CRYPTO
849280849ScyCACERTS_FILE
850280849ScyTEST_IN_BUILD
851280849ScyBUILD_HEADLESS
852132451SrobertoSUPPORT_HEADFUL
853280849ScySUPPORT_HEADLESS
854280849ScyOS_VERSION_MICRO
855280849ScyOS_VERSION_MINOR
856280849ScyOS_VERSION_MAJOR
857132451SrobertoPKG_CONFIG
858330106SdelphijBASH_ARGS
859330106SdelphijSETFILE
860330106SdelphijCODESIGN
861330106SdelphijXATTR
862330106SdelphijDSYMUTIL
863330106SdelphijIS_GNU_TIME
864330106SdelphijPATCH
865330106SdelphijTIME
866330106SdelphijSTAT
867330106SdelphijHG
86854359SrobertoREADELF
869330106SdelphijOTOOL
87054359SrobertoLDD
871280849ScyZIP
872280849ScyUNZIP
873280849ScyFIND_DELETE
874280849ScyOUTPUT_SYNC
875280849ScyOUTPUT_SYNC_SUPPORTED
876330106SdelphijCHECK_TOOLSDIR_MAKE
877330106SdelphijCHECK_TOOLSDIR_GMAKE
878132451SrobertoCHECK_MAKE
879132451SrobertoCHECK_GMAKE
880330106SdelphijMAKE
88154359SrobertoPKGHANDLER
882330106SdelphijCONFIGURESUPPORT_OUTPUTDIR
883330106SdelphijOUTPUT_ROOT
884330106SdelphijCONF_NAME
885330106SdelphijSPEC
886132451SrobertoSDKROOT
887330106SdelphijXCODEBUILD
888330106SdelphijBUILD_VARIANT_RELEASE
889330106SdelphijDEBUG_CLASSFILES
890330106SdelphijFASTDEBUG
891132451SrobertoVARIANT
892358659ScyDEBUG_LEVEL
893358659ScyMACOSX_UNIVERSAL
894358659ScyINCLUDE_SA
895358659ScyJVM_VARIANT_CORE
896280849ScyJVM_VARIANT_ZEROSHARK
897280849ScyJVM_VARIANT_ZERO
898280849ScyJVM_VARIANT_KERNEL
899280849ScyJVM_VARIANT_MINIMAL1
900358659ScyJVM_VARIANT_CLIENT
901132451SrobertoJVM_VARIANT_SERVER
90254359SrobertoJVM_VARIANTS
903330106SdelphijJVM_INTERPRETER
90454359SrobertoJDK_VARIANT
905280849ScySET_OPENJDK
906280849ScyCANONICAL_TOPDIR
907280849ScyORIGINAL_TOPDIR
90854359SrobertoTOPDIR
90954359SrobertoPATH_SEP
91054359SrobertoZERO_ARCHDEF
91154359SrobertoDEFINE_CROSS_COMPILE_ARCH
912330106SdelphijLP64
913330106SdelphijOPENJDK_TARGET_OS_EXPORT_DIR
914330106SdelphijOPENJDK_TARGET_CPU_JLI_CFLAGS
915330106SdelphijOPENJDK_TARGET_CPU_OSARCH
916330106SdelphijOPENJDK_TARGET_CPU_ISADIR
917330106SdelphijOPENJDK_TARGET_CPU_LIBDIR
918330106SdelphijOPENJDK_TARGET_CPU_LEGACY_LIB
91954359SrobertoOPENJDK_TARGET_CPU_LEGACY
92054359SrobertoREQUIRED_OS_VERSION
92154359SrobertoREQUIRED_OS_NAME
92254359SrobertoCOMPILE_TYPE
92354359SrobertoOPENJDK_TARGET_CPU_ENDIAN
92454359SrobertoOPENJDK_TARGET_CPU_BITS
92554359SrobertoOPENJDK_TARGET_CPU_ARCH
92654359SrobertoOPENJDK_TARGET_CPU
92754359SrobertoOPENJDK_TARGET_OS_ENV
92854359SrobertoOPENJDK_TARGET_OS_TYPE
92954359SrobertoOPENJDK_TARGET_OS
93054359SrobertoOPENJDK_BUILD_CPU_ENDIAN
931182007SrobertoOPENJDK_BUILD_CPU_BITS
932182007SrobertoOPENJDK_BUILD_CPU_ARCH
933282408ScyOPENJDK_BUILD_CPU
934282408ScyOPENJDK_BUILD_OS_ENV
935182007SrobertoOPENJDK_BUILD_OS_TYPE
936280849ScyOPENJDK_BUILD_OS
937182007SrobertoOPENJDK_BUILD_AUTOCONF_NAME
938182007SrobertoOPENJDK_TARGET_AUTOCONF_NAME
939282408Scytarget_os
94054359Srobertotarget_vendor
94154359Srobertotarget_cpu
94254359Srobertotarget
94354359Srobertohost_os
94454359Srobertohost_vendor
94554359Srobertohost_cpu
946280849Scyhost
947280849Scybuild_os
948280849Scybuild_vendor
949280849Scybuild_cpu
95054359Srobertobuild
951NICE
952CPIO
953DF
954READLINK
955CYGPATH
956SED
957FGREP
958EGREP
959GREP
960AWK
961XARGS
962WHICH
963WC
964UNIQ
965UNAME
966TR
967TOUCH
968TEE
969TAR
970TAIL
971SORT
972SH
973RMDIR
974RM
975PRINTF
976NAWK
977MV
978MKTEMP
979MKDIR
980LS
981LN
982HEAD
983FIND
984FILE
985EXPR
986ECHO
987DIRNAME
988DIFF
989DATE
990CUT
991CP
992COMM
993CMP
994CHMOD
995CAT
996BASH
997BASENAME
998DATE_WHEN_CONFIGURED
999ORIGINAL_PATH
1000CONFIGURE_COMMAND_LINE
1001target_alias
1002host_alias
1003build_alias
1004LIBS
1005ECHO_T
1006ECHO_N
1007ECHO_C
1008DEFS
1009mandir
1010localedir
1011libdir
1012psdir
1013pdfdir
1014dvidir
1015htmldir
1016infodir
1017docdir
1018oldincludedir
1019includedir
1020localstatedir
1021sharedstatedir
1022sysconfdir
1023datadir
1024datarootdir
1025libexecdir
1026sbindir
1027bindir
1028program_transform_name
1029prefix
1030exec_prefix
1031PACKAGE_URL
1032PACKAGE_BUGREPORT
1033PACKAGE_STRING
1034PACKAGE_VERSION
1035PACKAGE_TARNAME
1036PACKAGE_NAME
1037PATH_SEPARATOR
1038SHELL'
1039ac_subst_files=''
1040ac_user_opts='
1041enable_option_checking
1042with_target_bits
1043enable_openjdk_only
1044with_custom_make_dir
1045with_jdk_variant
1046with_jvm_interpreter
1047with_jvm_variants
1048enable_debug
1049with_debug_level
1050with_devkit
1051with_sys_root
1052with_sysroot
1053with_tools_dir
1054with_toolchain_path
1055with_extra_path
1056with_sdk_name
1057with_conf_name
1058with_output_sync
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063with_copyright_year
1064with_milestone
1065with_update_version
1066with_user_release_suffix
1067with_build_number
1068with_version_string
1069with_version_pre
1070with_version_opt
1071with_version_build
1072with_version_major
1073with_version_minor
1074with_version_security
1075with_version_patch
1076with_boot_jdk
1077with_add_source_root
1078with_override_source_root
1079with_adds_and_overrides
1080with_override_langtools
1081with_override_corba
1082with_override_jaxp
1083with_override_jaxws
1084with_override_hotspot
1085with_override_nashorn
1086with_override_jdk
1087with_import_hotspot
1088with_toolchain_type
1089with_extra_cflags
1090with_extra_cxxflags
1091with_extra_ldflags
1092with_toolchain_version
1093with_build_devkit
1094with_jtreg
1095enable_warnings_as_errors
1096enable_debug_symbols
1097enable_zip_debug_info
1098enable_native_coverage
1099with_stdc__lib
1100with_msvcr_dll
1101with_msvcp_dll
1102with_x
1103with_cups
1104with_cups_include
1105with_freetype
1106with_freetype_include
1107with_freetype_lib
1108with_freetype_src
1109enable_freetype_bundling
1110with_alsa
1111with_alsa_include
1112with_alsa_lib
1113with_libffi
1114with_libffi_include
1115with_libffi_lib
1116with_libjpeg
1117with_giflib
1118with_libpng
1119with_zlib
1120with_lcms
1121with_dxsdk
1122with_dxsdk_lib
1123with_dxsdk_include
1124with_num_cores
1125with_memory_size
1126with_jobs
1127with_boot_jdk_jvmargs
1128with_sjavac_server_java
1129enable_sjavac
1130enable_javac_server
1131enable_precompiled_headers
1132enable_ccache
1133with_ccache_dir
1134'
1135      ac_precious_vars='build_alias
1136host_alias
1137target_alias
1138BASENAME
1139BASH
1140CAT
1141CHMOD
1142CMP
1143COMM
1144CP
1145CUT
1146DATE
1147DIFF
1148DIRNAME
1149ECHO
1150EXPR
1151FILE
1152FIND
1153HEAD
1154LN
1155LS
1156MKDIR
1157MKTEMP
1158MV
1159NAWK
1160PRINTF
1161RM
1162RMDIR
1163SH
1164SORT
1165TAIL
1166TAR
1167TEE
1168TOUCH
1169TR
1170UNAME
1171UNIQ
1172WC
1173WHICH
1174XARGS
1175AWK
1176GREP
1177EGREP
1178FGREP
1179SED
1180CYGPATH
1181READLINK
1182DF
1183CPIO
1184NICE
1185MAKE
1186UNZIP
1187ZIP
1188LDD
1189OTOOL
1190READELF
1191HG
1192STAT
1193TIME
1194PATCH
1195DSYMUTIL
1196XATTR
1197CODESIGN
1198SETFILE
1199PKG_CONFIG
1200JAVA
1201JAVAC
1202JAVAH
1203JAR
1204JARSIGNER
1205CC
1206CFLAGS
1207LDFLAGS
1208LIBS
1209CPPFLAGS
1210CXX
1211CXXFLAGS
1212CCC
1213CPP
1214CXXCPP
1215AS
1216AR
1217LIPO
1218STRIP
1219NM
1220GNM
1221OBJCOPY
1222OBJDUMP
1223BUILD_CC
1224BUILD_CXX
1225JTREGEXE
1226XMKMF
1227FREETYPE_CFLAGS
1228FREETYPE_LIBS
1229ALSA_CFLAGS
1230ALSA_LIBS
1231LIBFFI_CFLAGS
1232LIBFFI_LIBS
1233PNG_CFLAGS
1234PNG_LIBS
1235LCMS_CFLAGS
1236LCMS_LIBS
1237CCACHE'
1238
1239
1240# Initialize some variables set by options.
1241ac_init_help=
1242ac_init_version=false
1243ac_unrecognized_opts=
1244ac_unrecognized_sep=
1245# The variables have the same names as the options, with
1246# dashes changed to underlines.
1247cache_file=/dev/null
1248exec_prefix=NONE
1249no_create=
1250no_recursion=
1251prefix=NONE
1252program_prefix=NONE
1253program_suffix=NONE
1254program_transform_name=s,x,x,
1255silent=
1256site=
1257srcdir=
1258verbose=
1259x_includes=NONE
1260x_libraries=NONE
1261
1262# Installation directory options.
1263# These are left unexpanded so users can "make install exec_prefix=/foo"
1264# and all the variables that are supposed to be based on exec_prefix
1265# by default will actually change.
1266# Use braces instead of parens because sh, perl, etc. also accept them.
1267# (The list follows the same order as the GNU Coding Standards.)
1268bindir='${exec_prefix}/bin'
1269sbindir='${exec_prefix}/sbin'
1270libexecdir='${exec_prefix}/libexec'
1271datarootdir='${prefix}/share'
1272datadir='${datarootdir}'
1273sysconfdir='${prefix}/etc'
1274sharedstatedir='${prefix}/com'
1275localstatedir='${prefix}/var'
1276includedir='${prefix}/include'
1277oldincludedir='/usr/include'
1278docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1279infodir='${datarootdir}/info'
1280htmldir='${docdir}'
1281dvidir='${docdir}'
1282pdfdir='${docdir}'
1283psdir='${docdir}'
1284libdir='${exec_prefix}/lib'
1285localedir='${datarootdir}/locale'
1286mandir='${datarootdir}/man'
1287
1288ac_prev=
1289ac_dashdash=
1290for ac_option
1291do
1292  # If the previous option needs an argument, assign it.
1293  if test -n "$ac_prev"; then
1294    eval $ac_prev=\$ac_option
1295    ac_prev=
1296    continue
1297  fi
1298
1299  case $ac_option in
1300  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1301  *=)   ac_optarg= ;;
1302  *)    ac_optarg=yes ;;
1303  esac
1304
1305  # Accept the important Cygnus configure options, so we can diagnose typos.
1306
1307  case $ac_dashdash$ac_option in
1308  --)
1309    ac_dashdash=yes ;;
1310
1311  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1312    ac_prev=bindir ;;
1313  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1314    bindir=$ac_optarg ;;
1315
1316  -build | --build | --buil | --bui | --bu)
1317    ac_prev=build_alias ;;
1318  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1319    build_alias=$ac_optarg ;;
1320
1321  -cache-file | --cache-file | --cache-fil | --cache-fi \
1322  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1323    ac_prev=cache_file ;;
1324  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1325  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1326    cache_file=$ac_optarg ;;
1327
1328  --config-cache | -C)
1329    cache_file=config.cache ;;
1330
1331  -datadir | --datadir | --datadi | --datad)
1332    ac_prev=datadir ;;
1333  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1334    datadir=$ac_optarg ;;
1335
1336  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1337  | --dataroo | --dataro | --datar)
1338    ac_prev=datarootdir ;;
1339  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1340  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1341    datarootdir=$ac_optarg ;;
1342
1343  -disable-* | --disable-*)
1344    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1345    # Reject names that are not valid shell variable names.
1346    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1347      as_fn_error $? "invalid feature name: $ac_useropt"
1348    ac_useropt_orig=$ac_useropt
1349    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1350    case $ac_user_opts in
1351      *"
1352"enable_$ac_useropt"
1353"*) ;;
1354      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1355	 ac_unrecognized_sep=', ';;
1356    esac
1357    eval enable_$ac_useropt=no ;;
1358
1359  -docdir | --docdir | --docdi | --doc | --do)
1360    ac_prev=docdir ;;
1361  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1362    docdir=$ac_optarg ;;
1363
1364  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1365    ac_prev=dvidir ;;
1366  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1367    dvidir=$ac_optarg ;;
1368
1369  -enable-* | --enable-*)
1370    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1371    # Reject names that are not valid shell variable names.
1372    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1373      as_fn_error $? "invalid feature name: $ac_useropt"
1374    ac_useropt_orig=$ac_useropt
1375    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1376    case $ac_user_opts in
1377      *"
1378"enable_$ac_useropt"
1379"*) ;;
1380      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1381	 ac_unrecognized_sep=', ';;
1382    esac
1383    eval enable_$ac_useropt=\$ac_optarg ;;
1384
1385  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1386  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1387  | --exec | --exe | --ex)
1388    ac_prev=exec_prefix ;;
1389  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1390  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1391  | --exec=* | --exe=* | --ex=*)
1392    exec_prefix=$ac_optarg ;;
1393
1394  -gas | --gas | --ga | --g)
1395    # Obsolete; use --with-gas.
1396    with_gas=yes ;;
1397
1398  -help | --help | --hel | --he | -h)
1399    ac_init_help=long ;;
1400  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1401    ac_init_help=recursive ;;
1402  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1403    ac_init_help=short ;;
1404
1405  -host | --host | --hos | --ho)
1406    ac_prev=host_alias ;;
1407  -host=* | --host=* | --hos=* | --ho=*)
1408    host_alias=$ac_optarg ;;
1409
1410  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1411    ac_prev=htmldir ;;
1412  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1413  | --ht=*)
1414    htmldir=$ac_optarg ;;
1415
1416  -includedir | --includedir | --includedi | --included | --include \
1417  | --includ | --inclu | --incl | --inc)
1418    ac_prev=includedir ;;
1419  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1420  | --includ=* | --inclu=* | --incl=* | --inc=*)
1421    includedir=$ac_optarg ;;
1422
1423  -infodir | --infodir | --infodi | --infod | --info | --inf)
1424    ac_prev=infodir ;;
1425  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1426    infodir=$ac_optarg ;;
1427
1428  -libdir | --libdir | --libdi | --libd)
1429    ac_prev=libdir ;;
1430  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1431    libdir=$ac_optarg ;;
1432
1433  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1434  | --libexe | --libex | --libe)
1435    ac_prev=libexecdir ;;
1436  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1437  | --libexe=* | --libex=* | --libe=*)
1438    libexecdir=$ac_optarg ;;
1439
1440  -localedir | --localedir | --localedi | --localed | --locale)
1441    ac_prev=localedir ;;
1442  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1443    localedir=$ac_optarg ;;
1444
1445  -localstatedir | --localstatedir | --localstatedi | --localstated \
1446  | --localstate | --localstat | --localsta | --localst | --locals)
1447    ac_prev=localstatedir ;;
1448  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1449  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1450    localstatedir=$ac_optarg ;;
1451
1452  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1453    ac_prev=mandir ;;
1454  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1455    mandir=$ac_optarg ;;
1456
1457  -nfp | --nfp | --nf)
1458    # Obsolete; use --without-fp.
1459    with_fp=no ;;
1460
1461  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1462  | --no-cr | --no-c | -n)
1463    no_create=yes ;;
1464
1465  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1466  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1467    no_recursion=yes ;;
1468
1469  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1470  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1471  | --oldin | --oldi | --old | --ol | --o)
1472    ac_prev=oldincludedir ;;
1473  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1474  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1475  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1476    oldincludedir=$ac_optarg ;;
1477
1478  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1479    ac_prev=prefix ;;
1480  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1481    prefix=$ac_optarg ;;
1482
1483  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1484  | --program-pre | --program-pr | --program-p)
1485    ac_prev=program_prefix ;;
1486  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1487  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1488    program_prefix=$ac_optarg ;;
1489
1490  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1491  | --program-suf | --program-su | --program-s)
1492    ac_prev=program_suffix ;;
1493  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1494  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1495    program_suffix=$ac_optarg ;;
1496
1497  -program-transform-name | --program-transform-name \
1498  | --program-transform-nam | --program-transform-na \
1499  | --program-transform-n | --program-transform- \
1500  | --program-transform | --program-transfor \
1501  | --program-transfo | --program-transf \
1502  | --program-trans | --program-tran \
1503  | --progr-tra | --program-tr | --program-t)
1504    ac_prev=program_transform_name ;;
1505  -program-transform-name=* | --program-transform-name=* \
1506  | --program-transform-nam=* | --program-transform-na=* \
1507  | --program-transform-n=* | --program-transform-=* \
1508  | --program-transform=* | --program-transfor=* \
1509  | --program-transfo=* | --program-transf=* \
1510  | --program-trans=* | --program-tran=* \
1511  | --progr-tra=* | --program-tr=* | --program-t=*)
1512    program_transform_name=$ac_optarg ;;
1513
1514  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1515    ac_prev=pdfdir ;;
1516  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1517    pdfdir=$ac_optarg ;;
1518
1519  -psdir | --psdir | --psdi | --psd | --ps)
1520    ac_prev=psdir ;;
1521  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1522    psdir=$ac_optarg ;;
1523
1524  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1525  | -silent | --silent | --silen | --sile | --sil)
1526    silent=yes ;;
1527
1528  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1529    ac_prev=sbindir ;;
1530  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1531  | --sbi=* | --sb=*)
1532    sbindir=$ac_optarg ;;
1533
1534  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1535  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1536  | --sharedst | --shareds | --shared | --share | --shar \
1537  | --sha | --sh)
1538    ac_prev=sharedstatedir ;;
1539  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1540  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1541  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1542  | --sha=* | --sh=*)
1543    sharedstatedir=$ac_optarg ;;
1544
1545  -site | --site | --sit)
1546    ac_prev=site ;;
1547  -site=* | --site=* | --sit=*)
1548    site=$ac_optarg ;;
1549
1550  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1551    ac_prev=srcdir ;;
1552  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1553    srcdir=$ac_optarg ;;
1554
1555  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1556  | --syscon | --sysco | --sysc | --sys | --sy)
1557    ac_prev=sysconfdir ;;
1558  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1559  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1560    sysconfdir=$ac_optarg ;;
1561
1562  -target | --target | --targe | --targ | --tar | --ta | --t)
1563    ac_prev=target_alias ;;
1564  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1565    target_alias=$ac_optarg ;;
1566
1567  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1568    verbose=yes ;;
1569
1570  -version | --version | --versio | --versi | --vers | -V)
1571    ac_init_version=: ;;
1572
1573  -with-* | --with-*)
1574    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1575    # Reject names that are not valid shell variable names.
1576    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1577      as_fn_error $? "invalid package name: $ac_useropt"
1578    ac_useropt_orig=$ac_useropt
1579    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1580    case $ac_user_opts in
1581      *"
1582"with_$ac_useropt"
1583"*) ;;
1584      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1585	 ac_unrecognized_sep=', ';;
1586    esac
1587    eval with_$ac_useropt=\$ac_optarg ;;
1588
1589  -without-* | --without-*)
1590    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1591    # Reject names that are not valid shell variable names.
1592    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1593      as_fn_error $? "invalid package name: $ac_useropt"
1594    ac_useropt_orig=$ac_useropt
1595    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1596    case $ac_user_opts in
1597      *"
1598"with_$ac_useropt"
1599"*) ;;
1600      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1601	 ac_unrecognized_sep=', ';;
1602    esac
1603    eval with_$ac_useropt=no ;;
1604
1605  --x)
1606    # Obsolete; use --with-x.
1607    with_x=yes ;;
1608
1609  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1610  | --x-incl | --x-inc | --x-in | --x-i)
1611    ac_prev=x_includes ;;
1612  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1613  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1614    x_includes=$ac_optarg ;;
1615
1616  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1617  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1618    ac_prev=x_libraries ;;
1619  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1620  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1621    x_libraries=$ac_optarg ;;
1622
1623  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1624Try \`$0 --help' for more information"
1625    ;;
1626
1627  *=*)
1628    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1629    # Reject names that are not valid shell variable names.
1630    case $ac_envvar in #(
1631      '' | [0-9]* | *[!_$as_cr_alnum]* )
1632      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1633    esac
1634    eval $ac_envvar=\$ac_optarg
1635    export $ac_envvar ;;
1636
1637  *)
1638    # FIXME: should be removed in autoconf 3.0.
1639    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1640    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1641      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1642    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1643    ;;
1644
1645  esac
1646done
1647
1648if test -n "$ac_prev"; then
1649  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1650  as_fn_error $? "missing argument to $ac_option"
1651fi
1652
1653if test -n "$ac_unrecognized_opts"; then
1654  case $enable_option_checking in
1655    no) ;;
1656    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1657    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1658  esac
1659fi
1660
1661# Check all directory arguments for consistency.
1662for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1663		datadir sysconfdir sharedstatedir localstatedir includedir \
1664		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1665		libdir localedir mandir
1666do
1667  eval ac_val=\$$ac_var
1668  # Remove trailing slashes.
1669  case $ac_val in
1670    */ )
1671      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1672      eval $ac_var=\$ac_val;;
1673  esac
1674  # Be sure to have absolute directory names.
1675  case $ac_val in
1676    [\\/$]* | ?:[\\/]* )  continue;;
1677    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1678  esac
1679  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1680done
1681
1682# There might be people who depend on the old broken behavior: `$host'
1683# used to hold the argument of --host etc.
1684# FIXME: To remove some day.
1685build=$build_alias
1686host=$host_alias
1687target=$target_alias
1688
1689# FIXME: To remove some day.
1690if test "x$host_alias" != x; then
1691  if test "x$build_alias" = x; then
1692    cross_compiling=maybe
1693  elif test "x$build_alias" != "x$host_alias"; then
1694    cross_compiling=yes
1695  fi
1696fi
1697
1698ac_tool_prefix=
1699test -n "$host_alias" && ac_tool_prefix=$host_alias-
1700
1701test "$silent" = yes && exec 6>/dev/null
1702
1703
1704ac_pwd=`pwd` && test -n "$ac_pwd" &&
1705ac_ls_di=`ls -di .` &&
1706ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1707  as_fn_error $? "working directory cannot be determined"
1708test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1709  as_fn_error $? "pwd does not report name of working directory"
1710
1711
1712# Find the source files, if location was not specified.
1713if test -z "$srcdir"; then
1714  ac_srcdir_defaulted=yes
1715  # Try the directory containing this script, then the parent directory.
1716  ac_confdir=`$as_dirname -- "$as_myself" ||
1717$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1718	 X"$as_myself" : 'X\(//\)[^/]' \| \
1719	 X"$as_myself" : 'X\(//\)$' \| \
1720	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1721$as_echo X"$as_myself" |
1722    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1723	    s//\1/
1724	    q
1725	  }
1726	  /^X\(\/\/\)[^/].*/{
1727	    s//\1/
1728	    q
1729	  }
1730	  /^X\(\/\/\)$/{
1731	    s//\1/
1732	    q
1733	  }
1734	  /^X\(\/\).*/{
1735	    s//\1/
1736	    q
1737	  }
1738	  s/.*/./; q'`
1739  srcdir=$ac_confdir
1740  if test ! -r "$srcdir/$ac_unique_file"; then
1741    srcdir=..
1742  fi
1743else
1744  ac_srcdir_defaulted=no
1745fi
1746if test ! -r "$srcdir/$ac_unique_file"; then
1747  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1748  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1749fi
1750ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1751ac_abs_confdir=`(
1752	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1753	pwd)`
1754# When building in place, set srcdir=.
1755if test "$ac_abs_confdir" = "$ac_pwd"; then
1756  srcdir=.
1757fi
1758# Remove unnecessary trailing slashes from srcdir.
1759# Double slashes in file names in object file debugging info
1760# mess up M-x gdb in Emacs.
1761case $srcdir in
1762*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1763esac
1764for ac_var in $ac_precious_vars; do
1765  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1766  eval ac_env_${ac_var}_value=\$${ac_var}
1767  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1768  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1769done
1770
1771#
1772# Report the --help message.
1773#
1774if test "$ac_init_help" = "long"; then
1775  # Omit some internal or obsolete options to make the list less imposing.
1776  # This message is too long to be a string in the A/UX 3.1 sh.
1777  cat <<_ACEOF
1778\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1779
1780Usage: $0 [OPTION]... [VAR=VALUE]...
1781
1782To assign environment variables (e.g., CC, CFLAGS...), specify them as
1783VAR=VALUE.  See below for descriptions of some of the useful variables.
1784
1785Defaults for the options are specified in brackets.
1786
1787Configuration:
1788  -h, --help              display this help and exit
1789      --help=short        display options specific to this package
1790      --help=recursive    display the short help of all the included packages
1791  -V, --version           display version information and exit
1792  -q, --quiet, --silent   do not print \`checking ...' messages
1793      --cache-file=FILE   cache test results in FILE [disabled]
1794  -C, --config-cache      alias for \`--cache-file=config.cache'
1795  -n, --no-create         do not create output files
1796      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1797
1798Installation directories:
1799  --prefix=PREFIX         install architecture-independent files in PREFIX
1800                          [$ac_default_prefix]
1801  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1802                          [PREFIX]
1803
1804By default, \`make install' will install all the files in
1805\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1806an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1807for instance \`--prefix=\$HOME'.
1808
1809For better control, use the options below.
1810
1811Fine tuning of the installation directories:
1812  --bindir=DIR            user executables [EPREFIX/bin]
1813  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1814  --libexecdir=DIR        program executables [EPREFIX/libexec]
1815  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1816  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1817  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1818  --libdir=DIR            object code libraries [EPREFIX/lib]
1819  --includedir=DIR        C header files [PREFIX/include]
1820  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1821  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1822  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1823  --infodir=DIR           info documentation [DATAROOTDIR/info]
1824  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1825  --mandir=DIR            man documentation [DATAROOTDIR/man]
1826  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1827  --htmldir=DIR           html documentation [DOCDIR]
1828  --dvidir=DIR            dvi documentation [DOCDIR]
1829  --pdfdir=DIR            pdf documentation [DOCDIR]
1830  --psdir=DIR             ps documentation [DOCDIR]
1831_ACEOF
1832
1833  cat <<\_ACEOF
1834
1835X features:
1836  --x-includes=DIR    X include files are in DIR
1837  --x-libraries=DIR   X library files are in DIR
1838
1839System types:
1840  --build=BUILD     configure for building on BUILD [guessed]
1841  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1842  --target=TARGET   configure for building compilers for TARGET [HOST]
1843_ACEOF
1844fi
1845
1846if test -n "$ac_init_help"; then
1847  case $ac_init_help in
1848     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1849   esac
1850  cat <<\_ACEOF
1851
1852Optional Features:
1853  --disable-option-checking  ignore unrecognized --enable/--with options
1854  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1855  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1856  --enable-openjdk-only   suppress building custom source even if present
1857                          [disabled]
1858  --enable-debug          set the debug level to fastdebug (shorthand for
1859                          --with-debug-level=fastdebug) [disabled]
1860  --disable-headful       disable building headful support (graphical UI
1861                          support) [enabled]
1862  --enable-hotspot-test-in-build
1863                          run the Queens test after Hotspot build [disabled]
1864  --enable-unlimited-crypto
1865                          Enable unlimited crypto policy [disabled]
1866  --disable-warnings-as-errors
1867                          do not consider native warnings to be an error
1868                          [enabled]
1869  --disable-debug-symbols disable generation of debug symbols [enabled]
1870  --disable-zip-debug-info
1871                          disable zipping of debug-info files [enabled]
1872  --enable-native-coverage
1873                          enable native compilation with code coverage
1874                          data[disabled]
1875  --disable-freetype-bundling
1876                          disable bundling of the freetype library with the
1877                          build result [enabled on Windows or when using
1878                          --with-freetype, disabled otherwise]
1879  --enable-sjavac         use sjavac to do fast incremental compiles
1880                          [disabled]
1881  --enable-javac-server   use only the server part of sjavac for faster javac
1882                          compiles [disabled]
1883  --disable-precompiled-headers
1884                          disable using precompiled headers when compiling C++
1885                          [enabled]
1886  --enable-ccache         enable using ccache to speed up recompilations
1887                          [disabled]
1888
1889Optional Packages:
1890  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1891  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1892  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1893                          support it), e.g. --with-target-bits=32 [guessed]
1894  --with-custom-make-dir  Deprecated. Option is kept for backwards
1895                          compatibility and is ignored
1896  --with-jdk-variant      JDK variant to build (normal) [normal]
1897  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1898  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1899                          client, minimal1, kernel, zero, zeroshark, core)
1900                          [server]
1901  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1902                          optimized (HotSpot build only)) [release]
1903  --with-devkit           use this devkit for compilers, tools and resources
1904  --with-sys-root         alias for --with-sysroot for backwards compatability
1905  --with-sysroot          use this directory as sysroot
1906  --with-tools-dir        alias for --with-toolchain-path for backwards
1907                          compatibility
1908  --with-toolchain-path   prepend these directories when searching for
1909                          toolchain binaries (compilers etc)
1910  --with-extra-path       prepend these directories to the default path
1911  --with-sdk-name         use the platform SDK of the given name. [macosx]
1912  --with-conf-name        use this as the name of the configuration [generated
1913                          from important configuration options]
1914  --with-output-sync      set make output sync type if supported by make.
1915                          [recurse]
1916  --with-cacerts-file     specify alternative cacerts file
1917  --with-copyright-year   Set copyright year value for build [current year]
1918  --with-milestone        Deprecated. Option is kept for backwards
1919                          compatibility and is ignored
1920  --with-update-version   Deprecated. Option is kept for backwards
1921                          compatibility and is ignored
1922  --with-user-release-suffix
1923                          Deprecated. Option is kept for backwards
1924                          compatibility and is ignored
1925  --with-build-number     Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-version-string   Set version string [calculated]
1928  --with-version-pre      Set the base part of the version 'PRE' field
1929                          (pre-release identifier) ['internal']
1930  --with-version-opt      Set version 'OPT' field (build metadata)
1931                          [<timestamp>.<user>.<dirname>]
1932  --with-version-build    Set version 'BUILD' field (build number) [not
1933                          specified]
1934  --with-version-major    Set version 'MAJOR' field (first number) [current
1935                          source value]
1936  --with-version-minor    Set version 'MINOR' field (second number) [current
1937                          source value]
1938  --with-version-security Set version 'SECURITY' field (third number) [current
1939                          source value]
1940  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1941                          specified]
1942  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1943  --with-add-source-root  Deprecated. Option is kept for backwards
1944                          compatibility and is ignored
1945  --with-override-source-root
1946                          Deprecated. Option is kept for backwards
1947                          compatibility and is ignored
1948  --with-adds-and-overrides
1949                          Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-override-langtools
1952                          Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-override-corba   Deprecated. Option is kept for backwards
1955                          compatibility and is ignored
1956  --with-override-jaxp    Deprecated. Option is kept for backwards
1957                          compatibility and is ignored
1958  --with-override-jaxws   Deprecated. Option is kept for backwards
1959                          compatibility and is ignored
1960  --with-override-hotspot Deprecated. Option is kept for backwards
1961                          compatibility and is ignored
1962  --with-override-nashorn Deprecated. Option is kept for backwards
1963                          compatibility and is ignored
1964  --with-override-jdk     Deprecated. Option is kept for backwards
1965                          compatibility and is ignored
1966  --with-import-hotspot   import hotspot binaries from this jdk image or
1967                          hotspot build dist dir instead of building from
1968                          source
1969  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1970                          to show possible values [platform dependent]
1971  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1972  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1973  --with-extra-ldflags    extra flags to be used when linking jdk
1974  --with-toolchain-version
1975                          the version of the toolchain to look for, use
1976                          '--help' to show possible values [platform
1977                          dependent]
1978  --with-build-devkit     Devkit to use for the build platform toolchain
1979  --with-jtreg            Regression Test Harness [probed]
1980  --with-stdc++lib=<static>,<dynamic>,<default>
1981                          force linking of the C++ runtime on Linux to either
1982                          static or dynamic, default is static with dynamic as
1983                          fallback
1984  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1985                          (Windows only) [probed]
1986  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1987                          (Windows only) [probed]
1988  --with-x                use the X Window System
1989  --with-cups             specify prefix directory for the cups package
1990                          (expecting the headers under PATH/include)
1991  --with-cups-include     specify directory for the cups include files
1992  --with-freetype         specify prefix directory for the freetype package
1993                          (expecting the libraries under PATH/lib and the
1994                          headers under PATH/include)
1995  --with-freetype-include specify directory for the freetype include files
1996  --with-freetype-lib     specify directory for the freetype library
1997  --with-freetype-src     specify directory with freetype sources to
1998                          automatically build the library (experimental,
1999                          Windows-only)
2000  --with-alsa             specify prefix directory for the alsa package
2001                          (expecting the libraries under PATH/lib and the
2002                          headers under PATH/include)
2003  --with-alsa-include     specify directory for the alsa include files
2004  --with-alsa-lib         specify directory for the alsa library
2005  --with-libffi           specify prefix directory for the libffi package
2006                          (expecting the libraries under PATH/lib and the
2007                          headers under PATH/include)
2008  --with-libffi-include   specify directory for the libffi include files
2009  --with-libffi-lib       specify directory for the libffi library
2010  --with-libjpeg          use libjpeg from build system or OpenJDK source
2011                          (system, bundled) [bundled]
2012  --with-giflib           use giflib from build system or OpenJDK source
2013                          (system, bundled) [bundled]
2014  --with-libpng           use libpng from build system or OpenJDK source
2015                          (system, bundled) [bundled]
2016  --with-zlib             use zlib from build system or OpenJDK source
2017                          (system, bundled) [bundled]
2018  --with-lcms             use lcms2 from build system or OpenJDK source
2019                          (system, bundled) [bundled]
2020  --with-dxsdk            Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-dxsdk-include    Deprecated. Option is kept for backwards
2025                          compatibility and is ignored
2026  --with-num-cores        number of cores in the build system, e.g.
2027                          --with-num-cores=8 [probed]
2028  --with-memory-size      memory (in MB) available in the build system, e.g.
2029                          --with-memory-size=1024 [probed]
2030  --with-jobs             number of parallel jobs to let make run [calculated
2031                          based on cores and memory]
2032  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2033                          invocations of boot JDK, overriding the default
2034                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2035                          -enableassertions"
2036  --with-sjavac-server-java
2037                          use this java binary for running the sjavac
2038                          background server [Boot JDK java]
2039  --with-ccache-dir       where to store ccache files [~/.ccache]
2040
2041Some influential environment variables:
2042  BASENAME    Override default value for BASENAME
2043  BASH        Override default value for BASH
2044  CAT         Override default value for CAT
2045  CHMOD       Override default value for CHMOD
2046  CMP         Override default value for CMP
2047  COMM        Override default value for COMM
2048  CP          Override default value for CP
2049  CUT         Override default value for CUT
2050  DATE        Override default value for DATE
2051  DIFF        Override default value for DIFF
2052  DIRNAME     Override default value for DIRNAME
2053  ECHO        Override default value for ECHO
2054  EXPR        Override default value for EXPR
2055  FILE        Override default value for FILE
2056  FIND        Override default value for FIND
2057  HEAD        Override default value for HEAD
2058  LN          Override default value for LN
2059  LS          Override default value for LS
2060  MKDIR       Override default value for MKDIR
2061  MKTEMP      Override default value for MKTEMP
2062  MV          Override default value for MV
2063  NAWK        Override default value for NAWK
2064  PRINTF      Override default value for PRINTF
2065  RM          Override default value for RM
2066  RMDIR       Override default value for RMDIR
2067  SH          Override default value for SH
2068  SORT        Override default value for SORT
2069  TAIL        Override default value for TAIL
2070  TAR         Override default value for TAR
2071  TEE         Override default value for TEE
2072  TOUCH       Override default value for TOUCH
2073  TR          Override default value for TR
2074  UNAME       Override default value for UNAME
2075  UNIQ        Override default value for UNIQ
2076  WC          Override default value for WC
2077  WHICH       Override default value for WHICH
2078  XARGS       Override default value for XARGS
2079  AWK         Override default value for AWK
2080  GREP        Override default value for GREP
2081  EGREP       Override default value for EGREP
2082  FGREP       Override default value for FGREP
2083  SED         Override default value for SED
2084  CYGPATH     Override default value for CYGPATH
2085  READLINK    Override default value for READLINK
2086  DF          Override default value for DF
2087  CPIO        Override default value for CPIO
2088  NICE        Override default value for NICE
2089  MAKE        Override default value for MAKE
2090  UNZIP       Override default value for UNZIP
2091  ZIP         Override default value for ZIP
2092  LDD         Override default value for LDD
2093  OTOOL       Override default value for OTOOL
2094  READELF     Override default value for READELF
2095  HG          Override default value for HG
2096  STAT        Override default value for STAT
2097  TIME        Override default value for TIME
2098  PATCH       Override default value for PATCH
2099  DSYMUTIL    Override default value for DSYMUTIL
2100  XATTR       Override default value for XATTR
2101  CODESIGN    Override default value for CODESIGN
2102  SETFILE     Override default value for SETFILE
2103  PKG_CONFIG  path to pkg-config utility
2104  JAVA        Override default value for JAVA
2105  JAVAC       Override default value for JAVAC
2106  JAVAH       Override default value for JAVAH
2107  JAR         Override default value for JAR
2108  JARSIGNER   Override default value for JARSIGNER
2109  CC          C compiler command
2110  CFLAGS      C compiler flags
2111  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2112              nonstandard directory <lib dir>
2113  LIBS        libraries to pass to the linker, e.g. -l<library>
2114  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2115              you have headers in a nonstandard directory <include dir>
2116  CXX         C++ compiler command
2117  CXXFLAGS    C++ compiler flags
2118  CPP         C preprocessor
2119  CXXCPP      C++ preprocessor
2120  AS          Override default value for AS
2121  AR          Override default value for AR
2122  LIPO        Override default value for LIPO
2123  STRIP       Override default value for STRIP
2124  NM          Override default value for NM
2125  GNM         Override default value for GNM
2126  OBJCOPY     Override default value for OBJCOPY
2127  OBJDUMP     Override default value for OBJDUMP
2128  BUILD_CC    Override default value for BUILD_CC
2129  BUILD_CXX   Override default value for BUILD_CXX
2130  JTREGEXE    Override default value for JTREGEXE
2131  XMKMF       Path to xmkmf, Makefile generator for X Window System
2132  FREETYPE_CFLAGS
2133              C compiler flags for FREETYPE, overriding pkg-config
2134  FREETYPE_LIBS
2135              linker flags for FREETYPE, overriding pkg-config
2136  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2137  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2138  LIBFFI_CFLAGS
2139              C compiler flags for LIBFFI, overriding pkg-config
2140  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2141  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2142  PNG_LIBS    linker flags for PNG, overriding pkg-config
2143  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2144  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2145  CCACHE      Override default value for CCACHE
2146
2147Use these variables to override the choices made by `configure' or to help
2148it to find libraries and programs with nonstandard names/locations.
2149
2150Report bugs to <build-dev@openjdk.java.net>.
2151OpenJDK home page: <http://openjdk.java.net>.
2152_ACEOF
2153ac_status=$?
2154fi
2155
2156if test "$ac_init_help" = "recursive"; then
2157  # If there are subdirs, report their specific --help.
2158  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2159    test -d "$ac_dir" ||
2160      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2161      continue
2162    ac_builddir=.
2163
2164case "$ac_dir" in
2165.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2166*)
2167  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2168  # A ".." for each directory in $ac_dir_suffix.
2169  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2170  case $ac_top_builddir_sub in
2171  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2172  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2173  esac ;;
2174esac
2175ac_abs_top_builddir=$ac_pwd
2176ac_abs_builddir=$ac_pwd$ac_dir_suffix
2177# for backward compatibility:
2178ac_top_builddir=$ac_top_build_prefix
2179
2180case $srcdir in
2181  .)  # We are building in place.
2182    ac_srcdir=.
2183    ac_top_srcdir=$ac_top_builddir_sub
2184    ac_abs_top_srcdir=$ac_pwd ;;
2185  [\\/]* | ?:[\\/]* )  # Absolute name.
2186    ac_srcdir=$srcdir$ac_dir_suffix;
2187    ac_top_srcdir=$srcdir
2188    ac_abs_top_srcdir=$srcdir ;;
2189  *) # Relative name.
2190    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2191    ac_top_srcdir=$ac_top_build_prefix$srcdir
2192    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2193esac
2194ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2195
2196    cd "$ac_dir" || { ac_status=$?; continue; }
2197    # Check for guested configure.
2198    if test -f "$ac_srcdir/configure.gnu"; then
2199      echo &&
2200      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2201    elif test -f "$ac_srcdir/configure"; then
2202      echo &&
2203      $SHELL "$ac_srcdir/configure" --help=recursive
2204    else
2205      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2206    fi || ac_status=$?
2207    cd "$ac_pwd" || { ac_status=$?; break; }
2208  done
2209fi
2210
2211test -n "$ac_init_help" && exit $ac_status
2212if $ac_init_version; then
2213  cat <<\_ACEOF
2214OpenJDK configure jdk9
2215generated by GNU Autoconf 2.69
2216
2217Copyright (C) 2012 Free Software Foundation, Inc.
2218This configure script is free software; the Free Software Foundation
2219gives unlimited permission to copy, distribute and modify it.
2220_ACEOF
2221  exit
2222fi
2223
2224## ------------------------ ##
2225## Autoconf initialization. ##
2226## ------------------------ ##
2227
2228# ac_fn_c_try_compile LINENO
2229# --------------------------
2230# Try to compile conftest.$ac_ext, and return whether this succeeded.
2231ac_fn_c_try_compile ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  rm -f conftest.$ac_objext
2235  if { { ac_try="$ac_compile"
2236case "(($ac_try" in
2237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238  *) ac_try_echo=$ac_try;;
2239esac
2240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2241$as_echo "$ac_try_echo"; } >&5
2242  (eval "$ac_compile") 2>conftest.err
2243  ac_status=$?
2244  if test -s conftest.err; then
2245    grep -v '^ *+' conftest.err >conftest.er1
2246    cat conftest.er1 >&5
2247    mv -f conftest.er1 conftest.err
2248  fi
2249  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2250  test $ac_status = 0; } && {
2251	 test -z "$ac_c_werror_flag" ||
2252	 test ! -s conftest.err
2253       } && test -s conftest.$ac_objext; then :
2254  ac_retval=0
2255else
2256  $as_echo "$as_me: failed program was:" >&5
2257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259	ac_retval=1
2260fi
2261  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262  as_fn_set_status $ac_retval
2263
2264} # ac_fn_c_try_compile
2265
2266# ac_fn_cxx_try_compile LINENO
2267# ----------------------------
2268# Try to compile conftest.$ac_ext, and return whether this succeeded.
2269ac_fn_cxx_try_compile ()
2270{
2271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272  rm -f conftest.$ac_objext
2273  if { { ac_try="$ac_compile"
2274case "(($ac_try" in
2275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276  *) ac_try_echo=$ac_try;;
2277esac
2278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279$as_echo "$ac_try_echo"; } >&5
2280  (eval "$ac_compile") 2>conftest.err
2281  ac_status=$?
2282  if test -s conftest.err; then
2283    grep -v '^ *+' conftest.err >conftest.er1
2284    cat conftest.er1 >&5
2285    mv -f conftest.er1 conftest.err
2286  fi
2287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2288  test $ac_status = 0; } && {
2289	 test -z "$ac_cxx_werror_flag" ||
2290	 test ! -s conftest.err
2291       } && test -s conftest.$ac_objext; then :
2292  ac_retval=0
2293else
2294  $as_echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297	ac_retval=1
2298fi
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300  as_fn_set_status $ac_retval
2301
2302} # ac_fn_cxx_try_compile
2303
2304# ac_fn_c_try_cpp LINENO
2305# ----------------------
2306# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2307ac_fn_c_try_cpp ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if { { ac_try="$ac_cpp conftest.$ac_ext"
2311case "(($ac_try" in
2312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313  *) ac_try_echo=$ac_try;;
2314esac
2315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316$as_echo "$ac_try_echo"; } >&5
2317  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2318  ac_status=$?
2319  if test -s conftest.err; then
2320    grep -v '^ *+' conftest.err >conftest.er1
2321    cat conftest.er1 >&5
2322    mv -f conftest.er1 conftest.err
2323  fi
2324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325  test $ac_status = 0; } > conftest.i && {
2326	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2327	 test ! -s conftest.err
2328       }; then :
2329  ac_retval=0
2330else
2331  $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334    ac_retval=1
2335fi
2336  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337  as_fn_set_status $ac_retval
2338
2339} # ac_fn_c_try_cpp
2340
2341# ac_fn_cxx_try_cpp LINENO
2342# ------------------------
2343# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2344ac_fn_cxx_try_cpp ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  if { { ac_try="$ac_cpp conftest.$ac_ext"
2348case "(($ac_try" in
2349  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2350  *) ac_try_echo=$ac_try;;
2351esac
2352eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2353$as_echo "$ac_try_echo"; } >&5
2354  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2355  ac_status=$?
2356  if test -s conftest.err; then
2357    grep -v '^ *+' conftest.err >conftest.er1
2358    cat conftest.er1 >&5
2359    mv -f conftest.er1 conftest.err
2360  fi
2361  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2362  test $ac_status = 0; } > conftest.i && {
2363	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2364	 test ! -s conftest.err
2365       }; then :
2366  ac_retval=0
2367else
2368  $as_echo "$as_me: failed program was:" >&5
2369sed 's/^/| /' conftest.$ac_ext >&5
2370
2371    ac_retval=1
2372fi
2373  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2374  as_fn_set_status $ac_retval
2375
2376} # ac_fn_cxx_try_cpp
2377
2378# ac_fn_c_try_link LINENO
2379# -----------------------
2380# Try to link conftest.$ac_ext, and return whether this succeeded.
2381ac_fn_c_try_link ()
2382{
2383  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384  rm -f conftest.$ac_objext conftest$ac_exeext
2385  if { { ac_try="$ac_link"
2386case "(($ac_try" in
2387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388  *) ac_try_echo=$ac_try;;
2389esac
2390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391$as_echo "$ac_try_echo"; } >&5
2392  (eval "$ac_link") 2>conftest.err
2393  ac_status=$?
2394  if test -s conftest.err; then
2395    grep -v '^ *+' conftest.err >conftest.er1
2396    cat conftest.er1 >&5
2397    mv -f conftest.er1 conftest.err
2398  fi
2399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400  test $ac_status = 0; } && {
2401	 test -z "$ac_c_werror_flag" ||
2402	 test ! -s conftest.err
2403       } && test -s conftest$ac_exeext && {
2404	 test "$cross_compiling" = yes ||
2405	 test -x conftest$ac_exeext
2406       }; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: failed program was:" >&5
2410sed 's/^/| /' conftest.$ac_ext >&5
2411
2412	ac_retval=1
2413fi
2414  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2415  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2416  # interfere with the next link command; also delete a directory that is
2417  # left behind by Apple's compiler.  We do this before executing the actions.
2418  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_c_try_link
2423
2424# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2425# ---------------------------------------------------------
2426# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2427# the include files in INCLUDES and setting the cache variable VAR
2428# accordingly.
2429ac_fn_cxx_check_header_mongrel ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  if eval \${$3+:} false; then :
2433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2434$as_echo_n "checking for $2... " >&6; }
2435if eval \${$3+:} false; then :
2436  $as_echo_n "(cached) " >&6
2437fi
2438eval ac_res=\$$3
2439	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2440$as_echo "$ac_res" >&6; }
2441else
2442  # Is the header compilable?
2443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2444$as_echo_n "checking $2 usability... " >&6; }
2445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446/* end confdefs.h.  */
2447$4
2448#include <$2>
2449_ACEOF
2450if ac_fn_cxx_try_compile "$LINENO"; then :
2451  ac_header_compiler=yes
2452else
2453  ac_header_compiler=no
2454fi
2455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2457$as_echo "$ac_header_compiler" >&6; }
2458
2459# Is the header present?
2460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2461$as_echo_n "checking $2 presence... " >&6; }
2462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464#include <$2>
2465_ACEOF
2466if ac_fn_cxx_try_cpp "$LINENO"; then :
2467  ac_header_preproc=yes
2468else
2469  ac_header_preproc=no
2470fi
2471rm -f conftest.err conftest.i conftest.$ac_ext
2472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2473$as_echo "$ac_header_preproc" >&6; }
2474
2475# So?  What about this header?
2476case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2477  yes:no: )
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2479$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2481$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2482    ;;
2483  no:yes:* )
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2485$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2487$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2489$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2491$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2493$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2494( $as_echo "## ----------------------------------------- ##
2495## Report this to build-dev@openjdk.java.net ##
2496## ----------------------------------------- ##"
2497     ) | sed "s/^/$as_me: WARNING:     /" >&2
2498    ;;
2499esac
2500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2501$as_echo_n "checking for $2... " >&6; }
2502if eval \${$3+:} false; then :
2503  $as_echo_n "(cached) " >&6
2504else
2505  eval "$3=\$ac_header_compiler"
2506fi
2507eval ac_res=\$$3
2508	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2509$as_echo "$ac_res" >&6; }
2510fi
2511  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2512
2513} # ac_fn_cxx_check_header_mongrel
2514
2515# ac_fn_cxx_try_run LINENO
2516# ------------------------
2517# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2518# that executables *can* be run.
2519ac_fn_cxx_try_run ()
2520{
2521  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2522  if { { ac_try="$ac_link"
2523case "(($ac_try" in
2524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2525  *) ac_try_echo=$ac_try;;
2526esac
2527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2528$as_echo "$ac_try_echo"; } >&5
2529  (eval "$ac_link") 2>&5
2530  ac_status=$?
2531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2532  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2533  { { case "(($ac_try" in
2534  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535  *) ac_try_echo=$ac_try;;
2536esac
2537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538$as_echo "$ac_try_echo"; } >&5
2539  (eval "$ac_try") 2>&5
2540  ac_status=$?
2541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2542  test $ac_status = 0; }; }; then :
2543  ac_retval=0
2544else
2545  $as_echo "$as_me: program exited with status $ac_status" >&5
2546       $as_echo "$as_me: failed program was:" >&5
2547sed 's/^/| /' conftest.$ac_ext >&5
2548
2549       ac_retval=$ac_status
2550fi
2551  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2552  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2553  as_fn_set_status $ac_retval
2554
2555} # ac_fn_cxx_try_run
2556
2557# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2558# ---------------------------------------------------------
2559# Tests whether HEADER exists and can be compiled using the include files in
2560# INCLUDES, setting the cache variable VAR accordingly.
2561ac_fn_cxx_check_header_compile ()
2562{
2563  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2565$as_echo_n "checking for $2... " >&6; }
2566if eval \${$3+:} false; then :
2567  $as_echo_n "(cached) " >&6
2568else
2569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572#include <$2>
2573_ACEOF
2574if ac_fn_cxx_try_compile "$LINENO"; then :
2575  eval "$3=yes"
2576else
2577  eval "$3=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_header_compile
2587
2588# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2589# ----------------------------------------------
2590# Tries to find the compile-time value of EXPR in a program that includes
2591# INCLUDES, setting VAR accordingly. Returns whether the value could be
2592# computed
2593ac_fn_cxx_compute_int ()
2594{
2595  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2596  if test "$cross_compiling" = yes; then
2597    # Depending upon the size, compute the lo and hi bounds.
2598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599/* end confdefs.h.  */
2600$4
2601int
2602main ()
2603{
2604static int test_array [1 - 2 * !(($2) >= 0)];
2605test_array [0] = 0;
2606return test_array [0];
2607
2608  ;
2609  return 0;
2610}
2611_ACEOF
2612if ac_fn_cxx_try_compile "$LINENO"; then :
2613  ac_lo=0 ac_mid=0
2614  while :; do
2615    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616/* end confdefs.h.  */
2617$4
2618int
2619main ()
2620{
2621static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2622test_array [0] = 0;
2623return test_array [0];
2624
2625  ;
2626  return 0;
2627}
2628_ACEOF
2629if ac_fn_cxx_try_compile "$LINENO"; then :
2630  ac_hi=$ac_mid; break
2631else
2632  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2633			if test $ac_lo -le $ac_mid; then
2634			  ac_lo= ac_hi=
2635			  break
2636			fi
2637			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2638fi
2639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2640  done
2641else
2642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) < 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_hi=-1 ac_mid=-1
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_lo=$ac_mid; break
2675else
2676  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2677			if test $ac_mid -le $ac_hi; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  ac_lo= ac_hi=
2687fi
2688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689fi
2690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2691# Binary search between lo and hi bounds.
2692while test "x$ac_lo" != "x$ac_hi"; do
2693  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695/* end confdefs.h.  */
2696$4
2697int
2698main ()
2699{
2700static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2701test_array [0] = 0;
2702return test_array [0];
2703
2704  ;
2705  return 0;
2706}
2707_ACEOF
2708if ac_fn_cxx_try_compile "$LINENO"; then :
2709  ac_hi=$ac_mid
2710else
2711  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2712fi
2713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2714done
2715case $ac_lo in #((
2716?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2717'') ac_retval=1 ;;
2718esac
2719  else
2720    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2721/* end confdefs.h.  */
2722$4
2723static long int longval () { return $2; }
2724static unsigned long int ulongval () { return $2; }
2725#include <stdio.h>
2726#include <stdlib.h>
2727int
2728main ()
2729{
2730
2731  FILE *f = fopen ("conftest.val", "w");
2732  if (! f)
2733    return 1;
2734  if (($2) < 0)
2735    {
2736      long int i = longval ();
2737      if (i != ($2))
2738	return 1;
2739      fprintf (f, "%ld", i);
2740    }
2741  else
2742    {
2743      unsigned long int i = ulongval ();
2744      if (i != ($2))
2745	return 1;
2746      fprintf (f, "%lu", i);
2747    }
2748  /* Do not output a trailing newline, as this causes \r\n confusion
2749     on some platforms.  */
2750  return ferror (f) || fclose (f) != 0;
2751
2752  ;
2753  return 0;
2754}
2755_ACEOF
2756if ac_fn_cxx_try_run "$LINENO"; then :
2757  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2758else
2759  ac_retval=1
2760fi
2761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2762  conftest.$ac_objext conftest.beam conftest.$ac_ext
2763rm -f conftest.val
2764
2765  fi
2766  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767  as_fn_set_status $ac_retval
2768
2769} # ac_fn_cxx_compute_int
2770
2771# ac_fn_cxx_try_link LINENO
2772# -------------------------
2773# Try to link conftest.$ac_ext, and return whether this succeeded.
2774ac_fn_cxx_try_link ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  rm -f conftest.$ac_objext conftest$ac_exeext
2778  if { { ac_try="$ac_link"
2779case "(($ac_try" in
2780  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2781  *) ac_try_echo=$ac_try;;
2782esac
2783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2784$as_echo "$ac_try_echo"; } >&5
2785  (eval "$ac_link") 2>conftest.err
2786  ac_status=$?
2787  if test -s conftest.err; then
2788    grep -v '^ *+' conftest.err >conftest.er1
2789    cat conftest.er1 >&5
2790    mv -f conftest.er1 conftest.err
2791  fi
2792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2793  test $ac_status = 0; } && {
2794	 test -z "$ac_cxx_werror_flag" ||
2795	 test ! -s conftest.err
2796       } && test -s conftest$ac_exeext && {
2797	 test "$cross_compiling" = yes ||
2798	 test -x conftest$ac_exeext
2799       }; then :
2800  ac_retval=0
2801else
2802  $as_echo "$as_me: failed program was:" >&5
2803sed 's/^/| /' conftest.$ac_ext >&5
2804
2805	ac_retval=1
2806fi
2807  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2808  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2809  # interfere with the next link command; also delete a directory that is
2810  # left behind by Apple's compiler.  We do this before executing the actions.
2811  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2812  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2813  as_fn_set_status $ac_retval
2814
2815} # ac_fn_cxx_try_link
2816
2817# ac_fn_cxx_check_func LINENO FUNC VAR
2818# ------------------------------------
2819# Tests whether FUNC exists, setting the cache variable VAR accordingly
2820ac_fn_cxx_check_func ()
2821{
2822  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2824$as_echo_n "checking for $2... " >&6; }
2825if eval \${$3+:} false; then :
2826  $as_echo_n "(cached) " >&6
2827else
2828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829/* end confdefs.h.  */
2830/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2831   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2832#define $2 innocuous_$2
2833
2834/* System header to define __stub macros and hopefully few prototypes,
2835    which can conflict with char $2 (); below.
2836    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2837    <limits.h> exists even on freestanding compilers.  */
2838
2839#ifdef __STDC__
2840# include <limits.h>
2841#else
2842# include <assert.h>
2843#endif
2844
2845#undef $2
2846
2847/* Override any GCC internal prototype to avoid an error.
2848   Use char because int might match the return type of a GCC
2849   builtin and then its argument prototype would still apply.  */
2850#ifdef __cplusplus
2851extern "C"
2852#endif
2853char $2 ();
2854/* The GNU C library defines this for functions which it implements
2855    to always fail with ENOSYS.  Some functions are actually named
2856    something starting with __ and the normal name is an alias.  */
2857#if defined __stub_$2 || defined __stub___$2
2858choke me
2859#endif
2860
2861int
2862main ()
2863{
2864return $2 ();
2865  ;
2866  return 0;
2867}
2868_ACEOF
2869if ac_fn_cxx_try_link "$LINENO"; then :
2870  eval "$3=yes"
2871else
2872  eval "$3=no"
2873fi
2874rm -f core conftest.err conftest.$ac_objext \
2875    conftest$ac_exeext conftest.$ac_ext
2876fi
2877eval ac_res=\$$3
2878	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2879$as_echo "$ac_res" >&6; }
2880  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2881
2882} # ac_fn_cxx_check_func
2883
2884# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2885# -------------------------------------------------------
2886# Tests whether HEADER exists and can be compiled using the include files in
2887# INCLUDES, setting the cache variable VAR accordingly.
2888ac_fn_c_check_header_compile ()
2889{
2890  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2892$as_echo_n "checking for $2... " >&6; }
2893if eval \${$3+:} false; then :
2894  $as_echo_n "(cached) " >&6
2895else
2896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2897/* end confdefs.h.  */
2898$4
2899#include <$2>
2900_ACEOF
2901if ac_fn_c_try_compile "$LINENO"; then :
2902  eval "$3=yes"
2903else
2904  eval "$3=no"
2905fi
2906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907fi
2908eval ac_res=\$$3
2909	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2910$as_echo "$ac_res" >&6; }
2911  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2912
2913} # ac_fn_c_check_header_compile
2914cat >config.log <<_ACEOF
2915This file contains any messages produced by compilers while
2916running configure, to aid debugging if configure makes a mistake.
2917
2918It was created by OpenJDK $as_me jdk9, which was
2919generated by GNU Autoconf 2.69.  Invocation command line was
2920
2921  $ $0 $@
2922
2923_ACEOF
2924exec 5>>config.log
2925{
2926cat <<_ASUNAME
2927## --------- ##
2928## Platform. ##
2929## --------- ##
2930
2931hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2932uname -m = `(uname -m) 2>/dev/null || echo unknown`
2933uname -r = `(uname -r) 2>/dev/null || echo unknown`
2934uname -s = `(uname -s) 2>/dev/null || echo unknown`
2935uname -v = `(uname -v) 2>/dev/null || echo unknown`
2936
2937/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2938/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2939
2940/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2941/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2942/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2943/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2944/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2945/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2946/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2947
2948_ASUNAME
2949
2950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951for as_dir in $PATH
2952do
2953  IFS=$as_save_IFS
2954  test -z "$as_dir" && as_dir=.
2955    $as_echo "PATH: $as_dir"
2956  done
2957IFS=$as_save_IFS
2958
2959} >&5
2960
2961cat >&5 <<_ACEOF
2962
2963
2964## ----------- ##
2965## Core tests. ##
2966## ----------- ##
2967
2968_ACEOF
2969
2970
2971# Keep a trace of the command line.
2972# Strip out --no-create and --no-recursion so they do not pile up.
2973# Strip out --silent because we don't want to record it for future runs.
2974# Also quote any args containing shell meta-characters.
2975# Make two passes to allow for proper duplicate-argument suppression.
2976ac_configure_args=
2977ac_configure_args0=
2978ac_configure_args1=
2979ac_must_keep_next=false
2980for ac_pass in 1 2
2981do
2982  for ac_arg
2983  do
2984    case $ac_arg in
2985    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2986    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2987    | -silent | --silent | --silen | --sile | --sil)
2988      continue ;;
2989    *\'*)
2990      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2991    esac
2992    case $ac_pass in
2993    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2994    2)
2995      as_fn_append ac_configure_args1 " '$ac_arg'"
2996      if test $ac_must_keep_next = true; then
2997	ac_must_keep_next=false # Got value, back to normal.
2998      else
2999	case $ac_arg in
3000	  *=* | --config-cache | -C | -disable-* | --disable-* \
3001	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3002	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3003	  | -with-* | --with-* | -without-* | --without-* | --x)
3004	    case "$ac_configure_args0 " in
3005	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3006	    esac
3007	    ;;
3008	  -* ) ac_must_keep_next=true ;;
3009	esac
3010      fi
3011      as_fn_append ac_configure_args " '$ac_arg'"
3012      ;;
3013    esac
3014  done
3015done
3016{ ac_configure_args0=; unset ac_configure_args0;}
3017{ ac_configure_args1=; unset ac_configure_args1;}
3018
3019# When interrupted or exit'd, cleanup temporary files, and complete
3020# config.log.  We remove comments because anyway the quotes in there
3021# would cause problems or look ugly.
3022# WARNING: Use '\'' to represent an apostrophe within the trap.
3023# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3024trap 'exit_status=$?
3025  # Save into config.log some information that might help in debugging.
3026  {
3027    echo
3028
3029    $as_echo "## ---------------- ##
3030## Cache variables. ##
3031## ---------------- ##"
3032    echo
3033    # The following way of writing the cache mishandles newlines in values,
3034(
3035  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3036    eval ac_val=\$$ac_var
3037    case $ac_val in #(
3038    *${as_nl}*)
3039      case $ac_var in #(
3040      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3041$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3042      esac
3043      case $ac_var in #(
3044      _ | IFS | as_nl) ;; #(
3045      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3046      *) { eval $ac_var=; unset $ac_var;} ;;
3047      esac ;;
3048    esac
3049  done
3050  (set) 2>&1 |
3051    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3052    *${as_nl}ac_space=\ *)
3053      sed -n \
3054	"s/'\''/'\''\\\\'\'''\''/g;
3055	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3056      ;; #(
3057    *)
3058      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3059      ;;
3060    esac |
3061    sort
3062)
3063    echo
3064
3065    $as_echo "## ----------------- ##
3066## Output variables. ##
3067## ----------------- ##"
3068    echo
3069    for ac_var in $ac_subst_vars
3070    do
3071      eval ac_val=\$$ac_var
3072      case $ac_val in
3073      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3074      esac
3075      $as_echo "$ac_var='\''$ac_val'\''"
3076    done | sort
3077    echo
3078
3079    if test -n "$ac_subst_files"; then
3080      $as_echo "## ------------------- ##
3081## File substitutions. ##
3082## ------------------- ##"
3083      echo
3084      for ac_var in $ac_subst_files
3085      do
3086	eval ac_val=\$$ac_var
3087	case $ac_val in
3088	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3089	esac
3090	$as_echo "$ac_var='\''$ac_val'\''"
3091      done | sort
3092      echo
3093    fi
3094
3095    if test -s confdefs.h; then
3096      $as_echo "## ----------- ##
3097## confdefs.h. ##
3098## ----------- ##"
3099      echo
3100      cat confdefs.h
3101      echo
3102    fi
3103    test "$ac_signal" != 0 &&
3104      $as_echo "$as_me: caught signal $ac_signal"
3105    $as_echo "$as_me: exit $exit_status"
3106  } >&5
3107  rm -f core *.core core.conftest.* &&
3108    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3109    exit $exit_status
3110' 0
3111for ac_signal in 1 2 13 15; do
3112  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3113done
3114ac_signal=0
3115
3116# confdefs.h avoids OS command line length limits that DEFS can exceed.
3117rm -f -r conftest* confdefs.h
3118
3119$as_echo "/* confdefs.h */" > confdefs.h
3120
3121# Predefined preprocessor variables.
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_NAME "$PACKAGE_NAME"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_VERSION "$PACKAGE_VERSION"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_STRING "$PACKAGE_STRING"
3137_ACEOF
3138
3139cat >>confdefs.h <<_ACEOF
3140#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3141_ACEOF
3142
3143cat >>confdefs.h <<_ACEOF
3144#define PACKAGE_URL "$PACKAGE_URL"
3145_ACEOF
3146
3147
3148# Let the site file select an alternate cache file if it wants to.
3149# Prefer an explicitly selected file to automatically selected ones.
3150ac_site_file1=NONE
3151ac_site_file2=NONE
3152if test -n "$CONFIG_SITE"; then
3153  # We do not want a PATH search for config.site.
3154  case $CONFIG_SITE in #((
3155    -*)  ac_site_file1=./$CONFIG_SITE;;
3156    */*) ac_site_file1=$CONFIG_SITE;;
3157    *)   ac_site_file1=./$CONFIG_SITE;;
3158  esac
3159elif test "x$prefix" != xNONE; then
3160  ac_site_file1=$prefix/share/config.site
3161  ac_site_file2=$prefix/etc/config.site
3162else
3163  ac_site_file1=$ac_default_prefix/share/config.site
3164  ac_site_file2=$ac_default_prefix/etc/config.site
3165fi
3166for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3167do
3168  test "x$ac_site_file" = xNONE && continue
3169  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3170    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3171$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3172    sed 's/^/| /' "$ac_site_file" >&5
3173    . "$ac_site_file" \
3174      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3176as_fn_error $? "failed to load site script $ac_site_file
3177See \`config.log' for more details" "$LINENO" 5; }
3178  fi
3179done
3180
3181if test -r "$cache_file"; then
3182  # Some versions of bash will fail to source /dev/null (special files
3183  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3184  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3185    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3186$as_echo "$as_me: loading cache $cache_file" >&6;}
3187    case $cache_file in
3188      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3189      *)                      . "./$cache_file";;
3190    esac
3191  fi
3192else
3193  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3194$as_echo "$as_me: creating cache $cache_file" >&6;}
3195  >$cache_file
3196fi
3197
3198# Check that the precious variables saved in the cache have kept the same
3199# value.
3200ac_cache_corrupted=false
3201for ac_var in $ac_precious_vars; do
3202  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3203  eval ac_new_set=\$ac_env_${ac_var}_set
3204  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3205  eval ac_new_val=\$ac_env_${ac_var}_value
3206  case $ac_old_set,$ac_new_set in
3207    set,)
3208      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3209$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3210      ac_cache_corrupted=: ;;
3211    ,set)
3212      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3213$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3214      ac_cache_corrupted=: ;;
3215    ,);;
3216    *)
3217      if test "x$ac_old_val" != "x$ac_new_val"; then
3218	# differences in whitespace do not lead to failure.
3219	ac_old_val_w=`echo x $ac_old_val`
3220	ac_new_val_w=`echo x $ac_new_val`
3221	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3222	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3223$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3224	  ac_cache_corrupted=:
3225	else
3226	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3227$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3228	  eval $ac_var=\$ac_old_val
3229	fi
3230	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3231$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3232	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3233$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3234      fi;;
3235  esac
3236  # Pass precious variables to config.status.
3237  if test "$ac_new_set" = set; then
3238    case $ac_new_val in
3239    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3240    *) ac_arg=$ac_var=$ac_new_val ;;
3241    esac
3242    case " $ac_configure_args " in
3243      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3244      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3245    esac
3246  fi
3247done
3248if $ac_cache_corrupted; then
3249  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3251  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3252$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3253  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3254fi
3255## -------------------- ##
3256## Main body of script. ##
3257## -------------------- ##
3258
3259ac_ext=c
3260ac_cpp='$CPP $CPPFLAGS'
3261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3263ac_compiler_gnu=$ac_cv_c_compiler_gnu
3264
3265
3266
3267ac_aux_dir=
3268for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3269  if test -f "$ac_dir/install-sh"; then
3270    ac_aux_dir=$ac_dir
3271    ac_install_sh="$ac_aux_dir/install-sh -c"
3272    break
3273  elif test -f "$ac_dir/install.sh"; then
3274    ac_aux_dir=$ac_dir
3275    ac_install_sh="$ac_aux_dir/install.sh -c"
3276    break
3277  elif test -f "$ac_dir/shtool"; then
3278    ac_aux_dir=$ac_dir
3279    ac_install_sh="$ac_aux_dir/shtool install -c"
3280    break
3281  fi
3282done
3283if test -z "$ac_aux_dir"; then
3284  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
3285fi
3286
3287# These three variables are undocumented and unsupported,
3288# and are intended to be withdrawn in a future Autoconf release.
3289# They can cause serious problems if a builder's source tree is in a directory
3290# whose full name contains unusual characters.
3291ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3292ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3293ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3294
3295
3296# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3297
3298#
3299# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3300# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301#
3302# This code is free software; you can redistribute it and/or modify it
3303# under the terms of the GNU General Public License version 2 only, as
3304# published by the Free Software Foundation.  Oracle designates this
3305# particular file as subject to the "Classpath" exception as provided
3306# by Oracle in the LICENSE file that accompanied this code.
3307#
3308# This code is distributed in the hope that it will be useful, but WITHOUT
3309# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311# version 2 for more details (a copy is included in the LICENSE file that
3312# accompanied this code).
3313#
3314# You should have received a copy of the GNU General Public License version
3315# 2 along with this work; if not, write to the Free Software Foundation,
3316# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317#
3318# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319# or visit www.oracle.com if you need additional information or have any
3320# questions.
3321#
3322
3323#
3324# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3325#
3326# This program is free software; you can redistribute it and/or modify
3327# it under the terms of the GNU General Public License as published by
3328# the Free Software Foundation; either version 2 of the License, or
3329# (at your option) any later version.
3330#
3331# This program is distributed in the hope that it will be useful, but
3332# WITHOUT ANY WARRANTY; without even the implied warranty of
3333# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3334# General Public License for more details.
3335#
3336# You should have received a copy of the GNU General Public License
3337# along with this program; if not, write to the Free Software
3338# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3339#
3340# As a special exception to the GNU General Public License, if you
3341# distribute this file as part of a program that contains a
3342# configuration script generated by Autoconf, you may include it under
3343# the same distribution terms that you use for the rest of that program.
3344
3345# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3346# ----------------------------------
3347# PKG_PROG_PKG_CONFIG
3348
3349# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3350#
3351# Check to see whether a particular set of modules exists.  Similar
3352# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3353#
3354#
3355# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3356# this or PKG_CHECK_MODULES is called, or make sure to call
3357# PKG_CHECK_EXISTS manually
3358# --------------------------------------------------------------
3359
3360
3361
3362# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3363# ---------------------------------------------
3364# _PKG_CONFIG
3365
3366# _PKG_SHORT_ERRORS_SUPPORTED
3367# -----------------------------
3368# _PKG_SHORT_ERRORS_SUPPORTED
3369
3370
3371# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3372# [ACTION-IF-NOT-FOUND])
3373#
3374#
3375# Note that if there is a possibility the first call to
3376# PKG_CHECK_MODULES might not happen, you should be sure to include an
3377# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3378#
3379#
3380# --------------------------------------------------------------
3381# PKG_CHECK_MODULES
3382
3383
3384# Include these first...
3385#
3386# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3387# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3388#
3389# This code is free software; you can redistribute it and/or modify it
3390# under the terms of the GNU General Public License version 2 only, as
3391# published by the Free Software Foundation.  Oracle designates this
3392# particular file as subject to the "Classpath" exception as provided
3393# by Oracle in the LICENSE file that accompanied this code.
3394#
3395# This code is distributed in the hope that it will be useful, but WITHOUT
3396# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3397# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3398# version 2 for more details (a copy is included in the LICENSE file that
3399# accompanied this code).
3400#
3401# You should have received a copy of the GNU General Public License version
3402# 2 along with this work; if not, write to the Free Software Foundation,
3403# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3404#
3405# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3406# or visit www.oracle.com if you need additional information or have any
3407# questions.
3408#
3409
3410# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3411# If so, then append $1 to $2 \
3412# Also set JVM_ARG_OK to true/false depending on outcome.
3413
3414
3415# Appends a string to a path variable, only adding the : when needed.
3416
3417
3418# Prepends a string to a path variable, only adding the : when needed.
3419
3420
3421# This will make sure the given variable points to a full and proper
3422# path. This means:
3423# 1) There will be no spaces in the path. On unix platforms,
3424#    spaces in the path will result in an error. On Windows,
3425#    the path will be rewritten using short-style to be space-free.
3426# 2) The path will be absolute, and it will be in unix-style (on
3427#     cygwin).
3428# $1: The name of the variable to fix
3429
3430
3431# This will make sure the given variable points to a executable
3432# with a full and proper path. This means:
3433# 1) There will be no spaces in the path. On unix platforms,
3434#    spaces in the path will result in an error. On Windows,
3435#    the path will be rewritten using short-style to be space-free.
3436# 2) The path will be absolute, and it will be in unix-style (on
3437#     cygwin).
3438# Any arguments given to the executable is preserved.
3439# If the input variable does not have a directory specification, then
3440# it need to be in the PATH.
3441# $1: The name of the variable to fix
3442
3443
3444
3445
3446# Register a --with argument but mark it as deprecated
3447# $1: The name of the with argument to deprecate, not including --with-
3448
3449
3450# Register a --enable argument but mark it as deprecated
3451# $1: The name of the with argument to deprecate, not including --enable-
3452# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3453
3454
3455
3456
3457# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3458# $1: variable to check
3459
3460
3461# Check that there are no unprocessed overridden variables left.
3462# If so, they are an incorrect argument and we will exit with an error.
3463
3464
3465# Setup a tool for the given variable. If correctly specified by the user,
3466# use that value, otherwise search for the tool using the supplied code snippet.
3467# $1: variable to set
3468# $2: code snippet to call to look for the tool
3469# $3: code snippet to call if variable was used to find tool
3470
3471
3472# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3478# $1: variable to set
3479# $2: executable name (or list of names) to look for
3480
3481
3482# Like BASIC_PATH_PROGS but fails if no tool was found.
3483# $1: variable to set
3484# $2: executable name (or list of names) to look for
3485
3486
3487# Like BASIC_SETUP_TOOL but fails if no tool was found.
3488# $1: variable to set
3489# $2: autoconf macro to call to look for the special tool
3490
3491
3492# Setup the most fundamental tools that relies on not much else to set up,
3493# but is used by much of the early bootstrap code.
3494
3495
3496# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3497
3498
3499# Evaluates platform specific overrides for devkit variables.
3500# $1: Name of variable
3501
3502
3503
3504
3505
3506
3507#%%% Simple tools %%%
3508
3509# Check if we have found a usable version of make
3510# $1: the path to a potential make binary (or empty)
3511# $2: the description on how we found this
3512
3513
3514
3515
3516# Goes looking for a usable version of GNU make.
3517
3518
3519
3520
3521
3522
3523# Check if build directory is on local disk. If not possible to determine,
3524# we prefer to claim it's local.
3525# Argument 1: directory to test
3526# Argument 2: what to do if it is on local disk
3527# Argument 3: what to do otherwise (remote disk or failure)
3528
3529
3530# Check that source files have basic read permissions set. This might
3531# not be the case in cygwin in certain conditions.
3532
3533
3534
3535
3536# Check for support for specific options in bash
3537
3538
3539# Code to run after AC_OUTPUT
3540
3541
3542#
3543# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3545#
3546# This code is free software; you can redistribute it and/or modify it
3547# under the terms of the GNU General Public License version 2 only, as
3548# published by the Free Software Foundation.  Oracle designates this
3549# particular file as subject to the "Classpath" exception as provided
3550# by Oracle in the LICENSE file that accompanied this code.
3551#
3552# This code is distributed in the hope that it will be useful, but WITHOUT
3553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3555# version 2 for more details (a copy is included in the LICENSE file that
3556# accompanied this code).
3557#
3558# You should have received a copy of the GNU General Public License version
3559# 2 along with this work; if not, write to the Free Software Foundation,
3560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3561#
3562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3563# or visit www.oracle.com if you need additional information or have any
3564# questions.
3565#
3566
3567
3568
3569
3570
3571# Helper function which possibly converts a path using DOS-style short mode.
3572# If so, the updated path is stored in $new_path.
3573# $1: The path to check
3574
3575
3576# Helper function which possibly converts a path using DOS-style short mode.
3577# If so, the updated path is stored in $new_path.
3578# $1: The path to check
3579
3580
3581# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3582# and could probably be heavily simplified. However, all changes in this
3583# area tend to need lot of testing in different scenarios, and in lack of
3584# proper unit testing, cleaning this up has not been deemed worth the effort
3585# at the moment.
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3596
3597
3598
3599
3600# ... then the rest
3601#
3602# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3604#
3605# This code is free software; you can redistribute it and/or modify it
3606# under the terms of the GNU General Public License version 2 only, as
3607# published by the Free Software Foundation.  Oracle designates this
3608# particular file as subject to the "Classpath" exception as provided
3609# by Oracle in the LICENSE file that accompanied this code.
3610#
3611# This code is distributed in the hope that it will be useful, but WITHOUT
3612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3614# version 2 for more details (a copy is included in the LICENSE file that
3615# accompanied this code).
3616#
3617# You should have received a copy of the GNU General Public License version
3618# 2 along with this work; if not, write to the Free Software Foundation,
3619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3620#
3621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3622# or visit www.oracle.com if you need additional information or have any
3623# questions.
3624#
3625
3626########################################################################
3627# This file handles detection of the Boot JDK. The Boot JDK detection
3628# process has been developed as a response to solve a complex real-world
3629# problem. Initially, it was simple, but it has grown as platform after
3630# platform, idiosyncracy after idiosyncracy has been supported.
3631#
3632# The basic idea is this:
3633# 1) You need an acceptable *) JDK to use as a Boot JDK
3634# 2) There are several ways to locate a JDK, that are mostly platform
3635#    dependent **)
3636# 3) You can have multiple JDKs installed
3637# 4) If possible, configure should try to dig out an acceptable JDK
3638#    automatically, without having to resort to command-line options
3639#
3640# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3641#     javac) and not a JRE, etc.
3642#
3643# **) On Windows we typically use a well-known path.
3644#     On MacOSX we typically use the tool java_home.
3645#     On Linux we typically find javac in the $PATH, and then follow a
3646#     chain of symlinks that often ends up in a real JDK.
3647#
3648# This leads to the code where we check in different ways to locate a
3649# JDK, and if one is found, check if it is acceptable. If not, we print
3650# our reasons for rejecting it (useful when debugging non-working
3651# configure situations) and continue checking the next one.
3652########################################################################
3653
3654# Execute the check given as argument, and verify the result
3655# If the Boot JDK was previously found, do nothing
3656# $1 A command line (typically autoconf macro) to execute
3657
3658
3659# Test: Is bootjdk explicitely set by command line arguments?
3660
3661
3662# Test: Is $JAVA_HOME set?
3663
3664
3665# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3666
3667
3668# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3669# $1: Argument to the java_home binary (optional)
3670
3671
3672# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3673
3674
3675# Look for a jdk in the given path. If there are multiple, try to select the newest.
3676# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3677# $1 = Path to directory containing jdk installations.
3678# $2 = String to append to the found JDK directory to get the proper JDK home
3679
3680
3681# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3682# environmental variable as base for where to look.
3683# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3684
3685
3686# Test: Is there a JDK installed in default, well-known locations?
3687
3688
3689# Check that a command-line tool in the Boot JDK is correct
3690# $1 = name of variable to assign
3691# $2 = name of binary
3692
3693
3694###############################################################################
3695#
3696# We need a Boot JDK to bootstrap the build.
3697#
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747#
3748# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3773# corresponding configure arguments instead
3774
3775
3776# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3777# that configure can use them while detecting compilers.
3778# TOOLCHAIN_TYPE is available here.
3779# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3780
3781
3782
3783
3784
3785
3786# Documentation on common flags used for solstudio in HIGHEST.
3787#
3788# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3789#          done with care, there are some assumptions below that need to
3790#          be understood about the use of pointers, and IEEE behavior.
3791#
3792# -fns: Use non-standard floating point mode (not IEEE 754)
3793# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3794# -fsingle: Use single precision floating point with 'float'
3795# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3796#   (Source with excessing pointer casting and data access with mixed
3797#    pointer types are not recommended)
3798# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3799#   (If you expect perfect errno behavior, do not use this)
3800# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3801# -xrestrict: Pointer parameters to functions do not overlap
3802#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3803#    If you pass in multiple pointers to the same data, do not use this)
3804# -xlibmil: Inline some library routines
3805#   (If you expect perfect errno behavior, do not use this)
3806# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3807#   (If you expect perfect errno behavior, do not use this)
3808#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3809
3810    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3811    # Bug?
3812    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3813    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3814    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3815    #fi
3816
3817
3818
3819
3820
3821# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3822#                                   [RUN-IF-FALSE])
3823# ------------------------------------------------------------
3824# Check that the c and c++ compilers support an argument
3825
3826
3827# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3828#                                    [RUN-IF-FALSE])
3829# ------------------------------------------------------------
3830# Check that the linker support an argument
3831
3832
3833
3834
3835#
3836# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3837# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3838#
3839# This code is free software; you can redistribute it and/or modify it
3840# under the terms of the GNU General Public License version 2 only, as
3841# published by the Free Software Foundation.  Oracle designates this
3842# particular file as subject to the "Classpath" exception as provided
3843# by Oracle in the LICENSE file that accompanied this code.
3844#
3845# This code is distributed in the hope that it will be useful, but WITHOUT
3846# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3847# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3848# version 2 for more details (a copy is included in the LICENSE file that
3849# accompanied this code).
3850#
3851# You should have received a copy of the GNU General Public License version
3852# 2 along with this work; if not, write to the Free Software Foundation,
3853# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3854#
3855# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3856# or visit www.oracle.com if you need additional information or have any
3857# questions.
3858#
3859
3860
3861
3862
3863
3864cygwin_help() {
3865  case $1 in
3866    unzip)
3867      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3868      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3869      ;;
3870    zip)
3871      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3873      ;;
3874    make)
3875      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3876      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3877      ;;
3878    freetype)
3879      HELP_MSG="
3880The freetype library can now be build during the configure process.
3881Download the freetype sources and unpack them into an arbitrary directory:
3882
3883wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3884tar -xzf freetype-2.5.3.tar.gz
3885
3886Then run configure with '--with-freetype-src=<freetype_src>'. This will
3887automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3888builds or into '<freetype_src>/lib32' for 32-bit builds.
3889Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3890and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3891      ;;
3892  esac
3893}
3894
3895msys_help() {
3896  PKGHANDLER_COMMAND=""
3897}
3898
3899apt_help() {
3900  case $1 in
3901    reduced)
3902      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3903    devkit)
3904      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3905    openjdk)
3906      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3907    alsa)
3908      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3909    cups)
3910      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3911    freetype)
3912      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3913    ffi)
3914      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3915    x11)
3916      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3917    ccache)
3918      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3919  esac
3920}
3921
3922yum_help() {
3923  case $1 in
3924    devkit)
3925      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3926    openjdk)
3927      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3928    alsa)
3929      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3930    cups)
3931      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3932    freetype)
3933      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3934    x11)
3935      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3936    ccache)
3937      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3938  esac
3939}
3940
3941port_help() {
3942  PKGHANDLER_COMMAND=""
3943}
3944
3945pkgutil_help() {
3946  PKGHANDLER_COMMAND=""
3947}
3948
3949pkgadd_help() {
3950  PKGHANDLER_COMMAND=""
3951}
3952
3953# This function will check if we're called from the "configure" wrapper while
3954# printing --help. If so, we will print out additional information that can
3955# only be extracted within the autoconf script, and then exit. This must be
3956# called at the very beginning in configure.ac.
3957
3958
3959
3960
3961
3962
3963#
3964# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3965# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3966#
3967# This code is free software; you can redistribute it and/or modify it
3968# under the terms of the GNU General Public License version 2 only, as
3969# published by the Free Software Foundation.  Oracle designates this
3970# particular file as subject to the "Classpath" exception as provided
3971# by Oracle in the LICENSE file that accompanied this code.
3972#
3973# This code is distributed in the hope that it will be useful, but WITHOUT
3974# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3975# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3976# version 2 for more details (a copy is included in the LICENSE file that
3977# accompanied this code).
3978#
3979# You should have received a copy of the GNU General Public License version
3980# 2 along with this work; if not, write to the Free Software Foundation,
3981# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3982#
3983# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3984# or visit www.oracle.com if you need additional information or have any
3985# questions.
3986#
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997###############################################################################
3998#
3999# Should we build only OpenJDK even if closed sources are present?
4000#
4001
4002
4003
4004
4005
4006
4007###############################################################################
4008#
4009# Enable or disable the elliptic curve crypto implementation
4010#
4011
4012
4013
4014
4015
4016################################################################################
4017#
4018# Gcov coverage data for hotspot
4019#
4020
4021
4022#
4023# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4024# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4025#
4026# This code is free software; you can redistribute it and/or modify it
4027# under the terms of the GNU General Public License version 2 only, as
4028# published by the Free Software Foundation.  Oracle designates this
4029# particular file as subject to the "Classpath" exception as provided
4030# by Oracle in the LICENSE file that accompanied this code.
4031#
4032# This code is distributed in the hope that it will be useful, but WITHOUT
4033# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4034# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4035# version 2 for more details (a copy is included in the LICENSE file that
4036# accompanied this code).
4037#
4038# You should have received a copy of the GNU General Public License version
4039# 2 along with this work; if not, write to the Free Software Foundation,
4040# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4041#
4042# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4043# or visit www.oracle.com if you need additional information or have any
4044# questions.
4045#
4046
4047###############################################################################
4048#
4049# Setup version numbers
4050#
4051
4052# Verify that a given string represents a valid version number, and assign it
4053# to a variable.
4054
4055# Argument 1: the variable to assign to
4056# Argument 2: the value given by the user
4057
4058
4059
4060
4061#
4062# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4063# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4064#
4065# This code is free software; you can redistribute it and/or modify it
4066# under the terms of the GNU General Public License version 2 only, as
4067# published by the Free Software Foundation.  Oracle designates this
4068# particular file as subject to the "Classpath" exception as provided
4069# by Oracle in the LICENSE file that accompanied this code.
4070#
4071# This code is distributed in the hope that it will be useful, but WITHOUT
4072# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4073# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4074# version 2 for more details (a copy is included in the LICENSE file that
4075# accompanied this code).
4076#
4077# You should have received a copy of the GNU General Public License version
4078# 2 along with this work; if not, write to the Free Software Foundation,
4079# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4080#
4081# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4082# or visit www.oracle.com if you need additional information or have any
4083# questions.
4084#
4085
4086# Major library component reside in separate files.
4087#
4088# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4089# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4090#
4091# This code is free software; you can redistribute it and/or modify it
4092# under the terms of the GNU General Public License version 2 only, as
4093# published by the Free Software Foundation.  Oracle designates this
4094# particular file as subject to the "Classpath" exception as provided
4095# by Oracle in the LICENSE file that accompanied this code.
4096#
4097# This code is distributed in the hope that it will be useful, but WITHOUT
4098# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4099# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4100# version 2 for more details (a copy is included in the LICENSE file that
4101# accompanied this code).
4102#
4103# You should have received a copy of the GNU General Public License version
4104# 2 along with this work; if not, write to the Free Software Foundation,
4105# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4106#
4107# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4108# or visit www.oracle.com if you need additional information or have any
4109# questions.
4110#
4111
4112################################################################################
4113# Setup alsa (Advanced Linux Sound Architecture)
4114################################################################################
4115
4116
4117#
4118# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4119# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4120#
4121# This code is free software; you can redistribute it and/or modify it
4122# under the terms of the GNU General Public License version 2 only, as
4123# published by the Free Software Foundation.  Oracle designates this
4124# particular file as subject to the "Classpath" exception as provided
4125# by Oracle in the LICENSE file that accompanied this code.
4126#
4127# This code is distributed in the hope that it will be useful, but WITHOUT
4128# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4129# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4130# version 2 for more details (a copy is included in the LICENSE file that
4131# accompanied this code).
4132#
4133# You should have received a copy of the GNU General Public License version
4134# 2 along with this work; if not, write to the Free Software Foundation,
4135# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4136#
4137# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4138# or visit www.oracle.com if you need additional information or have any
4139# questions.
4140#
4141
4142################################################################################
4143# Setup bundled libraries.
4144#
4145# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4146# OpenJDK repository. Default is to use these libraries as bundled, but they
4147# might be replaced by en external version by the user.
4148################################################################################
4149
4150
4151################################################################################
4152# Setup libjpeg
4153################################################################################
4154
4155
4156################################################################################
4157# Setup giflib
4158################################################################################
4159
4160
4161################################################################################
4162# Setup libpng
4163################################################################################
4164
4165
4166################################################################################
4167# Setup zlib
4168################################################################################
4169
4170
4171################################################################################
4172# Setup lcms (Little CMS)
4173################################################################################
4174
4175
4176#
4177# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4178# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4179#
4180# This code is free software; you can redistribute it and/or modify it
4181# under the terms of the GNU General Public License version 2 only, as
4182# published by the Free Software Foundation.  Oracle designates this
4183# particular file as subject to the "Classpath" exception as provided
4184# by Oracle in the LICENSE file that accompanied this code.
4185#
4186# This code is distributed in the hope that it will be useful, but WITHOUT
4187# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4188# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4189# version 2 for more details (a copy is included in the LICENSE file that
4190# accompanied this code).
4191#
4192# You should have received a copy of the GNU General Public License version
4193# 2 along with this work; if not, write to the Free Software Foundation,
4194# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4195#
4196# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4197# or visit www.oracle.com if you need additional information or have any
4198# questions.
4199#
4200
4201################################################################################
4202# Setup cups (Common Unix Printing System)
4203################################################################################
4204
4205
4206#
4207# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4208# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4209#
4210# This code is free software; you can redistribute it and/or modify it
4211# under the terms of the GNU General Public License version 2 only, as
4212# published by the Free Software Foundation.  Oracle designates this
4213# particular file as subject to the "Classpath" exception as provided
4214# by Oracle in the LICENSE file that accompanied this code.
4215#
4216# This code is distributed in the hope that it will be useful, but WITHOUT
4217# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4218# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4219# version 2 for more details (a copy is included in the LICENSE file that
4220# accompanied this code).
4221#
4222# You should have received a copy of the GNU General Public License version
4223# 2 along with this work; if not, write to the Free Software Foundation,
4224# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4225#
4226# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4227# or visit www.oracle.com if you need additional information or have any
4228# questions.
4229#
4230
4231################################################################################
4232# Setup libffi (Foreign Function Interface)
4233################################################################################
4234
4235
4236#
4237# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4238# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4239#
4240# This code is free software; you can redistribute it and/or modify it
4241# under the terms of the GNU General Public License version 2 only, as
4242# published by the Free Software Foundation.  Oracle designates this
4243# particular file as subject to the "Classpath" exception as provided
4244# by Oracle in the LICENSE file that accompanied this code.
4245#
4246# This code is distributed in the hope that it will be useful, but WITHOUT
4247# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4248# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4249# version 2 for more details (a copy is included in the LICENSE file that
4250# accompanied this code).
4251#
4252# You should have received a copy of the GNU General Public License version
4253# 2 along with this work; if not, write to the Free Software Foundation,
4254# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4255#
4256# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4257# or visit www.oracle.com if you need additional information or have any
4258# questions.
4259#
4260
4261################################################################################
4262# Build the freetype lib from source
4263################################################################################
4264
4265
4266################################################################################
4267# Check if a potential freeype library match is correct and usable
4268################################################################################
4269
4270
4271################################################################################
4272# Setup freetype (The FreeType2 font rendering library)
4273################################################################################
4274
4275
4276#
4277# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4279#
4280# This code is free software; you can redistribute it and/or modify it
4281# under the terms of the GNU General Public License version 2 only, as
4282# published by the Free Software Foundation.  Oracle designates this
4283# particular file as subject to the "Classpath" exception as provided
4284# by Oracle in the LICENSE file that accompanied this code.
4285#
4286# This code is distributed in the hope that it will be useful, but WITHOUT
4287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4289# version 2 for more details (a copy is included in the LICENSE file that
4290# accompanied this code).
4291#
4292# You should have received a copy of the GNU General Public License version
4293# 2 along with this work; if not, write to the Free Software Foundation,
4294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4295#
4296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4297# or visit www.oracle.com if you need additional information or have any
4298# questions.
4299#
4300
4301################################################################################
4302# Setup the standard C/C++ runtime libraries.
4303#
4304# Most importantly, determine if stdc++ should be linked statically or
4305# dynamically.
4306################################################################################
4307
4308
4309#
4310# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312#
4313# This code is free software; you can redistribute it and/or modify it
4314# under the terms of the GNU General Public License version 2 only, as
4315# published by the Free Software Foundation.  Oracle designates this
4316# particular file as subject to the "Classpath" exception as provided
4317# by Oracle in the LICENSE file that accompanied this code.
4318#
4319# This code is distributed in the hope that it will be useful, but WITHOUT
4320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322# version 2 for more details (a copy is included in the LICENSE file that
4323# accompanied this code).
4324#
4325# You should have received a copy of the GNU General Public License version
4326# 2 along with this work; if not, write to the Free Software Foundation,
4327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328#
4329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330# or visit www.oracle.com if you need additional information or have any
4331# questions.
4332#
4333
4334################################################################################
4335# Setup X11 Windows system
4336################################################################################
4337
4338
4339
4340################################################################################
4341# Determine which libraries are needed for this configuration
4342################################################################################
4343
4344
4345################################################################################
4346# Parse library options, and setup needed libraries
4347################################################################################
4348
4349
4350################################################################################
4351# Setup llvm (Low-Level VM)
4352################################################################################
4353
4354
4355################################################################################
4356# Setup various libraries, typically small system libraries
4357################################################################################
4358
4359
4360#
4361# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4362# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4363#
4364# This code is free software; you can redistribute it and/or modify it
4365# under the terms of the GNU General Public License version 2 only, as
4366# published by the Free Software Foundation.  Oracle designates this
4367# particular file as subject to the "Classpath" exception as provided
4368# by Oracle in the LICENSE file that accompanied this code.
4369#
4370# This code is distributed in the hope that it will be useful, but WITHOUT
4371# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4372# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4373# version 2 for more details (a copy is included in the LICENSE file that
4374# accompanied this code).
4375#
4376# You should have received a copy of the GNU General Public License version
4377# 2 along with this work; if not, write to the Free Software Foundation,
4378# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4379#
4380# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4381# or visit www.oracle.com if you need additional information or have any
4382# questions.
4383#
4384
4385# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4386# Converts autoconf style CPU name to OpenJDK style, into
4387# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4388
4389
4390# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4391# Converts autoconf style OS name to OpenJDK style, into
4392# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4393
4394
4395# Expects $host_os $host_cpu $build_os and $build_cpu
4396# and $with_target_bits to have been setup!
4397#
4398# Translate the standard triplet(quadruplet) definition
4399# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4400# OPENJDK_BUILD_OS, etc.
4401
4402
4403# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4404# accordingly. Must be done after setting up build and target system, but before
4405# doing anything else with these values.
4406
4407
4408# Setup the legacy variables, for controlling the old makefiles.
4409#
4410
4411
4412
4413
4414#%%% Build and target systems %%%
4415
4416
4417
4418
4419# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4420# Add -mX to various FLAGS variables.
4421
4422
4423
4424
4425
4426
4427#
4428# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4429# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4430#
4431# This code is free software; you can redistribute it and/or modify it
4432# under the terms of the GNU General Public License version 2 only, as
4433# published by the Free Software Foundation.  Oracle designates this
4434# particular file as subject to the "Classpath" exception as provided
4435# by Oracle in the LICENSE file that accompanied this code.
4436#
4437# This code is distributed in the hope that it will be useful, but WITHOUT
4438# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4439# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4440# version 2 for more details (a copy is included in the LICENSE file that
4441# accompanied this code).
4442#
4443# You should have received a copy of the GNU General Public License version
4444# 2 along with this work; if not, write to the Free Software Foundation,
4445# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4446#
4447# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4448# or visit www.oracle.com if you need additional information or have any
4449# questions.
4450#
4451
4452
4453
4454
4455
4456
4457
4458#
4459# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4461#
4462# This code is free software; you can redistribute it and/or modify it
4463# under the terms of the GNU General Public License version 2 only, as
4464# published by the Free Software Foundation.  Oracle designates this
4465# particular file as subject to the "Classpath" exception as provided
4466# by Oracle in the LICENSE file that accompanied this code.
4467#
4468# This code is distributed in the hope that it will be useful, but WITHOUT
4469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4471# version 2 for more details (a copy is included in the LICENSE file that
4472# accompanied this code).
4473#
4474# You should have received a copy of the GNU General Public License version
4475# 2 along with this work; if not, write to the Free Software Foundation,
4476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4477#
4478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4479# or visit www.oracle.com if you need additional information or have any
4480# questions.
4481#
4482
4483########################################################################
4484# This file is responsible for detecting, verifying and setting up the
4485# toolchain, i.e. the compiler, linker and related utilities. It will setup
4486# proper paths to the binaries, but it will not setup any flags.
4487#
4488# The binaries used is determined by the toolchain type, which is the family of
4489# compilers and related tools that are used.
4490########################################################################
4491
4492
4493# All valid toolchains, regardless of platform (used by help.m4)
4494VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4495
4496# These toolchains are valid on different platforms
4497VALID_TOOLCHAINS_linux="gcc clang"
4498VALID_TOOLCHAINS_solaris="solstudio"
4499VALID_TOOLCHAINS_macosx="gcc clang"
4500VALID_TOOLCHAINS_aix="xlc"
4501VALID_TOOLCHAINS_windows="microsoft"
4502
4503# Toolchain descriptions
4504TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4505TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4506TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4507TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4508TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4509
4510# Setup a number of variables describing how native output files are
4511# named on this platform/toolchain.
4512
4513
4514# Determine which toolchain type to use, and make sure it is valid for this
4515# platform. Setup various information about the selected toolchain.
4516
4517
4518# Before we start detecting the toolchain executables, we might need some
4519# special setup, e.g. additional paths etc.
4520
4521
4522# Restore path, etc
4523
4524
4525# Check if a compiler is of the toolchain type we expect, and save the version
4526# information from it. If the compiler does not match the expected type,
4527# this function will abort using AC_MSG_ERROR. If it matches, the version will
4528# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4529# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4530#
4531# $1 = compiler to test (CC or CXX)
4532# $2 = human readable name of compiler (C or C++)
4533
4534
4535# Try to locate the given C or C++ compiler in the path, or otherwise.
4536#
4537# $1 = compiler to test (CC or CXX)
4538# $2 = human readable name of compiler (C or C++)
4539# $3 = list of compiler names to search for
4540
4541
4542# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4543# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4544# archiver (AR). Verify that the compilers are correct according to the
4545# toolchain type.
4546
4547
4548# Setup additional tools that is considered a part of the toolchain, but not the
4549# core part. Many of these are highly platform-specific and do not exist,
4550# and/or are not needed on all platforms.
4551
4552
4553# Setup the build tools (i.e, the compiler and linker used to build programs
4554# that should be run on the build platform, not the target platform, as a build
4555# helper). Since the non-cross-compile case uses the normal, target compilers
4556# for this, we can only do this after these have been setup.
4557
4558
4559# Setup legacy variables that are still needed as alternative ways to refer to
4560# parts of the toolchain.
4561
4562
4563# Do some additional checks on the detected tools.
4564
4565
4566# Setup the JTReg Regression Test Harness.
4567
4568
4569#
4570# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4571# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4572#
4573# This code is free software; you can redistribute it and/or modify it
4574# under the terms of the GNU General Public License version 2 only, as
4575# published by the Free Software Foundation.  Oracle designates this
4576# particular file as subject to the "Classpath" exception as provided
4577# by Oracle in the LICENSE file that accompanied this code.
4578#
4579# This code is distributed in the hope that it will be useful, but WITHOUT
4580# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4581# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4582# version 2 for more details (a copy is included in the LICENSE file that
4583# accompanied this code).
4584#
4585# You should have received a copy of the GNU General Public License version
4586# 2 along with this work; if not, write to the Free Software Foundation,
4587# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4588#
4589# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4590# or visit www.oracle.com if you need additional information or have any
4591# questions.
4592#
4593
4594################################################################################
4595# The order of these defines the priority by which we try to find them.
4596VALID_VS_VERSIONS="2013 2012 2010"
4597
4598VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4599VS_VERSION_INTERNAL_2010=100
4600VS_MSVCR_2010=msvcr100.dll
4601# We don't use msvcp on Visual Studio 2010
4602#VS_MSVCP_2010=msvcp100.dll
4603VS_ENVVAR_2010="VS100COMNTOOLS"
4604VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4605VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4606VS_VS_PLATFORM_NAME_2010="v100"
4607VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4608
4609VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4610VS_VERSION_INTERNAL_2012=110
4611VS_MSVCR_2012=msvcr110.dll
4612VS_MSVCP_2012=msvcp110.dll
4613VS_ENVVAR_2012="VS110COMNTOOLS"
4614VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4615VS_SDK_INSTALLDIR_2012=
4616VS_VS_PLATFORM_NAME_2012="v110"
4617VS_SDK_PLATFORM_NAME_2012=
4618
4619VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4620VS_VERSION_INTERNAL_2013=120
4621VS_MSVCR_2013=msvcr120.dll
4622VS_MSVCP_2013=msvcp120.dll
4623VS_ENVVAR_2013="VS120COMNTOOLS"
4624VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4625VS_SDK_INSTALLDIR_2013=
4626VS_VS_PLATFORM_NAME_2013="v120"
4627VS_SDK_PLATFORM_NAME_2013=
4628
4629################################################################################
4630
4631
4632
4633################################################################################
4634
4635
4636
4637################################################################################
4638# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4639# build environment and assigns it to VS_ENV_CMD
4640
4641
4642################################################################################
4643
4644
4645
4646################################################################################
4647# Check if the VS env variables were setup prior to running configure.
4648# If not, then find vcvarsall.bat and run it automatically, and integrate
4649# the set env variables into the spec file.
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664# This line needs to be here, verbatim, after all includes and the dummy hook
4665# definitions. It is replaced with custom functionality when building
4666# custom sources.
4667#CUSTOM_AUTOCONF_INCLUDE
4668
4669# Do not change or remove the following line, it is needed for consistency checks:
4670DATE_WHEN_GENERATED=1447737510
4671
4672###############################################################################
4673#
4674# Initialization / Boot-strapping
4675#
4676# The bootstrapping process needs to solve the "chicken or the egg" problem,
4677# thus it jumps back and forth, each time gaining something needed later on.
4678#
4679###############################################################################
4680
4681# If we are requested to print additional help, do that and then exit.
4682# This must be the very first call.
4683
4684  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4685    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4686    $PRINTF "Which are valid to use depends on the build platform.\n"
4687    for toolchain in $VALID_TOOLCHAINS_all; do
4688      # Use indirect variable referencing
4689      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4690      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4691      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4692    done
4693
4694    # And now exit directly
4695    exit 0
4696  fi
4697
4698
4699# Basic initialization that must happen first of all in the normal process.
4700
4701  # Save the original command line. This is passed to us by the wrapper configure script.
4702
4703  # Save the path variable before it gets changed
4704  ORIGINAL_PATH="$PATH"
4705
4706  DATE_WHEN_CONFIGURED=`LANG=C date`
4707
4708  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4709$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4711$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4712
4713
4714  # Start with tools that do not need have cross compilation support
4715  # and can be expected to be found in the default PATH. These tools are
4716  # used by configure.
4717
4718  # First are all the simple required tools.
4719
4720
4721
4722  # Publish this variable in the help.
4723
4724
4725  if [ -z "${BASENAME+x}" ]; then
4726    # The variable is not set by user, try to locate tool using the code snippet
4727    for ac_prog in basename
4728do
4729  # Extract the first word of "$ac_prog", so it can be a program name with args.
4730set dummy $ac_prog; ac_word=$2
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4732$as_echo_n "checking for $ac_word... " >&6; }
4733if ${ac_cv_path_BASENAME+:} false; then :
4734  $as_echo_n "(cached) " >&6
4735else
4736  case $BASENAME in
4737  [\\/]* | ?:[\\/]*)
4738  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4739  ;;
4740  *)
4741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742for as_dir in $PATH
4743do
4744  IFS=$as_save_IFS
4745  test -z "$as_dir" && as_dir=.
4746    for ac_exec_ext in '' $ac_executable_extensions; do
4747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4748    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750    break 2
4751  fi
4752done
4753  done
4754IFS=$as_save_IFS
4755
4756  ;;
4757esac
4758fi
4759BASENAME=$ac_cv_path_BASENAME
4760if test -n "$BASENAME"; then
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4762$as_echo "$BASENAME" >&6; }
4763else
4764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765$as_echo "no" >&6; }
4766fi
4767
4768
4769  test -n "$BASENAME" && break
4770done
4771
4772  else
4773    # The variable is set, but is it from the command line or the environment?
4774
4775    # Try to remove the string !BASENAME! from our list.
4776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4778      # If it failed, the variable was not from the command line. Ignore it,
4779      # but warn the user (except for BASH, which is always set by the calling BASH).
4780      if test "xBASENAME" != xBASH; then
4781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4782$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4783      fi
4784      # Try to locate tool using the code snippet
4785      for ac_prog in basename
4786do
4787  # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if ${ac_cv_path_BASENAME+:} false; then :
4792  $as_echo_n "(cached) " >&6
4793else
4794  case $BASENAME in
4795  [\\/]* | ?:[\\/]*)
4796  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4797  ;;
4798  *)
4799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in $PATH
4801do
4802  IFS=$as_save_IFS
4803  test -z "$as_dir" && as_dir=.
4804    for ac_exec_ext in '' $ac_executable_extensions; do
4805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4806    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4808    break 2
4809  fi
4810done
4811  done
4812IFS=$as_save_IFS
4813
4814  ;;
4815esac
4816fi
4817BASENAME=$ac_cv_path_BASENAME
4818if test -n "$BASENAME"; then
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4820$as_echo "$BASENAME" >&6; }
4821else
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
4824fi
4825
4826
4827  test -n "$BASENAME" && break
4828done
4829
4830    else
4831      # If it succeeded, then it was overridden by the user. We will use it
4832      # for the tool.
4833
4834      # First remove it from the list of overridden variables, so we can test
4835      # for unknown variables in the end.
4836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4837
4838      # Check if we try to supply an empty value
4839      if test "x$BASENAME" = x; then
4840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4841$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4843$as_echo_n "checking for BASENAME... " >&6; }
4844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4845$as_echo "disabled" >&6; }
4846      else
4847        # Check if the provided tool contains a complete path.
4848        tool_specified="$BASENAME"
4849        tool_basename="${tool_specified##*/}"
4850        if test "x$tool_basename" = "x$tool_specified"; then
4851          # A command without a complete path is provided, search $PATH.
4852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4853$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4854          # Extract the first word of "$tool_basename", so it can be a program name with args.
4855set dummy $tool_basename; ac_word=$2
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4857$as_echo_n "checking for $ac_word... " >&6; }
4858if ${ac_cv_path_BASENAME+:} false; then :
4859  $as_echo_n "(cached) " >&6
4860else
4861  case $BASENAME in
4862  [\\/]* | ?:[\\/]*)
4863  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4864  ;;
4865  *)
4866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4867for as_dir in $PATH
4868do
4869  IFS=$as_save_IFS
4870  test -z "$as_dir" && as_dir=.
4871    for ac_exec_ext in '' $ac_executable_extensions; do
4872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4873    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4875    break 2
4876  fi
4877done
4878  done
4879IFS=$as_save_IFS
4880
4881  ;;
4882esac
4883fi
4884BASENAME=$ac_cv_path_BASENAME
4885if test -n "$BASENAME"; then
4886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4887$as_echo "$BASENAME" >&6; }
4888else
4889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4890$as_echo "no" >&6; }
4891fi
4892
4893
4894          if test "x$BASENAME" = x; then
4895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4896          fi
4897        else
4898          # Otherwise we believe it is a complete path. Use it as it is.
4899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4900$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4902$as_echo_n "checking for BASENAME... " >&6; }
4903          if test ! -x "$tool_specified"; then
4904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4905$as_echo "not found" >&6; }
4906            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4907          fi
4908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4909$as_echo "$tool_specified" >&6; }
4910        fi
4911      fi
4912    fi
4913
4914  fi
4915
4916
4917
4918  if test "x$BASENAME" = x; then
4919    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4920  fi
4921
4922
4923
4924
4925
4926  # Publish this variable in the help.
4927
4928
4929  if [ -z "${BASH+x}" ]; then
4930    # The variable is not set by user, try to locate tool using the code snippet
4931    for ac_prog in bash
4932do
4933  # Extract the first word of "$ac_prog", so it can be a program name with args.
4934set dummy $ac_prog; ac_word=$2
4935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4936$as_echo_n "checking for $ac_word... " >&6; }
4937if ${ac_cv_path_BASH+:} false; then :
4938  $as_echo_n "(cached) " >&6
4939else
4940  case $BASH in
4941  [\\/]* | ?:[\\/]*)
4942  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4943  ;;
4944  *)
4945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4946for as_dir in $PATH
4947do
4948  IFS=$as_save_IFS
4949  test -z "$as_dir" && as_dir=.
4950    for ac_exec_ext in '' $ac_executable_extensions; do
4951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4952    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4954    break 2
4955  fi
4956done
4957  done
4958IFS=$as_save_IFS
4959
4960  ;;
4961esac
4962fi
4963BASH=$ac_cv_path_BASH
4964if test -n "$BASH"; then
4965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4966$as_echo "$BASH" >&6; }
4967else
4968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4969$as_echo "no" >&6; }
4970fi
4971
4972
4973  test -n "$BASH" && break
4974done
4975
4976  else
4977    # The variable is set, but is it from the command line or the environment?
4978
4979    # Try to remove the string !BASH! from our list.
4980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4982      # If it failed, the variable was not from the command line. Ignore it,
4983      # but warn the user (except for BASH, which is always set by the calling BASH).
4984      if test "xBASH" != xBASH; then
4985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4986$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4987      fi
4988      # Try to locate tool using the code snippet
4989      for ac_prog in bash
4990do
4991  # Extract the first word of "$ac_prog", so it can be a program name with args.
4992set dummy $ac_prog; ac_word=$2
4993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4994$as_echo_n "checking for $ac_word... " >&6; }
4995if ${ac_cv_path_BASH+:} false; then :
4996  $as_echo_n "(cached) " >&6
4997else
4998  case $BASH in
4999  [\\/]* | ?:[\\/]*)
5000  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5001  ;;
5002  *)
5003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004for as_dir in $PATH
5005do
5006  IFS=$as_save_IFS
5007  test -z "$as_dir" && as_dir=.
5008    for ac_exec_ext in '' $ac_executable_extensions; do
5009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5010    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012    break 2
5013  fi
5014done
5015  done
5016IFS=$as_save_IFS
5017
5018  ;;
5019esac
5020fi
5021BASH=$ac_cv_path_BASH
5022if test -n "$BASH"; then
5023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5024$as_echo "$BASH" >&6; }
5025else
5026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027$as_echo "no" >&6; }
5028fi
5029
5030
5031  test -n "$BASH" && break
5032done
5033
5034    else
5035      # If it succeeded, then it was overridden by the user. We will use it
5036      # for the tool.
5037
5038      # First remove it from the list of overridden variables, so we can test
5039      # for unknown variables in the end.
5040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5041
5042      # Check if we try to supply an empty value
5043      if test "x$BASH" = x; then
5044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5045$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5047$as_echo_n "checking for BASH... " >&6; }
5048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5049$as_echo "disabled" >&6; }
5050      else
5051        # Check if the provided tool contains a complete path.
5052        tool_specified="$BASH"
5053        tool_basename="${tool_specified##*/}"
5054        if test "x$tool_basename" = "x$tool_specified"; then
5055          # A command without a complete path is provided, search $PATH.
5056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5057$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5058          # Extract the first word of "$tool_basename", so it can be a program name with args.
5059set dummy $tool_basename; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if ${ac_cv_path_BASH+:} false; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $BASH in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5077    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088BASH=$ac_cv_path_BASH
5089if test -n "$BASH"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5091$as_echo "$BASH" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098          if test "x$BASH" = x; then
5099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5100          fi
5101        else
5102          # Otherwise we believe it is a complete path. Use it as it is.
5103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5104$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5106$as_echo_n "checking for BASH... " >&6; }
5107          if test ! -x "$tool_specified"; then
5108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5109$as_echo "not found" >&6; }
5110            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5111          fi
5112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5113$as_echo "$tool_specified" >&6; }
5114        fi
5115      fi
5116    fi
5117
5118  fi
5119
5120
5121
5122  if test "x$BASH" = x; then
5123    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5124  fi
5125
5126
5127
5128
5129
5130  # Publish this variable in the help.
5131
5132
5133  if [ -z "${CAT+x}" ]; then
5134    # The variable is not set by user, try to locate tool using the code snippet
5135    for ac_prog in cat
5136do
5137  # Extract the first word of "$ac_prog", so it can be a program name with args.
5138set dummy $ac_prog; ac_word=$2
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
5141if ${ac_cv_path_CAT+:} false; then :
5142  $as_echo_n "(cached) " >&6
5143else
5144  case $CAT in
5145  [\\/]* | ?:[\\/]*)
5146  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5147  ;;
5148  *)
5149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152  IFS=$as_save_IFS
5153  test -z "$as_dir" && as_dir=.
5154    for ac_exec_ext in '' $ac_executable_extensions; do
5155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5156    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5158    break 2
5159  fi
5160done
5161  done
5162IFS=$as_save_IFS
5163
5164  ;;
5165esac
5166fi
5167CAT=$ac_cv_path_CAT
5168if test -n "$CAT"; then
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5170$as_echo "$CAT" >&6; }
5171else
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177  test -n "$CAT" && break
5178done
5179
5180  else
5181    # The variable is set, but is it from the command line or the environment?
5182
5183    # Try to remove the string !CAT! from our list.
5184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5186      # If it failed, the variable was not from the command line. Ignore it,
5187      # but warn the user (except for BASH, which is always set by the calling BASH).
5188      if test "xCAT" != xBASH; then
5189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5190$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5191      fi
5192      # Try to locate tool using the code snippet
5193      for ac_prog in cat
5194do
5195  # Extract the first word of "$ac_prog", so it can be a program name with args.
5196set dummy $ac_prog; ac_word=$2
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5198$as_echo_n "checking for $ac_word... " >&6; }
5199if ${ac_cv_path_CAT+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  case $CAT in
5203  [\\/]* | ?:[\\/]*)
5204  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5205  ;;
5206  *)
5207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210  IFS=$as_save_IFS
5211  test -z "$as_dir" && as_dir=.
5212    for ac_exec_ext in '' $ac_executable_extensions; do
5213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5214    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5216    break 2
5217  fi
5218done
5219  done
5220IFS=$as_save_IFS
5221
5222  ;;
5223esac
5224fi
5225CAT=$ac_cv_path_CAT
5226if test -n "$CAT"; then
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5228$as_echo "$CAT" >&6; }
5229else
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
5232fi
5233
5234
5235  test -n "$CAT" && break
5236done
5237
5238    else
5239      # If it succeeded, then it was overridden by the user. We will use it
5240      # for the tool.
5241
5242      # First remove it from the list of overridden variables, so we can test
5243      # for unknown variables in the end.
5244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5245
5246      # Check if we try to supply an empty value
5247      if test "x$CAT" = x; then
5248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5249$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5251$as_echo_n "checking for CAT... " >&6; }
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5253$as_echo "disabled" >&6; }
5254      else
5255        # Check if the provided tool contains a complete path.
5256        tool_specified="$CAT"
5257        tool_basename="${tool_specified##*/}"
5258        if test "x$tool_basename" = "x$tool_specified"; then
5259          # A command without a complete path is provided, search $PATH.
5260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5261$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5262          # Extract the first word of "$tool_basename", so it can be a program name with args.
5263set dummy $tool_basename; ac_word=$2
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265$as_echo_n "checking for $ac_word... " >&6; }
5266if ${ac_cv_path_CAT+:} false; then :
5267  $as_echo_n "(cached) " >&6
5268else
5269  case $CAT in
5270  [\\/]* | ?:[\\/]*)
5271  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5272  ;;
5273  *)
5274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275for as_dir in $PATH
5276do
5277  IFS=$as_save_IFS
5278  test -z "$as_dir" && as_dir=.
5279    for ac_exec_ext in '' $ac_executable_extensions; do
5280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5281    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5283    break 2
5284  fi
5285done
5286  done
5287IFS=$as_save_IFS
5288
5289  ;;
5290esac
5291fi
5292CAT=$ac_cv_path_CAT
5293if test -n "$CAT"; then
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5295$as_echo "$CAT" >&6; }
5296else
5297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298$as_echo "no" >&6; }
5299fi
5300
5301
5302          if test "x$CAT" = x; then
5303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5304          fi
5305        else
5306          # Otherwise we believe it is a complete path. Use it as it is.
5307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5308$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5310$as_echo_n "checking for CAT... " >&6; }
5311          if test ! -x "$tool_specified"; then
5312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5313$as_echo "not found" >&6; }
5314            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5315          fi
5316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5317$as_echo "$tool_specified" >&6; }
5318        fi
5319      fi
5320    fi
5321
5322  fi
5323
5324
5325
5326  if test "x$CAT" = x; then
5327    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5328  fi
5329
5330
5331
5332
5333
5334  # Publish this variable in the help.
5335
5336
5337  if [ -z "${CHMOD+x}" ]; then
5338    # The variable is not set by user, try to locate tool using the code snippet
5339    for ac_prog in chmod
5340do
5341  # Extract the first word of "$ac_prog", so it can be a program name with args.
5342set dummy $ac_prog; ac_word=$2
5343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5344$as_echo_n "checking for $ac_word... " >&6; }
5345if ${ac_cv_path_CHMOD+:} false; then :
5346  $as_echo_n "(cached) " >&6
5347else
5348  case $CHMOD in
5349  [\\/]* | ?:[\\/]*)
5350  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5351  ;;
5352  *)
5353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5354for as_dir in $PATH
5355do
5356  IFS=$as_save_IFS
5357  test -z "$as_dir" && as_dir=.
5358    for ac_exec_ext in '' $ac_executable_extensions; do
5359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5360    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5362    break 2
5363  fi
5364done
5365  done
5366IFS=$as_save_IFS
5367
5368  ;;
5369esac
5370fi
5371CHMOD=$ac_cv_path_CHMOD
5372if test -n "$CHMOD"; then
5373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5374$as_echo "$CHMOD" >&6; }
5375else
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5377$as_echo "no" >&6; }
5378fi
5379
5380
5381  test -n "$CHMOD" && break
5382done
5383
5384  else
5385    # The variable is set, but is it from the command line or the environment?
5386
5387    # Try to remove the string !CHMOD! from our list.
5388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5390      # If it failed, the variable was not from the command line. Ignore it,
5391      # but warn the user (except for BASH, which is always set by the calling BASH).
5392      if test "xCHMOD" != xBASH; then
5393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5394$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5395      fi
5396      # Try to locate tool using the code snippet
5397      for ac_prog in chmod
5398do
5399  # Extract the first word of "$ac_prog", so it can be a program name with args.
5400set dummy $ac_prog; ac_word=$2
5401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5402$as_echo_n "checking for $ac_word... " >&6; }
5403if ${ac_cv_path_CHMOD+:} false; then :
5404  $as_echo_n "(cached) " >&6
5405else
5406  case $CHMOD in
5407  [\\/]* | ?:[\\/]*)
5408  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5409  ;;
5410  *)
5411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5412for as_dir in $PATH
5413do
5414  IFS=$as_save_IFS
5415  test -z "$as_dir" && as_dir=.
5416    for ac_exec_ext in '' $ac_executable_extensions; do
5417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5418    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5420    break 2
5421  fi
5422done
5423  done
5424IFS=$as_save_IFS
5425
5426  ;;
5427esac
5428fi
5429CHMOD=$ac_cv_path_CHMOD
5430if test -n "$CHMOD"; then
5431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5432$as_echo "$CHMOD" >&6; }
5433else
5434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5435$as_echo "no" >&6; }
5436fi
5437
5438
5439  test -n "$CHMOD" && break
5440done
5441
5442    else
5443      # If it succeeded, then it was overridden by the user. We will use it
5444      # for the tool.
5445
5446      # First remove it from the list of overridden variables, so we can test
5447      # for unknown variables in the end.
5448      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5449
5450      # Check if we try to supply an empty value
5451      if test "x$CHMOD" = x; then
5452        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5453$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5455$as_echo_n "checking for CHMOD... " >&6; }
5456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5457$as_echo "disabled" >&6; }
5458      else
5459        # Check if the provided tool contains a complete path.
5460        tool_specified="$CHMOD"
5461        tool_basename="${tool_specified##*/}"
5462        if test "x$tool_basename" = "x$tool_specified"; then
5463          # A command without a complete path is provided, search $PATH.
5464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5465$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5466          # Extract the first word of "$tool_basename", so it can be a program name with args.
5467set dummy $tool_basename; ac_word=$2
5468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5469$as_echo_n "checking for $ac_word... " >&6; }
5470if ${ac_cv_path_CHMOD+:} false; then :
5471  $as_echo_n "(cached) " >&6
5472else
5473  case $CHMOD in
5474  [\\/]* | ?:[\\/]*)
5475  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5476  ;;
5477  *)
5478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5479for as_dir in $PATH
5480do
5481  IFS=$as_save_IFS
5482  test -z "$as_dir" && as_dir=.
5483    for ac_exec_ext in '' $ac_executable_extensions; do
5484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5485    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5487    break 2
5488  fi
5489done
5490  done
5491IFS=$as_save_IFS
5492
5493  ;;
5494esac
5495fi
5496CHMOD=$ac_cv_path_CHMOD
5497if test -n "$CHMOD"; then
5498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5499$as_echo "$CHMOD" >&6; }
5500else
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5502$as_echo "no" >&6; }
5503fi
5504
5505
5506          if test "x$CHMOD" = x; then
5507            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5508          fi
5509        else
5510          # Otherwise we believe it is a complete path. Use it as it is.
5511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5512$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5513          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5514$as_echo_n "checking for CHMOD... " >&6; }
5515          if test ! -x "$tool_specified"; then
5516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5517$as_echo "not found" >&6; }
5518            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5519          fi
5520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5521$as_echo "$tool_specified" >&6; }
5522        fi
5523      fi
5524    fi
5525
5526  fi
5527
5528
5529
5530  if test "x$CHMOD" = x; then
5531    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5532  fi
5533
5534
5535
5536
5537
5538  # Publish this variable in the help.
5539
5540
5541  if [ -z "${CMP+x}" ]; then
5542    # The variable is not set by user, try to locate tool using the code snippet
5543    for ac_prog in cmp
5544do
5545  # Extract the first word of "$ac_prog", so it can be a program name with args.
5546set dummy $ac_prog; ac_word=$2
5547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
5549if ${ac_cv_path_CMP+:} false; then :
5550  $as_echo_n "(cached) " >&6
5551else
5552  case $CMP in
5553  [\\/]* | ?:[\\/]*)
5554  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5555  ;;
5556  *)
5557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560  IFS=$as_save_IFS
5561  test -z "$as_dir" && as_dir=.
5562    for ac_exec_ext in '' $ac_executable_extensions; do
5563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5564    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5566    break 2
5567  fi
5568done
5569  done
5570IFS=$as_save_IFS
5571
5572  ;;
5573esac
5574fi
5575CMP=$ac_cv_path_CMP
5576if test -n "$CMP"; then
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5578$as_echo "$CMP" >&6; }
5579else
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5581$as_echo "no" >&6; }
5582fi
5583
5584
5585  test -n "$CMP" && break
5586done
5587
5588  else
5589    # The variable is set, but is it from the command line or the environment?
5590
5591    # Try to remove the string !CMP! from our list.
5592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5594      # If it failed, the variable was not from the command line. Ignore it,
5595      # but warn the user (except for BASH, which is always set by the calling BASH).
5596      if test "xCMP" != xBASH; then
5597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5598$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5599      fi
5600      # Try to locate tool using the code snippet
5601      for ac_prog in cmp
5602do
5603  # Extract the first word of "$ac_prog", so it can be a program name with args.
5604set dummy $ac_prog; ac_word=$2
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5606$as_echo_n "checking for $ac_word... " >&6; }
5607if ${ac_cv_path_CMP+:} false; then :
5608  $as_echo_n "(cached) " >&6
5609else
5610  case $CMP in
5611  [\\/]* | ?:[\\/]*)
5612  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5613  ;;
5614  *)
5615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5616for as_dir in $PATH
5617do
5618  IFS=$as_save_IFS
5619  test -z "$as_dir" && as_dir=.
5620    for ac_exec_ext in '' $ac_executable_extensions; do
5621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5622    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5624    break 2
5625  fi
5626done
5627  done
5628IFS=$as_save_IFS
5629
5630  ;;
5631esac
5632fi
5633CMP=$ac_cv_path_CMP
5634if test -n "$CMP"; then
5635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5636$as_echo "$CMP" >&6; }
5637else
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5639$as_echo "no" >&6; }
5640fi
5641
5642
5643  test -n "$CMP" && break
5644done
5645
5646    else
5647      # If it succeeded, then it was overridden by the user. We will use it
5648      # for the tool.
5649
5650      # First remove it from the list of overridden variables, so we can test
5651      # for unknown variables in the end.
5652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5653
5654      # Check if we try to supply an empty value
5655      if test "x$CMP" = x; then
5656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5657$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5659$as_echo_n "checking for CMP... " >&6; }
5660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5661$as_echo "disabled" >&6; }
5662      else
5663        # Check if the provided tool contains a complete path.
5664        tool_specified="$CMP"
5665        tool_basename="${tool_specified##*/}"
5666        if test "x$tool_basename" = "x$tool_specified"; then
5667          # A command without a complete path is provided, search $PATH.
5668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5669$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5670          # Extract the first word of "$tool_basename", so it can be a program name with args.
5671set dummy $tool_basename; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
5674if ${ac_cv_path_CMP+:} false; then :
5675  $as_echo_n "(cached) " >&6
5676else
5677  case $CMP in
5678  [\\/]* | ?:[\\/]*)
5679  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5680  ;;
5681  *)
5682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683for as_dir in $PATH
5684do
5685  IFS=$as_save_IFS
5686  test -z "$as_dir" && as_dir=.
5687    for ac_exec_ext in '' $ac_executable_extensions; do
5688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5689    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5691    break 2
5692  fi
5693done
5694  done
5695IFS=$as_save_IFS
5696
5697  ;;
5698esac
5699fi
5700CMP=$ac_cv_path_CMP
5701if test -n "$CMP"; then
5702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5703$as_echo "$CMP" >&6; }
5704else
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
5707fi
5708
5709
5710          if test "x$CMP" = x; then
5711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5712          fi
5713        else
5714          # Otherwise we believe it is a complete path. Use it as it is.
5715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5716$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5718$as_echo_n "checking for CMP... " >&6; }
5719          if test ! -x "$tool_specified"; then
5720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5721$as_echo "not found" >&6; }
5722            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5723          fi
5724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5725$as_echo "$tool_specified" >&6; }
5726        fi
5727      fi
5728    fi
5729
5730  fi
5731
5732
5733
5734  if test "x$CMP" = x; then
5735    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5736  fi
5737
5738
5739
5740
5741
5742  # Publish this variable in the help.
5743
5744
5745  if [ -z "${COMM+x}" ]; then
5746    # The variable is not set by user, try to locate tool using the code snippet
5747    for ac_prog in comm
5748do
5749  # Extract the first word of "$ac_prog", so it can be a program name with args.
5750set dummy $ac_prog; ac_word=$2
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
5753if ${ac_cv_path_COMM+:} false; then :
5754  $as_echo_n "(cached) " >&6
5755else
5756  case $COMM in
5757  [\\/]* | ?:[\\/]*)
5758  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5759  ;;
5760  *)
5761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764  IFS=$as_save_IFS
5765  test -z "$as_dir" && as_dir=.
5766    for ac_exec_ext in '' $ac_executable_extensions; do
5767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5768    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5770    break 2
5771  fi
5772done
5773  done
5774IFS=$as_save_IFS
5775
5776  ;;
5777esac
5778fi
5779COMM=$ac_cv_path_COMM
5780if test -n "$COMM"; then
5781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5782$as_echo "$COMM" >&6; }
5783else
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785$as_echo "no" >&6; }
5786fi
5787
5788
5789  test -n "$COMM" && break
5790done
5791
5792  else
5793    # The variable is set, but is it from the command line or the environment?
5794
5795    # Try to remove the string !COMM! from our list.
5796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5798      # If it failed, the variable was not from the command line. Ignore it,
5799      # but warn the user (except for BASH, which is always set by the calling BASH).
5800      if test "xCOMM" != xBASH; then
5801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5802$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5803      fi
5804      # Try to locate tool using the code snippet
5805      for ac_prog in comm
5806do
5807  # Extract the first word of "$ac_prog", so it can be a program name with args.
5808set dummy $ac_prog; ac_word=$2
5809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5810$as_echo_n "checking for $ac_word... " >&6; }
5811if ${ac_cv_path_COMM+:} false; then :
5812  $as_echo_n "(cached) " >&6
5813else
5814  case $COMM in
5815  [\\/]* | ?:[\\/]*)
5816  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5817  ;;
5818  *)
5819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5820for as_dir in $PATH
5821do
5822  IFS=$as_save_IFS
5823  test -z "$as_dir" && as_dir=.
5824    for ac_exec_ext in '' $ac_executable_extensions; do
5825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5826    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5828    break 2
5829  fi
5830done
5831  done
5832IFS=$as_save_IFS
5833
5834  ;;
5835esac
5836fi
5837COMM=$ac_cv_path_COMM
5838if test -n "$COMM"; then
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5840$as_echo "$COMM" >&6; }
5841else
5842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5843$as_echo "no" >&6; }
5844fi
5845
5846
5847  test -n "$COMM" && break
5848done
5849
5850    else
5851      # If it succeeded, then it was overridden by the user. We will use it
5852      # for the tool.
5853
5854      # First remove it from the list of overridden variables, so we can test
5855      # for unknown variables in the end.
5856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5857
5858      # Check if we try to supply an empty value
5859      if test "x$COMM" = x; then
5860        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5861$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5862        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5863$as_echo_n "checking for COMM... " >&6; }
5864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5865$as_echo "disabled" >&6; }
5866      else
5867        # Check if the provided tool contains a complete path.
5868        tool_specified="$COMM"
5869        tool_basename="${tool_specified##*/}"
5870        if test "x$tool_basename" = "x$tool_specified"; then
5871          # A command without a complete path is provided, search $PATH.
5872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5873$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5874          # Extract the first word of "$tool_basename", so it can be a program name with args.
5875set dummy $tool_basename; ac_word=$2
5876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5877$as_echo_n "checking for $ac_word... " >&6; }
5878if ${ac_cv_path_COMM+:} false; then :
5879  $as_echo_n "(cached) " >&6
5880else
5881  case $COMM in
5882  [\\/]* | ?:[\\/]*)
5883  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5884  ;;
5885  *)
5886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5887for as_dir in $PATH
5888do
5889  IFS=$as_save_IFS
5890  test -z "$as_dir" && as_dir=.
5891    for ac_exec_ext in '' $ac_executable_extensions; do
5892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5893    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5895    break 2
5896  fi
5897done
5898  done
5899IFS=$as_save_IFS
5900
5901  ;;
5902esac
5903fi
5904COMM=$ac_cv_path_COMM
5905if test -n "$COMM"; then
5906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5907$as_echo "$COMM" >&6; }
5908else
5909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910$as_echo "no" >&6; }
5911fi
5912
5913
5914          if test "x$COMM" = x; then
5915            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5916          fi
5917        else
5918          # Otherwise we believe it is a complete path. Use it as it is.
5919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5920$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5921          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5922$as_echo_n "checking for COMM... " >&6; }
5923          if test ! -x "$tool_specified"; then
5924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5925$as_echo "not found" >&6; }
5926            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5927          fi
5928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5929$as_echo "$tool_specified" >&6; }
5930        fi
5931      fi
5932    fi
5933
5934  fi
5935
5936
5937
5938  if test "x$COMM" = x; then
5939    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5940  fi
5941
5942
5943
5944
5945
5946  # Publish this variable in the help.
5947
5948
5949  if [ -z "${CP+x}" ]; then
5950    # The variable is not set by user, try to locate tool using the code snippet
5951    for ac_prog in cp
5952do
5953  # Extract the first word of "$ac_prog", so it can be a program name with args.
5954set dummy $ac_prog; ac_word=$2
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
5957if ${ac_cv_path_CP+:} false; then :
5958  $as_echo_n "(cached) " >&6
5959else
5960  case $CP in
5961  [\\/]* | ?:[\\/]*)
5962  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5963  ;;
5964  *)
5965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968  IFS=$as_save_IFS
5969  test -z "$as_dir" && as_dir=.
5970    for ac_exec_ext in '' $ac_executable_extensions; do
5971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5972    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974    break 2
5975  fi
5976done
5977  done
5978IFS=$as_save_IFS
5979
5980  ;;
5981esac
5982fi
5983CP=$ac_cv_path_CP
5984if test -n "$CP"; then
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5986$as_echo "$CP" >&6; }
5987else
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993  test -n "$CP" && break
5994done
5995
5996  else
5997    # The variable is set, but is it from the command line or the environment?
5998
5999    # Try to remove the string !CP! from our list.
6000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6002      # If it failed, the variable was not from the command line. Ignore it,
6003      # but warn the user (except for BASH, which is always set by the calling BASH).
6004      if test "xCP" != xBASH; then
6005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6006$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6007      fi
6008      # Try to locate tool using the code snippet
6009      for ac_prog in cp
6010do
6011  # Extract the first word of "$ac_prog", so it can be a program name with args.
6012set dummy $ac_prog; ac_word=$2
6013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
6015if ${ac_cv_path_CP+:} false; then :
6016  $as_echo_n "(cached) " >&6
6017else
6018  case $CP in
6019  [\\/]* | ?:[\\/]*)
6020  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6021  ;;
6022  *)
6023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6024for as_dir in $PATH
6025do
6026  IFS=$as_save_IFS
6027  test -z "$as_dir" && as_dir=.
6028    for ac_exec_ext in '' $ac_executable_extensions; do
6029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6030    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6032    break 2
6033  fi
6034done
6035  done
6036IFS=$as_save_IFS
6037
6038  ;;
6039esac
6040fi
6041CP=$ac_cv_path_CP
6042if test -n "$CP"; then
6043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6044$as_echo "$CP" >&6; }
6045else
6046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
6048fi
6049
6050
6051  test -n "$CP" && break
6052done
6053
6054    else
6055      # If it succeeded, then it was overridden by the user. We will use it
6056      # for the tool.
6057
6058      # First remove it from the list of overridden variables, so we can test
6059      # for unknown variables in the end.
6060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6061
6062      # Check if we try to supply an empty value
6063      if test "x$CP" = x; then
6064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6065$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6067$as_echo_n "checking for CP... " >&6; }
6068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6069$as_echo "disabled" >&6; }
6070      else
6071        # Check if the provided tool contains a complete path.
6072        tool_specified="$CP"
6073        tool_basename="${tool_specified##*/}"
6074        if test "x$tool_basename" = "x$tool_specified"; then
6075          # A command without a complete path is provided, search $PATH.
6076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6077$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6078          # Extract the first word of "$tool_basename", so it can be a program name with args.
6079set dummy $tool_basename; ac_word=$2
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6081$as_echo_n "checking for $ac_word... " >&6; }
6082if ${ac_cv_path_CP+:} false; then :
6083  $as_echo_n "(cached) " >&6
6084else
6085  case $CP in
6086  [\\/]* | ?:[\\/]*)
6087  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6088  ;;
6089  *)
6090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH
6092do
6093  IFS=$as_save_IFS
6094  test -z "$as_dir" && as_dir=.
6095    for ac_exec_ext in '' $ac_executable_extensions; do
6096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6097    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6099    break 2
6100  fi
6101done
6102  done
6103IFS=$as_save_IFS
6104
6105  ;;
6106esac
6107fi
6108CP=$ac_cv_path_CP
6109if test -n "$CP"; then
6110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6111$as_echo "$CP" >&6; }
6112else
6113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6114$as_echo "no" >&6; }
6115fi
6116
6117
6118          if test "x$CP" = x; then
6119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6120          fi
6121        else
6122          # Otherwise we believe it is a complete path. Use it as it is.
6123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6124$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6126$as_echo_n "checking for CP... " >&6; }
6127          if test ! -x "$tool_specified"; then
6128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6129$as_echo "not found" >&6; }
6130            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6131          fi
6132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6133$as_echo "$tool_specified" >&6; }
6134        fi
6135      fi
6136    fi
6137
6138  fi
6139
6140
6141
6142  if test "x$CP" = x; then
6143    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6144  fi
6145
6146
6147
6148
6149
6150  # Publish this variable in the help.
6151
6152
6153  if [ -z "${CUT+x}" ]; then
6154    # The variable is not set by user, try to locate tool using the code snippet
6155    for ac_prog in cut
6156do
6157  # Extract the first word of "$ac_prog", so it can be a program name with args.
6158set dummy $ac_prog; ac_word=$2
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
6161if ${ac_cv_path_CUT+:} false; then :
6162  $as_echo_n "(cached) " >&6
6163else
6164  case $CUT in
6165  [\\/]* | ?:[\\/]*)
6166  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6167  ;;
6168  *)
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6176    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178    break 2
6179  fi
6180done
6181  done
6182IFS=$as_save_IFS
6183
6184  ;;
6185esac
6186fi
6187CUT=$ac_cv_path_CUT
6188if test -n "$CUT"; then
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6190$as_echo "$CUT" >&6; }
6191else
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197  test -n "$CUT" && break
6198done
6199
6200  else
6201    # The variable is set, but is it from the command line or the environment?
6202
6203    # Try to remove the string !CUT! from our list.
6204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6206      # If it failed, the variable was not from the command line. Ignore it,
6207      # but warn the user (except for BASH, which is always set by the calling BASH).
6208      if test "xCUT" != xBASH; then
6209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6210$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6211      fi
6212      # Try to locate tool using the code snippet
6213      for ac_prog in cut
6214do
6215  # Extract the first word of "$ac_prog", so it can be a program name with args.
6216set dummy $ac_prog; ac_word=$2
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6218$as_echo_n "checking for $ac_word... " >&6; }
6219if ${ac_cv_path_CUT+:} false; then :
6220  $as_echo_n "(cached) " >&6
6221else
6222  case $CUT in
6223  [\\/]* | ?:[\\/]*)
6224  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6225  ;;
6226  *)
6227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH
6229do
6230  IFS=$as_save_IFS
6231  test -z "$as_dir" && as_dir=.
6232    for ac_exec_ext in '' $ac_executable_extensions; do
6233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6234    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6236    break 2
6237  fi
6238done
6239  done
6240IFS=$as_save_IFS
6241
6242  ;;
6243esac
6244fi
6245CUT=$ac_cv_path_CUT
6246if test -n "$CUT"; then
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6248$as_echo "$CUT" >&6; }
6249else
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6251$as_echo "no" >&6; }
6252fi
6253
6254
6255  test -n "$CUT" && break
6256done
6257
6258    else
6259      # If it succeeded, then it was overridden by the user. We will use it
6260      # for the tool.
6261
6262      # First remove it from the list of overridden variables, so we can test
6263      # for unknown variables in the end.
6264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6265
6266      # Check if we try to supply an empty value
6267      if test "x$CUT" = x; then
6268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6269$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6271$as_echo_n "checking for CUT... " >&6; }
6272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6273$as_echo "disabled" >&6; }
6274      else
6275        # Check if the provided tool contains a complete path.
6276        tool_specified="$CUT"
6277        tool_basename="${tool_specified##*/}"
6278        if test "x$tool_basename" = "x$tool_specified"; then
6279          # A command without a complete path is provided, search $PATH.
6280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6281$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6282          # Extract the first word of "$tool_basename", so it can be a program name with args.
6283set dummy $tool_basename; ac_word=$2
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285$as_echo_n "checking for $ac_word... " >&6; }
6286if ${ac_cv_path_CUT+:} false; then :
6287  $as_echo_n "(cached) " >&6
6288else
6289  case $CUT in
6290  [\\/]* | ?:[\\/]*)
6291  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6292  ;;
6293  *)
6294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295for as_dir in $PATH
6296do
6297  IFS=$as_save_IFS
6298  test -z "$as_dir" && as_dir=.
6299    for ac_exec_ext in '' $ac_executable_extensions; do
6300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6303    break 2
6304  fi
6305done
6306  done
6307IFS=$as_save_IFS
6308
6309  ;;
6310esac
6311fi
6312CUT=$ac_cv_path_CUT
6313if test -n "$CUT"; then
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6315$as_echo "$CUT" >&6; }
6316else
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
6319fi
6320
6321
6322          if test "x$CUT" = x; then
6323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6324          fi
6325        else
6326          # Otherwise we believe it is a complete path. Use it as it is.
6327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6328$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6330$as_echo_n "checking for CUT... " >&6; }
6331          if test ! -x "$tool_specified"; then
6332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6333$as_echo "not found" >&6; }
6334            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6335          fi
6336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6337$as_echo "$tool_specified" >&6; }
6338        fi
6339      fi
6340    fi
6341
6342  fi
6343
6344
6345
6346  if test "x$CUT" = x; then
6347    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6348  fi
6349
6350
6351
6352
6353
6354  # Publish this variable in the help.
6355
6356
6357  if [ -z "${DATE+x}" ]; then
6358    # The variable is not set by user, try to locate tool using the code snippet
6359    for ac_prog in date
6360do
6361  # Extract the first word of "$ac_prog", so it can be a program name with args.
6362set dummy $ac_prog; ac_word=$2
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6364$as_echo_n "checking for $ac_word... " >&6; }
6365if ${ac_cv_path_DATE+:} false; then :
6366  $as_echo_n "(cached) " >&6
6367else
6368  case $DATE in
6369  [\\/]* | ?:[\\/]*)
6370  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6371  ;;
6372  *)
6373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6374for as_dir in $PATH
6375do
6376  IFS=$as_save_IFS
6377  test -z "$as_dir" && as_dir=.
6378    for ac_exec_ext in '' $ac_executable_extensions; do
6379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6380    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6382    break 2
6383  fi
6384done
6385  done
6386IFS=$as_save_IFS
6387
6388  ;;
6389esac
6390fi
6391DATE=$ac_cv_path_DATE
6392if test -n "$DATE"; then
6393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6394$as_echo "$DATE" >&6; }
6395else
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6397$as_echo "no" >&6; }
6398fi
6399
6400
6401  test -n "$DATE" && break
6402done
6403
6404  else
6405    # The variable is set, but is it from the command line or the environment?
6406
6407    # Try to remove the string !DATE! from our list.
6408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6410      # If it failed, the variable was not from the command line. Ignore it,
6411      # but warn the user (except for BASH, which is always set by the calling BASH).
6412      if test "xDATE" != xBASH; then
6413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6414$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6415      fi
6416      # Try to locate tool using the code snippet
6417      for ac_prog in date
6418do
6419  # Extract the first word of "$ac_prog", so it can be a program name with args.
6420set dummy $ac_prog; ac_word=$2
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6422$as_echo_n "checking for $ac_word... " >&6; }
6423if ${ac_cv_path_DATE+:} false; then :
6424  $as_echo_n "(cached) " >&6
6425else
6426  case $DATE in
6427  [\\/]* | ?:[\\/]*)
6428  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6429  ;;
6430  *)
6431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6432for as_dir in $PATH
6433do
6434  IFS=$as_save_IFS
6435  test -z "$as_dir" && as_dir=.
6436    for ac_exec_ext in '' $ac_executable_extensions; do
6437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6438    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6440    break 2
6441  fi
6442done
6443  done
6444IFS=$as_save_IFS
6445
6446  ;;
6447esac
6448fi
6449DATE=$ac_cv_path_DATE
6450if test -n "$DATE"; then
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6452$as_echo "$DATE" >&6; }
6453else
6454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }
6456fi
6457
6458
6459  test -n "$DATE" && break
6460done
6461
6462    else
6463      # If it succeeded, then it was overridden by the user. We will use it
6464      # for the tool.
6465
6466      # First remove it from the list of overridden variables, so we can test
6467      # for unknown variables in the end.
6468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6469
6470      # Check if we try to supply an empty value
6471      if test "x$DATE" = x; then
6472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6473$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6475$as_echo_n "checking for DATE... " >&6; }
6476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6477$as_echo "disabled" >&6; }
6478      else
6479        # Check if the provided tool contains a complete path.
6480        tool_specified="$DATE"
6481        tool_basename="${tool_specified##*/}"
6482        if test "x$tool_basename" = "x$tool_specified"; then
6483          # A command without a complete path is provided, search $PATH.
6484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6485$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6486          # Extract the first word of "$tool_basename", so it can be a program name with args.
6487set dummy $tool_basename; ac_word=$2
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6489$as_echo_n "checking for $ac_word... " >&6; }
6490if ${ac_cv_path_DATE+:} false; then :
6491  $as_echo_n "(cached) " >&6
6492else
6493  case $DATE in
6494  [\\/]* | ?:[\\/]*)
6495  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6496  ;;
6497  *)
6498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6499for as_dir in $PATH
6500do
6501  IFS=$as_save_IFS
6502  test -z "$as_dir" && as_dir=.
6503    for ac_exec_ext in '' $ac_executable_extensions; do
6504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6505    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6507    break 2
6508  fi
6509done
6510  done
6511IFS=$as_save_IFS
6512
6513  ;;
6514esac
6515fi
6516DATE=$ac_cv_path_DATE
6517if test -n "$DATE"; then
6518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6519$as_echo "$DATE" >&6; }
6520else
6521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; }
6523fi
6524
6525
6526          if test "x$DATE" = x; then
6527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6528          fi
6529        else
6530          # Otherwise we believe it is a complete path. Use it as it is.
6531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6532$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6534$as_echo_n "checking for DATE... " >&6; }
6535          if test ! -x "$tool_specified"; then
6536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6537$as_echo "not found" >&6; }
6538            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6539          fi
6540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6541$as_echo "$tool_specified" >&6; }
6542        fi
6543      fi
6544    fi
6545
6546  fi
6547
6548
6549
6550  if test "x$DATE" = x; then
6551    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6552  fi
6553
6554
6555
6556
6557
6558  # Publish this variable in the help.
6559
6560
6561  if [ -z "${DIFF+x}" ]; then
6562    # The variable is not set by user, try to locate tool using the code snippet
6563    for ac_prog in gdiff diff
6564do
6565  # Extract the first word of "$ac_prog", so it can be a program name with args.
6566set dummy $ac_prog; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_path_DIFF+:} false; then :
6570  $as_echo_n "(cached) " >&6
6571else
6572  case $DIFF in
6573  [\\/]* | ?:[\\/]*)
6574  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6575  ;;
6576  *)
6577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in $PATH
6579do
6580  IFS=$as_save_IFS
6581  test -z "$as_dir" && as_dir=.
6582    for ac_exec_ext in '' $ac_executable_extensions; do
6583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586    break 2
6587  fi
6588done
6589  done
6590IFS=$as_save_IFS
6591
6592  ;;
6593esac
6594fi
6595DIFF=$ac_cv_path_DIFF
6596if test -n "$DIFF"; then
6597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6598$as_echo "$DIFF" >&6; }
6599else
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604
6605  test -n "$DIFF" && break
6606done
6607
6608  else
6609    # The variable is set, but is it from the command line or the environment?
6610
6611    # Try to remove the string !DIFF! from our list.
6612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6614      # If it failed, the variable was not from the command line. Ignore it,
6615      # but warn the user (except for BASH, which is always set by the calling BASH).
6616      if test "xDIFF" != xBASH; then
6617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6618$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6619      fi
6620      # Try to locate tool using the code snippet
6621      for ac_prog in gdiff diff
6622do
6623  # Extract the first word of "$ac_prog", so it can be a program name with args.
6624set dummy $ac_prog; ac_word=$2
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626$as_echo_n "checking for $ac_word... " >&6; }
6627if ${ac_cv_path_DIFF+:} false; then :
6628  $as_echo_n "(cached) " >&6
6629else
6630  case $DIFF in
6631  [\\/]* | ?:[\\/]*)
6632  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6633  ;;
6634  *)
6635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636for as_dir in $PATH
6637do
6638  IFS=$as_save_IFS
6639  test -z "$as_dir" && as_dir=.
6640    for ac_exec_ext in '' $ac_executable_extensions; do
6641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6642    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6644    break 2
6645  fi
6646done
6647  done
6648IFS=$as_save_IFS
6649
6650  ;;
6651esac
6652fi
6653DIFF=$ac_cv_path_DIFF
6654if test -n "$DIFF"; then
6655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6656$as_echo "$DIFF" >&6; }
6657else
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659$as_echo "no" >&6; }
6660fi
6661
6662
6663  test -n "$DIFF" && break
6664done
6665
6666    else
6667      # If it succeeded, then it was overridden by the user. We will use it
6668      # for the tool.
6669
6670      # First remove it from the list of overridden variables, so we can test
6671      # for unknown variables in the end.
6672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6673
6674      # Check if we try to supply an empty value
6675      if test "x$DIFF" = x; then
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6677$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6679$as_echo_n "checking for DIFF... " >&6; }
6680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6681$as_echo "disabled" >&6; }
6682      else
6683        # Check if the provided tool contains a complete path.
6684        tool_specified="$DIFF"
6685        tool_basename="${tool_specified##*/}"
6686        if test "x$tool_basename" = "x$tool_specified"; then
6687          # A command without a complete path is provided, search $PATH.
6688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6689$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6690          # Extract the first word of "$tool_basename", so it can be a program name with args.
6691set dummy $tool_basename; ac_word=$2
6692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693$as_echo_n "checking for $ac_word... " >&6; }
6694if ${ac_cv_path_DIFF+:} false; then :
6695  $as_echo_n "(cached) " >&6
6696else
6697  case $DIFF in
6698  [\\/]* | ?:[\\/]*)
6699  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6700  ;;
6701  *)
6702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703for as_dir in $PATH
6704do
6705  IFS=$as_save_IFS
6706  test -z "$as_dir" && as_dir=.
6707    for ac_exec_ext in '' $ac_executable_extensions; do
6708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6709    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711    break 2
6712  fi
6713done
6714  done
6715IFS=$as_save_IFS
6716
6717  ;;
6718esac
6719fi
6720DIFF=$ac_cv_path_DIFF
6721if test -n "$DIFF"; then
6722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6723$as_echo "$DIFF" >&6; }
6724else
6725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6726$as_echo "no" >&6; }
6727fi
6728
6729
6730          if test "x$DIFF" = x; then
6731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6732          fi
6733        else
6734          # Otherwise we believe it is a complete path. Use it as it is.
6735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6736$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6738$as_echo_n "checking for DIFF... " >&6; }
6739          if test ! -x "$tool_specified"; then
6740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6741$as_echo "not found" >&6; }
6742            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6743          fi
6744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6745$as_echo "$tool_specified" >&6; }
6746        fi
6747      fi
6748    fi
6749
6750  fi
6751
6752
6753
6754  if test "x$DIFF" = x; then
6755    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6756  fi
6757
6758
6759
6760
6761
6762  # Publish this variable in the help.
6763
6764
6765  if [ -z "${DIRNAME+x}" ]; then
6766    # The variable is not set by user, try to locate tool using the code snippet
6767    for ac_prog in dirname
6768do
6769  # Extract the first word of "$ac_prog", so it can be a program name with args.
6770set dummy $ac_prog; ac_word=$2
6771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6772$as_echo_n "checking for $ac_word... " >&6; }
6773if ${ac_cv_path_DIRNAME+:} false; then :
6774  $as_echo_n "(cached) " >&6
6775else
6776  case $DIRNAME in
6777  [\\/]* | ?:[\\/]*)
6778  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6779  ;;
6780  *)
6781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6782for as_dir in $PATH
6783do
6784  IFS=$as_save_IFS
6785  test -z "$as_dir" && as_dir=.
6786    for ac_exec_ext in '' $ac_executable_extensions; do
6787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6788    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6790    break 2
6791  fi
6792done
6793  done
6794IFS=$as_save_IFS
6795
6796  ;;
6797esac
6798fi
6799DIRNAME=$ac_cv_path_DIRNAME
6800if test -n "$DIRNAME"; then
6801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6802$as_echo "$DIRNAME" >&6; }
6803else
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6805$as_echo "no" >&6; }
6806fi
6807
6808
6809  test -n "$DIRNAME" && break
6810done
6811
6812  else
6813    # The variable is set, but is it from the command line or the environment?
6814
6815    # Try to remove the string !DIRNAME! from our list.
6816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6818      # If it failed, the variable was not from the command line. Ignore it,
6819      # but warn the user (except for BASH, which is always set by the calling BASH).
6820      if test "xDIRNAME" != xBASH; then
6821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6822$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6823      fi
6824      # Try to locate tool using the code snippet
6825      for ac_prog in dirname
6826do
6827  # Extract the first word of "$ac_prog", so it can be a program name with args.
6828set dummy $ac_prog; ac_word=$2
6829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6830$as_echo_n "checking for $ac_word... " >&6; }
6831if ${ac_cv_path_DIRNAME+:} false; then :
6832  $as_echo_n "(cached) " >&6
6833else
6834  case $DIRNAME in
6835  [\\/]* | ?:[\\/]*)
6836  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6837  ;;
6838  *)
6839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6840for as_dir in $PATH
6841do
6842  IFS=$as_save_IFS
6843  test -z "$as_dir" && as_dir=.
6844    for ac_exec_ext in '' $ac_executable_extensions; do
6845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6846    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6848    break 2
6849  fi
6850done
6851  done
6852IFS=$as_save_IFS
6853
6854  ;;
6855esac
6856fi
6857DIRNAME=$ac_cv_path_DIRNAME
6858if test -n "$DIRNAME"; then
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6860$as_echo "$DIRNAME" >&6; }
6861else
6862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6863$as_echo "no" >&6; }
6864fi
6865
6866
6867  test -n "$DIRNAME" && break
6868done
6869
6870    else
6871      # If it succeeded, then it was overridden by the user. We will use it
6872      # for the tool.
6873
6874      # First remove it from the list of overridden variables, so we can test
6875      # for unknown variables in the end.
6876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6877
6878      # Check if we try to supply an empty value
6879      if test "x$DIRNAME" = x; then
6880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6881$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6883$as_echo_n "checking for DIRNAME... " >&6; }
6884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6885$as_echo "disabled" >&6; }
6886      else
6887        # Check if the provided tool contains a complete path.
6888        tool_specified="$DIRNAME"
6889        tool_basename="${tool_specified##*/}"
6890        if test "x$tool_basename" = "x$tool_specified"; then
6891          # A command without a complete path is provided, search $PATH.
6892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6893$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6894          # Extract the first word of "$tool_basename", so it can be a program name with args.
6895set dummy $tool_basename; ac_word=$2
6896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6897$as_echo_n "checking for $ac_word... " >&6; }
6898if ${ac_cv_path_DIRNAME+:} false; then :
6899  $as_echo_n "(cached) " >&6
6900else
6901  case $DIRNAME in
6902  [\\/]* | ?:[\\/]*)
6903  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6904  ;;
6905  *)
6906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6907for as_dir in $PATH
6908do
6909  IFS=$as_save_IFS
6910  test -z "$as_dir" && as_dir=.
6911    for ac_exec_ext in '' $ac_executable_extensions; do
6912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6913    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6915    break 2
6916  fi
6917done
6918  done
6919IFS=$as_save_IFS
6920
6921  ;;
6922esac
6923fi
6924DIRNAME=$ac_cv_path_DIRNAME
6925if test -n "$DIRNAME"; then
6926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6927$as_echo "$DIRNAME" >&6; }
6928else
6929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6930$as_echo "no" >&6; }
6931fi
6932
6933
6934          if test "x$DIRNAME" = x; then
6935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6936          fi
6937        else
6938          # Otherwise we believe it is a complete path. Use it as it is.
6939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6940$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6942$as_echo_n "checking for DIRNAME... " >&6; }
6943          if test ! -x "$tool_specified"; then
6944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6945$as_echo "not found" >&6; }
6946            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6947          fi
6948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6949$as_echo "$tool_specified" >&6; }
6950        fi
6951      fi
6952    fi
6953
6954  fi
6955
6956
6957
6958  if test "x$DIRNAME" = x; then
6959    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6960  fi
6961
6962
6963
6964
6965
6966  # Publish this variable in the help.
6967
6968
6969  if [ -z "${ECHO+x}" ]; then
6970    # The variable is not set by user, try to locate tool using the code snippet
6971    for ac_prog in echo
6972do
6973  # Extract the first word of "$ac_prog", so it can be a program name with args.
6974set dummy $ac_prog; ac_word=$2
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6976$as_echo_n "checking for $ac_word... " >&6; }
6977if ${ac_cv_path_ECHO+:} false; then :
6978  $as_echo_n "(cached) " >&6
6979else
6980  case $ECHO in
6981  [\\/]* | ?:[\\/]*)
6982  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6983  ;;
6984  *)
6985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6986for as_dir in $PATH
6987do
6988  IFS=$as_save_IFS
6989  test -z "$as_dir" && as_dir=.
6990    for ac_exec_ext in '' $ac_executable_extensions; do
6991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6992    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6994    break 2
6995  fi
6996done
6997  done
6998IFS=$as_save_IFS
6999
7000  ;;
7001esac
7002fi
7003ECHO=$ac_cv_path_ECHO
7004if test -n "$ECHO"; then
7005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7006$as_echo "$ECHO" >&6; }
7007else
7008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7009$as_echo "no" >&6; }
7010fi
7011
7012
7013  test -n "$ECHO" && break
7014done
7015
7016  else
7017    # The variable is set, but is it from the command line or the environment?
7018
7019    # Try to remove the string !ECHO! from our list.
7020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7022      # If it failed, the variable was not from the command line. Ignore it,
7023      # but warn the user (except for BASH, which is always set by the calling BASH).
7024      if test "xECHO" != xBASH; then
7025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7026$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7027      fi
7028      # Try to locate tool using the code snippet
7029      for ac_prog in echo
7030do
7031  # Extract the first word of "$ac_prog", so it can be a program name with args.
7032set dummy $ac_prog; ac_word=$2
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7034$as_echo_n "checking for $ac_word... " >&6; }
7035if ${ac_cv_path_ECHO+:} false; then :
7036  $as_echo_n "(cached) " >&6
7037else
7038  case $ECHO in
7039  [\\/]* | ?:[\\/]*)
7040  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7041  ;;
7042  *)
7043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7044for as_dir in $PATH
7045do
7046  IFS=$as_save_IFS
7047  test -z "$as_dir" && as_dir=.
7048    for ac_exec_ext in '' $ac_executable_extensions; do
7049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7050    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7052    break 2
7053  fi
7054done
7055  done
7056IFS=$as_save_IFS
7057
7058  ;;
7059esac
7060fi
7061ECHO=$ac_cv_path_ECHO
7062if test -n "$ECHO"; then
7063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7064$as_echo "$ECHO" >&6; }
7065else
7066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7067$as_echo "no" >&6; }
7068fi
7069
7070
7071  test -n "$ECHO" && break
7072done
7073
7074    else
7075      # If it succeeded, then it was overridden by the user. We will use it
7076      # for the tool.
7077
7078      # First remove it from the list of overridden variables, so we can test
7079      # for unknown variables in the end.
7080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7081
7082      # Check if we try to supply an empty value
7083      if test "x$ECHO" = x; then
7084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7085$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7087$as_echo_n "checking for ECHO... " >&6; }
7088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7089$as_echo "disabled" >&6; }
7090      else
7091        # Check if the provided tool contains a complete path.
7092        tool_specified="$ECHO"
7093        tool_basename="${tool_specified##*/}"
7094        if test "x$tool_basename" = "x$tool_specified"; then
7095          # A command without a complete path is provided, search $PATH.
7096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7097$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7098          # Extract the first word of "$tool_basename", so it can be a program name with args.
7099set dummy $tool_basename; ac_word=$2
7100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7101$as_echo_n "checking for $ac_word... " >&6; }
7102if ${ac_cv_path_ECHO+:} false; then :
7103  $as_echo_n "(cached) " >&6
7104else
7105  case $ECHO in
7106  [\\/]* | ?:[\\/]*)
7107  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7108  ;;
7109  *)
7110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7111for as_dir in $PATH
7112do
7113  IFS=$as_save_IFS
7114  test -z "$as_dir" && as_dir=.
7115    for ac_exec_ext in '' $ac_executable_extensions; do
7116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7117    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7119    break 2
7120  fi
7121done
7122  done
7123IFS=$as_save_IFS
7124
7125  ;;
7126esac
7127fi
7128ECHO=$ac_cv_path_ECHO
7129if test -n "$ECHO"; then
7130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7131$as_echo "$ECHO" >&6; }
7132else
7133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7134$as_echo "no" >&6; }
7135fi
7136
7137
7138          if test "x$ECHO" = x; then
7139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7140          fi
7141        else
7142          # Otherwise we believe it is a complete path. Use it as it is.
7143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7144$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7146$as_echo_n "checking for ECHO... " >&6; }
7147          if test ! -x "$tool_specified"; then
7148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7149$as_echo "not found" >&6; }
7150            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7151          fi
7152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7153$as_echo "$tool_specified" >&6; }
7154        fi
7155      fi
7156    fi
7157
7158  fi
7159
7160
7161
7162  if test "x$ECHO" = x; then
7163    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7164  fi
7165
7166
7167
7168
7169
7170  # Publish this variable in the help.
7171
7172
7173  if [ -z "${EXPR+x}" ]; then
7174    # The variable is not set by user, try to locate tool using the code snippet
7175    for ac_prog in expr
7176do
7177  # Extract the first word of "$ac_prog", so it can be a program name with args.
7178set dummy $ac_prog; ac_word=$2
7179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7180$as_echo_n "checking for $ac_word... " >&6; }
7181if ${ac_cv_path_EXPR+:} false; then :
7182  $as_echo_n "(cached) " >&6
7183else
7184  case $EXPR in
7185  [\\/]* | ?:[\\/]*)
7186  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7187  ;;
7188  *)
7189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7190for as_dir in $PATH
7191do
7192  IFS=$as_save_IFS
7193  test -z "$as_dir" && as_dir=.
7194    for ac_exec_ext in '' $ac_executable_extensions; do
7195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7196    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7198    break 2
7199  fi
7200done
7201  done
7202IFS=$as_save_IFS
7203
7204  ;;
7205esac
7206fi
7207EXPR=$ac_cv_path_EXPR
7208if test -n "$EXPR"; then
7209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7210$as_echo "$EXPR" >&6; }
7211else
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
7214fi
7215
7216
7217  test -n "$EXPR" && break
7218done
7219
7220  else
7221    # The variable is set, but is it from the command line or the environment?
7222
7223    # Try to remove the string !EXPR! from our list.
7224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7226      # If it failed, the variable was not from the command line. Ignore it,
7227      # but warn the user (except for BASH, which is always set by the calling BASH).
7228      if test "xEXPR" != xBASH; then
7229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7230$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7231      fi
7232      # Try to locate tool using the code snippet
7233      for ac_prog in expr
7234do
7235  # Extract the first word of "$ac_prog", so it can be a program name with args.
7236set dummy $ac_prog; ac_word=$2
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7238$as_echo_n "checking for $ac_word... " >&6; }
7239if ${ac_cv_path_EXPR+:} false; then :
7240  $as_echo_n "(cached) " >&6
7241else
7242  case $EXPR in
7243  [\\/]* | ?:[\\/]*)
7244  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7245  ;;
7246  *)
7247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7248for as_dir in $PATH
7249do
7250  IFS=$as_save_IFS
7251  test -z "$as_dir" && as_dir=.
7252    for ac_exec_ext in '' $ac_executable_extensions; do
7253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7254    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7256    break 2
7257  fi
7258done
7259  done
7260IFS=$as_save_IFS
7261
7262  ;;
7263esac
7264fi
7265EXPR=$ac_cv_path_EXPR
7266if test -n "$EXPR"; then
7267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7268$as_echo "$EXPR" >&6; }
7269else
7270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7271$as_echo "no" >&6; }
7272fi
7273
7274
7275  test -n "$EXPR" && break
7276done
7277
7278    else
7279      # If it succeeded, then it was overridden by the user. We will use it
7280      # for the tool.
7281
7282      # First remove it from the list of overridden variables, so we can test
7283      # for unknown variables in the end.
7284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7285
7286      # Check if we try to supply an empty value
7287      if test "x$EXPR" = x; then
7288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7289$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7291$as_echo_n "checking for EXPR... " >&6; }
7292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7293$as_echo "disabled" >&6; }
7294      else
7295        # Check if the provided tool contains a complete path.
7296        tool_specified="$EXPR"
7297        tool_basename="${tool_specified##*/}"
7298        if test "x$tool_basename" = "x$tool_specified"; then
7299          # A command without a complete path is provided, search $PATH.
7300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7301$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7302          # Extract the first word of "$tool_basename", so it can be a program name with args.
7303set dummy $tool_basename; ac_word=$2
7304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7305$as_echo_n "checking for $ac_word... " >&6; }
7306if ${ac_cv_path_EXPR+:} false; then :
7307  $as_echo_n "(cached) " >&6
7308else
7309  case $EXPR in
7310  [\\/]* | ?:[\\/]*)
7311  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7312  ;;
7313  *)
7314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7315for as_dir in $PATH
7316do
7317  IFS=$as_save_IFS
7318  test -z "$as_dir" && as_dir=.
7319    for ac_exec_ext in '' $ac_executable_extensions; do
7320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7321    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7323    break 2
7324  fi
7325done
7326  done
7327IFS=$as_save_IFS
7328
7329  ;;
7330esac
7331fi
7332EXPR=$ac_cv_path_EXPR
7333if test -n "$EXPR"; then
7334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7335$as_echo "$EXPR" >&6; }
7336else
7337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7338$as_echo "no" >&6; }
7339fi
7340
7341
7342          if test "x$EXPR" = x; then
7343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7344          fi
7345        else
7346          # Otherwise we believe it is a complete path. Use it as it is.
7347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7348$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7350$as_echo_n "checking for EXPR... " >&6; }
7351          if test ! -x "$tool_specified"; then
7352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7353$as_echo "not found" >&6; }
7354            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7355          fi
7356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7357$as_echo "$tool_specified" >&6; }
7358        fi
7359      fi
7360    fi
7361
7362  fi
7363
7364
7365
7366  if test "x$EXPR" = x; then
7367    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7368  fi
7369
7370
7371
7372
7373
7374  # Publish this variable in the help.
7375
7376
7377  if [ -z "${FILE+x}" ]; then
7378    # The variable is not set by user, try to locate tool using the code snippet
7379    for ac_prog in file
7380do
7381  # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
7385if ${ac_cv_path_FILE+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388  case $FILE in
7389  [\\/]* | ?:[\\/]*)
7390  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7391  ;;
7392  *)
7393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  test -z "$as_dir" && as_dir=.
7398    for ac_exec_ext in '' $ac_executable_extensions; do
7399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402    break 2
7403  fi
7404done
7405  done
7406IFS=$as_save_IFS
7407
7408  ;;
7409esac
7410fi
7411FILE=$ac_cv_path_FILE
7412if test -n "$FILE"; then
7413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7414$as_echo "$FILE" >&6; }
7415else
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421  test -n "$FILE" && break
7422done
7423
7424  else
7425    # The variable is set, but is it from the command line or the environment?
7426
7427    # Try to remove the string !FILE! from our list.
7428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7430      # If it failed, the variable was not from the command line. Ignore it,
7431      # but warn the user (except for BASH, which is always set by the calling BASH).
7432      if test "xFILE" != xBASH; then
7433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7434$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7435      fi
7436      # Try to locate tool using the code snippet
7437      for ac_prog in file
7438do
7439  # Extract the first word of "$ac_prog", so it can be a program name with args.
7440set dummy $ac_prog; ac_word=$2
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
7443if ${ac_cv_path_FILE+:} false; then :
7444  $as_echo_n "(cached) " >&6
7445else
7446  case $FILE in
7447  [\\/]* | ?:[\\/]*)
7448  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7449  ;;
7450  *)
7451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454  IFS=$as_save_IFS
7455  test -z "$as_dir" && as_dir=.
7456    for ac_exec_ext in '' $ac_executable_extensions; do
7457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7458    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7460    break 2
7461  fi
7462done
7463  done
7464IFS=$as_save_IFS
7465
7466  ;;
7467esac
7468fi
7469FILE=$ac_cv_path_FILE
7470if test -n "$FILE"; then
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7472$as_echo "$FILE" >&6; }
7473else
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
7476fi
7477
7478
7479  test -n "$FILE" && break
7480done
7481
7482    else
7483      # If it succeeded, then it was overridden by the user. We will use it
7484      # for the tool.
7485
7486      # First remove it from the list of overridden variables, so we can test
7487      # for unknown variables in the end.
7488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7489
7490      # Check if we try to supply an empty value
7491      if test "x$FILE" = x; then
7492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7493$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7495$as_echo_n "checking for FILE... " >&6; }
7496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7497$as_echo "disabled" >&6; }
7498      else
7499        # Check if the provided tool contains a complete path.
7500        tool_specified="$FILE"
7501        tool_basename="${tool_specified##*/}"
7502        if test "x$tool_basename" = "x$tool_specified"; then
7503          # A command without a complete path is provided, search $PATH.
7504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7505$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7506          # Extract the first word of "$tool_basename", so it can be a program name with args.
7507set dummy $tool_basename; ac_word=$2
7508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7509$as_echo_n "checking for $ac_word... " >&6; }
7510if ${ac_cv_path_FILE+:} false; then :
7511  $as_echo_n "(cached) " >&6
7512else
7513  case $FILE in
7514  [\\/]* | ?:[\\/]*)
7515  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7516  ;;
7517  *)
7518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7519for as_dir in $PATH
7520do
7521  IFS=$as_save_IFS
7522  test -z "$as_dir" && as_dir=.
7523    for ac_exec_ext in '' $ac_executable_extensions; do
7524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7525    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7527    break 2
7528  fi
7529done
7530  done
7531IFS=$as_save_IFS
7532
7533  ;;
7534esac
7535fi
7536FILE=$ac_cv_path_FILE
7537if test -n "$FILE"; then
7538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7539$as_echo "$FILE" >&6; }
7540else
7541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7542$as_echo "no" >&6; }
7543fi
7544
7545
7546          if test "x$FILE" = x; then
7547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7548          fi
7549        else
7550          # Otherwise we believe it is a complete path. Use it as it is.
7551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7552$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7554$as_echo_n "checking for FILE... " >&6; }
7555          if test ! -x "$tool_specified"; then
7556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7557$as_echo "not found" >&6; }
7558            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7559          fi
7560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7561$as_echo "$tool_specified" >&6; }
7562        fi
7563      fi
7564    fi
7565
7566  fi
7567
7568
7569
7570  if test "x$FILE" = x; then
7571    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7572  fi
7573
7574
7575
7576
7577
7578  # Publish this variable in the help.
7579
7580
7581  if [ -z "${FIND+x}" ]; then
7582    # The variable is not set by user, try to locate tool using the code snippet
7583    for ac_prog in find
7584do
7585  # Extract the first word of "$ac_prog", so it can be a program name with args.
7586set dummy $ac_prog; ac_word=$2
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588$as_echo_n "checking for $ac_word... " >&6; }
7589if ${ac_cv_path_FIND+:} false; then :
7590  $as_echo_n "(cached) " >&6
7591else
7592  case $FIND in
7593  [\\/]* | ?:[\\/]*)
7594  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7595  ;;
7596  *)
7597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600  IFS=$as_save_IFS
7601  test -z "$as_dir" && as_dir=.
7602    for ac_exec_ext in '' $ac_executable_extensions; do
7603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606    break 2
7607  fi
7608done
7609  done
7610IFS=$as_save_IFS
7611
7612  ;;
7613esac
7614fi
7615FIND=$ac_cv_path_FIND
7616if test -n "$FIND"; then
7617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7618$as_echo "$FIND" >&6; }
7619else
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
7622fi
7623
7624
7625  test -n "$FIND" && break
7626done
7627
7628  else
7629    # The variable is set, but is it from the command line or the environment?
7630
7631    # Try to remove the string !FIND! from our list.
7632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7634      # If it failed, the variable was not from the command line. Ignore it,
7635      # but warn the user (except for BASH, which is always set by the calling BASH).
7636      if test "xFIND" != xBASH; then
7637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7638$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7639      fi
7640      # Try to locate tool using the code snippet
7641      for ac_prog in find
7642do
7643  # Extract the first word of "$ac_prog", so it can be a program name with args.
7644set dummy $ac_prog; ac_word=$2
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
7647if ${ac_cv_path_FIND+:} false; then :
7648  $as_echo_n "(cached) " >&6
7649else
7650  case $FIND in
7651  [\\/]* | ?:[\\/]*)
7652  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7653  ;;
7654  *)
7655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656for as_dir in $PATH
7657do
7658  IFS=$as_save_IFS
7659  test -z "$as_dir" && as_dir=.
7660    for ac_exec_ext in '' $ac_executable_extensions; do
7661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664    break 2
7665  fi
7666done
7667  done
7668IFS=$as_save_IFS
7669
7670  ;;
7671esac
7672fi
7673FIND=$ac_cv_path_FIND
7674if test -n "$FIND"; then
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7676$as_echo "$FIND" >&6; }
7677else
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679$as_echo "no" >&6; }
7680fi
7681
7682
7683  test -n "$FIND" && break
7684done
7685
7686    else
7687      # If it succeeded, then it was overridden by the user. We will use it
7688      # for the tool.
7689
7690      # First remove it from the list of overridden variables, so we can test
7691      # for unknown variables in the end.
7692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7693
7694      # Check if we try to supply an empty value
7695      if test "x$FIND" = x; then
7696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7697$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7699$as_echo_n "checking for FIND... " >&6; }
7700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7701$as_echo "disabled" >&6; }
7702      else
7703        # Check if the provided tool contains a complete path.
7704        tool_specified="$FIND"
7705        tool_basename="${tool_specified##*/}"
7706        if test "x$tool_basename" = "x$tool_specified"; then
7707          # A command without a complete path is provided, search $PATH.
7708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7709$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7710          # Extract the first word of "$tool_basename", so it can be a program name with args.
7711set dummy $tool_basename; ac_word=$2
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7713$as_echo_n "checking for $ac_word... " >&6; }
7714if ${ac_cv_path_FIND+:} false; then :
7715  $as_echo_n "(cached) " >&6
7716else
7717  case $FIND in
7718  [\\/]* | ?:[\\/]*)
7719  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7720  ;;
7721  *)
7722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7723for as_dir in $PATH
7724do
7725  IFS=$as_save_IFS
7726  test -z "$as_dir" && as_dir=.
7727    for ac_exec_ext in '' $ac_executable_extensions; do
7728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7729    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7731    break 2
7732  fi
7733done
7734  done
7735IFS=$as_save_IFS
7736
7737  ;;
7738esac
7739fi
7740FIND=$ac_cv_path_FIND
7741if test -n "$FIND"; then
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7743$as_echo "$FIND" >&6; }
7744else
7745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7746$as_echo "no" >&6; }
7747fi
7748
7749
7750          if test "x$FIND" = x; then
7751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7752          fi
7753        else
7754          # Otherwise we believe it is a complete path. Use it as it is.
7755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7756$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7758$as_echo_n "checking for FIND... " >&6; }
7759          if test ! -x "$tool_specified"; then
7760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7761$as_echo "not found" >&6; }
7762            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7763          fi
7764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7765$as_echo "$tool_specified" >&6; }
7766        fi
7767      fi
7768    fi
7769
7770  fi
7771
7772
7773
7774  if test "x$FIND" = x; then
7775    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7776  fi
7777
7778
7779
7780
7781
7782  # Publish this variable in the help.
7783
7784
7785  if [ -z "${HEAD+x}" ]; then
7786    # The variable is not set by user, try to locate tool using the code snippet
7787    for ac_prog in head
7788do
7789  # Extract the first word of "$ac_prog", so it can be a program name with args.
7790set dummy $ac_prog; ac_word=$2
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7792$as_echo_n "checking for $ac_word... " >&6; }
7793if ${ac_cv_path_HEAD+:} false; then :
7794  $as_echo_n "(cached) " >&6
7795else
7796  case $HEAD in
7797  [\\/]* | ?:[\\/]*)
7798  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7799  ;;
7800  *)
7801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7802for as_dir in $PATH
7803do
7804  IFS=$as_save_IFS
7805  test -z "$as_dir" && as_dir=.
7806    for ac_exec_ext in '' $ac_executable_extensions; do
7807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7808    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7810    break 2
7811  fi
7812done
7813  done
7814IFS=$as_save_IFS
7815
7816  ;;
7817esac
7818fi
7819HEAD=$ac_cv_path_HEAD
7820if test -n "$HEAD"; then
7821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7822$as_echo "$HEAD" >&6; }
7823else
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7825$as_echo "no" >&6; }
7826fi
7827
7828
7829  test -n "$HEAD" && break
7830done
7831
7832  else
7833    # The variable is set, but is it from the command line or the environment?
7834
7835    # Try to remove the string !HEAD! from our list.
7836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7838      # If it failed, the variable was not from the command line. Ignore it,
7839      # but warn the user (except for BASH, which is always set by the calling BASH).
7840      if test "xHEAD" != xBASH; then
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7842$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7843      fi
7844      # Try to locate tool using the code snippet
7845      for ac_prog in head
7846do
7847  # Extract the first word of "$ac_prog", so it can be a program name with args.
7848set dummy $ac_prog; ac_word=$2
7849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7850$as_echo_n "checking for $ac_word... " >&6; }
7851if ${ac_cv_path_HEAD+:} false; then :
7852  $as_echo_n "(cached) " >&6
7853else
7854  case $HEAD in
7855  [\\/]* | ?:[\\/]*)
7856  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7857  ;;
7858  *)
7859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7860for as_dir in $PATH
7861do
7862  IFS=$as_save_IFS
7863  test -z "$as_dir" && as_dir=.
7864    for ac_exec_ext in '' $ac_executable_extensions; do
7865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7866    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7868    break 2
7869  fi
7870done
7871  done
7872IFS=$as_save_IFS
7873
7874  ;;
7875esac
7876fi
7877HEAD=$ac_cv_path_HEAD
7878if test -n "$HEAD"; then
7879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7880$as_echo "$HEAD" >&6; }
7881else
7882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7883$as_echo "no" >&6; }
7884fi
7885
7886
7887  test -n "$HEAD" && break
7888done
7889
7890    else
7891      # If it succeeded, then it was overridden by the user. We will use it
7892      # for the tool.
7893
7894      # First remove it from the list of overridden variables, so we can test
7895      # for unknown variables in the end.
7896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7897
7898      # Check if we try to supply an empty value
7899      if test "x$HEAD" = x; then
7900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7901$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7903$as_echo_n "checking for HEAD... " >&6; }
7904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7905$as_echo "disabled" >&6; }
7906      else
7907        # Check if the provided tool contains a complete path.
7908        tool_specified="$HEAD"
7909        tool_basename="${tool_specified##*/}"
7910        if test "x$tool_basename" = "x$tool_specified"; then
7911          # A command without a complete path is provided, search $PATH.
7912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7913$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7914          # Extract the first word of "$tool_basename", so it can be a program name with args.
7915set dummy $tool_basename; ac_word=$2
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7917$as_echo_n "checking for $ac_word... " >&6; }
7918if ${ac_cv_path_HEAD+:} false; then :
7919  $as_echo_n "(cached) " >&6
7920else
7921  case $HEAD in
7922  [\\/]* | ?:[\\/]*)
7923  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7924  ;;
7925  *)
7926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7927for as_dir in $PATH
7928do
7929  IFS=$as_save_IFS
7930  test -z "$as_dir" && as_dir=.
7931    for ac_exec_ext in '' $ac_executable_extensions; do
7932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7933    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7935    break 2
7936  fi
7937done
7938  done
7939IFS=$as_save_IFS
7940
7941  ;;
7942esac
7943fi
7944HEAD=$ac_cv_path_HEAD
7945if test -n "$HEAD"; then
7946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7947$as_echo "$HEAD" >&6; }
7948else
7949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7950$as_echo "no" >&6; }
7951fi
7952
7953
7954          if test "x$HEAD" = x; then
7955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7956          fi
7957        else
7958          # Otherwise we believe it is a complete path. Use it as it is.
7959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7960$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7962$as_echo_n "checking for HEAD... " >&6; }
7963          if test ! -x "$tool_specified"; then
7964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7965$as_echo "not found" >&6; }
7966            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7967          fi
7968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7969$as_echo "$tool_specified" >&6; }
7970        fi
7971      fi
7972    fi
7973
7974  fi
7975
7976
7977
7978  if test "x$HEAD" = x; then
7979    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7980  fi
7981
7982
7983
7984
7985
7986  # Publish this variable in the help.
7987
7988
7989  if [ -z "${LN+x}" ]; then
7990    # The variable is not set by user, try to locate tool using the code snippet
7991    for ac_prog in ln
7992do
7993  # Extract the first word of "$ac_prog", so it can be a program name with args.
7994set dummy $ac_prog; ac_word=$2
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7996$as_echo_n "checking for $ac_word... " >&6; }
7997if ${ac_cv_path_LN+:} false; then :
7998  $as_echo_n "(cached) " >&6
7999else
8000  case $LN in
8001  [\\/]* | ?:[\\/]*)
8002  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8003  ;;
8004  *)
8005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8006for as_dir in $PATH
8007do
8008  IFS=$as_save_IFS
8009  test -z "$as_dir" && as_dir=.
8010    for ac_exec_ext in '' $ac_executable_extensions; do
8011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8012    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8014    break 2
8015  fi
8016done
8017  done
8018IFS=$as_save_IFS
8019
8020  ;;
8021esac
8022fi
8023LN=$ac_cv_path_LN
8024if test -n "$LN"; then
8025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8026$as_echo "$LN" >&6; }
8027else
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029$as_echo "no" >&6; }
8030fi
8031
8032
8033  test -n "$LN" && break
8034done
8035
8036  else
8037    # The variable is set, but is it from the command line or the environment?
8038
8039    # Try to remove the string !LN! from our list.
8040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8042      # If it failed, the variable was not from the command line. Ignore it,
8043      # but warn the user (except for BASH, which is always set by the calling BASH).
8044      if test "xLN" != xBASH; then
8045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8046$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8047      fi
8048      # Try to locate tool using the code snippet
8049      for ac_prog in ln
8050do
8051  # Extract the first word of "$ac_prog", so it can be a program name with args.
8052set dummy $ac_prog; ac_word=$2
8053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8054$as_echo_n "checking for $ac_word... " >&6; }
8055if ${ac_cv_path_LN+:} false; then :
8056  $as_echo_n "(cached) " >&6
8057else
8058  case $LN in
8059  [\\/]* | ?:[\\/]*)
8060  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8061  ;;
8062  *)
8063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8064for as_dir in $PATH
8065do
8066  IFS=$as_save_IFS
8067  test -z "$as_dir" && as_dir=.
8068    for ac_exec_ext in '' $ac_executable_extensions; do
8069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8070    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8072    break 2
8073  fi
8074done
8075  done
8076IFS=$as_save_IFS
8077
8078  ;;
8079esac
8080fi
8081LN=$ac_cv_path_LN
8082if test -n "$LN"; then
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8084$as_echo "$LN" >&6; }
8085else
8086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8087$as_echo "no" >&6; }
8088fi
8089
8090
8091  test -n "$LN" && break
8092done
8093
8094    else
8095      # If it succeeded, then it was overridden by the user. We will use it
8096      # for the tool.
8097
8098      # First remove it from the list of overridden variables, so we can test
8099      # for unknown variables in the end.
8100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8101
8102      # Check if we try to supply an empty value
8103      if test "x$LN" = x; then
8104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8105$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8107$as_echo_n "checking for LN... " >&6; }
8108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8109$as_echo "disabled" >&6; }
8110      else
8111        # Check if the provided tool contains a complete path.
8112        tool_specified="$LN"
8113        tool_basename="${tool_specified##*/}"
8114        if test "x$tool_basename" = "x$tool_specified"; then
8115          # A command without a complete path is provided, search $PATH.
8116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8117$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8118          # Extract the first word of "$tool_basename", so it can be a program name with args.
8119set dummy $tool_basename; ac_word=$2
8120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8121$as_echo_n "checking for $ac_word... " >&6; }
8122if ${ac_cv_path_LN+:} false; then :
8123  $as_echo_n "(cached) " >&6
8124else
8125  case $LN in
8126  [\\/]* | ?:[\\/]*)
8127  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8128  ;;
8129  *)
8130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8131for as_dir in $PATH
8132do
8133  IFS=$as_save_IFS
8134  test -z "$as_dir" && as_dir=.
8135    for ac_exec_ext in '' $ac_executable_extensions; do
8136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8137    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8139    break 2
8140  fi
8141done
8142  done
8143IFS=$as_save_IFS
8144
8145  ;;
8146esac
8147fi
8148LN=$ac_cv_path_LN
8149if test -n "$LN"; then
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8151$as_echo "$LN" >&6; }
8152else
8153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8154$as_echo "no" >&6; }
8155fi
8156
8157
8158          if test "x$LN" = x; then
8159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8160          fi
8161        else
8162          # Otherwise we believe it is a complete path. Use it as it is.
8163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8164$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8166$as_echo_n "checking for LN... " >&6; }
8167          if test ! -x "$tool_specified"; then
8168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8169$as_echo "not found" >&6; }
8170            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8171          fi
8172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8173$as_echo "$tool_specified" >&6; }
8174        fi
8175      fi
8176    fi
8177
8178  fi
8179
8180
8181
8182  if test "x$LN" = x; then
8183    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8184  fi
8185
8186
8187
8188
8189
8190  # Publish this variable in the help.
8191
8192
8193  if [ -z "${LS+x}" ]; then
8194    # The variable is not set by user, try to locate tool using the code snippet
8195    for ac_prog in ls
8196do
8197  # Extract the first word of "$ac_prog", so it can be a program name with args.
8198set dummy $ac_prog; ac_word=$2
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8200$as_echo_n "checking for $ac_word... " >&6; }
8201if ${ac_cv_path_LS+:} false; then :
8202  $as_echo_n "(cached) " >&6
8203else
8204  case $LS in
8205  [\\/]* | ?:[\\/]*)
8206  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8207  ;;
8208  *)
8209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8210for as_dir in $PATH
8211do
8212  IFS=$as_save_IFS
8213  test -z "$as_dir" && as_dir=.
8214    for ac_exec_ext in '' $ac_executable_extensions; do
8215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8216    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8218    break 2
8219  fi
8220done
8221  done
8222IFS=$as_save_IFS
8223
8224  ;;
8225esac
8226fi
8227LS=$ac_cv_path_LS
8228if test -n "$LS"; then
8229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8230$as_echo "$LS" >&6; }
8231else
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8233$as_echo "no" >&6; }
8234fi
8235
8236
8237  test -n "$LS" && break
8238done
8239
8240  else
8241    # The variable is set, but is it from the command line or the environment?
8242
8243    # Try to remove the string !LS! from our list.
8244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8246      # If it failed, the variable was not from the command line. Ignore it,
8247      # but warn the user (except for BASH, which is always set by the calling BASH).
8248      if test "xLS" != xBASH; then
8249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8250$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8251      fi
8252      # Try to locate tool using the code snippet
8253      for ac_prog in ls
8254do
8255  # Extract the first word of "$ac_prog", so it can be a program name with args.
8256set dummy $ac_prog; ac_word=$2
8257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8258$as_echo_n "checking for $ac_word... " >&6; }
8259if ${ac_cv_path_LS+:} false; then :
8260  $as_echo_n "(cached) " >&6
8261else
8262  case $LS in
8263  [\\/]* | ?:[\\/]*)
8264  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8265  ;;
8266  *)
8267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268for as_dir in $PATH
8269do
8270  IFS=$as_save_IFS
8271  test -z "$as_dir" && as_dir=.
8272    for ac_exec_ext in '' $ac_executable_extensions; do
8273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8274    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8276    break 2
8277  fi
8278done
8279  done
8280IFS=$as_save_IFS
8281
8282  ;;
8283esac
8284fi
8285LS=$ac_cv_path_LS
8286if test -n "$LS"; then
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8288$as_echo "$LS" >&6; }
8289else
8290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8291$as_echo "no" >&6; }
8292fi
8293
8294
8295  test -n "$LS" && break
8296done
8297
8298    else
8299      # If it succeeded, then it was overridden by the user. We will use it
8300      # for the tool.
8301
8302      # First remove it from the list of overridden variables, so we can test
8303      # for unknown variables in the end.
8304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8305
8306      # Check if we try to supply an empty value
8307      if test "x$LS" = x; then
8308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8309$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8311$as_echo_n "checking for LS... " >&6; }
8312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8313$as_echo "disabled" >&6; }
8314      else
8315        # Check if the provided tool contains a complete path.
8316        tool_specified="$LS"
8317        tool_basename="${tool_specified##*/}"
8318        if test "x$tool_basename" = "x$tool_specified"; then
8319          # A command without a complete path is provided, search $PATH.
8320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8321$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8322          # Extract the first word of "$tool_basename", so it can be a program name with args.
8323set dummy $tool_basename; ac_word=$2
8324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8325$as_echo_n "checking for $ac_word... " >&6; }
8326if ${ac_cv_path_LS+:} false; then :
8327  $as_echo_n "(cached) " >&6
8328else
8329  case $LS in
8330  [\\/]* | ?:[\\/]*)
8331  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8332  ;;
8333  *)
8334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8335for as_dir in $PATH
8336do
8337  IFS=$as_save_IFS
8338  test -z "$as_dir" && as_dir=.
8339    for ac_exec_ext in '' $ac_executable_extensions; do
8340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8341    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8343    break 2
8344  fi
8345done
8346  done
8347IFS=$as_save_IFS
8348
8349  ;;
8350esac
8351fi
8352LS=$ac_cv_path_LS
8353if test -n "$LS"; then
8354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8355$as_echo "$LS" >&6; }
8356else
8357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8358$as_echo "no" >&6; }
8359fi
8360
8361
8362          if test "x$LS" = x; then
8363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8364          fi
8365        else
8366          # Otherwise we believe it is a complete path. Use it as it is.
8367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8368$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8370$as_echo_n "checking for LS... " >&6; }
8371          if test ! -x "$tool_specified"; then
8372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8373$as_echo "not found" >&6; }
8374            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8375          fi
8376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8377$as_echo "$tool_specified" >&6; }
8378        fi
8379      fi
8380    fi
8381
8382  fi
8383
8384
8385
8386  if test "x$LS" = x; then
8387    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8388  fi
8389
8390
8391
8392
8393
8394  # Publish this variable in the help.
8395
8396
8397  if [ -z "${MKDIR+x}" ]; then
8398    # The variable is not set by user, try to locate tool using the code snippet
8399    for ac_prog in mkdir
8400do
8401  # Extract the first word of "$ac_prog", so it can be a program name with args.
8402set dummy $ac_prog; ac_word=$2
8403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8404$as_echo_n "checking for $ac_word... " >&6; }
8405if ${ac_cv_path_MKDIR+:} false; then :
8406  $as_echo_n "(cached) " >&6
8407else
8408  case $MKDIR in
8409  [\\/]* | ?:[\\/]*)
8410  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8411  ;;
8412  *)
8413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8414for as_dir in $PATH
8415do
8416  IFS=$as_save_IFS
8417  test -z "$as_dir" && as_dir=.
8418    for ac_exec_ext in '' $ac_executable_extensions; do
8419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8420    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8422    break 2
8423  fi
8424done
8425  done
8426IFS=$as_save_IFS
8427
8428  ;;
8429esac
8430fi
8431MKDIR=$ac_cv_path_MKDIR
8432if test -n "$MKDIR"; then
8433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8434$as_echo "$MKDIR" >&6; }
8435else
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8437$as_echo "no" >&6; }
8438fi
8439
8440
8441  test -n "$MKDIR" && break
8442done
8443
8444  else
8445    # The variable is set, but is it from the command line or the environment?
8446
8447    # Try to remove the string !MKDIR! from our list.
8448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8450      # If it failed, the variable was not from the command line. Ignore it,
8451      # but warn the user (except for BASH, which is always set by the calling BASH).
8452      if test "xMKDIR" != xBASH; then
8453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8454$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8455      fi
8456      # Try to locate tool using the code snippet
8457      for ac_prog in mkdir
8458do
8459  # Extract the first word of "$ac_prog", so it can be a program name with args.
8460set dummy $ac_prog; ac_word=$2
8461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8462$as_echo_n "checking for $ac_word... " >&6; }
8463if ${ac_cv_path_MKDIR+:} false; then :
8464  $as_echo_n "(cached) " >&6
8465else
8466  case $MKDIR in
8467  [\\/]* | ?:[\\/]*)
8468  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8469  ;;
8470  *)
8471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8472for as_dir in $PATH
8473do
8474  IFS=$as_save_IFS
8475  test -z "$as_dir" && as_dir=.
8476    for ac_exec_ext in '' $ac_executable_extensions; do
8477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8478    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8480    break 2
8481  fi
8482done
8483  done
8484IFS=$as_save_IFS
8485
8486  ;;
8487esac
8488fi
8489MKDIR=$ac_cv_path_MKDIR
8490if test -n "$MKDIR"; then
8491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8492$as_echo "$MKDIR" >&6; }
8493else
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8495$as_echo "no" >&6; }
8496fi
8497
8498
8499  test -n "$MKDIR" && break
8500done
8501
8502    else
8503      # If it succeeded, then it was overridden by the user. We will use it
8504      # for the tool.
8505
8506      # First remove it from the list of overridden variables, so we can test
8507      # for unknown variables in the end.
8508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8509
8510      # Check if we try to supply an empty value
8511      if test "x$MKDIR" = x; then
8512        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8513$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8515$as_echo_n "checking for MKDIR... " >&6; }
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8517$as_echo "disabled" >&6; }
8518      else
8519        # Check if the provided tool contains a complete path.
8520        tool_specified="$MKDIR"
8521        tool_basename="${tool_specified##*/}"
8522        if test "x$tool_basename" = "x$tool_specified"; then
8523          # A command without a complete path is provided, search $PATH.
8524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8525$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8526          # Extract the first word of "$tool_basename", so it can be a program name with args.
8527set dummy $tool_basename; ac_word=$2
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8529$as_echo_n "checking for $ac_word... " >&6; }
8530if ${ac_cv_path_MKDIR+:} false; then :
8531  $as_echo_n "(cached) " >&6
8532else
8533  case $MKDIR in
8534  [\\/]* | ?:[\\/]*)
8535  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8536  ;;
8537  *)
8538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8539for as_dir in $PATH
8540do
8541  IFS=$as_save_IFS
8542  test -z "$as_dir" && as_dir=.
8543    for ac_exec_ext in '' $ac_executable_extensions; do
8544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8545    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8547    break 2
8548  fi
8549done
8550  done
8551IFS=$as_save_IFS
8552
8553  ;;
8554esac
8555fi
8556MKDIR=$ac_cv_path_MKDIR
8557if test -n "$MKDIR"; then
8558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8559$as_echo "$MKDIR" >&6; }
8560else
8561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8562$as_echo "no" >&6; }
8563fi
8564
8565
8566          if test "x$MKDIR" = x; then
8567            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8568          fi
8569        else
8570          # Otherwise we believe it is a complete path. Use it as it is.
8571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8572$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8573          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8574$as_echo_n "checking for MKDIR... " >&6; }
8575          if test ! -x "$tool_specified"; then
8576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8577$as_echo "not found" >&6; }
8578            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8579          fi
8580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8581$as_echo "$tool_specified" >&6; }
8582        fi
8583      fi
8584    fi
8585
8586  fi
8587
8588
8589
8590  if test "x$MKDIR" = x; then
8591    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8592  fi
8593
8594
8595
8596
8597
8598  # Publish this variable in the help.
8599
8600
8601  if [ -z "${MKTEMP+x}" ]; then
8602    # The variable is not set by user, try to locate tool using the code snippet
8603    for ac_prog in mktemp
8604do
8605  # Extract the first word of "$ac_prog", so it can be a program name with args.
8606set dummy $ac_prog; ac_word=$2
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8608$as_echo_n "checking for $ac_word... " >&6; }
8609if ${ac_cv_path_MKTEMP+:} false; then :
8610  $as_echo_n "(cached) " >&6
8611else
8612  case $MKTEMP in
8613  [\\/]* | ?:[\\/]*)
8614  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8615  ;;
8616  *)
8617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8618for as_dir in $PATH
8619do
8620  IFS=$as_save_IFS
8621  test -z "$as_dir" && as_dir=.
8622    for ac_exec_ext in '' $ac_executable_extensions; do
8623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8624    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8626    break 2
8627  fi
8628done
8629  done
8630IFS=$as_save_IFS
8631
8632  ;;
8633esac
8634fi
8635MKTEMP=$ac_cv_path_MKTEMP
8636if test -n "$MKTEMP"; then
8637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8638$as_echo "$MKTEMP" >&6; }
8639else
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641$as_echo "no" >&6; }
8642fi
8643
8644
8645  test -n "$MKTEMP" && break
8646done
8647
8648  else
8649    # The variable is set, but is it from the command line or the environment?
8650
8651    # Try to remove the string !MKTEMP! from our list.
8652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8654      # If it failed, the variable was not from the command line. Ignore it,
8655      # but warn the user (except for BASH, which is always set by the calling BASH).
8656      if test "xMKTEMP" != xBASH; then
8657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8658$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8659      fi
8660      # Try to locate tool using the code snippet
8661      for ac_prog in mktemp
8662do
8663  # Extract the first word of "$ac_prog", so it can be a program name with args.
8664set dummy $ac_prog; ac_word=$2
8665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8666$as_echo_n "checking for $ac_word... " >&6; }
8667if ${ac_cv_path_MKTEMP+:} false; then :
8668  $as_echo_n "(cached) " >&6
8669else
8670  case $MKTEMP in
8671  [\\/]* | ?:[\\/]*)
8672  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8673  ;;
8674  *)
8675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8676for as_dir in $PATH
8677do
8678  IFS=$as_save_IFS
8679  test -z "$as_dir" && as_dir=.
8680    for ac_exec_ext in '' $ac_executable_extensions; do
8681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8682    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8684    break 2
8685  fi
8686done
8687  done
8688IFS=$as_save_IFS
8689
8690  ;;
8691esac
8692fi
8693MKTEMP=$ac_cv_path_MKTEMP
8694if test -n "$MKTEMP"; then
8695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8696$as_echo "$MKTEMP" >&6; }
8697else
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8699$as_echo "no" >&6; }
8700fi
8701
8702
8703  test -n "$MKTEMP" && break
8704done
8705
8706    else
8707      # If it succeeded, then it was overridden by the user. We will use it
8708      # for the tool.
8709
8710      # First remove it from the list of overridden variables, so we can test
8711      # for unknown variables in the end.
8712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8713
8714      # Check if we try to supply an empty value
8715      if test "x$MKTEMP" = x; then
8716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8717$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8719$as_echo_n "checking for MKTEMP... " >&6; }
8720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8721$as_echo "disabled" >&6; }
8722      else
8723        # Check if the provided tool contains a complete path.
8724        tool_specified="$MKTEMP"
8725        tool_basename="${tool_specified##*/}"
8726        if test "x$tool_basename" = "x$tool_specified"; then
8727          # A command without a complete path is provided, search $PATH.
8728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8729$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8730          # Extract the first word of "$tool_basename", so it can be a program name with args.
8731set dummy $tool_basename; ac_word=$2
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733$as_echo_n "checking for $ac_word... " >&6; }
8734if ${ac_cv_path_MKTEMP+:} false; then :
8735  $as_echo_n "(cached) " >&6
8736else
8737  case $MKTEMP in
8738  [\\/]* | ?:[\\/]*)
8739  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8740  ;;
8741  *)
8742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8743for as_dir in $PATH
8744do
8745  IFS=$as_save_IFS
8746  test -z "$as_dir" && as_dir=.
8747    for ac_exec_ext in '' $ac_executable_extensions; do
8748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8749    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8751    break 2
8752  fi
8753done
8754  done
8755IFS=$as_save_IFS
8756
8757  ;;
8758esac
8759fi
8760MKTEMP=$ac_cv_path_MKTEMP
8761if test -n "$MKTEMP"; then
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8763$as_echo "$MKTEMP" >&6; }
8764else
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
8767fi
8768
8769
8770          if test "x$MKTEMP" = x; then
8771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8772          fi
8773        else
8774          # Otherwise we believe it is a complete path. Use it as it is.
8775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8776$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8778$as_echo_n "checking for MKTEMP... " >&6; }
8779          if test ! -x "$tool_specified"; then
8780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8781$as_echo "not found" >&6; }
8782            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8783          fi
8784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8785$as_echo "$tool_specified" >&6; }
8786        fi
8787      fi
8788    fi
8789
8790  fi
8791
8792
8793
8794  if test "x$MKTEMP" = x; then
8795    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8796  fi
8797
8798
8799
8800
8801
8802  # Publish this variable in the help.
8803
8804
8805  if [ -z "${MV+x}" ]; then
8806    # The variable is not set by user, try to locate tool using the code snippet
8807    for ac_prog in mv
8808do
8809  # Extract the first word of "$ac_prog", so it can be a program name with args.
8810set dummy $ac_prog; ac_word=$2
8811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8812$as_echo_n "checking for $ac_word... " >&6; }
8813if ${ac_cv_path_MV+:} false; then :
8814  $as_echo_n "(cached) " >&6
8815else
8816  case $MV in
8817  [\\/]* | ?:[\\/]*)
8818  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8819  ;;
8820  *)
8821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8822for as_dir in $PATH
8823do
8824  IFS=$as_save_IFS
8825  test -z "$as_dir" && as_dir=.
8826    for ac_exec_ext in '' $ac_executable_extensions; do
8827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8828    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8830    break 2
8831  fi
8832done
8833  done
8834IFS=$as_save_IFS
8835
8836  ;;
8837esac
8838fi
8839MV=$ac_cv_path_MV
8840if test -n "$MV"; then
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8842$as_echo "$MV" >&6; }
8843else
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
8846fi
8847
8848
8849  test -n "$MV" && break
8850done
8851
8852  else
8853    # The variable is set, but is it from the command line or the environment?
8854
8855    # Try to remove the string !MV! from our list.
8856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8858      # If it failed, the variable was not from the command line. Ignore it,
8859      # but warn the user (except for BASH, which is always set by the calling BASH).
8860      if test "xMV" != xBASH; then
8861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8862$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8863      fi
8864      # Try to locate tool using the code snippet
8865      for ac_prog in mv
8866do
8867  # Extract the first word of "$ac_prog", so it can be a program name with args.
8868set dummy $ac_prog; ac_word=$2
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8870$as_echo_n "checking for $ac_word... " >&6; }
8871if ${ac_cv_path_MV+:} false; then :
8872  $as_echo_n "(cached) " >&6
8873else
8874  case $MV in
8875  [\\/]* | ?:[\\/]*)
8876  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8877  ;;
8878  *)
8879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8880for as_dir in $PATH
8881do
8882  IFS=$as_save_IFS
8883  test -z "$as_dir" && as_dir=.
8884    for ac_exec_ext in '' $ac_executable_extensions; do
8885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8886    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8888    break 2
8889  fi
8890done
8891  done
8892IFS=$as_save_IFS
8893
8894  ;;
8895esac
8896fi
8897MV=$ac_cv_path_MV
8898if test -n "$MV"; then
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8900$as_echo "$MV" >&6; }
8901else
8902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8903$as_echo "no" >&6; }
8904fi
8905
8906
8907  test -n "$MV" && break
8908done
8909
8910    else
8911      # If it succeeded, then it was overridden by the user. We will use it
8912      # for the tool.
8913
8914      # First remove it from the list of overridden variables, so we can test
8915      # for unknown variables in the end.
8916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8917
8918      # Check if we try to supply an empty value
8919      if test "x$MV" = x; then
8920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8921$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8923$as_echo_n "checking for MV... " >&6; }
8924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8925$as_echo "disabled" >&6; }
8926      else
8927        # Check if the provided tool contains a complete path.
8928        tool_specified="$MV"
8929        tool_basename="${tool_specified##*/}"
8930        if test "x$tool_basename" = "x$tool_specified"; then
8931          # A command without a complete path is provided, search $PATH.
8932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8933$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8934          # Extract the first word of "$tool_basename", so it can be a program name with args.
8935set dummy $tool_basename; ac_word=$2
8936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8937$as_echo_n "checking for $ac_word... " >&6; }
8938if ${ac_cv_path_MV+:} false; then :
8939  $as_echo_n "(cached) " >&6
8940else
8941  case $MV in
8942  [\\/]* | ?:[\\/]*)
8943  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8944  ;;
8945  *)
8946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8947for as_dir in $PATH
8948do
8949  IFS=$as_save_IFS
8950  test -z "$as_dir" && as_dir=.
8951    for ac_exec_ext in '' $ac_executable_extensions; do
8952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8953    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8955    break 2
8956  fi
8957done
8958  done
8959IFS=$as_save_IFS
8960
8961  ;;
8962esac
8963fi
8964MV=$ac_cv_path_MV
8965if test -n "$MV"; then
8966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8967$as_echo "$MV" >&6; }
8968else
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8970$as_echo "no" >&6; }
8971fi
8972
8973
8974          if test "x$MV" = x; then
8975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8976          fi
8977        else
8978          # Otherwise we believe it is a complete path. Use it as it is.
8979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8980$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8982$as_echo_n "checking for MV... " >&6; }
8983          if test ! -x "$tool_specified"; then
8984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8985$as_echo "not found" >&6; }
8986            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8987          fi
8988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8989$as_echo "$tool_specified" >&6; }
8990        fi
8991      fi
8992    fi
8993
8994  fi
8995
8996
8997
8998  if test "x$MV" = x; then
8999    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9000  fi
9001
9002
9003
9004
9005
9006  # Publish this variable in the help.
9007
9008
9009  if [ -z "${NAWK+x}" ]; then
9010    # The variable is not set by user, try to locate tool using the code snippet
9011    for ac_prog in nawk gawk awk
9012do
9013  # Extract the first word of "$ac_prog", so it can be a program name with args.
9014set dummy $ac_prog; ac_word=$2
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9016$as_echo_n "checking for $ac_word... " >&6; }
9017if ${ac_cv_path_NAWK+:} false; then :
9018  $as_echo_n "(cached) " >&6
9019else
9020  case $NAWK in
9021  [\\/]* | ?:[\\/]*)
9022  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9023  ;;
9024  *)
9025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9026for as_dir in $PATH
9027do
9028  IFS=$as_save_IFS
9029  test -z "$as_dir" && as_dir=.
9030    for ac_exec_ext in '' $ac_executable_extensions; do
9031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9032    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9034    break 2
9035  fi
9036done
9037  done
9038IFS=$as_save_IFS
9039
9040  ;;
9041esac
9042fi
9043NAWK=$ac_cv_path_NAWK
9044if test -n "$NAWK"; then
9045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9046$as_echo "$NAWK" >&6; }
9047else
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
9050fi
9051
9052
9053  test -n "$NAWK" && break
9054done
9055
9056  else
9057    # The variable is set, but is it from the command line or the environment?
9058
9059    # Try to remove the string !NAWK! from our list.
9060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9062      # If it failed, the variable was not from the command line. Ignore it,
9063      # but warn the user (except for BASH, which is always set by the calling BASH).
9064      if test "xNAWK" != xBASH; then
9065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9066$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9067      fi
9068      # Try to locate tool using the code snippet
9069      for ac_prog in nawk gawk awk
9070do
9071  # Extract the first word of "$ac_prog", so it can be a program name with args.
9072set dummy $ac_prog; ac_word=$2
9073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9074$as_echo_n "checking for $ac_word... " >&6; }
9075if ${ac_cv_path_NAWK+:} false; then :
9076  $as_echo_n "(cached) " >&6
9077else
9078  case $NAWK in
9079  [\\/]* | ?:[\\/]*)
9080  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9081  ;;
9082  *)
9083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9084for as_dir in $PATH
9085do
9086  IFS=$as_save_IFS
9087  test -z "$as_dir" && as_dir=.
9088    for ac_exec_ext in '' $ac_executable_extensions; do
9089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9090    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9092    break 2
9093  fi
9094done
9095  done
9096IFS=$as_save_IFS
9097
9098  ;;
9099esac
9100fi
9101NAWK=$ac_cv_path_NAWK
9102if test -n "$NAWK"; then
9103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9104$as_echo "$NAWK" >&6; }
9105else
9106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107$as_echo "no" >&6; }
9108fi
9109
9110
9111  test -n "$NAWK" && break
9112done
9113
9114    else
9115      # If it succeeded, then it was overridden by the user. We will use it
9116      # for the tool.
9117
9118      # First remove it from the list of overridden variables, so we can test
9119      # for unknown variables in the end.
9120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9121
9122      # Check if we try to supply an empty value
9123      if test "x$NAWK" = x; then
9124        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9125$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9127$as_echo_n "checking for NAWK... " >&6; }
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9129$as_echo "disabled" >&6; }
9130      else
9131        # Check if the provided tool contains a complete path.
9132        tool_specified="$NAWK"
9133        tool_basename="${tool_specified##*/}"
9134        if test "x$tool_basename" = "x$tool_specified"; then
9135          # A command without a complete path is provided, search $PATH.
9136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9137$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9138          # Extract the first word of "$tool_basename", so it can be a program name with args.
9139set dummy $tool_basename; ac_word=$2
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141$as_echo_n "checking for $ac_word... " >&6; }
9142if ${ac_cv_path_NAWK+:} false; then :
9143  $as_echo_n "(cached) " >&6
9144else
9145  case $NAWK in
9146  [\\/]* | ?:[\\/]*)
9147  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9148  ;;
9149  *)
9150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151for as_dir in $PATH
9152do
9153  IFS=$as_save_IFS
9154  test -z "$as_dir" && as_dir=.
9155    for ac_exec_ext in '' $ac_executable_extensions; do
9156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9157    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9159    break 2
9160  fi
9161done
9162  done
9163IFS=$as_save_IFS
9164
9165  ;;
9166esac
9167fi
9168NAWK=$ac_cv_path_NAWK
9169if test -n "$NAWK"; then
9170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9171$as_echo "$NAWK" >&6; }
9172else
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
9175fi
9176
9177
9178          if test "x$NAWK" = x; then
9179            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9180          fi
9181        else
9182          # Otherwise we believe it is a complete path. Use it as it is.
9183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9184$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9186$as_echo_n "checking for NAWK... " >&6; }
9187          if test ! -x "$tool_specified"; then
9188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9189$as_echo "not found" >&6; }
9190            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9191          fi
9192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9193$as_echo "$tool_specified" >&6; }
9194        fi
9195      fi
9196    fi
9197
9198  fi
9199
9200
9201
9202  if test "x$NAWK" = x; then
9203    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9204  fi
9205
9206
9207
9208
9209
9210  # Publish this variable in the help.
9211
9212
9213  if [ -z "${PRINTF+x}" ]; then
9214    # The variable is not set by user, try to locate tool using the code snippet
9215    for ac_prog in printf
9216do
9217  # Extract the first word of "$ac_prog", so it can be a program name with args.
9218set dummy $ac_prog; ac_word=$2
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9220$as_echo_n "checking for $ac_word... " >&6; }
9221if ${ac_cv_path_PRINTF+:} false; then :
9222  $as_echo_n "(cached) " >&6
9223else
9224  case $PRINTF in
9225  [\\/]* | ?:[\\/]*)
9226  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9227  ;;
9228  *)
9229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9230for as_dir in $PATH
9231do
9232  IFS=$as_save_IFS
9233  test -z "$as_dir" && as_dir=.
9234    for ac_exec_ext in '' $ac_executable_extensions; do
9235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9236    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9238    break 2
9239  fi
9240done
9241  done
9242IFS=$as_save_IFS
9243
9244  ;;
9245esac
9246fi
9247PRINTF=$ac_cv_path_PRINTF
9248if test -n "$PRINTF"; then
9249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9250$as_echo "$PRINTF" >&6; }
9251else
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
9254fi
9255
9256
9257  test -n "$PRINTF" && break
9258done
9259
9260  else
9261    # The variable is set, but is it from the command line or the environment?
9262
9263    # Try to remove the string !PRINTF! from our list.
9264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9266      # If it failed, the variable was not from the command line. Ignore it,
9267      # but warn the user (except for BASH, which is always set by the calling BASH).
9268      if test "xPRINTF" != xBASH; then
9269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9270$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9271      fi
9272      # Try to locate tool using the code snippet
9273      for ac_prog in printf
9274do
9275  # Extract the first word of "$ac_prog", so it can be a program name with args.
9276set dummy $ac_prog; ac_word=$2
9277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9278$as_echo_n "checking for $ac_word... " >&6; }
9279if ${ac_cv_path_PRINTF+:} false; then :
9280  $as_echo_n "(cached) " >&6
9281else
9282  case $PRINTF in
9283  [\\/]* | ?:[\\/]*)
9284  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9285  ;;
9286  *)
9287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9288for as_dir in $PATH
9289do
9290  IFS=$as_save_IFS
9291  test -z "$as_dir" && as_dir=.
9292    for ac_exec_ext in '' $ac_executable_extensions; do
9293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9294    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9296    break 2
9297  fi
9298done
9299  done
9300IFS=$as_save_IFS
9301
9302  ;;
9303esac
9304fi
9305PRINTF=$ac_cv_path_PRINTF
9306if test -n "$PRINTF"; then
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9308$as_echo "$PRINTF" >&6; }
9309else
9310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9311$as_echo "no" >&6; }
9312fi
9313
9314
9315  test -n "$PRINTF" && break
9316done
9317
9318    else
9319      # If it succeeded, then it was overridden by the user. We will use it
9320      # for the tool.
9321
9322      # First remove it from the list of overridden variables, so we can test
9323      # for unknown variables in the end.
9324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9325
9326      # Check if we try to supply an empty value
9327      if test "x$PRINTF" = x; then
9328        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9329$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9331$as_echo_n "checking for PRINTF... " >&6; }
9332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9333$as_echo "disabled" >&6; }
9334      else
9335        # Check if the provided tool contains a complete path.
9336        tool_specified="$PRINTF"
9337        tool_basename="${tool_specified##*/}"
9338        if test "x$tool_basename" = "x$tool_specified"; then
9339          # A command without a complete path is provided, search $PATH.
9340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9341$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9342          # Extract the first word of "$tool_basename", so it can be a program name with args.
9343set dummy $tool_basename; ac_word=$2
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9345$as_echo_n "checking for $ac_word... " >&6; }
9346if ${ac_cv_path_PRINTF+:} false; then :
9347  $as_echo_n "(cached) " >&6
9348else
9349  case $PRINTF in
9350  [\\/]* | ?:[\\/]*)
9351  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9352  ;;
9353  *)
9354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9355for as_dir in $PATH
9356do
9357  IFS=$as_save_IFS
9358  test -z "$as_dir" && as_dir=.
9359    for ac_exec_ext in '' $ac_executable_extensions; do
9360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9361    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9363    break 2
9364  fi
9365done
9366  done
9367IFS=$as_save_IFS
9368
9369  ;;
9370esac
9371fi
9372PRINTF=$ac_cv_path_PRINTF
9373if test -n "$PRINTF"; then
9374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9375$as_echo "$PRINTF" >&6; }
9376else
9377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378$as_echo "no" >&6; }
9379fi
9380
9381
9382          if test "x$PRINTF" = x; then
9383            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9384          fi
9385        else
9386          # Otherwise we believe it is a complete path. Use it as it is.
9387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9388$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9390$as_echo_n "checking for PRINTF... " >&6; }
9391          if test ! -x "$tool_specified"; then
9392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9393$as_echo "not found" >&6; }
9394            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9395          fi
9396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9397$as_echo "$tool_specified" >&6; }
9398        fi
9399      fi
9400    fi
9401
9402  fi
9403
9404
9405
9406  if test "x$PRINTF" = x; then
9407    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9408  fi
9409
9410
9411
9412
9413
9414  # Publish this variable in the help.
9415
9416
9417  if [ -z "${RM+x}" ]; then
9418    # The variable is not set by user, try to locate tool using the code snippet
9419    for ac_prog in rm
9420do
9421  # Extract the first word of "$ac_prog", so it can be a program name with args.
9422set dummy $ac_prog; ac_word=$2
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9424$as_echo_n "checking for $ac_word... " >&6; }
9425if ${ac_cv_path_RM+:} false; then :
9426  $as_echo_n "(cached) " >&6
9427else
9428  case $RM in
9429  [\\/]* | ?:[\\/]*)
9430  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9431  ;;
9432  *)
9433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9434for as_dir in $PATH
9435do
9436  IFS=$as_save_IFS
9437  test -z "$as_dir" && as_dir=.
9438    for ac_exec_ext in '' $ac_executable_extensions; do
9439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9440    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9442    break 2
9443  fi
9444done
9445  done
9446IFS=$as_save_IFS
9447
9448  ;;
9449esac
9450fi
9451RM=$ac_cv_path_RM
9452if test -n "$RM"; then
9453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9454$as_echo "$RM" >&6; }
9455else
9456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
9458fi
9459
9460
9461  test -n "$RM" && break
9462done
9463
9464  else
9465    # The variable is set, but is it from the command line or the environment?
9466
9467    # Try to remove the string !RM! from our list.
9468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9470      # If it failed, the variable was not from the command line. Ignore it,
9471      # but warn the user (except for BASH, which is always set by the calling BASH).
9472      if test "xRM" != xBASH; then
9473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9474$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9475      fi
9476      # Try to locate tool using the code snippet
9477      for ac_prog in rm
9478do
9479  # Extract the first word of "$ac_prog", so it can be a program name with args.
9480set dummy $ac_prog; ac_word=$2
9481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9482$as_echo_n "checking for $ac_word... " >&6; }
9483if ${ac_cv_path_RM+:} false; then :
9484  $as_echo_n "(cached) " >&6
9485else
9486  case $RM in
9487  [\\/]* | ?:[\\/]*)
9488  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9489  ;;
9490  *)
9491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9492for as_dir in $PATH
9493do
9494  IFS=$as_save_IFS
9495  test -z "$as_dir" && as_dir=.
9496    for ac_exec_ext in '' $ac_executable_extensions; do
9497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9498    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9500    break 2
9501  fi
9502done
9503  done
9504IFS=$as_save_IFS
9505
9506  ;;
9507esac
9508fi
9509RM=$ac_cv_path_RM
9510if test -n "$RM"; then
9511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9512$as_echo "$RM" >&6; }
9513else
9514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9515$as_echo "no" >&6; }
9516fi
9517
9518
9519  test -n "$RM" && break
9520done
9521
9522    else
9523      # If it succeeded, then it was overridden by the user. We will use it
9524      # for the tool.
9525
9526      # First remove it from the list of overridden variables, so we can test
9527      # for unknown variables in the end.
9528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9529
9530      # Check if we try to supply an empty value
9531      if test "x$RM" = x; then
9532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9533$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9535$as_echo_n "checking for RM... " >&6; }
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9537$as_echo "disabled" >&6; }
9538      else
9539        # Check if the provided tool contains a complete path.
9540        tool_specified="$RM"
9541        tool_basename="${tool_specified##*/}"
9542        if test "x$tool_basename" = "x$tool_specified"; then
9543          # A command without a complete path is provided, search $PATH.
9544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9545$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9546          # Extract the first word of "$tool_basename", so it can be a program name with args.
9547set dummy $tool_basename; ac_word=$2
9548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9549$as_echo_n "checking for $ac_word... " >&6; }
9550if ${ac_cv_path_RM+:} false; then :
9551  $as_echo_n "(cached) " >&6
9552else
9553  case $RM in
9554  [\\/]* | ?:[\\/]*)
9555  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9556  ;;
9557  *)
9558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9559for as_dir in $PATH
9560do
9561  IFS=$as_save_IFS
9562  test -z "$as_dir" && as_dir=.
9563    for ac_exec_ext in '' $ac_executable_extensions; do
9564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9565    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9567    break 2
9568  fi
9569done
9570  done
9571IFS=$as_save_IFS
9572
9573  ;;
9574esac
9575fi
9576RM=$ac_cv_path_RM
9577if test -n "$RM"; then
9578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9579$as_echo "$RM" >&6; }
9580else
9581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9582$as_echo "no" >&6; }
9583fi
9584
9585
9586          if test "x$RM" = x; then
9587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9588          fi
9589        else
9590          # Otherwise we believe it is a complete path. Use it as it is.
9591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9592$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9594$as_echo_n "checking for RM... " >&6; }
9595          if test ! -x "$tool_specified"; then
9596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9597$as_echo "not found" >&6; }
9598            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9599          fi
9600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9601$as_echo "$tool_specified" >&6; }
9602        fi
9603      fi
9604    fi
9605
9606  fi
9607
9608
9609
9610  if test "x$RM" = x; then
9611    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9612  fi
9613
9614
9615
9616
9617
9618  # Publish this variable in the help.
9619
9620
9621  if [ -z "${RMDIR+x}" ]; then
9622    # The variable is not set by user, try to locate tool using the code snippet
9623    for ac_prog in rmdir
9624do
9625  # Extract the first word of "$ac_prog", so it can be a program name with args.
9626set dummy $ac_prog; ac_word=$2
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9628$as_echo_n "checking for $ac_word... " >&6; }
9629if ${ac_cv_path_RMDIR+:} false; then :
9630  $as_echo_n "(cached) " >&6
9631else
9632  case $RMDIR in
9633  [\\/]* | ?:[\\/]*)
9634  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9635  ;;
9636  *)
9637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9638for as_dir in $PATH
9639do
9640  IFS=$as_save_IFS
9641  test -z "$as_dir" && as_dir=.
9642    for ac_exec_ext in '' $ac_executable_extensions; do
9643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9644    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9646    break 2
9647  fi
9648done
9649  done
9650IFS=$as_save_IFS
9651
9652  ;;
9653esac
9654fi
9655RMDIR=$ac_cv_path_RMDIR
9656if test -n "$RMDIR"; then
9657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9658$as_echo "$RMDIR" >&6; }
9659else
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
9662fi
9663
9664
9665  test -n "$RMDIR" && break
9666done
9667
9668  else
9669    # The variable is set, but is it from the command line or the environment?
9670
9671    # Try to remove the string !RMDIR! from our list.
9672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9674      # If it failed, the variable was not from the command line. Ignore it,
9675      # but warn the user (except for BASH, which is always set by the calling BASH).
9676      if test "xRMDIR" != xBASH; then
9677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9678$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9679      fi
9680      # Try to locate tool using the code snippet
9681      for ac_prog in rmdir
9682do
9683  # Extract the first word of "$ac_prog", so it can be a program name with args.
9684set dummy $ac_prog; ac_word=$2
9685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9686$as_echo_n "checking for $ac_word... " >&6; }
9687if ${ac_cv_path_RMDIR+:} false; then :
9688  $as_echo_n "(cached) " >&6
9689else
9690  case $RMDIR in
9691  [\\/]* | ?:[\\/]*)
9692  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9693  ;;
9694  *)
9695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9696for as_dir in $PATH
9697do
9698  IFS=$as_save_IFS
9699  test -z "$as_dir" && as_dir=.
9700    for ac_exec_ext in '' $ac_executable_extensions; do
9701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9702    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9704    break 2
9705  fi
9706done
9707  done
9708IFS=$as_save_IFS
9709
9710  ;;
9711esac
9712fi
9713RMDIR=$ac_cv_path_RMDIR
9714if test -n "$RMDIR"; then
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9716$as_echo "$RMDIR" >&6; }
9717else
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
9720fi
9721
9722
9723  test -n "$RMDIR" && break
9724done
9725
9726    else
9727      # If it succeeded, then it was overridden by the user. We will use it
9728      # for the tool.
9729
9730      # First remove it from the list of overridden variables, so we can test
9731      # for unknown variables in the end.
9732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9733
9734      # Check if we try to supply an empty value
9735      if test "x$RMDIR" = x; then
9736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9737$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9739$as_echo_n "checking for RMDIR... " >&6; }
9740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9741$as_echo "disabled" >&6; }
9742      else
9743        # Check if the provided tool contains a complete path.
9744        tool_specified="$RMDIR"
9745        tool_basename="${tool_specified##*/}"
9746        if test "x$tool_basename" = "x$tool_specified"; then
9747          # A command without a complete path is provided, search $PATH.
9748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9749$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9750          # Extract the first word of "$tool_basename", so it can be a program name with args.
9751set dummy $tool_basename; ac_word=$2
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9753$as_echo_n "checking for $ac_word... " >&6; }
9754if ${ac_cv_path_RMDIR+:} false; then :
9755  $as_echo_n "(cached) " >&6
9756else
9757  case $RMDIR in
9758  [\\/]* | ?:[\\/]*)
9759  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9760  ;;
9761  *)
9762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763for as_dir in $PATH
9764do
9765  IFS=$as_save_IFS
9766  test -z "$as_dir" && as_dir=.
9767    for ac_exec_ext in '' $ac_executable_extensions; do
9768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9769    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771    break 2
9772  fi
9773done
9774  done
9775IFS=$as_save_IFS
9776
9777  ;;
9778esac
9779fi
9780RMDIR=$ac_cv_path_RMDIR
9781if test -n "$RMDIR"; then
9782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9783$as_echo "$RMDIR" >&6; }
9784else
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
9787fi
9788
9789
9790          if test "x$RMDIR" = x; then
9791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9792          fi
9793        else
9794          # Otherwise we believe it is a complete path. Use it as it is.
9795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9796$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9798$as_echo_n "checking for RMDIR... " >&6; }
9799          if test ! -x "$tool_specified"; then
9800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9801$as_echo "not found" >&6; }
9802            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9803          fi
9804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9805$as_echo "$tool_specified" >&6; }
9806        fi
9807      fi
9808    fi
9809
9810  fi
9811
9812
9813
9814  if test "x$RMDIR" = x; then
9815    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9816  fi
9817
9818
9819
9820
9821
9822  # Publish this variable in the help.
9823
9824
9825  if [ -z "${SH+x}" ]; then
9826    # The variable is not set by user, try to locate tool using the code snippet
9827    for ac_prog in sh
9828do
9829  # Extract the first word of "$ac_prog", so it can be a program name with args.
9830set dummy $ac_prog; ac_word=$2
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832$as_echo_n "checking for $ac_word... " >&6; }
9833if ${ac_cv_path_SH+:} false; then :
9834  $as_echo_n "(cached) " >&6
9835else
9836  case $SH in
9837  [\\/]* | ?:[\\/]*)
9838  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9839  ;;
9840  *)
9841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842for as_dir in $PATH
9843do
9844  IFS=$as_save_IFS
9845  test -z "$as_dir" && as_dir=.
9846    for ac_exec_ext in '' $ac_executable_extensions; do
9847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850    break 2
9851  fi
9852done
9853  done
9854IFS=$as_save_IFS
9855
9856  ;;
9857esac
9858fi
9859SH=$ac_cv_path_SH
9860if test -n "$SH"; then
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9862$as_echo "$SH" >&6; }
9863else
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866fi
9867
9868
9869  test -n "$SH" && break
9870done
9871
9872  else
9873    # The variable is set, but is it from the command line or the environment?
9874
9875    # Try to remove the string !SH! from our list.
9876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9878      # If it failed, the variable was not from the command line. Ignore it,
9879      # but warn the user (except for BASH, which is always set by the calling BASH).
9880      if test "xSH" != xBASH; then
9881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9882$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9883      fi
9884      # Try to locate tool using the code snippet
9885      for ac_prog in sh
9886do
9887  # Extract the first word of "$ac_prog", so it can be a program name with args.
9888set dummy $ac_prog; ac_word=$2
9889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9890$as_echo_n "checking for $ac_word... " >&6; }
9891if ${ac_cv_path_SH+:} false; then :
9892  $as_echo_n "(cached) " >&6
9893else
9894  case $SH in
9895  [\\/]* | ?:[\\/]*)
9896  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9897  ;;
9898  *)
9899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9900for as_dir in $PATH
9901do
9902  IFS=$as_save_IFS
9903  test -z "$as_dir" && as_dir=.
9904    for ac_exec_ext in '' $ac_executable_extensions; do
9905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9906    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9908    break 2
9909  fi
9910done
9911  done
9912IFS=$as_save_IFS
9913
9914  ;;
9915esac
9916fi
9917SH=$ac_cv_path_SH
9918if test -n "$SH"; then
9919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9920$as_echo "$SH" >&6; }
9921else
9922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
9924fi
9925
9926
9927  test -n "$SH" && break
9928done
9929
9930    else
9931      # If it succeeded, then it was overridden by the user. We will use it
9932      # for the tool.
9933
9934      # First remove it from the list of overridden variables, so we can test
9935      # for unknown variables in the end.
9936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9937
9938      # Check if we try to supply an empty value
9939      if test "x$SH" = x; then
9940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9941$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9943$as_echo_n "checking for SH... " >&6; }
9944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9945$as_echo "disabled" >&6; }
9946      else
9947        # Check if the provided tool contains a complete path.
9948        tool_specified="$SH"
9949        tool_basename="${tool_specified##*/}"
9950        if test "x$tool_basename" = "x$tool_specified"; then
9951          # A command without a complete path is provided, search $PATH.
9952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9953$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9954          # Extract the first word of "$tool_basename", so it can be a program name with args.
9955set dummy $tool_basename; ac_word=$2
9956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9957$as_echo_n "checking for $ac_word... " >&6; }
9958if ${ac_cv_path_SH+:} false; then :
9959  $as_echo_n "(cached) " >&6
9960else
9961  case $SH in
9962  [\\/]* | ?:[\\/]*)
9963  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9964  ;;
9965  *)
9966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9967for as_dir in $PATH
9968do
9969  IFS=$as_save_IFS
9970  test -z "$as_dir" && as_dir=.
9971    for ac_exec_ext in '' $ac_executable_extensions; do
9972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9973    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9975    break 2
9976  fi
9977done
9978  done
9979IFS=$as_save_IFS
9980
9981  ;;
9982esac
9983fi
9984SH=$ac_cv_path_SH
9985if test -n "$SH"; then
9986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9987$as_echo "$SH" >&6; }
9988else
9989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9990$as_echo "no" >&6; }
9991fi
9992
9993
9994          if test "x$SH" = x; then
9995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9996          fi
9997        else
9998          # Otherwise we believe it is a complete path. Use it as it is.
9999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10000$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10002$as_echo_n "checking for SH... " >&6; }
10003          if test ! -x "$tool_specified"; then
10004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10005$as_echo "not found" >&6; }
10006            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10007          fi
10008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10009$as_echo "$tool_specified" >&6; }
10010        fi
10011      fi
10012    fi
10013
10014  fi
10015
10016
10017
10018  if test "x$SH" = x; then
10019    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10020  fi
10021
10022
10023
10024
10025
10026  # Publish this variable in the help.
10027
10028
10029  if [ -z "${SORT+x}" ]; then
10030    # The variable is not set by user, try to locate tool using the code snippet
10031    for ac_prog in sort
10032do
10033  # Extract the first word of "$ac_prog", so it can be a program name with args.
10034set dummy $ac_prog; ac_word=$2
10035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10036$as_echo_n "checking for $ac_word... " >&6; }
10037if ${ac_cv_path_SORT+:} false; then :
10038  $as_echo_n "(cached) " >&6
10039else
10040  case $SORT in
10041  [\\/]* | ?:[\\/]*)
10042  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10043  ;;
10044  *)
10045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10046for as_dir in $PATH
10047do
10048  IFS=$as_save_IFS
10049  test -z "$as_dir" && as_dir=.
10050    for ac_exec_ext in '' $ac_executable_extensions; do
10051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10052    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10054    break 2
10055  fi
10056done
10057  done
10058IFS=$as_save_IFS
10059
10060  ;;
10061esac
10062fi
10063SORT=$ac_cv_path_SORT
10064if test -n "$SORT"; then
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10066$as_echo "$SORT" >&6; }
10067else
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070fi
10071
10072
10073  test -n "$SORT" && break
10074done
10075
10076  else
10077    # The variable is set, but is it from the command line or the environment?
10078
10079    # Try to remove the string !SORT! from our list.
10080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10082      # If it failed, the variable was not from the command line. Ignore it,
10083      # but warn the user (except for BASH, which is always set by the calling BASH).
10084      if test "xSORT" != xBASH; then
10085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10086$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10087      fi
10088      # Try to locate tool using the code snippet
10089      for ac_prog in sort
10090do
10091  # Extract the first word of "$ac_prog", so it can be a program name with args.
10092set dummy $ac_prog; ac_word=$2
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10094$as_echo_n "checking for $ac_word... " >&6; }
10095if ${ac_cv_path_SORT+:} false; then :
10096  $as_echo_n "(cached) " >&6
10097else
10098  case $SORT in
10099  [\\/]* | ?:[\\/]*)
10100  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10101  ;;
10102  *)
10103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10104for as_dir in $PATH
10105do
10106  IFS=$as_save_IFS
10107  test -z "$as_dir" && as_dir=.
10108    for ac_exec_ext in '' $ac_executable_extensions; do
10109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10110    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10112    break 2
10113  fi
10114done
10115  done
10116IFS=$as_save_IFS
10117
10118  ;;
10119esac
10120fi
10121SORT=$ac_cv_path_SORT
10122if test -n "$SORT"; then
10123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10124$as_echo "$SORT" >&6; }
10125else
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10127$as_echo "no" >&6; }
10128fi
10129
10130
10131  test -n "$SORT" && break
10132done
10133
10134    else
10135      # If it succeeded, then it was overridden by the user. We will use it
10136      # for the tool.
10137
10138      # First remove it from the list of overridden variables, so we can test
10139      # for unknown variables in the end.
10140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10141
10142      # Check if we try to supply an empty value
10143      if test "x$SORT" = x; then
10144        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10145$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10147$as_echo_n "checking for SORT... " >&6; }
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10149$as_echo "disabled" >&6; }
10150      else
10151        # Check if the provided tool contains a complete path.
10152        tool_specified="$SORT"
10153        tool_basename="${tool_specified##*/}"
10154        if test "x$tool_basename" = "x$tool_specified"; then
10155          # A command without a complete path is provided, search $PATH.
10156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10157$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10158          # Extract the first word of "$tool_basename", so it can be a program name with args.
10159set dummy $tool_basename; ac_word=$2
10160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10161$as_echo_n "checking for $ac_word... " >&6; }
10162if ${ac_cv_path_SORT+:} false; then :
10163  $as_echo_n "(cached) " >&6
10164else
10165  case $SORT in
10166  [\\/]* | ?:[\\/]*)
10167  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10168  ;;
10169  *)
10170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10171for as_dir in $PATH
10172do
10173  IFS=$as_save_IFS
10174  test -z "$as_dir" && as_dir=.
10175    for ac_exec_ext in '' $ac_executable_extensions; do
10176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10177    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10179    break 2
10180  fi
10181done
10182  done
10183IFS=$as_save_IFS
10184
10185  ;;
10186esac
10187fi
10188SORT=$ac_cv_path_SORT
10189if test -n "$SORT"; then
10190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10191$as_echo "$SORT" >&6; }
10192else
10193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10194$as_echo "no" >&6; }
10195fi
10196
10197
10198          if test "x$SORT" = x; then
10199            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10200          fi
10201        else
10202          # Otherwise we believe it is a complete path. Use it as it is.
10203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10204$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10205          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10206$as_echo_n "checking for SORT... " >&6; }
10207          if test ! -x "$tool_specified"; then
10208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10209$as_echo "not found" >&6; }
10210            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10211          fi
10212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10213$as_echo "$tool_specified" >&6; }
10214        fi
10215      fi
10216    fi
10217
10218  fi
10219
10220
10221
10222  if test "x$SORT" = x; then
10223    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10224  fi
10225
10226
10227
10228
10229
10230  # Publish this variable in the help.
10231
10232
10233  if [ -z "${TAIL+x}" ]; then
10234    # The variable is not set by user, try to locate tool using the code snippet
10235    for ac_prog in tail
10236do
10237  # Extract the first word of "$ac_prog", so it can be a program name with args.
10238set dummy $ac_prog; ac_word=$2
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240$as_echo_n "checking for $ac_word... " >&6; }
10241if ${ac_cv_path_TAIL+:} false; then :
10242  $as_echo_n "(cached) " >&6
10243else
10244  case $TAIL in
10245  [\\/]* | ?:[\\/]*)
10246  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10247  ;;
10248  *)
10249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250for as_dir in $PATH
10251do
10252  IFS=$as_save_IFS
10253  test -z "$as_dir" && as_dir=.
10254    for ac_exec_ext in '' $ac_executable_extensions; do
10255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10256    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258    break 2
10259  fi
10260done
10261  done
10262IFS=$as_save_IFS
10263
10264  ;;
10265esac
10266fi
10267TAIL=$ac_cv_path_TAIL
10268if test -n "$TAIL"; then
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10270$as_echo "$TAIL" >&6; }
10271else
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
10274fi
10275
10276
10277  test -n "$TAIL" && break
10278done
10279
10280  else
10281    # The variable is set, but is it from the command line or the environment?
10282
10283    # Try to remove the string !TAIL! from our list.
10284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10286      # If it failed, the variable was not from the command line. Ignore it,
10287      # but warn the user (except for BASH, which is always set by the calling BASH).
10288      if test "xTAIL" != xBASH; then
10289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10290$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10291      fi
10292      # Try to locate tool using the code snippet
10293      for ac_prog in tail
10294do
10295  # Extract the first word of "$ac_prog", so it can be a program name with args.
10296set dummy $ac_prog; ac_word=$2
10297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10298$as_echo_n "checking for $ac_word... " >&6; }
10299if ${ac_cv_path_TAIL+:} false; then :
10300  $as_echo_n "(cached) " >&6
10301else
10302  case $TAIL in
10303  [\\/]* | ?:[\\/]*)
10304  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10305  ;;
10306  *)
10307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10308for as_dir in $PATH
10309do
10310  IFS=$as_save_IFS
10311  test -z "$as_dir" && as_dir=.
10312    for ac_exec_ext in '' $ac_executable_extensions; do
10313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10314    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10316    break 2
10317  fi
10318done
10319  done
10320IFS=$as_save_IFS
10321
10322  ;;
10323esac
10324fi
10325TAIL=$ac_cv_path_TAIL
10326if test -n "$TAIL"; then
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10328$as_echo "$TAIL" >&6; }
10329else
10330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
10332fi
10333
10334
10335  test -n "$TAIL" && break
10336done
10337
10338    else
10339      # If it succeeded, then it was overridden by the user. We will use it
10340      # for the tool.
10341
10342      # First remove it from the list of overridden variables, so we can test
10343      # for unknown variables in the end.
10344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10345
10346      # Check if we try to supply an empty value
10347      if test "x$TAIL" = x; then
10348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10349$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10351$as_echo_n "checking for TAIL... " >&6; }
10352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10353$as_echo "disabled" >&6; }
10354      else
10355        # Check if the provided tool contains a complete path.
10356        tool_specified="$TAIL"
10357        tool_basename="${tool_specified##*/}"
10358        if test "x$tool_basename" = "x$tool_specified"; then
10359          # A command without a complete path is provided, search $PATH.
10360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10361$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10362          # Extract the first word of "$tool_basename", so it can be a program name with args.
10363set dummy $tool_basename; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if ${ac_cv_path_TAIL+:} false; then :
10367  $as_echo_n "(cached) " >&6
10368else
10369  case $TAIL in
10370  [\\/]* | ?:[\\/]*)
10371  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10372  ;;
10373  *)
10374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377  IFS=$as_save_IFS
10378  test -z "$as_dir" && as_dir=.
10379    for ac_exec_ext in '' $ac_executable_extensions; do
10380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10381    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383    break 2
10384  fi
10385done
10386  done
10387IFS=$as_save_IFS
10388
10389  ;;
10390esac
10391fi
10392TAIL=$ac_cv_path_TAIL
10393if test -n "$TAIL"; then
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10395$as_echo "$TAIL" >&6; }
10396else
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401
10402          if test "x$TAIL" = x; then
10403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10404          fi
10405        else
10406          # Otherwise we believe it is a complete path. Use it as it is.
10407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10408$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10410$as_echo_n "checking for TAIL... " >&6; }
10411          if test ! -x "$tool_specified"; then
10412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10413$as_echo "not found" >&6; }
10414            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10415          fi
10416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10417$as_echo "$tool_specified" >&6; }
10418        fi
10419      fi
10420    fi
10421
10422  fi
10423
10424
10425
10426  if test "x$TAIL" = x; then
10427    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10428  fi
10429
10430
10431
10432
10433
10434  # Publish this variable in the help.
10435
10436
10437  if [ -z "${TAR+x}" ]; then
10438    # The variable is not set by user, try to locate tool using the code snippet
10439    for ac_prog in tar
10440do
10441  # Extract the first word of "$ac_prog", so it can be a program name with args.
10442set dummy $ac_prog; ac_word=$2
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10444$as_echo_n "checking for $ac_word... " >&6; }
10445if ${ac_cv_path_TAR+:} false; then :
10446  $as_echo_n "(cached) " >&6
10447else
10448  case $TAR in
10449  [\\/]* | ?:[\\/]*)
10450  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10451  ;;
10452  *)
10453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10454for as_dir in $PATH
10455do
10456  IFS=$as_save_IFS
10457  test -z "$as_dir" && as_dir=.
10458    for ac_exec_ext in '' $ac_executable_extensions; do
10459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10460    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10462    break 2
10463  fi
10464done
10465  done
10466IFS=$as_save_IFS
10467
10468  ;;
10469esac
10470fi
10471TAR=$ac_cv_path_TAR
10472if test -n "$TAR"; then
10473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10474$as_echo "$TAR" >&6; }
10475else
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
10478fi
10479
10480
10481  test -n "$TAR" && break
10482done
10483
10484  else
10485    # The variable is set, but is it from the command line or the environment?
10486
10487    # Try to remove the string !TAR! from our list.
10488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10490      # If it failed, the variable was not from the command line. Ignore it,
10491      # but warn the user (except for BASH, which is always set by the calling BASH).
10492      if test "xTAR" != xBASH; then
10493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10494$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10495      fi
10496      # Try to locate tool using the code snippet
10497      for ac_prog in tar
10498do
10499  # Extract the first word of "$ac_prog", so it can be a program name with args.
10500set dummy $ac_prog; ac_word=$2
10501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10502$as_echo_n "checking for $ac_word... " >&6; }
10503if ${ac_cv_path_TAR+:} false; then :
10504  $as_echo_n "(cached) " >&6
10505else
10506  case $TAR in
10507  [\\/]* | ?:[\\/]*)
10508  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10509  ;;
10510  *)
10511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10512for as_dir in $PATH
10513do
10514  IFS=$as_save_IFS
10515  test -z "$as_dir" && as_dir=.
10516    for ac_exec_ext in '' $ac_executable_extensions; do
10517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10518    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10520    break 2
10521  fi
10522done
10523  done
10524IFS=$as_save_IFS
10525
10526  ;;
10527esac
10528fi
10529TAR=$ac_cv_path_TAR
10530if test -n "$TAR"; then
10531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10532$as_echo "$TAR" >&6; }
10533else
10534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10535$as_echo "no" >&6; }
10536fi
10537
10538
10539  test -n "$TAR" && break
10540done
10541
10542    else
10543      # If it succeeded, then it was overridden by the user. We will use it
10544      # for the tool.
10545
10546      # First remove it from the list of overridden variables, so we can test
10547      # for unknown variables in the end.
10548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10549
10550      # Check if we try to supply an empty value
10551      if test "x$TAR" = x; then
10552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10553$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10555$as_echo_n "checking for TAR... " >&6; }
10556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10557$as_echo "disabled" >&6; }
10558      else
10559        # Check if the provided tool contains a complete path.
10560        tool_specified="$TAR"
10561        tool_basename="${tool_specified##*/}"
10562        if test "x$tool_basename" = "x$tool_specified"; then
10563          # A command without a complete path is provided, search $PATH.
10564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10565$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10566          # Extract the first word of "$tool_basename", so it can be a program name with args.
10567set dummy $tool_basename; ac_word=$2
10568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10569$as_echo_n "checking for $ac_word... " >&6; }
10570if ${ac_cv_path_TAR+:} false; then :
10571  $as_echo_n "(cached) " >&6
10572else
10573  case $TAR in
10574  [\\/]* | ?:[\\/]*)
10575  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10576  ;;
10577  *)
10578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10579for as_dir in $PATH
10580do
10581  IFS=$as_save_IFS
10582  test -z "$as_dir" && as_dir=.
10583    for ac_exec_ext in '' $ac_executable_extensions; do
10584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10585    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10587    break 2
10588  fi
10589done
10590  done
10591IFS=$as_save_IFS
10592
10593  ;;
10594esac
10595fi
10596TAR=$ac_cv_path_TAR
10597if test -n "$TAR"; then
10598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10599$as_echo "$TAR" >&6; }
10600else
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
10603fi
10604
10605
10606          if test "x$TAR" = x; then
10607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10608          fi
10609        else
10610          # Otherwise we believe it is a complete path. Use it as it is.
10611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10612$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10614$as_echo_n "checking for TAR... " >&6; }
10615          if test ! -x "$tool_specified"; then
10616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10617$as_echo "not found" >&6; }
10618            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10619          fi
10620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10621$as_echo "$tool_specified" >&6; }
10622        fi
10623      fi
10624    fi
10625
10626  fi
10627
10628
10629
10630  if test "x$TAR" = x; then
10631    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10632  fi
10633
10634
10635
10636
10637
10638  # Publish this variable in the help.
10639
10640
10641  if [ -z "${TEE+x}" ]; then
10642    # The variable is not set by user, try to locate tool using the code snippet
10643    for ac_prog in tee
10644do
10645  # Extract the first word of "$ac_prog", so it can be a program name with args.
10646set dummy $ac_prog; ac_word=$2
10647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10648$as_echo_n "checking for $ac_word... " >&6; }
10649if ${ac_cv_path_TEE+:} false; then :
10650  $as_echo_n "(cached) " >&6
10651else
10652  case $TEE in
10653  [\\/]* | ?:[\\/]*)
10654  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10655  ;;
10656  *)
10657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10658for as_dir in $PATH
10659do
10660  IFS=$as_save_IFS
10661  test -z "$as_dir" && as_dir=.
10662    for ac_exec_ext in '' $ac_executable_extensions; do
10663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10664    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10666    break 2
10667  fi
10668done
10669  done
10670IFS=$as_save_IFS
10671
10672  ;;
10673esac
10674fi
10675TEE=$ac_cv_path_TEE
10676if test -n "$TEE"; then
10677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10678$as_echo "$TEE" >&6; }
10679else
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10681$as_echo "no" >&6; }
10682fi
10683
10684
10685  test -n "$TEE" && break
10686done
10687
10688  else
10689    # The variable is set, but is it from the command line or the environment?
10690
10691    # Try to remove the string !TEE! from our list.
10692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10694      # If it failed, the variable was not from the command line. Ignore it,
10695      # but warn the user (except for BASH, which is always set by the calling BASH).
10696      if test "xTEE" != xBASH; then
10697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10698$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10699      fi
10700      # Try to locate tool using the code snippet
10701      for ac_prog in tee
10702do
10703  # Extract the first word of "$ac_prog", so it can be a program name with args.
10704set dummy $ac_prog; ac_word=$2
10705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10706$as_echo_n "checking for $ac_word... " >&6; }
10707if ${ac_cv_path_TEE+:} false; then :
10708  $as_echo_n "(cached) " >&6
10709else
10710  case $TEE in
10711  [\\/]* | ?:[\\/]*)
10712  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10713  ;;
10714  *)
10715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10716for as_dir in $PATH
10717do
10718  IFS=$as_save_IFS
10719  test -z "$as_dir" && as_dir=.
10720    for ac_exec_ext in '' $ac_executable_extensions; do
10721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10722    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10724    break 2
10725  fi
10726done
10727  done
10728IFS=$as_save_IFS
10729
10730  ;;
10731esac
10732fi
10733TEE=$ac_cv_path_TEE
10734if test -n "$TEE"; then
10735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10736$as_echo "$TEE" >&6; }
10737else
10738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10739$as_echo "no" >&6; }
10740fi
10741
10742
10743  test -n "$TEE" && break
10744done
10745
10746    else
10747      # If it succeeded, then it was overridden by the user. We will use it
10748      # for the tool.
10749
10750      # First remove it from the list of overridden variables, so we can test
10751      # for unknown variables in the end.
10752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10753
10754      # Check if we try to supply an empty value
10755      if test "x$TEE" = x; then
10756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10757$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10759$as_echo_n "checking for TEE... " >&6; }
10760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10761$as_echo "disabled" >&6; }
10762      else
10763        # Check if the provided tool contains a complete path.
10764        tool_specified="$TEE"
10765        tool_basename="${tool_specified##*/}"
10766        if test "x$tool_basename" = "x$tool_specified"; then
10767          # A command without a complete path is provided, search $PATH.
10768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10769$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10770          # Extract the first word of "$tool_basename", so it can be a program name with args.
10771set dummy $tool_basename; ac_word=$2
10772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10773$as_echo_n "checking for $ac_word... " >&6; }
10774if ${ac_cv_path_TEE+:} false; then :
10775  $as_echo_n "(cached) " >&6
10776else
10777  case $TEE in
10778  [\\/]* | ?:[\\/]*)
10779  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10780  ;;
10781  *)
10782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10783for as_dir in $PATH
10784do
10785  IFS=$as_save_IFS
10786  test -z "$as_dir" && as_dir=.
10787    for ac_exec_ext in '' $ac_executable_extensions; do
10788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10789    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10791    break 2
10792  fi
10793done
10794  done
10795IFS=$as_save_IFS
10796
10797  ;;
10798esac
10799fi
10800TEE=$ac_cv_path_TEE
10801if test -n "$TEE"; then
10802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10803$as_echo "$TEE" >&6; }
10804else
10805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10806$as_echo "no" >&6; }
10807fi
10808
10809
10810          if test "x$TEE" = x; then
10811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10812          fi
10813        else
10814          # Otherwise we believe it is a complete path. Use it as it is.
10815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10816$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10818$as_echo_n "checking for TEE... " >&6; }
10819          if test ! -x "$tool_specified"; then
10820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10821$as_echo "not found" >&6; }
10822            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10823          fi
10824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10825$as_echo "$tool_specified" >&6; }
10826        fi
10827      fi
10828    fi
10829
10830  fi
10831
10832
10833
10834  if test "x$TEE" = x; then
10835    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10836  fi
10837
10838
10839
10840
10841
10842  # Publish this variable in the help.
10843
10844
10845  if [ -z "${TOUCH+x}" ]; then
10846    # The variable is not set by user, try to locate tool using the code snippet
10847    for ac_prog in touch
10848do
10849  # Extract the first word of "$ac_prog", so it can be a program name with args.
10850set dummy $ac_prog; ac_word=$2
10851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10852$as_echo_n "checking for $ac_word... " >&6; }
10853if ${ac_cv_path_TOUCH+:} false; then :
10854  $as_echo_n "(cached) " >&6
10855else
10856  case $TOUCH in
10857  [\\/]* | ?:[\\/]*)
10858  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10859  ;;
10860  *)
10861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10862for as_dir in $PATH
10863do
10864  IFS=$as_save_IFS
10865  test -z "$as_dir" && as_dir=.
10866    for ac_exec_ext in '' $ac_executable_extensions; do
10867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10868    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10870    break 2
10871  fi
10872done
10873  done
10874IFS=$as_save_IFS
10875
10876  ;;
10877esac
10878fi
10879TOUCH=$ac_cv_path_TOUCH
10880if test -n "$TOUCH"; then
10881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10882$as_echo "$TOUCH" >&6; }
10883else
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10885$as_echo "no" >&6; }
10886fi
10887
10888
10889  test -n "$TOUCH" && break
10890done
10891
10892  else
10893    # The variable is set, but is it from the command line or the environment?
10894
10895    # Try to remove the string !TOUCH! from our list.
10896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10898      # If it failed, the variable was not from the command line. Ignore it,
10899      # but warn the user (except for BASH, which is always set by the calling BASH).
10900      if test "xTOUCH" != xBASH; then
10901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10902$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10903      fi
10904      # Try to locate tool using the code snippet
10905      for ac_prog in touch
10906do
10907  # Extract the first word of "$ac_prog", so it can be a program name with args.
10908set dummy $ac_prog; ac_word=$2
10909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10910$as_echo_n "checking for $ac_word... " >&6; }
10911if ${ac_cv_path_TOUCH+:} false; then :
10912  $as_echo_n "(cached) " >&6
10913else
10914  case $TOUCH in
10915  [\\/]* | ?:[\\/]*)
10916  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10917  ;;
10918  *)
10919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10920for as_dir in $PATH
10921do
10922  IFS=$as_save_IFS
10923  test -z "$as_dir" && as_dir=.
10924    for ac_exec_ext in '' $ac_executable_extensions; do
10925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10926    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10928    break 2
10929  fi
10930done
10931  done
10932IFS=$as_save_IFS
10933
10934  ;;
10935esac
10936fi
10937TOUCH=$ac_cv_path_TOUCH
10938if test -n "$TOUCH"; then
10939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10940$as_echo "$TOUCH" >&6; }
10941else
10942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943$as_echo "no" >&6; }
10944fi
10945
10946
10947  test -n "$TOUCH" && break
10948done
10949
10950    else
10951      # If it succeeded, then it was overridden by the user. We will use it
10952      # for the tool.
10953
10954      # First remove it from the list of overridden variables, so we can test
10955      # for unknown variables in the end.
10956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10957
10958      # Check if we try to supply an empty value
10959      if test "x$TOUCH" = x; then
10960        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10961$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10963$as_echo_n "checking for TOUCH... " >&6; }
10964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10965$as_echo "disabled" >&6; }
10966      else
10967        # Check if the provided tool contains a complete path.
10968        tool_specified="$TOUCH"
10969        tool_basename="${tool_specified##*/}"
10970        if test "x$tool_basename" = "x$tool_specified"; then
10971          # A command without a complete path is provided, search $PATH.
10972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10973$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10974          # Extract the first word of "$tool_basename", so it can be a program name with args.
10975set dummy $tool_basename; ac_word=$2
10976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10977$as_echo_n "checking for $ac_word... " >&6; }
10978if ${ac_cv_path_TOUCH+:} false; then :
10979  $as_echo_n "(cached) " >&6
10980else
10981  case $TOUCH in
10982  [\\/]* | ?:[\\/]*)
10983  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10984  ;;
10985  *)
10986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10987for as_dir in $PATH
10988do
10989  IFS=$as_save_IFS
10990  test -z "$as_dir" && as_dir=.
10991    for ac_exec_ext in '' $ac_executable_extensions; do
10992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10993    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10995    break 2
10996  fi
10997done
10998  done
10999IFS=$as_save_IFS
11000
11001  ;;
11002esac
11003fi
11004TOUCH=$ac_cv_path_TOUCH
11005if test -n "$TOUCH"; then
11006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11007$as_echo "$TOUCH" >&6; }
11008else
11009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11010$as_echo "no" >&6; }
11011fi
11012
11013
11014          if test "x$TOUCH" = x; then
11015            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11016          fi
11017        else
11018          # Otherwise we believe it is a complete path. Use it as it is.
11019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11020$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11021          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11022$as_echo_n "checking for TOUCH... " >&6; }
11023          if test ! -x "$tool_specified"; then
11024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11025$as_echo "not found" >&6; }
11026            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11027          fi
11028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11029$as_echo "$tool_specified" >&6; }
11030        fi
11031      fi
11032    fi
11033
11034  fi
11035
11036
11037
11038  if test "x$TOUCH" = x; then
11039    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11040  fi
11041
11042
11043
11044
11045
11046  # Publish this variable in the help.
11047
11048
11049  if [ -z "${TR+x}" ]; then
11050    # The variable is not set by user, try to locate tool using the code snippet
11051    for ac_prog in tr
11052do
11053  # Extract the first word of "$ac_prog", so it can be a program name with args.
11054set dummy $ac_prog; ac_word=$2
11055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11056$as_echo_n "checking for $ac_word... " >&6; }
11057if ${ac_cv_path_TR+:} false; then :
11058  $as_echo_n "(cached) " >&6
11059else
11060  case $TR in
11061  [\\/]* | ?:[\\/]*)
11062  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11063  ;;
11064  *)
11065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11066for as_dir in $PATH
11067do
11068  IFS=$as_save_IFS
11069  test -z "$as_dir" && as_dir=.
11070    for ac_exec_ext in '' $ac_executable_extensions; do
11071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11072    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11074    break 2
11075  fi
11076done
11077  done
11078IFS=$as_save_IFS
11079
11080  ;;
11081esac
11082fi
11083TR=$ac_cv_path_TR
11084if test -n "$TR"; then
11085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11086$as_echo "$TR" >&6; }
11087else
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11089$as_echo "no" >&6; }
11090fi
11091
11092
11093  test -n "$TR" && break
11094done
11095
11096  else
11097    # The variable is set, but is it from the command line or the environment?
11098
11099    # Try to remove the string !TR! from our list.
11100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11102      # If it failed, the variable was not from the command line. Ignore it,
11103      # but warn the user (except for BASH, which is always set by the calling BASH).
11104      if test "xTR" != xBASH; then
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11106$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11107      fi
11108      # Try to locate tool using the code snippet
11109      for ac_prog in tr
11110do
11111  # Extract the first word of "$ac_prog", so it can be a program name with args.
11112set dummy $ac_prog; ac_word=$2
11113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11114$as_echo_n "checking for $ac_word... " >&6; }
11115if ${ac_cv_path_TR+:} false; then :
11116  $as_echo_n "(cached) " >&6
11117else
11118  case $TR in
11119  [\\/]* | ?:[\\/]*)
11120  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11121  ;;
11122  *)
11123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11124for as_dir in $PATH
11125do
11126  IFS=$as_save_IFS
11127  test -z "$as_dir" && as_dir=.
11128    for ac_exec_ext in '' $ac_executable_extensions; do
11129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11130    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11132    break 2
11133  fi
11134done
11135  done
11136IFS=$as_save_IFS
11137
11138  ;;
11139esac
11140fi
11141TR=$ac_cv_path_TR
11142if test -n "$TR"; then
11143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11144$as_echo "$TR" >&6; }
11145else
11146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11147$as_echo "no" >&6; }
11148fi
11149
11150
11151  test -n "$TR" && break
11152done
11153
11154    else
11155      # If it succeeded, then it was overridden by the user. We will use it
11156      # for the tool.
11157
11158      # First remove it from the list of overridden variables, so we can test
11159      # for unknown variables in the end.
11160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11161
11162      # Check if we try to supply an empty value
11163      if test "x$TR" = x; then
11164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11165$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11167$as_echo_n "checking for TR... " >&6; }
11168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11169$as_echo "disabled" >&6; }
11170      else
11171        # Check if the provided tool contains a complete path.
11172        tool_specified="$TR"
11173        tool_basename="${tool_specified##*/}"
11174        if test "x$tool_basename" = "x$tool_specified"; then
11175          # A command without a complete path is provided, search $PATH.
11176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11177$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11178          # Extract the first word of "$tool_basename", so it can be a program name with args.
11179set dummy $tool_basename; ac_word=$2
11180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11181$as_echo_n "checking for $ac_word... " >&6; }
11182if ${ac_cv_path_TR+:} false; then :
11183  $as_echo_n "(cached) " >&6
11184else
11185  case $TR in
11186  [\\/]* | ?:[\\/]*)
11187  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11188  ;;
11189  *)
11190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11191for as_dir in $PATH
11192do
11193  IFS=$as_save_IFS
11194  test -z "$as_dir" && as_dir=.
11195    for ac_exec_ext in '' $ac_executable_extensions; do
11196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11197    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11199    break 2
11200  fi
11201done
11202  done
11203IFS=$as_save_IFS
11204
11205  ;;
11206esac
11207fi
11208TR=$ac_cv_path_TR
11209if test -n "$TR"; then
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11211$as_echo "$TR" >&6; }
11212else
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
11215fi
11216
11217
11218          if test "x$TR" = x; then
11219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11220          fi
11221        else
11222          # Otherwise we believe it is a complete path. Use it as it is.
11223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11224$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11226$as_echo_n "checking for TR... " >&6; }
11227          if test ! -x "$tool_specified"; then
11228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11229$as_echo "not found" >&6; }
11230            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11231          fi
11232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11233$as_echo "$tool_specified" >&6; }
11234        fi
11235      fi
11236    fi
11237
11238  fi
11239
11240
11241
11242  if test "x$TR" = x; then
11243    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11244  fi
11245
11246
11247
11248
11249
11250  # Publish this variable in the help.
11251
11252
11253  if [ -z "${UNAME+x}" ]; then
11254    # The variable is not set by user, try to locate tool using the code snippet
11255    for ac_prog in uname
11256do
11257  # Extract the first word of "$ac_prog", so it can be a program name with args.
11258set dummy $ac_prog; ac_word=$2
11259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260$as_echo_n "checking for $ac_word... " >&6; }
11261if ${ac_cv_path_UNAME+:} false; then :
11262  $as_echo_n "(cached) " >&6
11263else
11264  case $UNAME in
11265  [\\/]* | ?:[\\/]*)
11266  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11267  ;;
11268  *)
11269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11270for as_dir in $PATH
11271do
11272  IFS=$as_save_IFS
11273  test -z "$as_dir" && as_dir=.
11274    for ac_exec_ext in '' $ac_executable_extensions; do
11275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11276    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11278    break 2
11279  fi
11280done
11281  done
11282IFS=$as_save_IFS
11283
11284  ;;
11285esac
11286fi
11287UNAME=$ac_cv_path_UNAME
11288if test -n "$UNAME"; then
11289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11290$as_echo "$UNAME" >&6; }
11291else
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
11294fi
11295
11296
11297  test -n "$UNAME" && break
11298done
11299
11300  else
11301    # The variable is set, but is it from the command line or the environment?
11302
11303    # Try to remove the string !UNAME! from our list.
11304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11306      # If it failed, the variable was not from the command line. Ignore it,
11307      # but warn the user (except for BASH, which is always set by the calling BASH).
11308      if test "xUNAME" != xBASH; then
11309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11310$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11311      fi
11312      # Try to locate tool using the code snippet
11313      for ac_prog in uname
11314do
11315  # Extract the first word of "$ac_prog", so it can be a program name with args.
11316set dummy $ac_prog; ac_word=$2
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11318$as_echo_n "checking for $ac_word... " >&6; }
11319if ${ac_cv_path_UNAME+:} false; then :
11320  $as_echo_n "(cached) " >&6
11321else
11322  case $UNAME in
11323  [\\/]* | ?:[\\/]*)
11324  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11325  ;;
11326  *)
11327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11328for as_dir in $PATH
11329do
11330  IFS=$as_save_IFS
11331  test -z "$as_dir" && as_dir=.
11332    for ac_exec_ext in '' $ac_executable_extensions; do
11333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11334    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11336    break 2
11337  fi
11338done
11339  done
11340IFS=$as_save_IFS
11341
11342  ;;
11343esac
11344fi
11345UNAME=$ac_cv_path_UNAME
11346if test -n "$UNAME"; then
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11348$as_echo "$UNAME" >&6; }
11349else
11350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
11352fi
11353
11354
11355  test -n "$UNAME" && break
11356done
11357
11358    else
11359      # If it succeeded, then it was overridden by the user. We will use it
11360      # for the tool.
11361
11362      # First remove it from the list of overridden variables, so we can test
11363      # for unknown variables in the end.
11364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11365
11366      # Check if we try to supply an empty value
11367      if test "x$UNAME" = x; then
11368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11369$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11371$as_echo_n "checking for UNAME... " >&6; }
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11373$as_echo "disabled" >&6; }
11374      else
11375        # Check if the provided tool contains a complete path.
11376        tool_specified="$UNAME"
11377        tool_basename="${tool_specified##*/}"
11378        if test "x$tool_basename" = "x$tool_specified"; then
11379          # A command without a complete path is provided, search $PATH.
11380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11381$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11382          # Extract the first word of "$tool_basename", so it can be a program name with args.
11383set dummy $tool_basename; ac_word=$2
11384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11385$as_echo_n "checking for $ac_word... " >&6; }
11386if ${ac_cv_path_UNAME+:} false; then :
11387  $as_echo_n "(cached) " >&6
11388else
11389  case $UNAME in
11390  [\\/]* | ?:[\\/]*)
11391  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11392  ;;
11393  *)
11394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11395for as_dir in $PATH
11396do
11397  IFS=$as_save_IFS
11398  test -z "$as_dir" && as_dir=.
11399    for ac_exec_ext in '' $ac_executable_extensions; do
11400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11401    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11403    break 2
11404  fi
11405done
11406  done
11407IFS=$as_save_IFS
11408
11409  ;;
11410esac
11411fi
11412UNAME=$ac_cv_path_UNAME
11413if test -n "$UNAME"; then
11414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11415$as_echo "$UNAME" >&6; }
11416else
11417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11418$as_echo "no" >&6; }
11419fi
11420
11421
11422          if test "x$UNAME" = x; then
11423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11424          fi
11425        else
11426          # Otherwise we believe it is a complete path. Use it as it is.
11427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11428$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11430$as_echo_n "checking for UNAME... " >&6; }
11431          if test ! -x "$tool_specified"; then
11432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11433$as_echo "not found" >&6; }
11434            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11435          fi
11436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11437$as_echo "$tool_specified" >&6; }
11438        fi
11439      fi
11440    fi
11441
11442  fi
11443
11444
11445
11446  if test "x$UNAME" = x; then
11447    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11448  fi
11449
11450
11451
11452
11453
11454  # Publish this variable in the help.
11455
11456
11457  if [ -z "${UNIQ+x}" ]; then
11458    # The variable is not set by user, try to locate tool using the code snippet
11459    for ac_prog in uniq
11460do
11461  # Extract the first word of "$ac_prog", so it can be a program name with args.
11462set dummy $ac_prog; ac_word=$2
11463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11464$as_echo_n "checking for $ac_word... " >&6; }
11465if ${ac_cv_path_UNIQ+:} false; then :
11466  $as_echo_n "(cached) " >&6
11467else
11468  case $UNIQ in
11469  [\\/]* | ?:[\\/]*)
11470  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11471  ;;
11472  *)
11473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11474for as_dir in $PATH
11475do
11476  IFS=$as_save_IFS
11477  test -z "$as_dir" && as_dir=.
11478    for ac_exec_ext in '' $ac_executable_extensions; do
11479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11480    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11482    break 2
11483  fi
11484done
11485  done
11486IFS=$as_save_IFS
11487
11488  ;;
11489esac
11490fi
11491UNIQ=$ac_cv_path_UNIQ
11492if test -n "$UNIQ"; then
11493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11494$as_echo "$UNIQ" >&6; }
11495else
11496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
11498fi
11499
11500
11501  test -n "$UNIQ" && break
11502done
11503
11504  else
11505    # The variable is set, but is it from the command line or the environment?
11506
11507    # Try to remove the string !UNIQ! from our list.
11508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11510      # If it failed, the variable was not from the command line. Ignore it,
11511      # but warn the user (except for BASH, which is always set by the calling BASH).
11512      if test "xUNIQ" != xBASH; then
11513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11514$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11515      fi
11516      # Try to locate tool using the code snippet
11517      for ac_prog in uniq
11518do
11519  # Extract the first word of "$ac_prog", so it can be a program name with args.
11520set dummy $ac_prog; ac_word=$2
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11522$as_echo_n "checking for $ac_word... " >&6; }
11523if ${ac_cv_path_UNIQ+:} false; then :
11524  $as_echo_n "(cached) " >&6
11525else
11526  case $UNIQ in
11527  [\\/]* | ?:[\\/]*)
11528  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11529  ;;
11530  *)
11531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11532for as_dir in $PATH
11533do
11534  IFS=$as_save_IFS
11535  test -z "$as_dir" && as_dir=.
11536    for ac_exec_ext in '' $ac_executable_extensions; do
11537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11538    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11540    break 2
11541  fi
11542done
11543  done
11544IFS=$as_save_IFS
11545
11546  ;;
11547esac
11548fi
11549UNIQ=$ac_cv_path_UNIQ
11550if test -n "$UNIQ"; then
11551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11552$as_echo "$UNIQ" >&6; }
11553else
11554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
11556fi
11557
11558
11559  test -n "$UNIQ" && break
11560done
11561
11562    else
11563      # If it succeeded, then it was overridden by the user. We will use it
11564      # for the tool.
11565
11566      # First remove it from the list of overridden variables, so we can test
11567      # for unknown variables in the end.
11568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11569
11570      # Check if we try to supply an empty value
11571      if test "x$UNIQ" = x; then
11572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11573$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11575$as_echo_n "checking for UNIQ... " >&6; }
11576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11577$as_echo "disabled" >&6; }
11578      else
11579        # Check if the provided tool contains a complete path.
11580        tool_specified="$UNIQ"
11581        tool_basename="${tool_specified##*/}"
11582        if test "x$tool_basename" = "x$tool_specified"; then
11583          # A command without a complete path is provided, search $PATH.
11584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11585$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11586          # Extract the first word of "$tool_basename", so it can be a program name with args.
11587set dummy $tool_basename; ac_word=$2
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11589$as_echo_n "checking for $ac_word... " >&6; }
11590if ${ac_cv_path_UNIQ+:} false; then :
11591  $as_echo_n "(cached) " >&6
11592else
11593  case $UNIQ in
11594  [\\/]* | ?:[\\/]*)
11595  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11596  ;;
11597  *)
11598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11599for as_dir in $PATH
11600do
11601  IFS=$as_save_IFS
11602  test -z "$as_dir" && as_dir=.
11603    for ac_exec_ext in '' $ac_executable_extensions; do
11604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11605    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11607    break 2
11608  fi
11609done
11610  done
11611IFS=$as_save_IFS
11612
11613  ;;
11614esac
11615fi
11616UNIQ=$ac_cv_path_UNIQ
11617if test -n "$UNIQ"; then
11618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11619$as_echo "$UNIQ" >&6; }
11620else
11621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622$as_echo "no" >&6; }
11623fi
11624
11625
11626          if test "x$UNIQ" = x; then
11627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11628          fi
11629        else
11630          # Otherwise we believe it is a complete path. Use it as it is.
11631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11632$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11634$as_echo_n "checking for UNIQ... " >&6; }
11635          if test ! -x "$tool_specified"; then
11636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11637$as_echo "not found" >&6; }
11638            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11639          fi
11640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11641$as_echo "$tool_specified" >&6; }
11642        fi
11643      fi
11644    fi
11645
11646  fi
11647
11648
11649
11650  if test "x$UNIQ" = x; then
11651    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11652  fi
11653
11654
11655
11656
11657
11658  # Publish this variable in the help.
11659
11660
11661  if [ -z "${WC+x}" ]; then
11662    # The variable is not set by user, try to locate tool using the code snippet
11663    for ac_prog in wc
11664do
11665  # Extract the first word of "$ac_prog", so it can be a program name with args.
11666set dummy $ac_prog; ac_word=$2
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11668$as_echo_n "checking for $ac_word... " >&6; }
11669if ${ac_cv_path_WC+:} false; then :
11670  $as_echo_n "(cached) " >&6
11671else
11672  case $WC in
11673  [\\/]* | ?:[\\/]*)
11674  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11675  ;;
11676  *)
11677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11678for as_dir in $PATH
11679do
11680  IFS=$as_save_IFS
11681  test -z "$as_dir" && as_dir=.
11682    for ac_exec_ext in '' $ac_executable_extensions; do
11683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11684    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11686    break 2
11687  fi
11688done
11689  done
11690IFS=$as_save_IFS
11691
11692  ;;
11693esac
11694fi
11695WC=$ac_cv_path_WC
11696if test -n "$WC"; then
11697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11698$as_echo "$WC" >&6; }
11699else
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
11702fi
11703
11704
11705  test -n "$WC" && break
11706done
11707
11708  else
11709    # The variable is set, but is it from the command line or the environment?
11710
11711    # Try to remove the string !WC! from our list.
11712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11714      # If it failed, the variable was not from the command line. Ignore it,
11715      # but warn the user (except for BASH, which is always set by the calling BASH).
11716      if test "xWC" != xBASH; then
11717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11718$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11719      fi
11720      # Try to locate tool using the code snippet
11721      for ac_prog in wc
11722do
11723  # Extract the first word of "$ac_prog", so it can be a program name with args.
11724set dummy $ac_prog; ac_word=$2
11725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11726$as_echo_n "checking for $ac_word... " >&6; }
11727if ${ac_cv_path_WC+:} false; then :
11728  $as_echo_n "(cached) " >&6
11729else
11730  case $WC in
11731  [\\/]* | ?:[\\/]*)
11732  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11733  ;;
11734  *)
11735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11736for as_dir in $PATH
11737do
11738  IFS=$as_save_IFS
11739  test -z "$as_dir" && as_dir=.
11740    for ac_exec_ext in '' $ac_executable_extensions; do
11741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11742    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11744    break 2
11745  fi
11746done
11747  done
11748IFS=$as_save_IFS
11749
11750  ;;
11751esac
11752fi
11753WC=$ac_cv_path_WC
11754if test -n "$WC"; then
11755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11756$as_echo "$WC" >&6; }
11757else
11758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11759$as_echo "no" >&6; }
11760fi
11761
11762
11763  test -n "$WC" && break
11764done
11765
11766    else
11767      # If it succeeded, then it was overridden by the user. We will use it
11768      # for the tool.
11769
11770      # First remove it from the list of overridden variables, so we can test
11771      # for unknown variables in the end.
11772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11773
11774      # Check if we try to supply an empty value
11775      if test "x$WC" = x; then
11776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11777$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11779$as_echo_n "checking for WC... " >&6; }
11780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11781$as_echo "disabled" >&6; }
11782      else
11783        # Check if the provided tool contains a complete path.
11784        tool_specified="$WC"
11785        tool_basename="${tool_specified##*/}"
11786        if test "x$tool_basename" = "x$tool_specified"; then
11787          # A command without a complete path is provided, search $PATH.
11788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11789$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11790          # Extract the first word of "$tool_basename", so it can be a program name with args.
11791set dummy $tool_basename; ac_word=$2
11792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11793$as_echo_n "checking for $ac_word... " >&6; }
11794if ${ac_cv_path_WC+:} false; then :
11795  $as_echo_n "(cached) " >&6
11796else
11797  case $WC in
11798  [\\/]* | ?:[\\/]*)
11799  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11800  ;;
11801  *)
11802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11803for as_dir in $PATH
11804do
11805  IFS=$as_save_IFS
11806  test -z "$as_dir" && as_dir=.
11807    for ac_exec_ext in '' $ac_executable_extensions; do
11808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11809    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11811    break 2
11812  fi
11813done
11814  done
11815IFS=$as_save_IFS
11816
11817  ;;
11818esac
11819fi
11820WC=$ac_cv_path_WC
11821if test -n "$WC"; then
11822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11823$as_echo "$WC" >&6; }
11824else
11825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11826$as_echo "no" >&6; }
11827fi
11828
11829
11830          if test "x$WC" = x; then
11831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11832          fi
11833        else
11834          # Otherwise we believe it is a complete path. Use it as it is.
11835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11836$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11838$as_echo_n "checking for WC... " >&6; }
11839          if test ! -x "$tool_specified"; then
11840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11841$as_echo "not found" >&6; }
11842            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11843          fi
11844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11845$as_echo "$tool_specified" >&6; }
11846        fi
11847      fi
11848    fi
11849
11850  fi
11851
11852
11853
11854  if test "x$WC" = x; then
11855    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11856  fi
11857
11858
11859
11860
11861
11862  # Publish this variable in the help.
11863
11864
11865  if [ -z "${WHICH+x}" ]; then
11866    # The variable is not set by user, try to locate tool using the code snippet
11867    for ac_prog in which
11868do
11869  # Extract the first word of "$ac_prog", so it can be a program name with args.
11870set dummy $ac_prog; ac_word=$2
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11872$as_echo_n "checking for $ac_word... " >&6; }
11873if ${ac_cv_path_WHICH+:} false; then :
11874  $as_echo_n "(cached) " >&6
11875else
11876  case $WHICH in
11877  [\\/]* | ?:[\\/]*)
11878  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11879  ;;
11880  *)
11881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11882for as_dir in $PATH
11883do
11884  IFS=$as_save_IFS
11885  test -z "$as_dir" && as_dir=.
11886    for ac_exec_ext in '' $ac_executable_extensions; do
11887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11888    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11890    break 2
11891  fi
11892done
11893  done
11894IFS=$as_save_IFS
11895
11896  ;;
11897esac
11898fi
11899WHICH=$ac_cv_path_WHICH
11900if test -n "$WHICH"; then
11901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11902$as_echo "$WHICH" >&6; }
11903else
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11905$as_echo "no" >&6; }
11906fi
11907
11908
11909  test -n "$WHICH" && break
11910done
11911
11912  else
11913    # The variable is set, but is it from the command line or the environment?
11914
11915    # Try to remove the string !WHICH! from our list.
11916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11918      # If it failed, the variable was not from the command line. Ignore it,
11919      # but warn the user (except for BASH, which is always set by the calling BASH).
11920      if test "xWHICH" != xBASH; then
11921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11922$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11923      fi
11924      # Try to locate tool using the code snippet
11925      for ac_prog in which
11926do
11927  # Extract the first word of "$ac_prog", so it can be a program name with args.
11928set dummy $ac_prog; ac_word=$2
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11930$as_echo_n "checking for $ac_word... " >&6; }
11931if ${ac_cv_path_WHICH+:} false; then :
11932  $as_echo_n "(cached) " >&6
11933else
11934  case $WHICH in
11935  [\\/]* | ?:[\\/]*)
11936  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11937  ;;
11938  *)
11939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11940for as_dir in $PATH
11941do
11942  IFS=$as_save_IFS
11943  test -z "$as_dir" && as_dir=.
11944    for ac_exec_ext in '' $ac_executable_extensions; do
11945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11946    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11948    break 2
11949  fi
11950done
11951  done
11952IFS=$as_save_IFS
11953
11954  ;;
11955esac
11956fi
11957WHICH=$ac_cv_path_WHICH
11958if test -n "$WHICH"; then
11959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11960$as_echo "$WHICH" >&6; }
11961else
11962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11963$as_echo "no" >&6; }
11964fi
11965
11966
11967  test -n "$WHICH" && break
11968done
11969
11970    else
11971      # If it succeeded, then it was overridden by the user. We will use it
11972      # for the tool.
11973
11974      # First remove it from the list of overridden variables, so we can test
11975      # for unknown variables in the end.
11976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11977
11978      # Check if we try to supply an empty value
11979      if test "x$WHICH" = x; then
11980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11981$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11983$as_echo_n "checking for WHICH... " >&6; }
11984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11985$as_echo "disabled" >&6; }
11986      else
11987        # Check if the provided tool contains a complete path.
11988        tool_specified="$WHICH"
11989        tool_basename="${tool_specified##*/}"
11990        if test "x$tool_basename" = "x$tool_specified"; then
11991          # A command without a complete path is provided, search $PATH.
11992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11993$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11994          # Extract the first word of "$tool_basename", so it can be a program name with args.
11995set dummy $tool_basename; ac_word=$2
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11997$as_echo_n "checking for $ac_word... " >&6; }
11998if ${ac_cv_path_WHICH+:} false; then :
11999  $as_echo_n "(cached) " >&6
12000else
12001  case $WHICH in
12002  [\\/]* | ?:[\\/]*)
12003  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12004  ;;
12005  *)
12006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12007for as_dir in $PATH
12008do
12009  IFS=$as_save_IFS
12010  test -z "$as_dir" && as_dir=.
12011    for ac_exec_ext in '' $ac_executable_extensions; do
12012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12013    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12015    break 2
12016  fi
12017done
12018  done
12019IFS=$as_save_IFS
12020
12021  ;;
12022esac
12023fi
12024WHICH=$ac_cv_path_WHICH
12025if test -n "$WHICH"; then
12026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12027$as_echo "$WHICH" >&6; }
12028else
12029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12030$as_echo "no" >&6; }
12031fi
12032
12033
12034          if test "x$WHICH" = x; then
12035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12036          fi
12037        else
12038          # Otherwise we believe it is a complete path. Use it as it is.
12039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12040$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12042$as_echo_n "checking for WHICH... " >&6; }
12043          if test ! -x "$tool_specified"; then
12044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12045$as_echo "not found" >&6; }
12046            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12047          fi
12048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12049$as_echo "$tool_specified" >&6; }
12050        fi
12051      fi
12052    fi
12053
12054  fi
12055
12056
12057
12058  if test "x$WHICH" = x; then
12059    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12060  fi
12061
12062
12063
12064
12065
12066  # Publish this variable in the help.
12067
12068
12069  if [ -z "${XARGS+x}" ]; then
12070    # The variable is not set by user, try to locate tool using the code snippet
12071    for ac_prog in xargs
12072do
12073  # Extract the first word of "$ac_prog", so it can be a program name with args.
12074set dummy $ac_prog; ac_word=$2
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12076$as_echo_n "checking for $ac_word... " >&6; }
12077if ${ac_cv_path_XARGS+:} false; then :
12078  $as_echo_n "(cached) " >&6
12079else
12080  case $XARGS in
12081  [\\/]* | ?:[\\/]*)
12082  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12083  ;;
12084  *)
12085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12086for as_dir in $PATH
12087do
12088  IFS=$as_save_IFS
12089  test -z "$as_dir" && as_dir=.
12090    for ac_exec_ext in '' $ac_executable_extensions; do
12091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12092    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12094    break 2
12095  fi
12096done
12097  done
12098IFS=$as_save_IFS
12099
12100  ;;
12101esac
12102fi
12103XARGS=$ac_cv_path_XARGS
12104if test -n "$XARGS"; then
12105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12106$as_echo "$XARGS" >&6; }
12107else
12108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12109$as_echo "no" >&6; }
12110fi
12111
12112
12113  test -n "$XARGS" && break
12114done
12115
12116  else
12117    # The variable is set, but is it from the command line or the environment?
12118
12119    # Try to remove the string !XARGS! from our list.
12120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12122      # If it failed, the variable was not from the command line. Ignore it,
12123      # but warn the user (except for BASH, which is always set by the calling BASH).
12124      if test "xXARGS" != xBASH; then
12125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12126$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12127      fi
12128      # Try to locate tool using the code snippet
12129      for ac_prog in xargs
12130do
12131  # Extract the first word of "$ac_prog", so it can be a program name with args.
12132set dummy $ac_prog; ac_word=$2
12133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12134$as_echo_n "checking for $ac_word... " >&6; }
12135if ${ac_cv_path_XARGS+:} false; then :
12136  $as_echo_n "(cached) " >&6
12137else
12138  case $XARGS in
12139  [\\/]* | ?:[\\/]*)
12140  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12141  ;;
12142  *)
12143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12144for as_dir in $PATH
12145do
12146  IFS=$as_save_IFS
12147  test -z "$as_dir" && as_dir=.
12148    for ac_exec_ext in '' $ac_executable_extensions; do
12149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12150    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12152    break 2
12153  fi
12154done
12155  done
12156IFS=$as_save_IFS
12157
12158  ;;
12159esac
12160fi
12161XARGS=$ac_cv_path_XARGS
12162if test -n "$XARGS"; then
12163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12164$as_echo "$XARGS" >&6; }
12165else
12166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12167$as_echo "no" >&6; }
12168fi
12169
12170
12171  test -n "$XARGS" && break
12172done
12173
12174    else
12175      # If it succeeded, then it was overridden by the user. We will use it
12176      # for the tool.
12177
12178      # First remove it from the list of overridden variables, so we can test
12179      # for unknown variables in the end.
12180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12181
12182      # Check if we try to supply an empty value
12183      if test "x$XARGS" = x; then
12184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12185$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12187$as_echo_n "checking for XARGS... " >&6; }
12188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12189$as_echo "disabled" >&6; }
12190      else
12191        # Check if the provided tool contains a complete path.
12192        tool_specified="$XARGS"
12193        tool_basename="${tool_specified##*/}"
12194        if test "x$tool_basename" = "x$tool_specified"; then
12195          # A command without a complete path is provided, search $PATH.
12196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12197$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12198          # Extract the first word of "$tool_basename", so it can be a program name with args.
12199set dummy $tool_basename; ac_word=$2
12200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12201$as_echo_n "checking for $ac_word... " >&6; }
12202if ${ac_cv_path_XARGS+:} false; then :
12203  $as_echo_n "(cached) " >&6
12204else
12205  case $XARGS in
12206  [\\/]* | ?:[\\/]*)
12207  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12208  ;;
12209  *)
12210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12211for as_dir in $PATH
12212do
12213  IFS=$as_save_IFS
12214  test -z "$as_dir" && as_dir=.
12215    for ac_exec_ext in '' $ac_executable_extensions; do
12216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12217    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12219    break 2
12220  fi
12221done
12222  done
12223IFS=$as_save_IFS
12224
12225  ;;
12226esac
12227fi
12228XARGS=$ac_cv_path_XARGS
12229if test -n "$XARGS"; then
12230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12231$as_echo "$XARGS" >&6; }
12232else
12233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12234$as_echo "no" >&6; }
12235fi
12236
12237
12238          if test "x$XARGS" = x; then
12239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12240          fi
12241        else
12242          # Otherwise we believe it is a complete path. Use it as it is.
12243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12244$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12246$as_echo_n "checking for XARGS... " >&6; }
12247          if test ! -x "$tool_specified"; then
12248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12249$as_echo "not found" >&6; }
12250            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12251          fi
12252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12253$as_echo "$tool_specified" >&6; }
12254        fi
12255      fi
12256    fi
12257
12258  fi
12259
12260
12261
12262  if test "x$XARGS" = x; then
12263    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12264  fi
12265
12266
12267
12268  # Then required tools that require some special treatment.
12269
12270
12271  # Publish this variable in the help.
12272
12273
12274  if [ -z "${AWK+x}" ]; then
12275    # The variable is not set by user, try to locate tool using the code snippet
12276    for ac_prog in gawk mawk nawk awk
12277do
12278  # Extract the first word of "$ac_prog", so it can be a program name with args.
12279set dummy $ac_prog; ac_word=$2
12280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12281$as_echo_n "checking for $ac_word... " >&6; }
12282if ${ac_cv_prog_AWK+:} false; then :
12283  $as_echo_n "(cached) " >&6
12284else
12285  if test -n "$AWK"; then
12286  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12287else
12288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12289for as_dir in $PATH
12290do
12291  IFS=$as_save_IFS
12292  test -z "$as_dir" && as_dir=.
12293    for ac_exec_ext in '' $ac_executable_extensions; do
12294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12295    ac_cv_prog_AWK="$ac_prog"
12296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12297    break 2
12298  fi
12299done
12300  done
12301IFS=$as_save_IFS
12302
12303fi
12304fi
12305AWK=$ac_cv_prog_AWK
12306if test -n "$AWK"; then
12307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12308$as_echo "$AWK" >&6; }
12309else
12310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12311$as_echo "no" >&6; }
12312fi
12313
12314
12315  test -n "$AWK" && break
12316done
12317
12318  else
12319    # The variable is set, but is it from the command line or the environment?
12320
12321    # Try to remove the string !AWK! from our list.
12322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12324      # If it failed, the variable was not from the command line. Ignore it,
12325      # but warn the user (except for BASH, which is always set by the calling BASH).
12326      if test "xAWK" != xBASH; then
12327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12328$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12329      fi
12330      # Try to locate tool using the code snippet
12331      for ac_prog in gawk mawk nawk awk
12332do
12333  # Extract the first word of "$ac_prog", so it can be a program name with args.
12334set dummy $ac_prog; ac_word=$2
12335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12336$as_echo_n "checking for $ac_word... " >&6; }
12337if ${ac_cv_prog_AWK+:} false; then :
12338  $as_echo_n "(cached) " >&6
12339else
12340  if test -n "$AWK"; then
12341  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12342else
12343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12344for as_dir in $PATH
12345do
12346  IFS=$as_save_IFS
12347  test -z "$as_dir" && as_dir=.
12348    for ac_exec_ext in '' $ac_executable_extensions; do
12349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12350    ac_cv_prog_AWK="$ac_prog"
12351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12352    break 2
12353  fi
12354done
12355  done
12356IFS=$as_save_IFS
12357
12358fi
12359fi
12360AWK=$ac_cv_prog_AWK
12361if test -n "$AWK"; then
12362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12363$as_echo "$AWK" >&6; }
12364else
12365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12366$as_echo "no" >&6; }
12367fi
12368
12369
12370  test -n "$AWK" && break
12371done
12372
12373    else
12374      # If it succeeded, then it was overridden by the user. We will use it
12375      # for the tool.
12376
12377      # First remove it from the list of overridden variables, so we can test
12378      # for unknown variables in the end.
12379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12380
12381      # Check if we try to supply an empty value
12382      if test "x$AWK" = x; then
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12384$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12386$as_echo_n "checking for AWK... " >&6; }
12387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12388$as_echo "disabled" >&6; }
12389      else
12390        # Check if the provided tool contains a complete path.
12391        tool_specified="$AWK"
12392        tool_basename="${tool_specified##*/}"
12393        if test "x$tool_basename" = "x$tool_specified"; then
12394          # A command without a complete path is provided, search $PATH.
12395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12396$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12397          # Extract the first word of "$tool_basename", so it can be a program name with args.
12398set dummy $tool_basename; ac_word=$2
12399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12400$as_echo_n "checking for $ac_word... " >&6; }
12401if ${ac_cv_path_AWK+:} false; then :
12402  $as_echo_n "(cached) " >&6
12403else
12404  case $AWK in
12405  [\\/]* | ?:[\\/]*)
12406  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12407  ;;
12408  *)
12409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12410for as_dir in $PATH
12411do
12412  IFS=$as_save_IFS
12413  test -z "$as_dir" && as_dir=.
12414    for ac_exec_ext in '' $ac_executable_extensions; do
12415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12416    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12418    break 2
12419  fi
12420done
12421  done
12422IFS=$as_save_IFS
12423
12424  ;;
12425esac
12426fi
12427AWK=$ac_cv_path_AWK
12428if test -n "$AWK"; then
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12430$as_echo "$AWK" >&6; }
12431else
12432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12433$as_echo "no" >&6; }
12434fi
12435
12436
12437          if test "x$AWK" = x; then
12438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12439          fi
12440        else
12441          # Otherwise we believe it is a complete path. Use it as it is.
12442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12443$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12445$as_echo_n "checking for AWK... " >&6; }
12446          if test ! -x "$tool_specified"; then
12447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12448$as_echo "not found" >&6; }
12449            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12450          fi
12451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12452$as_echo "$tool_specified" >&6; }
12453        fi
12454      fi
12455    fi
12456
12457  fi
12458
12459
12460  if test "x$AWK" = x; then
12461    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12462  fi
12463
12464
12465
12466
12467  # Publish this variable in the help.
12468
12469
12470  if [ -z "${GREP+x}" ]; then
12471    # The variable is not set by user, try to locate tool using the code snippet
12472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12473$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12474if ${ac_cv_path_GREP+:} false; then :
12475  $as_echo_n "(cached) " >&6
12476else
12477  if test -z "$GREP"; then
12478  ac_path_GREP_found=false
12479  # Loop through the user's path and test for each of PROGNAME-LIST
12480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12481for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12482do
12483  IFS=$as_save_IFS
12484  test -z "$as_dir" && as_dir=.
12485    for ac_prog in grep ggrep; do
12486    for ac_exec_ext in '' $ac_executable_extensions; do
12487      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12488      as_fn_executable_p "$ac_path_GREP" || continue
12489# Check for GNU ac_path_GREP and select it if it is found.
12490  # Check for GNU $ac_path_GREP
12491case `"$ac_path_GREP" --version 2>&1` in
12492*GNU*)
12493  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12494*)
12495  ac_count=0
12496  $as_echo_n 0123456789 >"conftest.in"
12497  while :
12498  do
12499    cat "conftest.in" "conftest.in" >"conftest.tmp"
12500    mv "conftest.tmp" "conftest.in"
12501    cp "conftest.in" "conftest.nl"
12502    $as_echo 'GREP' >> "conftest.nl"
12503    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12504    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12505    as_fn_arith $ac_count + 1 && ac_count=$as_val
12506    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12507      # Best one so far, save it but keep looking for a better one
12508      ac_cv_path_GREP="$ac_path_GREP"
12509      ac_path_GREP_max=$ac_count
12510    fi
12511    # 10*(2^10) chars as input seems more than enough
12512    test $ac_count -gt 10 && break
12513  done
12514  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12515esac
12516
12517      $ac_path_GREP_found && break 3
12518    done
12519  done
12520  done
12521IFS=$as_save_IFS
12522  if test -z "$ac_cv_path_GREP"; then
12523    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12524  fi
12525else
12526  ac_cv_path_GREP=$GREP
12527fi
12528
12529fi
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12531$as_echo "$ac_cv_path_GREP" >&6; }
12532 GREP="$ac_cv_path_GREP"
12533
12534
12535  else
12536    # The variable is set, but is it from the command line or the environment?
12537
12538    # Try to remove the string !GREP! from our list.
12539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12541      # If it failed, the variable was not from the command line. Ignore it,
12542      # but warn the user (except for BASH, which is always set by the calling BASH).
12543      if test "xGREP" != xBASH; then
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12545$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12546      fi
12547      # Try to locate tool using the code snippet
12548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12549$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12550if ${ac_cv_path_GREP+:} false; then :
12551  $as_echo_n "(cached) " >&6
12552else
12553  if test -z "$GREP"; then
12554  ac_path_GREP_found=false
12555  # Loop through the user's path and test for each of PROGNAME-LIST
12556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12557for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12558do
12559  IFS=$as_save_IFS
12560  test -z "$as_dir" && as_dir=.
12561    for ac_prog in grep ggrep; do
12562    for ac_exec_ext in '' $ac_executable_extensions; do
12563      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12564      as_fn_executable_p "$ac_path_GREP" || continue
12565# Check for GNU ac_path_GREP and select it if it is found.
12566  # Check for GNU $ac_path_GREP
12567case `"$ac_path_GREP" --version 2>&1` in
12568*GNU*)
12569  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12570*)
12571  ac_count=0
12572  $as_echo_n 0123456789 >"conftest.in"
12573  while :
12574  do
12575    cat "conftest.in" "conftest.in" >"conftest.tmp"
12576    mv "conftest.tmp" "conftest.in"
12577    cp "conftest.in" "conftest.nl"
12578    $as_echo 'GREP' >> "conftest.nl"
12579    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12580    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12581    as_fn_arith $ac_count + 1 && ac_count=$as_val
12582    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12583      # Best one so far, save it but keep looking for a better one
12584      ac_cv_path_GREP="$ac_path_GREP"
12585      ac_path_GREP_max=$ac_count
12586    fi
12587    # 10*(2^10) chars as input seems more than enough
12588    test $ac_count -gt 10 && break
12589  done
12590  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12591esac
12592
12593      $ac_path_GREP_found && break 3
12594    done
12595  done
12596  done
12597IFS=$as_save_IFS
12598  if test -z "$ac_cv_path_GREP"; then
12599    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12600  fi
12601else
12602  ac_cv_path_GREP=$GREP
12603fi
12604
12605fi
12606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12607$as_echo "$ac_cv_path_GREP" >&6; }
12608 GREP="$ac_cv_path_GREP"
12609
12610
12611    else
12612      # If it succeeded, then it was overridden by the user. We will use it
12613      # for the tool.
12614
12615      # First remove it from the list of overridden variables, so we can test
12616      # for unknown variables in the end.
12617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12618
12619      # Check if we try to supply an empty value
12620      if test "x$GREP" = x; then
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12622$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12624$as_echo_n "checking for GREP... " >&6; }
12625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12626$as_echo "disabled" >&6; }
12627      else
12628        # Check if the provided tool contains a complete path.
12629        tool_specified="$GREP"
12630        tool_basename="${tool_specified##*/}"
12631        if test "x$tool_basename" = "x$tool_specified"; then
12632          # A command without a complete path is provided, search $PATH.
12633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12634$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12635          # Extract the first word of "$tool_basename", so it can be a program name with args.
12636set dummy $tool_basename; ac_word=$2
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12638$as_echo_n "checking for $ac_word... " >&6; }
12639if ${ac_cv_path_GREP+:} false; then :
12640  $as_echo_n "(cached) " >&6
12641else
12642  case $GREP in
12643  [\\/]* | ?:[\\/]*)
12644  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12645  ;;
12646  *)
12647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12648for as_dir in $PATH
12649do
12650  IFS=$as_save_IFS
12651  test -z "$as_dir" && as_dir=.
12652    for ac_exec_ext in '' $ac_executable_extensions; do
12653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12654    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12656    break 2
12657  fi
12658done
12659  done
12660IFS=$as_save_IFS
12661
12662  ;;
12663esac
12664fi
12665GREP=$ac_cv_path_GREP
12666if test -n "$GREP"; then
12667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12668$as_echo "$GREP" >&6; }
12669else
12670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671$as_echo "no" >&6; }
12672fi
12673
12674
12675          if test "x$GREP" = x; then
12676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12677          fi
12678        else
12679          # Otherwise we believe it is a complete path. Use it as it is.
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12681$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12683$as_echo_n "checking for GREP... " >&6; }
12684          if test ! -x "$tool_specified"; then
12685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12686$as_echo "not found" >&6; }
12687            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12688          fi
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12690$as_echo "$tool_specified" >&6; }
12691        fi
12692      fi
12693    fi
12694
12695  fi
12696
12697
12698  if test "x$GREP" = x; then
12699    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12700  fi
12701
12702
12703
12704
12705  # Publish this variable in the help.
12706
12707
12708  if [ -z "${EGREP+x}" ]; then
12709    # The variable is not set by user, try to locate tool using the code snippet
12710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12711$as_echo_n "checking for egrep... " >&6; }
12712if ${ac_cv_path_EGREP+:} false; then :
12713  $as_echo_n "(cached) " >&6
12714else
12715  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12716   then ac_cv_path_EGREP="$GREP -E"
12717   else
12718     if test -z "$EGREP"; then
12719  ac_path_EGREP_found=false
12720  # Loop through the user's path and test for each of PROGNAME-LIST
12721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12722for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12723do
12724  IFS=$as_save_IFS
12725  test -z "$as_dir" && as_dir=.
12726    for ac_prog in egrep; do
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12729      as_fn_executable_p "$ac_path_EGREP" || continue
12730# Check for GNU ac_path_EGREP and select it if it is found.
12731  # Check for GNU $ac_path_EGREP
12732case `"$ac_path_EGREP" --version 2>&1` in
12733*GNU*)
12734  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12735*)
12736  ac_count=0
12737  $as_echo_n 0123456789 >"conftest.in"
12738  while :
12739  do
12740    cat "conftest.in" "conftest.in" >"conftest.tmp"
12741    mv "conftest.tmp" "conftest.in"
12742    cp "conftest.in" "conftest.nl"
12743    $as_echo 'EGREP' >> "conftest.nl"
12744    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12745    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12746    as_fn_arith $ac_count + 1 && ac_count=$as_val
12747    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12748      # Best one so far, save it but keep looking for a better one
12749      ac_cv_path_EGREP="$ac_path_EGREP"
12750      ac_path_EGREP_max=$ac_count
12751    fi
12752    # 10*(2^10) chars as input seems more than enough
12753    test $ac_count -gt 10 && break
12754  done
12755  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12756esac
12757
12758      $ac_path_EGREP_found && break 3
12759    done
12760  done
12761  done
12762IFS=$as_save_IFS
12763  if test -z "$ac_cv_path_EGREP"; then
12764    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12765  fi
12766else
12767  ac_cv_path_EGREP=$EGREP
12768fi
12769
12770   fi
12771fi
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12773$as_echo "$ac_cv_path_EGREP" >&6; }
12774 EGREP="$ac_cv_path_EGREP"
12775
12776
12777  else
12778    # The variable is set, but is it from the command line or the environment?
12779
12780    # Try to remove the string !EGREP! from our list.
12781    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12782    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12783      # If it failed, the variable was not from the command line. Ignore it,
12784      # but warn the user (except for BASH, which is always set by the calling BASH).
12785      if test "xEGREP" != xBASH; then
12786        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12787$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12788      fi
12789      # Try to locate tool using the code snippet
12790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12791$as_echo_n "checking for egrep... " >&6; }
12792if ${ac_cv_path_EGREP+:} false; then :
12793  $as_echo_n "(cached) " >&6
12794else
12795  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12796   then ac_cv_path_EGREP="$GREP -E"
12797   else
12798     if test -z "$EGREP"; then
12799  ac_path_EGREP_found=false
12800  # Loop through the user's path and test for each of PROGNAME-LIST
12801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12802for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12803do
12804  IFS=$as_save_IFS
12805  test -z "$as_dir" && as_dir=.
12806    for ac_prog in egrep; do
12807    for ac_exec_ext in '' $ac_executable_extensions; do
12808      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12809      as_fn_executable_p "$ac_path_EGREP" || continue
12810# Check for GNU ac_path_EGREP and select it if it is found.
12811  # Check for GNU $ac_path_EGREP
12812case `"$ac_path_EGREP" --version 2>&1` in
12813*GNU*)
12814  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12815*)
12816  ac_count=0
12817  $as_echo_n 0123456789 >"conftest.in"
12818  while :
12819  do
12820    cat "conftest.in" "conftest.in" >"conftest.tmp"
12821    mv "conftest.tmp" "conftest.in"
12822    cp "conftest.in" "conftest.nl"
12823    $as_echo 'EGREP' >> "conftest.nl"
12824    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12825    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12826    as_fn_arith $ac_count + 1 && ac_count=$as_val
12827    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12828      # Best one so far, save it but keep looking for a better one
12829      ac_cv_path_EGREP="$ac_path_EGREP"
12830      ac_path_EGREP_max=$ac_count
12831    fi
12832    # 10*(2^10) chars as input seems more than enough
12833    test $ac_count -gt 10 && break
12834  done
12835  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12836esac
12837
12838      $ac_path_EGREP_found && break 3
12839    done
12840  done
12841  done
12842IFS=$as_save_IFS
12843  if test -z "$ac_cv_path_EGREP"; then
12844    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12845  fi
12846else
12847  ac_cv_path_EGREP=$EGREP
12848fi
12849
12850   fi
12851fi
12852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12853$as_echo "$ac_cv_path_EGREP" >&6; }
12854 EGREP="$ac_cv_path_EGREP"
12855
12856
12857    else
12858      # If it succeeded, then it was overridden by the user. We will use it
12859      # for the tool.
12860
12861      # First remove it from the list of overridden variables, so we can test
12862      # for unknown variables in the end.
12863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12864
12865      # Check if we try to supply an empty value
12866      if test "x$EGREP" = x; then
12867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12868$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12870$as_echo_n "checking for EGREP... " >&6; }
12871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12872$as_echo "disabled" >&6; }
12873      else
12874        # Check if the provided tool contains a complete path.
12875        tool_specified="$EGREP"
12876        tool_basename="${tool_specified##*/}"
12877        if test "x$tool_basename" = "x$tool_specified"; then
12878          # A command without a complete path is provided, search $PATH.
12879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12880$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12881          # Extract the first word of "$tool_basename", so it can be a program name with args.
12882set dummy $tool_basename; ac_word=$2
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12884$as_echo_n "checking for $ac_word... " >&6; }
12885if ${ac_cv_path_EGREP+:} false; then :
12886  $as_echo_n "(cached) " >&6
12887else
12888  case $EGREP in
12889  [\\/]* | ?:[\\/]*)
12890  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12891  ;;
12892  *)
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_exec_ext in '' $ac_executable_extensions; do
12899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12900    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12902    break 2
12903  fi
12904done
12905  done
12906IFS=$as_save_IFS
12907
12908  ;;
12909esac
12910fi
12911EGREP=$ac_cv_path_EGREP
12912if test -n "$EGREP"; then
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12914$as_echo "$EGREP" >&6; }
12915else
12916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12917$as_echo "no" >&6; }
12918fi
12919
12920
12921          if test "x$EGREP" = x; then
12922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12923          fi
12924        else
12925          # Otherwise we believe it is a complete path. Use it as it is.
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12927$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12929$as_echo_n "checking for EGREP... " >&6; }
12930          if test ! -x "$tool_specified"; then
12931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12932$as_echo "not found" >&6; }
12933            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12934          fi
12935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12936$as_echo "$tool_specified" >&6; }
12937        fi
12938      fi
12939    fi
12940
12941  fi
12942
12943
12944  if test "x$EGREP" = x; then
12945    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12946  fi
12947
12948
12949
12950
12951  # Publish this variable in the help.
12952
12953
12954  if [ -z "${FGREP+x}" ]; then
12955    # The variable is not set by user, try to locate tool using the code snippet
12956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12957$as_echo_n "checking for fgrep... " >&6; }
12958if ${ac_cv_path_FGREP+:} false; then :
12959  $as_echo_n "(cached) " >&6
12960else
12961  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12962   then ac_cv_path_FGREP="$GREP -F"
12963   else
12964     if test -z "$FGREP"; then
12965  ac_path_FGREP_found=false
12966  # Loop through the user's path and test for each of PROGNAME-LIST
12967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12969do
12970  IFS=$as_save_IFS
12971  test -z "$as_dir" && as_dir=.
12972    for ac_prog in fgrep; do
12973    for ac_exec_ext in '' $ac_executable_extensions; do
12974      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12975      as_fn_executable_p "$ac_path_FGREP" || continue
12976# Check for GNU ac_path_FGREP and select it if it is found.
12977  # Check for GNU $ac_path_FGREP
12978case `"$ac_path_FGREP" --version 2>&1` in
12979*GNU*)
12980  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12981*)
12982  ac_count=0
12983  $as_echo_n 0123456789 >"conftest.in"
12984  while :
12985  do
12986    cat "conftest.in" "conftest.in" >"conftest.tmp"
12987    mv "conftest.tmp" "conftest.in"
12988    cp "conftest.in" "conftest.nl"
12989    $as_echo 'FGREP' >> "conftest.nl"
12990    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12991    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12992    as_fn_arith $ac_count + 1 && ac_count=$as_val
12993    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12994      # Best one so far, save it but keep looking for a better one
12995      ac_cv_path_FGREP="$ac_path_FGREP"
12996      ac_path_FGREP_max=$ac_count
12997    fi
12998    # 10*(2^10) chars as input seems more than enough
12999    test $ac_count -gt 10 && break
13000  done
13001  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13002esac
13003
13004      $ac_path_FGREP_found && break 3
13005    done
13006  done
13007  done
13008IFS=$as_save_IFS
13009  if test -z "$ac_cv_path_FGREP"; then
13010    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13011  fi
13012else
13013  ac_cv_path_FGREP=$FGREP
13014fi
13015
13016   fi
13017fi
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13019$as_echo "$ac_cv_path_FGREP" >&6; }
13020 FGREP="$ac_cv_path_FGREP"
13021
13022
13023  else
13024    # The variable is set, but is it from the command line or the environment?
13025
13026    # Try to remove the string !FGREP! from our list.
13027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13029      # If it failed, the variable was not from the command line. Ignore it,
13030      # but warn the user (except for BASH, which is always set by the calling BASH).
13031      if test "xFGREP" != xBASH; then
13032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13033$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13034      fi
13035      # Try to locate tool using the code snippet
13036      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13037$as_echo_n "checking for fgrep... " >&6; }
13038if ${ac_cv_path_FGREP+:} false; then :
13039  $as_echo_n "(cached) " >&6
13040else
13041  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13042   then ac_cv_path_FGREP="$GREP -F"
13043   else
13044     if test -z "$FGREP"; then
13045  ac_path_FGREP_found=false
13046  # Loop through the user's path and test for each of PROGNAME-LIST
13047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13048for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13049do
13050  IFS=$as_save_IFS
13051  test -z "$as_dir" && as_dir=.
13052    for ac_prog in fgrep; do
13053    for ac_exec_ext in '' $ac_executable_extensions; do
13054      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13055      as_fn_executable_p "$ac_path_FGREP" || continue
13056# Check for GNU ac_path_FGREP and select it if it is found.
13057  # Check for GNU $ac_path_FGREP
13058case `"$ac_path_FGREP" --version 2>&1` in
13059*GNU*)
13060  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13061*)
13062  ac_count=0
13063  $as_echo_n 0123456789 >"conftest.in"
13064  while :
13065  do
13066    cat "conftest.in" "conftest.in" >"conftest.tmp"
13067    mv "conftest.tmp" "conftest.in"
13068    cp "conftest.in" "conftest.nl"
13069    $as_echo 'FGREP' >> "conftest.nl"
13070    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13071    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13072    as_fn_arith $ac_count + 1 && ac_count=$as_val
13073    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13074      # Best one so far, save it but keep looking for a better one
13075      ac_cv_path_FGREP="$ac_path_FGREP"
13076      ac_path_FGREP_max=$ac_count
13077    fi
13078    # 10*(2^10) chars as input seems more than enough
13079    test $ac_count -gt 10 && break
13080  done
13081  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13082esac
13083
13084      $ac_path_FGREP_found && break 3
13085    done
13086  done
13087  done
13088IFS=$as_save_IFS
13089  if test -z "$ac_cv_path_FGREP"; then
13090    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13091  fi
13092else
13093  ac_cv_path_FGREP=$FGREP
13094fi
13095
13096   fi
13097fi
13098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13099$as_echo "$ac_cv_path_FGREP" >&6; }
13100 FGREP="$ac_cv_path_FGREP"
13101
13102
13103    else
13104      # If it succeeded, then it was overridden by the user. We will use it
13105      # for the tool.
13106
13107      # First remove it from the list of overridden variables, so we can test
13108      # for unknown variables in the end.
13109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13110
13111      # Check if we try to supply an empty value
13112      if test "x$FGREP" = x; then
13113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13114$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13116$as_echo_n "checking for FGREP... " >&6; }
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13118$as_echo "disabled" >&6; }
13119      else
13120        # Check if the provided tool contains a complete path.
13121        tool_specified="$FGREP"
13122        tool_basename="${tool_specified##*/}"
13123        if test "x$tool_basename" = "x$tool_specified"; then
13124          # A command without a complete path is provided, search $PATH.
13125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13126$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13127          # Extract the first word of "$tool_basename", so it can be a program name with args.
13128set dummy $tool_basename; ac_word=$2
13129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13130$as_echo_n "checking for $ac_word... " >&6; }
13131if ${ac_cv_path_FGREP+:} false; then :
13132  $as_echo_n "(cached) " >&6
13133else
13134  case $FGREP in
13135  [\\/]* | ?:[\\/]*)
13136  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13137  ;;
13138  *)
13139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140for as_dir in $PATH
13141do
13142  IFS=$as_save_IFS
13143  test -z "$as_dir" && as_dir=.
13144    for ac_exec_ext in '' $ac_executable_extensions; do
13145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13146    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13148    break 2
13149  fi
13150done
13151  done
13152IFS=$as_save_IFS
13153
13154  ;;
13155esac
13156fi
13157FGREP=$ac_cv_path_FGREP
13158if test -n "$FGREP"; then
13159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13160$as_echo "$FGREP" >&6; }
13161else
13162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13163$as_echo "no" >&6; }
13164fi
13165
13166
13167          if test "x$FGREP" = x; then
13168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13169          fi
13170        else
13171          # Otherwise we believe it is a complete path. Use it as it is.
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13173$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13175$as_echo_n "checking for FGREP... " >&6; }
13176          if test ! -x "$tool_specified"; then
13177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13178$as_echo "not found" >&6; }
13179            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13180          fi
13181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13182$as_echo "$tool_specified" >&6; }
13183        fi
13184      fi
13185    fi
13186
13187  fi
13188
13189
13190  if test "x$FGREP" = x; then
13191    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13192  fi
13193
13194
13195
13196
13197  # Publish this variable in the help.
13198
13199
13200  if [ -z "${SED+x}" ]; then
13201    # The variable is not set by user, try to locate tool using the code snippet
13202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13203$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13204if ${ac_cv_path_SED+:} false; then :
13205  $as_echo_n "(cached) " >&6
13206else
13207            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13208     for ac_i in 1 2 3 4 5 6 7; do
13209       ac_script="$ac_script$as_nl$ac_script"
13210     done
13211     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13212     { ac_script=; unset ac_script;}
13213     if test -z "$SED"; then
13214  ac_path_SED_found=false
13215  # Loop through the user's path and test for each of PROGNAME-LIST
13216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217for as_dir in $PATH
13218do
13219  IFS=$as_save_IFS
13220  test -z "$as_dir" && as_dir=.
13221    for ac_prog in sed gsed; do
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13224      as_fn_executable_p "$ac_path_SED" || continue
13225# Check for GNU ac_path_SED and select it if it is found.
13226  # Check for GNU $ac_path_SED
13227case `"$ac_path_SED" --version 2>&1` in
13228*GNU*)
13229  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13230*)
13231  ac_count=0
13232  $as_echo_n 0123456789 >"conftest.in"
13233  while :
13234  do
13235    cat "conftest.in" "conftest.in" >"conftest.tmp"
13236    mv "conftest.tmp" "conftest.in"
13237    cp "conftest.in" "conftest.nl"
13238    $as_echo '' >> "conftest.nl"
13239    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13240    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13241    as_fn_arith $ac_count + 1 && ac_count=$as_val
13242    if test $ac_count -gt ${ac_path_SED_max-0}; then
13243      # Best one so far, save it but keep looking for a better one
13244      ac_cv_path_SED="$ac_path_SED"
13245      ac_path_SED_max=$ac_count
13246    fi
13247    # 10*(2^10) chars as input seems more than enough
13248    test $ac_count -gt 10 && break
13249  done
13250  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13251esac
13252
13253      $ac_path_SED_found && break 3
13254    done
13255  done
13256  done
13257IFS=$as_save_IFS
13258  if test -z "$ac_cv_path_SED"; then
13259    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13260  fi
13261else
13262  ac_cv_path_SED=$SED
13263fi
13264
13265fi
13266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13267$as_echo "$ac_cv_path_SED" >&6; }
13268 SED="$ac_cv_path_SED"
13269  rm -f conftest.sed
13270
13271  else
13272    # The variable is set, but is it from the command line or the environment?
13273
13274    # Try to remove the string !SED! from our list.
13275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13277      # If it failed, the variable was not from the command line. Ignore it,
13278      # but warn the user (except for BASH, which is always set by the calling BASH).
13279      if test "xSED" != xBASH; then
13280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13281$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13282      fi
13283      # Try to locate tool using the code snippet
13284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13285$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13286if ${ac_cv_path_SED+:} false; then :
13287  $as_echo_n "(cached) " >&6
13288else
13289            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13290     for ac_i in 1 2 3 4 5 6 7; do
13291       ac_script="$ac_script$as_nl$ac_script"
13292     done
13293     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13294     { ac_script=; unset ac_script;}
13295     if test -z "$SED"; then
13296  ac_path_SED_found=false
13297  # Loop through the user's path and test for each of PROGNAME-LIST
13298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13299for as_dir in $PATH
13300do
13301  IFS=$as_save_IFS
13302  test -z "$as_dir" && as_dir=.
13303    for ac_prog in sed gsed; do
13304    for ac_exec_ext in '' $ac_executable_extensions; do
13305      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13306      as_fn_executable_p "$ac_path_SED" || continue
13307# Check for GNU ac_path_SED and select it if it is found.
13308  # Check for GNU $ac_path_SED
13309case `"$ac_path_SED" --version 2>&1` in
13310*GNU*)
13311  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13312*)
13313  ac_count=0
13314  $as_echo_n 0123456789 >"conftest.in"
13315  while :
13316  do
13317    cat "conftest.in" "conftest.in" >"conftest.tmp"
13318    mv "conftest.tmp" "conftest.in"
13319    cp "conftest.in" "conftest.nl"
13320    $as_echo '' >> "conftest.nl"
13321    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13322    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13323    as_fn_arith $ac_count + 1 && ac_count=$as_val
13324    if test $ac_count -gt ${ac_path_SED_max-0}; then
13325      # Best one so far, save it but keep looking for a better one
13326      ac_cv_path_SED="$ac_path_SED"
13327      ac_path_SED_max=$ac_count
13328    fi
13329    # 10*(2^10) chars as input seems more than enough
13330    test $ac_count -gt 10 && break
13331  done
13332  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13333esac
13334
13335      $ac_path_SED_found && break 3
13336    done
13337  done
13338  done
13339IFS=$as_save_IFS
13340  if test -z "$ac_cv_path_SED"; then
13341    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13342  fi
13343else
13344  ac_cv_path_SED=$SED
13345fi
13346
13347fi
13348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13349$as_echo "$ac_cv_path_SED" >&6; }
13350 SED="$ac_cv_path_SED"
13351  rm -f conftest.sed
13352
13353    else
13354      # If it succeeded, then it was overridden by the user. We will use it
13355      # for the tool.
13356
13357      # First remove it from the list of overridden variables, so we can test
13358      # for unknown variables in the end.
13359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13360
13361      # Check if we try to supply an empty value
13362      if test "x$SED" = x; then
13363        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13364$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13366$as_echo_n "checking for SED... " >&6; }
13367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13368$as_echo "disabled" >&6; }
13369      else
13370        # Check if the provided tool contains a complete path.
13371        tool_specified="$SED"
13372        tool_basename="${tool_specified##*/}"
13373        if test "x$tool_basename" = "x$tool_specified"; then
13374          # A command without a complete path is provided, search $PATH.
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13376$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13377          # Extract the first word of "$tool_basename", so it can be a program name with args.
13378set dummy $tool_basename; ac_word=$2
13379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13380$as_echo_n "checking for $ac_word... " >&6; }
13381if ${ac_cv_path_SED+:} false; then :
13382  $as_echo_n "(cached) " >&6
13383else
13384  case $SED in
13385  [\\/]* | ?:[\\/]*)
13386  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13387  ;;
13388  *)
13389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13390for as_dir in $PATH
13391do
13392  IFS=$as_save_IFS
13393  test -z "$as_dir" && as_dir=.
13394    for ac_exec_ext in '' $ac_executable_extensions; do
13395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13396    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13398    break 2
13399  fi
13400done
13401  done
13402IFS=$as_save_IFS
13403
13404  ;;
13405esac
13406fi
13407SED=$ac_cv_path_SED
13408if test -n "$SED"; then
13409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13410$as_echo "$SED" >&6; }
13411else
13412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13413$as_echo "no" >&6; }
13414fi
13415
13416
13417          if test "x$SED" = x; then
13418            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13419          fi
13420        else
13421          # Otherwise we believe it is a complete path. Use it as it is.
13422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13423$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13424          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13425$as_echo_n "checking for SED... " >&6; }
13426          if test ! -x "$tool_specified"; then
13427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13428$as_echo "not found" >&6; }
13429            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13430          fi
13431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13432$as_echo "$tool_specified" >&6; }
13433        fi
13434      fi
13435    fi
13436
13437  fi
13438
13439
13440  if test "x$SED" = x; then
13441    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13442  fi
13443
13444
13445
13446  # Always force rm.
13447  RM="$RM -f"
13448
13449  # pwd behaves differently on various platforms and some don't support the -L flag.
13450  # Always use the bash builtin pwd to get uniform behavior.
13451  THEPWDCMD=pwd
13452
13453  # These are not required on all platforms
13454
13455
13456  # Publish this variable in the help.
13457
13458
13459  if [ -z "${CYGPATH+x}" ]; then
13460    # The variable is not set by user, try to locate tool using the code snippet
13461    for ac_prog in cygpath
13462do
13463  # Extract the first word of "$ac_prog", so it can be a program name with args.
13464set dummy $ac_prog; ac_word=$2
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13466$as_echo_n "checking for $ac_word... " >&6; }
13467if ${ac_cv_path_CYGPATH+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  case $CYGPATH in
13471  [\\/]* | ?:[\\/]*)
13472  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13473  ;;
13474  *)
13475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13476for as_dir in $PATH
13477do
13478  IFS=$as_save_IFS
13479  test -z "$as_dir" && as_dir=.
13480    for ac_exec_ext in '' $ac_executable_extensions; do
13481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13482    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13484    break 2
13485  fi
13486done
13487  done
13488IFS=$as_save_IFS
13489
13490  ;;
13491esac
13492fi
13493CYGPATH=$ac_cv_path_CYGPATH
13494if test -n "$CYGPATH"; then
13495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13496$as_echo "$CYGPATH" >&6; }
13497else
13498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13499$as_echo "no" >&6; }
13500fi
13501
13502
13503  test -n "$CYGPATH" && break
13504done
13505
13506  else
13507    # The variable is set, but is it from the command line or the environment?
13508
13509    # Try to remove the string !CYGPATH! from our list.
13510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13512      # If it failed, the variable was not from the command line. Ignore it,
13513      # but warn the user (except for BASH, which is always set by the calling BASH).
13514      if test "xCYGPATH" != xBASH; then
13515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13516$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13517      fi
13518      # Try to locate tool using the code snippet
13519      for ac_prog in cygpath
13520do
13521  # Extract the first word of "$ac_prog", so it can be a program name with args.
13522set dummy $ac_prog; ac_word=$2
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13524$as_echo_n "checking for $ac_word... " >&6; }
13525if ${ac_cv_path_CYGPATH+:} false; then :
13526  $as_echo_n "(cached) " >&6
13527else
13528  case $CYGPATH in
13529  [\\/]* | ?:[\\/]*)
13530  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13531  ;;
13532  *)
13533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13534for as_dir in $PATH
13535do
13536  IFS=$as_save_IFS
13537  test -z "$as_dir" && as_dir=.
13538    for ac_exec_ext in '' $ac_executable_extensions; do
13539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13540    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13542    break 2
13543  fi
13544done
13545  done
13546IFS=$as_save_IFS
13547
13548  ;;
13549esac
13550fi
13551CYGPATH=$ac_cv_path_CYGPATH
13552if test -n "$CYGPATH"; then
13553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13554$as_echo "$CYGPATH" >&6; }
13555else
13556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13557$as_echo "no" >&6; }
13558fi
13559
13560
13561  test -n "$CYGPATH" && break
13562done
13563
13564    else
13565      # If it succeeded, then it was overridden by the user. We will use it
13566      # for the tool.
13567
13568      # First remove it from the list of overridden variables, so we can test
13569      # for unknown variables in the end.
13570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13571
13572      # Check if we try to supply an empty value
13573      if test "x$CYGPATH" = x; then
13574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13575$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13577$as_echo_n "checking for CYGPATH... " >&6; }
13578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13579$as_echo "disabled" >&6; }
13580      else
13581        # Check if the provided tool contains a complete path.
13582        tool_specified="$CYGPATH"
13583        tool_basename="${tool_specified##*/}"
13584        if test "x$tool_basename" = "x$tool_specified"; then
13585          # A command without a complete path is provided, search $PATH.
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13587$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13588          # Extract the first word of "$tool_basename", so it can be a program name with args.
13589set dummy $tool_basename; ac_word=$2
13590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13591$as_echo_n "checking for $ac_word... " >&6; }
13592if ${ac_cv_path_CYGPATH+:} false; then :
13593  $as_echo_n "(cached) " >&6
13594else
13595  case $CYGPATH in
13596  [\\/]* | ?:[\\/]*)
13597  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13598  ;;
13599  *)
13600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13601for as_dir in $PATH
13602do
13603  IFS=$as_save_IFS
13604  test -z "$as_dir" && as_dir=.
13605    for ac_exec_ext in '' $ac_executable_extensions; do
13606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13607    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13609    break 2
13610  fi
13611done
13612  done
13613IFS=$as_save_IFS
13614
13615  ;;
13616esac
13617fi
13618CYGPATH=$ac_cv_path_CYGPATH
13619if test -n "$CYGPATH"; then
13620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13621$as_echo "$CYGPATH" >&6; }
13622else
13623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13624$as_echo "no" >&6; }
13625fi
13626
13627
13628          if test "x$CYGPATH" = x; then
13629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13630          fi
13631        else
13632          # Otherwise we believe it is a complete path. Use it as it is.
13633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13634$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13636$as_echo_n "checking for CYGPATH... " >&6; }
13637          if test ! -x "$tool_specified"; then
13638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13639$as_echo "not found" >&6; }
13640            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13641          fi
13642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13643$as_echo "$tool_specified" >&6; }
13644        fi
13645      fi
13646    fi
13647
13648  fi
13649
13650
13651
13652
13653  # Publish this variable in the help.
13654
13655
13656  if [ -z "${READLINK+x}" ]; then
13657    # The variable is not set by user, try to locate tool using the code snippet
13658    for ac_prog in greadlink readlink
13659do
13660  # Extract the first word of "$ac_prog", so it can be a program name with args.
13661set dummy $ac_prog; ac_word=$2
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13663$as_echo_n "checking for $ac_word... " >&6; }
13664if ${ac_cv_path_READLINK+:} false; then :
13665  $as_echo_n "(cached) " >&6
13666else
13667  case $READLINK in
13668  [\\/]* | ?:[\\/]*)
13669  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13670  ;;
13671  *)
13672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13673for as_dir in $PATH
13674do
13675  IFS=$as_save_IFS
13676  test -z "$as_dir" && as_dir=.
13677    for ac_exec_ext in '' $ac_executable_extensions; do
13678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13679    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13681    break 2
13682  fi
13683done
13684  done
13685IFS=$as_save_IFS
13686
13687  ;;
13688esac
13689fi
13690READLINK=$ac_cv_path_READLINK
13691if test -n "$READLINK"; then
13692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13693$as_echo "$READLINK" >&6; }
13694else
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13696$as_echo "no" >&6; }
13697fi
13698
13699
13700  test -n "$READLINK" && break
13701done
13702
13703  else
13704    # The variable is set, but is it from the command line or the environment?
13705
13706    # Try to remove the string !READLINK! from our list.
13707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13709      # If it failed, the variable was not from the command line. Ignore it,
13710      # but warn the user (except for BASH, which is always set by the calling BASH).
13711      if test "xREADLINK" != xBASH; then
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13713$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13714      fi
13715      # Try to locate tool using the code snippet
13716      for ac_prog in greadlink readlink
13717do
13718  # Extract the first word of "$ac_prog", so it can be a program name with args.
13719set dummy $ac_prog; ac_word=$2
13720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13721$as_echo_n "checking for $ac_word... " >&6; }
13722if ${ac_cv_path_READLINK+:} false; then :
13723  $as_echo_n "(cached) " >&6
13724else
13725  case $READLINK in
13726  [\\/]* | ?:[\\/]*)
13727  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13728  ;;
13729  *)
13730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13731for as_dir in $PATH
13732do
13733  IFS=$as_save_IFS
13734  test -z "$as_dir" && as_dir=.
13735    for ac_exec_ext in '' $ac_executable_extensions; do
13736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13737    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13739    break 2
13740  fi
13741done
13742  done
13743IFS=$as_save_IFS
13744
13745  ;;
13746esac
13747fi
13748READLINK=$ac_cv_path_READLINK
13749if test -n "$READLINK"; then
13750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13751$as_echo "$READLINK" >&6; }
13752else
13753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
13755fi
13756
13757
13758  test -n "$READLINK" && break
13759done
13760
13761    else
13762      # If it succeeded, then it was overridden by the user. We will use it
13763      # for the tool.
13764
13765      # First remove it from the list of overridden variables, so we can test
13766      # for unknown variables in the end.
13767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13768
13769      # Check if we try to supply an empty value
13770      if test "x$READLINK" = x; then
13771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13772$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13774$as_echo_n "checking for READLINK... " >&6; }
13775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13776$as_echo "disabled" >&6; }
13777      else
13778        # Check if the provided tool contains a complete path.
13779        tool_specified="$READLINK"
13780        tool_basename="${tool_specified##*/}"
13781        if test "x$tool_basename" = "x$tool_specified"; then
13782          # A command without a complete path is provided, search $PATH.
13783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13784$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13785          # Extract the first word of "$tool_basename", so it can be a program name with args.
13786set dummy $tool_basename; ac_word=$2
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13788$as_echo_n "checking for $ac_word... " >&6; }
13789if ${ac_cv_path_READLINK+:} false; then :
13790  $as_echo_n "(cached) " >&6
13791else
13792  case $READLINK in
13793  [\\/]* | ?:[\\/]*)
13794  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13795  ;;
13796  *)
13797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13798for as_dir in $PATH
13799do
13800  IFS=$as_save_IFS
13801  test -z "$as_dir" && as_dir=.
13802    for ac_exec_ext in '' $ac_executable_extensions; do
13803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13804    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13806    break 2
13807  fi
13808done
13809  done
13810IFS=$as_save_IFS
13811
13812  ;;
13813esac
13814fi
13815READLINK=$ac_cv_path_READLINK
13816if test -n "$READLINK"; then
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13818$as_echo "$READLINK" >&6; }
13819else
13820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13821$as_echo "no" >&6; }
13822fi
13823
13824
13825          if test "x$READLINK" = x; then
13826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13827          fi
13828        else
13829          # Otherwise we believe it is a complete path. Use it as it is.
13830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13831$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13833$as_echo_n "checking for READLINK... " >&6; }
13834          if test ! -x "$tool_specified"; then
13835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13836$as_echo "not found" >&6; }
13837            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13838          fi
13839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13840$as_echo "$tool_specified" >&6; }
13841        fi
13842      fi
13843    fi
13844
13845  fi
13846
13847
13848
13849
13850  # Publish this variable in the help.
13851
13852
13853  if [ -z "${DF+x}" ]; then
13854    # The variable is not set by user, try to locate tool using the code snippet
13855    for ac_prog in df
13856do
13857  # Extract the first word of "$ac_prog", so it can be a program name with args.
13858set dummy $ac_prog; ac_word=$2
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13860$as_echo_n "checking for $ac_word... " >&6; }
13861if ${ac_cv_path_DF+:} false; then :
13862  $as_echo_n "(cached) " >&6
13863else
13864  case $DF in
13865  [\\/]* | ?:[\\/]*)
13866  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13867  ;;
13868  *)
13869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13870for as_dir in $PATH
13871do
13872  IFS=$as_save_IFS
13873  test -z "$as_dir" && as_dir=.
13874    for ac_exec_ext in '' $ac_executable_extensions; do
13875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13876    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13878    break 2
13879  fi
13880done
13881  done
13882IFS=$as_save_IFS
13883
13884  ;;
13885esac
13886fi
13887DF=$ac_cv_path_DF
13888if test -n "$DF"; then
13889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13890$as_echo "$DF" >&6; }
13891else
13892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13893$as_echo "no" >&6; }
13894fi
13895
13896
13897  test -n "$DF" && break
13898done
13899
13900  else
13901    # The variable is set, but is it from the command line or the environment?
13902
13903    # Try to remove the string !DF! from our list.
13904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13906      # If it failed, the variable was not from the command line. Ignore it,
13907      # but warn the user (except for BASH, which is always set by the calling BASH).
13908      if test "xDF" != xBASH; then
13909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13910$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13911      fi
13912      # Try to locate tool using the code snippet
13913      for ac_prog in df
13914do
13915  # Extract the first word of "$ac_prog", so it can be a program name with args.
13916set dummy $ac_prog; ac_word=$2
13917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13918$as_echo_n "checking for $ac_word... " >&6; }
13919if ${ac_cv_path_DF+:} false; then :
13920  $as_echo_n "(cached) " >&6
13921else
13922  case $DF in
13923  [\\/]* | ?:[\\/]*)
13924  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13925  ;;
13926  *)
13927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13928for as_dir in $PATH
13929do
13930  IFS=$as_save_IFS
13931  test -z "$as_dir" && as_dir=.
13932    for ac_exec_ext in '' $ac_executable_extensions; do
13933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13934    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13936    break 2
13937  fi
13938done
13939  done
13940IFS=$as_save_IFS
13941
13942  ;;
13943esac
13944fi
13945DF=$ac_cv_path_DF
13946if test -n "$DF"; then
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13948$as_echo "$DF" >&6; }
13949else
13950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13951$as_echo "no" >&6; }
13952fi
13953
13954
13955  test -n "$DF" && break
13956done
13957
13958    else
13959      # If it succeeded, then it was overridden by the user. We will use it
13960      # for the tool.
13961
13962      # First remove it from the list of overridden variables, so we can test
13963      # for unknown variables in the end.
13964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13965
13966      # Check if we try to supply an empty value
13967      if test "x$DF" = x; then
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13969$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13971$as_echo_n "checking for DF... " >&6; }
13972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13973$as_echo "disabled" >&6; }
13974      else
13975        # Check if the provided tool contains a complete path.
13976        tool_specified="$DF"
13977        tool_basename="${tool_specified##*/}"
13978        if test "x$tool_basename" = "x$tool_specified"; then
13979          # A command without a complete path is provided, search $PATH.
13980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13981$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13982          # Extract the first word of "$tool_basename", so it can be a program name with args.
13983set dummy $tool_basename; ac_word=$2
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13985$as_echo_n "checking for $ac_word... " >&6; }
13986if ${ac_cv_path_DF+:} false; then :
13987  $as_echo_n "(cached) " >&6
13988else
13989  case $DF in
13990  [\\/]* | ?:[\\/]*)
13991  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13992  ;;
13993  *)
13994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13995for as_dir in $PATH
13996do
13997  IFS=$as_save_IFS
13998  test -z "$as_dir" && as_dir=.
13999    for ac_exec_ext in '' $ac_executable_extensions; do
14000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14001    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14003    break 2
14004  fi
14005done
14006  done
14007IFS=$as_save_IFS
14008
14009  ;;
14010esac
14011fi
14012DF=$ac_cv_path_DF
14013if test -n "$DF"; then
14014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14015$as_echo "$DF" >&6; }
14016else
14017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14018$as_echo "no" >&6; }
14019fi
14020
14021
14022          if test "x$DF" = x; then
14023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14024          fi
14025        else
14026          # Otherwise we believe it is a complete path. Use it as it is.
14027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14028$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14030$as_echo_n "checking for DF... " >&6; }
14031          if test ! -x "$tool_specified"; then
14032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14033$as_echo "not found" >&6; }
14034            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14035          fi
14036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14037$as_echo "$tool_specified" >&6; }
14038        fi
14039      fi
14040    fi
14041
14042  fi
14043
14044
14045
14046
14047  # Publish this variable in the help.
14048
14049
14050  if [ -z "${CPIO+x}" ]; then
14051    # The variable is not set by user, try to locate tool using the code snippet
14052    for ac_prog in cpio bsdcpio
14053do
14054  # Extract the first word of "$ac_prog", so it can be a program name with args.
14055set dummy $ac_prog; ac_word=$2
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14057$as_echo_n "checking for $ac_word... " >&6; }
14058if ${ac_cv_path_CPIO+:} false; then :
14059  $as_echo_n "(cached) " >&6
14060else
14061  case $CPIO in
14062  [\\/]* | ?:[\\/]*)
14063  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14064  ;;
14065  *)
14066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14067for as_dir in $PATH
14068do
14069  IFS=$as_save_IFS
14070  test -z "$as_dir" && as_dir=.
14071    for ac_exec_ext in '' $ac_executable_extensions; do
14072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14073    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14075    break 2
14076  fi
14077done
14078  done
14079IFS=$as_save_IFS
14080
14081  ;;
14082esac
14083fi
14084CPIO=$ac_cv_path_CPIO
14085if test -n "$CPIO"; then
14086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14087$as_echo "$CPIO" >&6; }
14088else
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14090$as_echo "no" >&6; }
14091fi
14092
14093
14094  test -n "$CPIO" && break
14095done
14096
14097  else
14098    # The variable is set, but is it from the command line or the environment?
14099
14100    # Try to remove the string !CPIO! from our list.
14101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14103      # If it failed, the variable was not from the command line. Ignore it,
14104      # but warn the user (except for BASH, which is always set by the calling BASH).
14105      if test "xCPIO" != xBASH; then
14106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14107$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14108      fi
14109      # Try to locate tool using the code snippet
14110      for ac_prog in cpio bsdcpio
14111do
14112  # Extract the first word of "$ac_prog", so it can be a program name with args.
14113set dummy $ac_prog; ac_word=$2
14114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14115$as_echo_n "checking for $ac_word... " >&6; }
14116if ${ac_cv_path_CPIO+:} false; then :
14117  $as_echo_n "(cached) " >&6
14118else
14119  case $CPIO in
14120  [\\/]* | ?:[\\/]*)
14121  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14122  ;;
14123  *)
14124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14125for as_dir in $PATH
14126do
14127  IFS=$as_save_IFS
14128  test -z "$as_dir" && as_dir=.
14129    for ac_exec_ext in '' $ac_executable_extensions; do
14130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14131    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14133    break 2
14134  fi
14135done
14136  done
14137IFS=$as_save_IFS
14138
14139  ;;
14140esac
14141fi
14142CPIO=$ac_cv_path_CPIO
14143if test -n "$CPIO"; then
14144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14145$as_echo "$CPIO" >&6; }
14146else
14147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14148$as_echo "no" >&6; }
14149fi
14150
14151
14152  test -n "$CPIO" && break
14153done
14154
14155    else
14156      # If it succeeded, then it was overridden by the user. We will use it
14157      # for the tool.
14158
14159      # First remove it from the list of overridden variables, so we can test
14160      # for unknown variables in the end.
14161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14162
14163      # Check if we try to supply an empty value
14164      if test "x$CPIO" = x; then
14165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14166$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14168$as_echo_n "checking for CPIO... " >&6; }
14169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14170$as_echo "disabled" >&6; }
14171      else
14172        # Check if the provided tool contains a complete path.
14173        tool_specified="$CPIO"
14174        tool_basename="${tool_specified##*/}"
14175        if test "x$tool_basename" = "x$tool_specified"; then
14176          # A command without a complete path is provided, search $PATH.
14177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14178$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14179          # Extract the first word of "$tool_basename", so it can be a program name with args.
14180set dummy $tool_basename; ac_word=$2
14181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14182$as_echo_n "checking for $ac_word... " >&6; }
14183if ${ac_cv_path_CPIO+:} false; then :
14184  $as_echo_n "(cached) " >&6
14185else
14186  case $CPIO in
14187  [\\/]* | ?:[\\/]*)
14188  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14189  ;;
14190  *)
14191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14192for as_dir in $PATH
14193do
14194  IFS=$as_save_IFS
14195  test -z "$as_dir" && as_dir=.
14196    for ac_exec_ext in '' $ac_executable_extensions; do
14197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14198    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14200    break 2
14201  fi
14202done
14203  done
14204IFS=$as_save_IFS
14205
14206  ;;
14207esac
14208fi
14209CPIO=$ac_cv_path_CPIO
14210if test -n "$CPIO"; then
14211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14212$as_echo "$CPIO" >&6; }
14213else
14214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14215$as_echo "no" >&6; }
14216fi
14217
14218
14219          if test "x$CPIO" = x; then
14220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14221          fi
14222        else
14223          # Otherwise we believe it is a complete path. Use it as it is.
14224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14225$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14227$as_echo_n "checking for CPIO... " >&6; }
14228          if test ! -x "$tool_specified"; then
14229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14230$as_echo "not found" >&6; }
14231            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14232          fi
14233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14234$as_echo "$tool_specified" >&6; }
14235        fi
14236      fi
14237    fi
14238
14239  fi
14240
14241
14242
14243
14244  # Publish this variable in the help.
14245
14246
14247  if [ -z "${NICE+x}" ]; then
14248    # The variable is not set by user, try to locate tool using the code snippet
14249    for ac_prog in nice
14250do
14251  # Extract the first word of "$ac_prog", so it can be a program name with args.
14252set dummy $ac_prog; ac_word=$2
14253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14254$as_echo_n "checking for $ac_word... " >&6; }
14255if ${ac_cv_path_NICE+:} false; then :
14256  $as_echo_n "(cached) " >&6
14257else
14258  case $NICE in
14259  [\\/]* | ?:[\\/]*)
14260  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14261  ;;
14262  *)
14263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14264for as_dir in $PATH
14265do
14266  IFS=$as_save_IFS
14267  test -z "$as_dir" && as_dir=.
14268    for ac_exec_ext in '' $ac_executable_extensions; do
14269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14270    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14272    break 2
14273  fi
14274done
14275  done
14276IFS=$as_save_IFS
14277
14278  ;;
14279esac
14280fi
14281NICE=$ac_cv_path_NICE
14282if test -n "$NICE"; then
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14284$as_echo "$NICE" >&6; }
14285else
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14287$as_echo "no" >&6; }
14288fi
14289
14290
14291  test -n "$NICE" && break
14292done
14293
14294  else
14295    # The variable is set, but is it from the command line or the environment?
14296
14297    # Try to remove the string !NICE! from our list.
14298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14300      # If it failed, the variable was not from the command line. Ignore it,
14301      # but warn the user (except for BASH, which is always set by the calling BASH).
14302      if test "xNICE" != xBASH; then
14303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14304$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14305      fi
14306      # Try to locate tool using the code snippet
14307      for ac_prog in nice
14308do
14309  # Extract the first word of "$ac_prog", so it can be a program name with args.
14310set dummy $ac_prog; ac_word=$2
14311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14312$as_echo_n "checking for $ac_word... " >&6; }
14313if ${ac_cv_path_NICE+:} false; then :
14314  $as_echo_n "(cached) " >&6
14315else
14316  case $NICE in
14317  [\\/]* | ?:[\\/]*)
14318  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14319  ;;
14320  *)
14321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14322for as_dir in $PATH
14323do
14324  IFS=$as_save_IFS
14325  test -z "$as_dir" && as_dir=.
14326    for ac_exec_ext in '' $ac_executable_extensions; do
14327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14328    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14330    break 2
14331  fi
14332done
14333  done
14334IFS=$as_save_IFS
14335
14336  ;;
14337esac
14338fi
14339NICE=$ac_cv_path_NICE
14340if test -n "$NICE"; then
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14342$as_echo "$NICE" >&6; }
14343else
14344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14345$as_echo "no" >&6; }
14346fi
14347
14348
14349  test -n "$NICE" && break
14350done
14351
14352    else
14353      # If it succeeded, then it was overridden by the user. We will use it
14354      # for the tool.
14355
14356      # First remove it from the list of overridden variables, so we can test
14357      # for unknown variables in the end.
14358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14359
14360      # Check if we try to supply an empty value
14361      if test "x$NICE" = x; then
14362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14363$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14365$as_echo_n "checking for NICE... " >&6; }
14366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14367$as_echo "disabled" >&6; }
14368      else
14369        # Check if the provided tool contains a complete path.
14370        tool_specified="$NICE"
14371        tool_basename="${tool_specified##*/}"
14372        if test "x$tool_basename" = "x$tool_specified"; then
14373          # A command without a complete path is provided, search $PATH.
14374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14375$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14376          # Extract the first word of "$tool_basename", so it can be a program name with args.
14377set dummy $tool_basename; ac_word=$2
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14379$as_echo_n "checking for $ac_word... " >&6; }
14380if ${ac_cv_path_NICE+:} false; then :
14381  $as_echo_n "(cached) " >&6
14382else
14383  case $NICE in
14384  [\\/]* | ?:[\\/]*)
14385  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14386  ;;
14387  *)
14388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14389for as_dir in $PATH
14390do
14391  IFS=$as_save_IFS
14392  test -z "$as_dir" && as_dir=.
14393    for ac_exec_ext in '' $ac_executable_extensions; do
14394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14395    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14397    break 2
14398  fi
14399done
14400  done
14401IFS=$as_save_IFS
14402
14403  ;;
14404esac
14405fi
14406NICE=$ac_cv_path_NICE
14407if test -n "$NICE"; then
14408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14409$as_echo "$NICE" >&6; }
14410else
14411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14412$as_echo "no" >&6; }
14413fi
14414
14415
14416          if test "x$NICE" = x; then
14417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14418          fi
14419        else
14420          # Otherwise we believe it is a complete path. Use it as it is.
14421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14422$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14424$as_echo_n "checking for NICE... " >&6; }
14425          if test ! -x "$tool_specified"; then
14426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14427$as_echo "not found" >&6; }
14428            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14429          fi
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14431$as_echo "$tool_specified" >&6; }
14432        fi
14433      fi
14434    fi
14435
14436  fi
14437
14438
14439
14440
14441# Now we can determine OpenJDK build and target platforms. This is required to
14442# have early on.
14443# Make sure we can run config.sub.
14444$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14445  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14446
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14448$as_echo_n "checking build system type... " >&6; }
14449if ${ac_cv_build+:} false; then :
14450  $as_echo_n "(cached) " >&6
14451else
14452  ac_build_alias=$build_alias
14453test "x$ac_build_alias" = x &&
14454  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14455test "x$ac_build_alias" = x &&
14456  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14457ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14458  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14459
14460fi
14461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14462$as_echo "$ac_cv_build" >&6; }
14463case $ac_cv_build in
14464*-*-*) ;;
14465*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14466esac
14467build=$ac_cv_build
14468ac_save_IFS=$IFS; IFS='-'
14469set x $ac_cv_build
14470shift
14471build_cpu=$1
14472build_vendor=$2
14473shift; shift
14474# Remember, the first character of IFS is used to create $*,
14475# except with old shells:
14476build_os=$*
14477IFS=$ac_save_IFS
14478case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14479
14480
14481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14482$as_echo_n "checking host system type... " >&6; }
14483if ${ac_cv_host+:} false; then :
14484  $as_echo_n "(cached) " >&6
14485else
14486  if test "x$host_alias" = x; then
14487  ac_cv_host=$ac_cv_build
14488else
14489  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14490    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14491fi
14492
14493fi
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14495$as_echo "$ac_cv_host" >&6; }
14496case $ac_cv_host in
14497*-*-*) ;;
14498*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14499esac
14500host=$ac_cv_host
14501ac_save_IFS=$IFS; IFS='-'
14502set x $ac_cv_host
14503shift
14504host_cpu=$1
14505host_vendor=$2
14506shift; shift
14507# Remember, the first character of IFS is used to create $*,
14508# except with old shells:
14509host_os=$*
14510IFS=$ac_save_IFS
14511case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14512
14513
14514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14515$as_echo_n "checking target system type... " >&6; }
14516if ${ac_cv_target+:} false; then :
14517  $as_echo_n "(cached) " >&6
14518else
14519  if test "x$target_alias" = x; then
14520  ac_cv_target=$ac_cv_host
14521else
14522  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14523    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14524fi
14525
14526fi
14527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14528$as_echo "$ac_cv_target" >&6; }
14529case $ac_cv_target in
14530*-*-*) ;;
14531*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14532esac
14533target=$ac_cv_target
14534ac_save_IFS=$IFS; IFS='-'
14535set x $ac_cv_target
14536shift
14537target_cpu=$1
14538target_vendor=$2
14539shift; shift
14540# Remember, the first character of IFS is used to create $*,
14541# except with old shells:
14542target_os=$*
14543IFS=$ac_save_IFS
14544case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14545
14546
14547# The aliases save the names the user supplied, while $host etc.
14548# will get canonicalized.
14549test -n "$target_alias" &&
14550  test "$program_prefix$program_suffix$program_transform_name" = \
14551    NONENONEs,x,x, &&
14552  program_prefix=${target_alias}-
14553
14554  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14555  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14556  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14557  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14558  # to use the configure naming style.
14559
14560
14561
14562
14563
14564  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14565  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14566  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14567  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14568  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14569  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14570
14571
14572
14573  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14574
14575  case "$build_os" in
14576    *linux*)
14577      VAR_OS=linux
14578      VAR_OS_TYPE=unix
14579      ;;
14580    *solaris*)
14581      VAR_OS=solaris
14582      VAR_OS_TYPE=unix
14583      ;;
14584    *darwin*)
14585      VAR_OS=macosx
14586      VAR_OS_TYPE=unix
14587      ;;
14588    *bsd*)
14589      VAR_OS=bsd
14590      VAR_OS_TYPE=unix
14591      ;;
14592    *cygwin*)
14593      VAR_OS=windows
14594      VAR_OS_ENV=windows.cygwin
14595      ;;
14596    *mingw*)
14597      VAR_OS=windows
14598      VAR_OS_ENV=windows.msys
14599      ;;
14600    *aix*)
14601      VAR_OS=aix
14602      VAR_OS_TYPE=unix
14603      ;;
14604    *)
14605      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14606      ;;
14607  esac
14608
14609
14610  # First argument is the cpu name from the trip/quad
14611  case "$build_cpu" in
14612    x86_64)
14613      VAR_CPU=x86_64
14614      VAR_CPU_ARCH=x86
14615      VAR_CPU_BITS=64
14616      VAR_CPU_ENDIAN=little
14617      ;;
14618    i?86)
14619      VAR_CPU=x86
14620      VAR_CPU_ARCH=x86
14621      VAR_CPU_BITS=32
14622      VAR_CPU_ENDIAN=little
14623      ;;
14624    arm*)
14625      VAR_CPU=arm
14626      VAR_CPU_ARCH=arm
14627      VAR_CPU_BITS=32
14628      VAR_CPU_ENDIAN=little
14629      ;;
14630    aarch64)
14631      VAR_CPU=aarch64
14632      VAR_CPU_ARCH=aarch64
14633      VAR_CPU_BITS=64
14634      VAR_CPU_ENDIAN=little
14635      ;;
14636    powerpc)
14637      VAR_CPU=ppc
14638      VAR_CPU_ARCH=ppc
14639      VAR_CPU_BITS=32
14640      VAR_CPU_ENDIAN=big
14641      ;;
14642    powerpc64)
14643      VAR_CPU=ppc64
14644      VAR_CPU_ARCH=ppc
14645      VAR_CPU_BITS=64
14646      VAR_CPU_ENDIAN=big
14647      ;;
14648    powerpc64le)
14649      VAR_CPU=ppc64
14650      VAR_CPU_ARCH=ppc
14651      VAR_CPU_BITS=64
14652      VAR_CPU_ENDIAN=little
14653      ;;
14654    s390)
14655      VAR_CPU=s390
14656      VAR_CPU_ARCH=s390
14657      VAR_CPU_BITS=32
14658      VAR_CPU_ENDIAN=big
14659      ;;
14660    s390x)
14661      VAR_CPU=s390x
14662      VAR_CPU_ARCH=s390
14663      VAR_CPU_BITS=64
14664      VAR_CPU_ENDIAN=big
14665      ;;
14666    sparc)
14667      VAR_CPU=sparc
14668      VAR_CPU_ARCH=sparc
14669      VAR_CPU_BITS=32
14670      VAR_CPU_ENDIAN=big
14671      ;;
14672    sparcv9|sparc64)
14673      VAR_CPU=sparcv9
14674      VAR_CPU_ARCH=sparc
14675      VAR_CPU_BITS=64
14676      VAR_CPU_ENDIAN=big
14677      ;;
14678    *)
14679      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14680      ;;
14681  esac
14682
14683  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14684  OPENJDK_BUILD_OS="$VAR_OS"
14685  if test "x$VAR_OS_TYPE" != x; then
14686    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14687  else
14688    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14689  fi
14690  if test "x$VAR_OS_ENV" != x; then
14691    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14692  else
14693    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14694  fi
14695  OPENJDK_BUILD_CPU="$VAR_CPU"
14696  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14697  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14698  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14699
14700
14701
14702
14703
14704
14705
14706
14707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14708$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14710$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14711
14712  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14713
14714  case "$host_os" in
14715    *linux*)
14716      VAR_OS=linux
14717      VAR_OS_TYPE=unix
14718      ;;
14719    *solaris*)
14720      VAR_OS=solaris
14721      VAR_OS_TYPE=unix
14722      ;;
14723    *darwin*)
14724      VAR_OS=macosx
14725      VAR_OS_TYPE=unix
14726      ;;
14727    *bsd*)
14728      VAR_OS=bsd
14729      VAR_OS_TYPE=unix
14730      ;;
14731    *cygwin*)
14732      VAR_OS=windows
14733      VAR_OS_ENV=windows.cygwin
14734      ;;
14735    *mingw*)
14736      VAR_OS=windows
14737      VAR_OS_ENV=windows.msys
14738      ;;
14739    *aix*)
14740      VAR_OS=aix
14741      VAR_OS_TYPE=unix
14742      ;;
14743    *)
14744      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14745      ;;
14746  esac
14747
14748
14749  # First argument is the cpu name from the trip/quad
14750  case "$host_cpu" in
14751    x86_64)
14752      VAR_CPU=x86_64
14753      VAR_CPU_ARCH=x86
14754      VAR_CPU_BITS=64
14755      VAR_CPU_ENDIAN=little
14756      ;;
14757    i?86)
14758      VAR_CPU=x86
14759      VAR_CPU_ARCH=x86
14760      VAR_CPU_BITS=32
14761      VAR_CPU_ENDIAN=little
14762      ;;
14763    arm*)
14764      VAR_CPU=arm
14765      VAR_CPU_ARCH=arm
14766      VAR_CPU_BITS=32
14767      VAR_CPU_ENDIAN=little
14768      ;;
14769    aarch64)
14770      VAR_CPU=aarch64
14771      VAR_CPU_ARCH=aarch64
14772      VAR_CPU_BITS=64
14773      VAR_CPU_ENDIAN=little
14774      ;;
14775    powerpc)
14776      VAR_CPU=ppc
14777      VAR_CPU_ARCH=ppc
14778      VAR_CPU_BITS=32
14779      VAR_CPU_ENDIAN=big
14780      ;;
14781    powerpc64)
14782      VAR_CPU=ppc64
14783      VAR_CPU_ARCH=ppc
14784      VAR_CPU_BITS=64
14785      VAR_CPU_ENDIAN=big
14786      ;;
14787    powerpc64le)
14788      VAR_CPU=ppc64
14789      VAR_CPU_ARCH=ppc
14790      VAR_CPU_BITS=64
14791      VAR_CPU_ENDIAN=little
14792      ;;
14793    s390)
14794      VAR_CPU=s390
14795      VAR_CPU_ARCH=s390
14796      VAR_CPU_BITS=32
14797      VAR_CPU_ENDIAN=big
14798      ;;
14799    s390x)
14800      VAR_CPU=s390x
14801      VAR_CPU_ARCH=s390
14802      VAR_CPU_BITS=64
14803      VAR_CPU_ENDIAN=big
14804      ;;
14805    sparc)
14806      VAR_CPU=sparc
14807      VAR_CPU_ARCH=sparc
14808      VAR_CPU_BITS=32
14809      VAR_CPU_ENDIAN=big
14810      ;;
14811    sparcv9|sparc64)
14812      VAR_CPU=sparcv9
14813      VAR_CPU_ARCH=sparc
14814      VAR_CPU_BITS=64
14815      VAR_CPU_ENDIAN=big
14816      ;;
14817    *)
14818      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14819      ;;
14820  esac
14821
14822  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14823  OPENJDK_TARGET_OS="$VAR_OS"
14824  if test "x$VAR_OS_TYPE" != x; then
14825    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14826  else
14827    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14828  fi
14829  if test "x$VAR_OS_ENV" != x; then
14830    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14831  else
14832    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14833  fi
14834  OPENJDK_TARGET_CPU="$VAR_CPU"
14835  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14836  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14837  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14838
14839
14840
14841
14842
14843
14844
14845
14846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14847$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14849$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14850
14851
14852
14853# Check whether --with-target-bits was given.
14854if test "${with_target_bits+set}" = set; then :
14855  withval=$with_target_bits;
14856fi
14857
14858
14859  # We have three types of compiles:
14860  # native  == normal compilation, target system == build system
14861  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14862  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14863  #
14864  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14865    # We're doing a proper cross-compilation
14866    COMPILE_TYPE="cross"
14867  else
14868    COMPILE_TYPE="native"
14869  fi
14870
14871  if test "x$with_target_bits" != x; then
14872    if test "x$COMPILE_TYPE" = "xcross"; then
14873      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14874    fi
14875
14876    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14877      # A reduced build is requested
14878      COMPILE_TYPE="reduced"
14879      OPENJDK_TARGET_CPU_BITS=32
14880      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14881        OPENJDK_TARGET_CPU=x86
14882      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14883        OPENJDK_TARGET_CPU=sparc
14884      else
14885        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14886      fi
14887    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14888      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
14889    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14890      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14891$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14892    else
14893      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14894    fi
14895  fi
14896
14897
14898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14899$as_echo_n "checking compilation type... " >&6; }
14900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14901$as_echo "$COMPILE_TYPE" >&6; }
14902
14903
14904  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14905    REQUIRED_OS_NAME=SunOS
14906    REQUIRED_OS_VERSION=5.10
14907  fi
14908  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14909    REQUIRED_OS_NAME=Linux
14910    REQUIRED_OS_VERSION=2.6
14911  fi
14912  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14913    REQUIRED_OS_NAME=Windows
14914    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14915      REQUIRED_OS_VERSION=5.2
14916    else
14917      REQUIRED_OS_VERSION=5.1
14918    fi
14919  fi
14920  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14921    REQUIRED_OS_NAME=Darwin
14922    REQUIRED_OS_VERSION=11.2
14923  fi
14924
14925
14926
14927
14928
14929  # Also store the legacy naming of the cpu.
14930  # Ie i586 and amd64 instead of x86 and x86_64
14931  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14932  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14933    OPENJDK_TARGET_CPU_LEGACY="i586"
14934  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14935    # On all platforms except MacOSX replace x86_64 with amd64.
14936    OPENJDK_TARGET_CPU_LEGACY="amd64"
14937  fi
14938
14939
14940  # And the second legacy naming of the cpu.
14941  # Ie i386 and amd64 instead of x86 and x86_64.
14942  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14943  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14944    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14945  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14946    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14947  fi
14948
14949
14950  # This is the name of the cpu (but using i386 and amd64 instead of
14951  # x86 and x86_64, respectively), preceeded by a /, to be used when
14952  # locating libraries. On macosx, it's empty, though.
14953  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14954  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14955    OPENJDK_TARGET_CPU_LIBDIR=""
14956  fi
14957
14958
14959  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14960  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14961  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14962  OPENJDK_TARGET_CPU_ISADIR=""
14963  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14964    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14965      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14966    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14967      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14968    fi
14969  fi
14970
14971
14972  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14973  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14974  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14975    # On linux only, we replace x86 with i386.
14976    OPENJDK_TARGET_CPU_OSARCH="i386"
14977  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14978    # On all platforms except macosx, we replace x86_64 with amd64.
14979    OPENJDK_TARGET_CPU_OSARCH="amd64"
14980  fi
14981
14982
14983  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14984  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14985    OPENJDK_TARGET_CPU_JLI="i386"
14986  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14987    # On all platforms except macosx, we replace x86_64 with amd64.
14988    OPENJDK_TARGET_CPU_JLI="amd64"
14989  fi
14990  # Now setup the -D flags for building libjli.
14991  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14992  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14993    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14994      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14995    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14996      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14997    fi
14998  fi
14999
15000
15001  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15002      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15003  else
15004      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15005  fi
15006
15007
15008  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15009    A_LP64="LP64:="
15010    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15011    # unpack200.exe
15012    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15013      ADD_LP64="-D_LP64=1"
15014    fi
15015  fi
15016  LP64=$A_LP64
15017
15018
15019  if test "x$COMPILE_TYPE" = "xcross"; then
15020    # FIXME: ... or should this include reduced builds..?
15021    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15022  else
15023    DEFINE_CROSS_COMPILE_ARCH=""
15024  fi
15025
15026
15027  # ZERO_ARCHDEF is used to enable architecture-specific code
15028  case "${OPENJDK_TARGET_CPU}" in
15029    ppc)     ZERO_ARCHDEF=PPC32 ;;
15030    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15031    s390*)   ZERO_ARCHDEF=S390  ;;
15032    sparc*)  ZERO_ARCHDEF=SPARC ;;
15033    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15034    x86)     ZERO_ARCHDEF=IA32  ;;
15035    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15036  esac
15037
15038
15039
15040
15041# Continue setting up basic stuff. Most remaining code require fundamental tools.
15042
15043  # Save the current directory this script was started from
15044  CURDIR="$PWD"
15045
15046  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15047  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15048  # was not available at that time.
15049  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15050  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15051    ORIGINAL_PATH="$REWRITTEN_PATH"
15052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15053$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15054  fi
15055
15056  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15057    PATH_SEP=";"
15058
15059  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15060  if test $SRC_ROOT_LENGTH -gt 100; then
15061    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15062  fi
15063
15064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15066$as_echo_n "checking cygwin release... " >&6; }
15067    CYGWIN_VERSION=`$UNAME -r`
15068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15069$as_echo "$CYGWIN_VERSION" >&6; }
15070    WINDOWS_ENV_VENDOR='cygwin'
15071    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15072
15073    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15074    if test "x$CYGWIN_VERSION_OLD" != x; then
15075      { $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
15076$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;}
15077      as_fn_error $? "Cannot continue" "$LINENO" 5
15078    fi
15079    if test "x$CYGPATH" = x; then
15080      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15081    fi
15082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15083$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15084    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15085    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15086    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15087    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15089$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15090    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15091    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15092    if test "x$test_cygdrive_prefix" = x; then
15093      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15094    fi
15095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15097$as_echo_n "checking msys release... " >&6; }
15098    MSYS_VERSION=`$UNAME -r`
15099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15100$as_echo "$MSYS_VERSION" >&6; }
15101
15102    WINDOWS_ENV_VENDOR='msys'
15103    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15104
15105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15106$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15107    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15108    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15109
15110  windows_path="$MSYS_ROOT_PATH"
15111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15112    unix_path=`$CYGPATH -u "$windows_path"`
15113    MSYS_ROOT_PATH="$unix_path"
15114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15116    MSYS_ROOT_PATH="$unix_path"
15117  fi
15118
15119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15120$as_echo "$MSYS_ROOT_PATH" >&6; }
15121    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15122  else
15123    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15124  fi
15125
15126  # Test if windows or unix (cygwin/msys) find is first in path.
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15128$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15129  FIND_BINARY_OUTPUT=`find --version 2>&1`
15130  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15132$as_echo "unix style" >&6; }
15133  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15135$as_echo "Windows" >&6; }
15136    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15137$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15138    { $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
15139$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15140    as_fn_error $? "Cannot continue" "$LINENO" 5
15141  else
15142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15143$as_echo "unknown" >&6; }
15144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15145$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15146  fi
15147
15148  else
15149    PATH_SEP=":"
15150  fi
15151
15152
15153  # We get the top-level directory from the supporting wrappers.
15154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15155$as_echo_n "checking for top-level directory... " >&6; }
15156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15157$as_echo "$TOPDIR" >&6; }
15158
15159
15160  # Save the original version of TOPDIR for string comparisons
15161  ORIGINAL_TOPDIR="$TOPDIR"
15162
15163
15164  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15165
15166  # Only process if variable expands to non-empty
15167
15168  if test "x$CURDIR" != x; then
15169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15170
15171  # Input might be given as Windows format, start by converting to
15172  # unix format.
15173  path="$CURDIR"
15174  new_path=`$CYGPATH -u "$path"`
15175
15176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15179  # "foo.exe" is OK but "foo" is an error.
15180  #
15181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15182  # It is also a way to make sure we got the proper file name for the real test later on.
15183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15184  if test "x$test_shortpath" = x; then
15185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15186$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15187    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15188  fi
15189
15190  # Call helper function which possibly converts this using DOS-style short mode.
15191  # If so, the updated path is stored in $new_path.
15192
15193  input_path="$new_path"
15194  # Check if we need to convert this using DOS-style short mode. If the path
15195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15196  # take no chances and rewrite it.
15197  # Note: m4 eats our [], so we need to use [ and ] instead.
15198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15199  if test "x$has_forbidden_chars" != x; then
15200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15204      # Going to short mode and back again did indeed matter. Since short mode is
15205      # case insensitive, let's make it lowercase to improve readability.
15206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15207      # Now convert it back to Unix-style (cygpath)
15208      input_path=`$CYGPATH -u "$shortmode_path"`
15209      new_path="$input_path"
15210    fi
15211  fi
15212
15213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15214  if test "x$test_cygdrive_prefix" = x; then
15215    # As a simple fix, exclude /usr/bin since it's not a real path.
15216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15218      # a path prefixed by /cygdrive for fixpath to work.
15219      new_path="$CYGWIN_ROOT_PATH$input_path"
15220    fi
15221  fi
15222
15223
15224  if test "x$path" != "x$new_path"; then
15225    CURDIR="$new_path"
15226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15227$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15228  fi
15229
15230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15231
15232  path="$CURDIR"
15233  has_colon=`$ECHO $path | $GREP ^.:`
15234  new_path="$path"
15235  if test "x$has_colon" = x; then
15236    # Not in mixed or Windows style, start by that.
15237    new_path=`cmd //c echo $path`
15238  fi
15239
15240
15241  input_path="$new_path"
15242  # Check if we need to convert this using DOS-style short mode. If the path
15243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15244  # take no chances and rewrite it.
15245  # Note: m4 eats our [], so we need to use [ and ] instead.
15246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15247  if test "x$has_forbidden_chars" != x; then
15248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15250  fi
15251
15252
15253  windows_path="$new_path"
15254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15255    unix_path=`$CYGPATH -u "$windows_path"`
15256    new_path="$unix_path"
15257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15259    new_path="$unix_path"
15260  fi
15261
15262  if test "x$path" != "x$new_path"; then
15263    CURDIR="$new_path"
15264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15265$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15266  fi
15267
15268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15270
15271    else
15272      # We're on a unix platform. Hooray! :)
15273      path="$CURDIR"
15274      has_space=`$ECHO "$path" | $GREP " "`
15275      if test "x$has_space" != x; then
15276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15277$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15279      fi
15280
15281      # Use eval to expand a potential ~
15282      eval path="$path"
15283      if test ! -f "$path" && test ! -d "$path"; then
15284        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15285      fi
15286
15287      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15288    fi
15289  fi
15290
15291
15292  # Only process if variable expands to non-empty
15293
15294  if test "x$TOPDIR" != x; then
15295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15296
15297  # Input might be given as Windows format, start by converting to
15298  # unix format.
15299  path="$TOPDIR"
15300  new_path=`$CYGPATH -u "$path"`
15301
15302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15305  # "foo.exe" is OK but "foo" is an error.
15306  #
15307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15308  # It is also a way to make sure we got the proper file name for the real test later on.
15309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15310  if test "x$test_shortpath" = x; then
15311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15312$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15313    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15314  fi
15315
15316  # Call helper function which possibly converts this using DOS-style short mode.
15317  # If so, the updated path is stored in $new_path.
15318
15319  input_path="$new_path"
15320  # Check if we need to convert this using DOS-style short mode. If the path
15321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15322  # take no chances and rewrite it.
15323  # Note: m4 eats our [], so we need to use [ and ] instead.
15324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15325  if test "x$has_forbidden_chars" != x; then
15326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15330      # Going to short mode and back again did indeed matter. Since short mode is
15331      # case insensitive, let's make it lowercase to improve readability.
15332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15333      # Now convert it back to Unix-style (cygpath)
15334      input_path=`$CYGPATH -u "$shortmode_path"`
15335      new_path="$input_path"
15336    fi
15337  fi
15338
15339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15340  if test "x$test_cygdrive_prefix" = x; then
15341    # As a simple fix, exclude /usr/bin since it's not a real path.
15342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15344      # a path prefixed by /cygdrive for fixpath to work.
15345      new_path="$CYGWIN_ROOT_PATH$input_path"
15346    fi
15347  fi
15348
15349
15350  if test "x$path" != "x$new_path"; then
15351    TOPDIR="$new_path"
15352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15353$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15354  fi
15355
15356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15357
15358  path="$TOPDIR"
15359  has_colon=`$ECHO $path | $GREP ^.:`
15360  new_path="$path"
15361  if test "x$has_colon" = x; then
15362    # Not in mixed or Windows style, start by that.
15363    new_path=`cmd //c echo $path`
15364  fi
15365
15366
15367  input_path="$new_path"
15368  # Check if we need to convert this using DOS-style short mode. If the path
15369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15370  # take no chances and rewrite it.
15371  # Note: m4 eats our [], so we need to use [ and ] instead.
15372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15373  if test "x$has_forbidden_chars" != x; then
15374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15376  fi
15377
15378
15379  windows_path="$new_path"
15380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15381    unix_path=`$CYGPATH -u "$windows_path"`
15382    new_path="$unix_path"
15383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15385    new_path="$unix_path"
15386  fi
15387
15388  if test "x$path" != "x$new_path"; then
15389    TOPDIR="$new_path"
15390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15391$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15392  fi
15393
15394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15396
15397    else
15398      # We're on a unix platform. Hooray! :)
15399      path="$TOPDIR"
15400      has_space=`$ECHO "$path" | $GREP " "`
15401      if test "x$has_space" != x; then
15402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15403$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15404        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15405      fi
15406
15407      # Use eval to expand a potential ~
15408      eval path="$path"
15409      if test ! -f "$path" && test ! -d "$path"; then
15410        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15411      fi
15412
15413      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15414    fi
15415  fi
15416
15417  # SRC_ROOT is a traditional alias for TOPDIR.
15418  SRC_ROOT=$TOPDIR
15419
15420  # Calculate a canonical version of TOPDIR for string comparisons
15421  CANONICAL_TOPDIR=$TOPDIR
15422
15423  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15424    # Follow a chain of symbolic links. Use readlink
15425    # where it exists, else fall back to horribly
15426    # complicated shell code.
15427    if test "x$READLINK_TESTED" != yes; then
15428      # On MacOSX there is a readlink tool with a different
15429      # purpose than the GNU readlink tool. Check the found readlink.
15430      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15431      if test "x$ISGNU" = x; then
15432        # A readlink that we do not know how to use.
15433        # Are there other non-GNU readlinks out there?
15434        READLINK_TESTED=yes
15435        READLINK=
15436      fi
15437    fi
15438
15439    if test "x$READLINK" != x; then
15440      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15441    else
15442      # Save the current directory for restoring afterwards
15443      STARTDIR=$PWD
15444      COUNTER=0
15445      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15446      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15447      cd $sym_link_dir
15448      # Use -P flag to resolve symlinks in directories.
15449      cd `$THEPWDCMD -P`
15450      sym_link_dir=`$THEPWDCMD -P`
15451      # Resolve file symlinks
15452      while test $COUNTER -lt 20; do
15453        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15454        if test "x$ISLINK" == x; then
15455          # This is not a symbolic link! We are done!
15456          break
15457        fi
15458        # Again resolve directory symlinks since the target of the just found
15459        # link could be in a different directory
15460        cd `$DIRNAME $ISLINK`
15461        sym_link_dir=`$THEPWDCMD -P`
15462        sym_link_file=`$BASENAME $ISLINK`
15463        let COUNTER=COUNTER+1
15464      done
15465      cd $STARTDIR
15466      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15467    fi
15468  fi
15469
15470
15471
15472  # Locate the directory of this script.
15473  AUTOCONF_DIR=$TOPDIR/common/autoconf
15474
15475
15476# Check if it's a pure open build or if custom sources are to be used.
15477
15478  # Check whether --enable-openjdk-only was given.
15479if test "${enable_openjdk_only+set}" = set; then :
15480  enableval=$enable_openjdk_only;
15481else
15482  enable_openjdk_only="no"
15483fi
15484
15485
15486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15487$as_echo_n "checking for presence of closed sources... " >&6; }
15488  if test -d "$SRC_ROOT/jdk/src/closed"; then
15489    CLOSED_SOURCE_PRESENT=yes
15490  else
15491    CLOSED_SOURCE_PRESENT=no
15492  fi
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15494$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15495
15496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15497$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15498  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15500$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15501
15502  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15503    OPENJDK=true
15504    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15505      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15506$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15507    fi
15508  else
15509    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15510      OPENJDK=true
15511    else
15512      OPENJDK=false
15513    fi
15514  fi
15515
15516  if test "x$OPENJDK" = "xtrue"; then
15517    SET_OPENJDK="OPENJDK=true"
15518  fi
15519
15520
15521
15522  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15523  # the IncludeCustomExtension macro.
15524
15525
15526# Check whether --with-custom-make-dir was given.
15527if test "${with_custom_make_dir+set}" = set; then :
15528  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
15529$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15530fi
15531
15532
15533
15534
15535# These are needed to be able to create a configuration name (and thus the output directory)
15536
15537  ###############################################################################
15538  #
15539  # Check which variant of the JDK that we want to build.
15540  # Currently we have:
15541  #    normal:   standard edition
15542  # but the custom make system may add other variants
15543  #
15544  # Effectively the JDK variant gives a name to a specific set of
15545  # modules to compile into the JDK. In the future, these modules
15546  # might even be Jigsaw modules.
15547  #
15548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15549$as_echo_n "checking which variant of the JDK to build... " >&6; }
15550
15551# Check whether --with-jdk-variant was given.
15552if test "${with_jdk_variant+set}" = set; then :
15553  withval=$with_jdk_variant;
15554fi
15555
15556
15557  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15558    JDK_VARIANT="normal"
15559  else
15560    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15561  fi
15562
15563
15564
15565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15566$as_echo "$JDK_VARIANT" >&6; }
15567
15568
15569###############################################################################
15570#
15571# Check which interpreter of the JVM we want to build.
15572# Currently we have:
15573#    template: Template interpreter (the default)
15574#    cpp     : C++ interpreter
15575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15576$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15577
15578# Check whether --with-jvm-interpreter was given.
15579if test "${with_jvm_interpreter+set}" = set; then :
15580  withval=$with_jvm_interpreter;
15581fi
15582
15583
15584if test "x$with_jvm_interpreter" = x; then
15585     with_jvm_interpreter="template"
15586fi
15587
15588JVM_INTERPRETER="$with_jvm_interpreter"
15589
15590if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15591   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15592fi
15593
15594
15595
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15597$as_echo "$with_jvm_interpreter" >&6; }
15598
15599
15600
15601  ###############################################################################
15602  #
15603  # Check which variants of the JVM that we want to build.
15604  # Currently we have:
15605  #    server: normal interpreter and a tiered C1/C2 compiler
15606  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15607  #    minimal1: reduced form of client with optional VM services and features stripped out
15608  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15609  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15610  #    zero: no machine code interpreter, no compiler
15611  #    zeroshark: zero interpreter and shark/llvm compiler backend
15612#    core: interpreter only, no compiler (only works on some platforms)
15613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15614$as_echo_n "checking which variants of the JVM to build... " >&6; }
15615
15616# Check whether --with-jvm-variants was given.
15617if test "${with_jvm_variants+set}" = set; then :
15618  withval=$with_jvm_variants;
15619fi
15620
15621
15622  if test "x$with_jvm_variants" = x; then
15623    with_jvm_variants="server"
15624  fi
15625
15626  JVM_VARIANTS=",$with_jvm_variants,"
15627  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,//'`
15628
15629  if test "x$TEST_VARIANTS" != "x,"; then
15630     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15631  fi
15632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15633$as_echo "$with_jvm_variants" >&6; }
15634
15635  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15636  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15637  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15638  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15639  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15640  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15641  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15642
15643  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15644    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15645      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15646    fi
15647  fi
15648  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15649    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15650      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15651    fi
15652  fi
15653  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15654    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15655      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15656    fi
15657  fi
15658
15659  # Replace the commas with AND for use in the build directory name.
15660  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15661  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/'`
15662  if test "x$COUNT_VARIANTS" != "x,1"; then
15663    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15664  else
15665    BUILDING_MULTIPLE_JVM_VARIANTS=no
15666  fi
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677  INCLUDE_SA=true
15678  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15679    INCLUDE_SA=false
15680  fi
15681  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15682    INCLUDE_SA=false
15683  fi
15684  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15685    INCLUDE_SA=false
15686  fi
15687  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15688    INCLUDE_SA=false
15689  fi
15690
15691
15692  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15693    MACOSX_UNIVERSAL="true"
15694  fi
15695
15696
15697
15698
15699  ###############################################################################
15700  #
15701  # Set the debug level
15702  #    release: no debug information, all optimizations, no asserts.
15703  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15704  #    fastdebug: debug information (-g), all optimizations, all asserts
15705  #    slowdebug: debug information (-g), no optimizations, all asserts
15706  #
15707  DEBUG_LEVEL="release"
15708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15709$as_echo_n "checking which debug level to use... " >&6; }
15710  # Check whether --enable-debug was given.
15711if test "${enable_debug+set}" = set; then :
15712  enableval=$enable_debug;
15713        ENABLE_DEBUG="${enableval}"
15714        DEBUG_LEVEL="fastdebug"
15715
15716else
15717  ENABLE_DEBUG="no"
15718fi
15719
15720
15721
15722# Check whether --with-debug-level was given.
15723if test "${with_debug_level+set}" = set; then :
15724  withval=$with_debug_level;
15725        DEBUG_LEVEL="${withval}"
15726        if test "x$ENABLE_DEBUG" = xyes; then
15727          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15728        fi
15729
15730fi
15731
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15733$as_echo "$DEBUG_LEVEL" >&6; }
15734
15735  if test "x$DEBUG_LEVEL" != xrelease && \
15736      test "x$DEBUG_LEVEL" != xoptimized && \
15737      test "x$DEBUG_LEVEL" != xfastdebug && \
15738      test "x$DEBUG_LEVEL" != xslowdebug; then
15739    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15740  fi
15741
15742
15743  ###############################################################################
15744  #
15745  # Setup legacy vars/targets and new vars to deal with different debug levels.
15746  #
15747
15748  case $DEBUG_LEVEL in
15749    release )
15750      VARIANT="OPT"
15751      FASTDEBUG="false"
15752      DEBUG_CLASSFILES="false"
15753      BUILD_VARIANT_RELEASE=""
15754      HOTSPOT_DEBUG_LEVEL="product"
15755      HOTSPOT_EXPORT="product"
15756      ;;
15757    fastdebug )
15758      VARIANT="DBG"
15759      FASTDEBUG="true"
15760      DEBUG_CLASSFILES="true"
15761      BUILD_VARIANT_RELEASE="-fastdebug"
15762      HOTSPOT_DEBUG_LEVEL="fastdebug"
15763      HOTSPOT_EXPORT="fastdebug"
15764      ;;
15765    slowdebug )
15766      VARIANT="DBG"
15767      FASTDEBUG="false"
15768      DEBUG_CLASSFILES="true"
15769      BUILD_VARIANT_RELEASE="-debug"
15770      HOTSPOT_DEBUG_LEVEL="debug"
15771      HOTSPOT_EXPORT="debug"
15772      ;;
15773    optimized )
15774      VARIANT="OPT"
15775      FASTDEBUG="false"
15776      DEBUG_CLASSFILES="false"
15777      BUILD_VARIANT_RELEASE="-optimized"
15778      HOTSPOT_DEBUG_LEVEL="optimized"
15779      HOTSPOT_EXPORT="optimized"
15780      ;;
15781  esac
15782
15783  # The debug level 'optimized' is a little special because it is currently only
15784  # applicable to the HotSpot build where it means to build a completely
15785  # optimized version of the VM without any debugging code (like for the
15786  # 'release' debug level which is called 'product' in the HotSpot build) but
15787  # with the exception that it can contain additional code which is otherwise
15788  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15789  # test new and/or experimental features which are not intended for customer
15790  # shipment. Because these new features need to be tested and benchmarked in
15791  # real world scenarios, we want to build the containing JDK at the 'release'
15792  # debug level.
15793  if test "x$DEBUG_LEVEL" = xoptimized; then
15794    DEBUG_LEVEL="release"
15795  fi
15796
15797  #####
15798  # Generate the legacy makefile targets for hotspot.
15799  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15800  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15801  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15802  # But until then ...
15803  HOTSPOT_TARGET=""
15804
15805  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15806    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15807  fi
15808
15809  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15810    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15811  fi
15812
15813  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15814    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15815  fi
15816
15817  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15818    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15819  fi
15820
15821  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15822    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15823  fi
15824
15825  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15826    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15827  fi
15828
15829  if test "x$JVM_VARIANT_CORE" = xtrue; then
15830    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15831  fi
15832
15833  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15834
15835  # On Macosx universal binaries are produced, but they only contain
15836  # 64 bit intel. This invalidates control of which jvms are built
15837  # from configure, but only server is valid anyway. Fix this
15838  # when hotspot makefiles are rewritten.
15839  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15840    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15841  fi
15842
15843  #####
15844
15845
15846
15847
15848
15849
15850
15851
15852# With basic setup done, call the custom early hook.
15853
15854
15855# Check if we have devkits, extra paths or sysroot set.
15856
15857
15858# Check whether --with-devkit was given.
15859if test "${with_devkit+set}" = set; then :
15860  withval=$with_devkit;
15861
15862  # Only process if variable expands to non-empty
15863
15864  if test "x$with_devkit" != x; then
15865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15866
15867  # Input might be given as Windows format, start by converting to
15868  # unix format.
15869  path="$with_devkit"
15870  new_path=`$CYGPATH -u "$path"`
15871
15872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15875  # "foo.exe" is OK but "foo" is an error.
15876  #
15877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15878  # It is also a way to make sure we got the proper file name for the real test later on.
15879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15880  if test "x$test_shortpath" = x; then
15881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15882$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15883    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15884  fi
15885
15886  # Call helper function which possibly converts this using DOS-style short mode.
15887  # If so, the updated path is stored in $new_path.
15888
15889  input_path="$new_path"
15890  # Check if we need to convert this using DOS-style short mode. If the path
15891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15892  # take no chances and rewrite it.
15893  # Note: m4 eats our [], so we need to use [ and ] instead.
15894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15895  if test "x$has_forbidden_chars" != x; then
15896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15900      # Going to short mode and back again did indeed matter. Since short mode is
15901      # case insensitive, let's make it lowercase to improve readability.
15902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15903      # Now convert it back to Unix-style (cygpath)
15904      input_path=`$CYGPATH -u "$shortmode_path"`
15905      new_path="$input_path"
15906    fi
15907  fi
15908
15909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15910  if test "x$test_cygdrive_prefix" = x; then
15911    # As a simple fix, exclude /usr/bin since it's not a real path.
15912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15914      # a path prefixed by /cygdrive for fixpath to work.
15915      new_path="$CYGWIN_ROOT_PATH$input_path"
15916    fi
15917  fi
15918
15919
15920  if test "x$path" != "x$new_path"; then
15921    with_devkit="$new_path"
15922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15923$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15924  fi
15925
15926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15927
15928  path="$with_devkit"
15929  has_colon=`$ECHO $path | $GREP ^.:`
15930  new_path="$path"
15931  if test "x$has_colon" = x; then
15932    # Not in mixed or Windows style, start by that.
15933    new_path=`cmd //c echo $path`
15934  fi
15935
15936
15937  input_path="$new_path"
15938  # Check if we need to convert this using DOS-style short mode. If the path
15939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15940  # take no chances and rewrite it.
15941  # Note: m4 eats our [], so we need to use [ and ] instead.
15942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15943  if test "x$has_forbidden_chars" != x; then
15944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15946  fi
15947
15948
15949  windows_path="$new_path"
15950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15951    unix_path=`$CYGPATH -u "$windows_path"`
15952    new_path="$unix_path"
15953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15955    new_path="$unix_path"
15956  fi
15957
15958  if test "x$path" != "x$new_path"; then
15959    with_devkit="$new_path"
15960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15961$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15962  fi
15963
15964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15966
15967    else
15968      # We're on a unix platform. Hooray! :)
15969      path="$with_devkit"
15970      has_space=`$ECHO "$path" | $GREP " "`
15971      if test "x$has_space" != x; then
15972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15973$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15975      fi
15976
15977      # Use eval to expand a potential ~
15978      eval path="$path"
15979      if test ! -f "$path" && test ! -d "$path"; then
15980        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15981      fi
15982
15983      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15984    fi
15985  fi
15986
15987        DEVKIT_ROOT="$with_devkit"
15988        # Check for a meta data info file in the root of the devkit
15989        if test -f "$DEVKIT_ROOT/devkit.info"; then
15990          . $DEVKIT_ROOT/devkit.info
15991          # This potentially sets the following:
15992          # A descriptive name of the devkit
15993
15994  if test "x$DEVKIT_NAME" = x; then
15995    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15996  fi
15997
15998          # Corresponds to --with-extra-path
15999
16000  if test "x$DEVKIT_EXTRA_PATH" = x; then
16001    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16002  fi
16003
16004          # Corresponds to --with-toolchain-path
16005
16006  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16007    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16008  fi
16009
16010          # Corresponds to --with-sysroot
16011
16012  if test "x$DEVKIT_SYSROOT" = x; then
16013    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16014  fi
16015
16016
16017          # Identifies the Visual Studio version in the devkit
16018
16019  if test "x$DEVKIT_VS_VERSION" = x; then
16020    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16021  fi
16022
16023          # The Visual Studio include environment variable
16024
16025  if test "x$DEVKIT_VS_INCLUDE" = x; then
16026    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16027  fi
16028
16029          # The Visual Studio lib environment variable
16030
16031  if test "x$DEVKIT_VS_LIB" = x; then
16032    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16033  fi
16034
16035          # Corresponds to --with-msvcr-dll
16036
16037  if test "x$DEVKIT_MSVCR_DLL" = x; then
16038    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16039  fi
16040
16041          # Corresponds to --with-msvcp-dll
16042
16043  if test "x$DEVKIT_MSVCP_DLL" = x; then
16044    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16045  fi
16046
16047        fi
16048
16049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16050$as_echo_n "checking for devkit... " >&6; }
16051        if test "x$DEVKIT_NAME" != x; then
16052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16053$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16054        else
16055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16056$as_echo "$DEVKIT_ROOT" >&6; }
16057        fi
16058
16059
16060  if test "x$DEVKIT_EXTRA_PATH" != x; then
16061    if test "x$EXTRA_PATH" = x; then
16062      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16063    else
16064      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16065    fi
16066  fi
16067
16068
16069        # Fallback default of just /bin if DEVKIT_PATH is not defined
16070        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16071          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16072        fi
16073
16074  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16075    if test "x$TOOLCHAIN_PATH" = x; then
16076      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16077    else
16078      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16079    fi
16080  fi
16081
16082
16083        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16084        # places for backwards compatiblity.
16085        if test "x$DEVKIT_SYSROOT" != x; then
16086          SYSROOT="$DEVKIT_SYSROOT"
16087        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16088          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16089        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16090          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16091        fi
16092
16093
16094fi
16095
16096
16097  # You can force the sysroot if the sysroot encoded into the compiler tools
16098  # is not correct.
16099
16100# Check whether --with-sys-root was given.
16101if test "${with_sys_root+set}" = set; then :
16102  withval=$with_sys_root; SYSROOT=$with_sys_root
16103
16104fi
16105
16106
16107
16108# Check whether --with-sysroot was given.
16109if test "${with_sysroot+set}" = set; then :
16110  withval=$with_sysroot; SYSROOT=$with_sysroot
16111
16112fi
16113
16114
16115
16116# Check whether --with-tools-dir was given.
16117if test "${with_tools_dir+set}" = set; then :
16118  withval=$with_tools_dir;
16119  if test "x$with_tools_dir" != x; then
16120    if test "x$TOOLCHAIN_PATH" = x; then
16121      TOOLCHAIN_PATH="$with_tools_dir"
16122    else
16123      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16124    fi
16125  fi
16126
16127
16128fi
16129
16130
16131
16132# Check whether --with-toolchain-path was given.
16133if test "${with_toolchain_path+set}" = set; then :
16134  withval=$with_toolchain_path;
16135  if test "x$with_toolchain_path" != x; then
16136    if test "x$TOOLCHAIN_PATH" = x; then
16137      TOOLCHAIN_PATH="$with_toolchain_path"
16138    else
16139      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16140    fi
16141  fi
16142
16143
16144fi
16145
16146
16147
16148# Check whether --with-extra-path was given.
16149if test "${with_extra_path+set}" = set; then :
16150  withval=$with_extra_path;
16151  if test "x$with_extra_path" != x; then
16152    if test "x$EXTRA_PATH" = x; then
16153      EXTRA_PATH="$with_extra_path"
16154    else
16155      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16156    fi
16157  fi
16158
16159
16160fi
16161
16162
16163  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16164    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16165    # If not, detect if Xcode is installed by running xcodebuild -version
16166    # if no Xcode installed, xcodebuild exits with 1
16167    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16168    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16169      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16170      # fall back on the stub binary in /usr/bin/xcodebuild
16171      # Extract the first word of "xcodebuild", so it can be a program name with args.
16172set dummy xcodebuild; ac_word=$2
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16174$as_echo_n "checking for $ac_word... " >&6; }
16175if ${ac_cv_path_XCODEBUILD+:} false; then :
16176  $as_echo_n "(cached) " >&6
16177else
16178  case $XCODEBUILD in
16179  [\\/]* | ?:[\\/]*)
16180  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16181  ;;
16182  *)
16183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16184for as_dir in $TOOLCHAIN_PATH
16185do
16186  IFS=$as_save_IFS
16187  test -z "$as_dir" && as_dir=.
16188    for ac_exec_ext in '' $ac_executable_extensions; do
16189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16190    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16192    break 2
16193  fi
16194done
16195  done
16196IFS=$as_save_IFS
16197
16198  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16199  ;;
16200esac
16201fi
16202XCODEBUILD=$ac_cv_path_XCODEBUILD
16203if test -n "$XCODEBUILD"; then
16204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16205$as_echo "$XCODEBUILD" >&6; }
16206else
16207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16208$as_echo "no" >&6; }
16209fi
16210
16211
16212    else
16213      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16214      # when only the command line tools are installed there are no SDKs, so headers
16215      # are copied into the system frameworks
16216      XCODEBUILD=
16217
16218    fi
16219
16220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16221$as_echo_n "checking for sdk name... " >&6; }
16222
16223# Check whether --with-sdk-name was given.
16224if test "${with_sdk_name+set}" = set; then :
16225  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16226
16227fi
16228
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16230$as_echo "$SDKNAME" >&6; }
16231
16232    # if toolchain path is specified then don't rely on system headers, they may not compile
16233    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16234    test -z "$TOOLCHAIN_PATH" && \
16235      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16236
16237    if test -z "$SYSROOT"; then
16238      if test -n "$XCODEBUILD"; then
16239        # if we don't have system headers, use default SDK name (last resort)
16240        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16241          SDKNAME=${SDKNAME:-macosx}
16242        fi
16243
16244        if test -n "$SDKNAME"; then
16245          # Call xcodebuild to determine SYSROOT
16246          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16247        fi
16248      else
16249        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16250          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
16251        fi
16252      fi
16253    else
16254      # warn user if --with-sdk-name was also set
16255      if test -n "$with_sdk_name"; then
16256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16257$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16258      fi
16259    fi
16260
16261    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16262      # If no system framework headers, then SYSROOT must be set, or we won't build
16263      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
16264    fi
16265
16266    # Perform a basic sanity test
16267    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16268      if test -z "$SYSROOT"; then
16269        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
16270      else
16271        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16272      fi
16273    fi
16274
16275    # set SDKROOT too, Xcode tools will pick it up
16276    SDKROOT=$SYSROOT
16277
16278  fi
16279
16280  # Prepend the extra path to the global path
16281
16282  if test "x$EXTRA_PATH" != x; then
16283    if test "x$PATH" = x; then
16284      PATH="$EXTRA_PATH"
16285    else
16286      PATH="$EXTRA_PATH:$PATH"
16287    fi
16288  fi
16289
16290
16291  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16292    # Add extra search paths on solaris for utilities like ar and as etc...
16293    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16294  fi
16295
16296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16297$as_echo_n "checking for sysroot... " >&6; }
16298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16299$as_echo "$SYSROOT" >&6; }
16300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16301$as_echo_n "checking for toolchain path... " >&6; }
16302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16303$as_echo "$TOOLCHAIN_PATH" >&6; }
16304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16305$as_echo_n "checking for extra path... " >&6; }
16306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16307$as_echo "$EXTRA_PATH" >&6; }
16308
16309
16310# To properly create a configuration name, we need to have the OpenJDK target
16311# and options (variants and debug level) parsed.
16312
16313
16314
16315# Check whether --with-conf-name was given.
16316if test "${with_conf_name+set}" = set; then :
16317  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16318fi
16319
16320
16321  # Test from where we are running configure, in or outside of src root.
16322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16323$as_echo_n "checking where to store configuration... " >&6; }
16324  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16325      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16326      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16327    # We are running configure from the src root.
16328    # Create a default ./build/target-variant-debuglevel output root.
16329    if test "x${CONF_NAME}" = x; then
16330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16331$as_echo "in default location" >&6; }
16332      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16333    else
16334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16335$as_echo "in build directory with custom name" >&6; }
16336    fi
16337    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16338    $MKDIR -p "$OUTPUT_ROOT"
16339    if test ! -d "$OUTPUT_ROOT"; then
16340      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16341    fi
16342  else
16343    # We are running configure from outside of the src dir.
16344    # Then use the current directory as output dir!
16345    # If configuration is situated in normal build directory, just use the build
16346    # directory name as configuration name, otherwise use the complete path.
16347    if test "x${CONF_NAME}" = x; then
16348      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16349    fi
16350    OUTPUT_ROOT="$CURDIR"
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16352$as_echo "in current directory" >&6; }
16353
16354    # WARNING: This might be a bad thing to do. You need to be sure you want to
16355    # have a configuration in this directory. Do some sanity checks!
16356
16357    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16358      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16359      # other files
16360      files_present=`$LS $OUTPUT_ROOT`
16361      # Configure has already touched config.log and confdefs.h in the current dir when this check
16362      # is performed.
16363      filtered_files=`$ECHO "$files_present" \
16364          | $SED -e 's/config.log//g' \
16365              -e 's/configure.log//g' \
16366              -e 's/confdefs.h//g' \
16367              -e 's/ //g' \
16368          | $TR -d '\n'`
16369      if test "x$filtered_files" != x; then
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16371$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16372        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16373$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16374        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16375$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16376        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16377$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16379$as_echo "$as_me: seriously mess up just about everything." >&6;}
16380        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16381$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16382        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16383$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16384        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16385      fi
16386    fi
16387  fi
16388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16389$as_echo_n "checking what configuration name to use... " >&6; }
16390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16391$as_echo "$CONF_NAME" >&6; }
16392
16393
16394  # Only process if variable expands to non-empty
16395
16396  if test "x$OUTPUT_ROOT" != x; then
16397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398
16399  # Input might be given as Windows format, start by converting to
16400  # unix format.
16401  path="$OUTPUT_ROOT"
16402  new_path=`$CYGPATH -u "$path"`
16403
16404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16407  # "foo.exe" is OK but "foo" is an error.
16408  #
16409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16410  # It is also a way to make sure we got the proper file name for the real test later on.
16411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16412  if test "x$test_shortpath" = x; then
16413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16414$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16415    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16416  fi
16417
16418  # Call helper function which possibly converts this using DOS-style short mode.
16419  # If so, the updated path is stored in $new_path.
16420
16421  input_path="$new_path"
16422  # Check if we need to convert this using DOS-style short mode. If the path
16423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16424  # take no chances and rewrite it.
16425  # Note: m4 eats our [], so we need to use [ and ] instead.
16426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16427  if test "x$has_forbidden_chars" != x; then
16428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16432      # Going to short mode and back again did indeed matter. Since short mode is
16433      # case insensitive, let's make it lowercase to improve readability.
16434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16435      # Now convert it back to Unix-style (cygpath)
16436      input_path=`$CYGPATH -u "$shortmode_path"`
16437      new_path="$input_path"
16438    fi
16439  fi
16440
16441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16442  if test "x$test_cygdrive_prefix" = x; then
16443    # As a simple fix, exclude /usr/bin since it's not a real path.
16444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16446      # a path prefixed by /cygdrive for fixpath to work.
16447      new_path="$CYGWIN_ROOT_PATH$input_path"
16448    fi
16449  fi
16450
16451
16452  if test "x$path" != "x$new_path"; then
16453    OUTPUT_ROOT="$new_path"
16454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16455$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16456  fi
16457
16458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459
16460  path="$OUTPUT_ROOT"
16461  has_colon=`$ECHO $path | $GREP ^.:`
16462  new_path="$path"
16463  if test "x$has_colon" = x; then
16464    # Not in mixed or Windows style, start by that.
16465    new_path=`cmd //c echo $path`
16466  fi
16467
16468
16469  input_path="$new_path"
16470  # Check if we need to convert this using DOS-style short mode. If the path
16471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16472  # take no chances and rewrite it.
16473  # Note: m4 eats our [], so we need to use [ and ] instead.
16474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16475  if test "x$has_forbidden_chars" != x; then
16476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16478  fi
16479
16480
16481  windows_path="$new_path"
16482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16483    unix_path=`$CYGPATH -u "$windows_path"`
16484    new_path="$unix_path"
16485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16487    new_path="$unix_path"
16488  fi
16489
16490  if test "x$path" != "x$new_path"; then
16491    OUTPUT_ROOT="$new_path"
16492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16493$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16494  fi
16495
16496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16498
16499    else
16500      # We're on a unix platform. Hooray! :)
16501      path="$OUTPUT_ROOT"
16502      has_space=`$ECHO "$path" | $GREP " "`
16503      if test "x$has_space" != x; then
16504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16505$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16507      fi
16508
16509      # Use eval to expand a potential ~
16510      eval path="$path"
16511      if test ! -f "$path" && test ! -d "$path"; then
16512        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16513      fi
16514
16515      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16516    fi
16517  fi
16518
16519
16520  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16521  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16522
16523  SPEC=$OUTPUT_ROOT/spec.gmk
16524
16525  CONF_NAME=$CONF_NAME
16526
16527  OUTPUT_ROOT=$OUTPUT_ROOT
16528
16529
16530
16531  # The spec.gmk file contains all variables for the make system.
16532  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16533
16534  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16535  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16536
16537  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16538  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16539
16540  # The compare.sh is used to compare the build output to other builds.
16541  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16542
16543  # The generated Makefile knows where the spec.gmk is and where the source is.
16544  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16545  # which will look for generated configurations
16546  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16547
16548
16549
16550# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16551
16552  for ac_prog in apt-get yum port pkgutil pkgadd
16553do
16554  # Extract the first word of "$ac_prog", so it can be a program name with args.
16555set dummy $ac_prog; ac_word=$2
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16557$as_echo_n "checking for $ac_word... " >&6; }
16558if ${ac_cv_prog_PKGHANDLER+:} false; then :
16559  $as_echo_n "(cached) " >&6
16560else
16561  if test -n "$PKGHANDLER"; then
16562  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16563else
16564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16565for as_dir in $PATH
16566do
16567  IFS=$as_save_IFS
16568  test -z "$as_dir" && as_dir=.
16569    for ac_exec_ext in '' $ac_executable_extensions; do
16570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16571    ac_cv_prog_PKGHANDLER="$ac_prog"
16572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16573    break 2
16574  fi
16575done
16576  done
16577IFS=$as_save_IFS
16578
16579fi
16580fi
16581PKGHANDLER=$ac_cv_prog_PKGHANDLER
16582if test -n "$PKGHANDLER"; then
16583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16584$as_echo "$PKGHANDLER" >&6; }
16585else
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16587$as_echo "no" >&6; }
16588fi
16589
16590
16591  test -n "$PKGHANDLER" && break
16592done
16593
16594
16595
16596# Setup tools that requires more complex handling, or that is not needed by the configure script.
16597
16598
16599
16600  # Publish this variable in the help.
16601
16602
16603  if [ -z "${MAKE+x}" ]; then
16604    # The variable is not set by user, try to locate tool using the code snippet
16605
16606    # Try our hardest to locate a correct version of GNU make
16607    for ac_prog in gmake
16608do
16609  # Extract the first word of "$ac_prog", so it can be a program name with args.
16610set dummy $ac_prog; ac_word=$2
16611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16612$as_echo_n "checking for $ac_word... " >&6; }
16613if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16614  $as_echo_n "(cached) " >&6
16615else
16616  case $CHECK_GMAKE in
16617  [\\/]* | ?:[\\/]*)
16618  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16619  ;;
16620  *)
16621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16622for as_dir in $PATH
16623do
16624  IFS=$as_save_IFS
16625  test -z "$as_dir" && as_dir=.
16626    for ac_exec_ext in '' $ac_executable_extensions; do
16627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16628    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16630    break 2
16631  fi
16632done
16633  done
16634IFS=$as_save_IFS
16635
16636  ;;
16637esac
16638fi
16639CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16640if test -n "$CHECK_GMAKE"; then
16641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16642$as_echo "$CHECK_GMAKE" >&6; }
16643else
16644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16645$as_echo "no" >&6; }
16646fi
16647
16648
16649  test -n "$CHECK_GMAKE" && break
16650done
16651
16652
16653  MAKE_CANDIDATE=""$CHECK_GMAKE""
16654  DESCRIPTION="gmake in PATH"
16655
16656  # On Cygwin, we require a newer version of make than on other platforms
16657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16658    MAKE_VERSION_EXPR="-e 4\."
16659    MAKE_REQUIRED_VERSION="4.0"
16660   else
16661    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16662    MAKE_REQUIRED_VERSION="3.81"
16663  fi
16664
16665  if test "x$MAKE_CANDIDATE" != x; then
16666    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16667$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16668    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16669    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16670    if test "x$IS_GNU_MAKE" = x; then
16671      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16672$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16673    else
16674      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16675      if test "x$IS_MODERN_MAKE" = x; then
16676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16677$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16678      else
16679        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16680          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16681            MAKE_EXPECTED_ENV='cygwin'
16682          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16683            MAKE_EXPECTED_ENV='msys'
16684          else
16685            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16686          fi
16687          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16688          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16689        else
16690          # Not relevant for non-Windows
16691          IS_MAKE_CORRECT_ENV=true
16692        fi
16693        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16694          { $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
16695$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;}
16696        else
16697          FOUND_MAKE=$MAKE_CANDIDATE
16698
16699  # Only process if variable expands to non-empty
16700
16701  if test "x$FOUND_MAKE" != x; then
16702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16703
16704  # First separate the path from the arguments. This will split at the first
16705  # space.
16706  complete="$FOUND_MAKE"
16707  path="${complete%% *}"
16708  tmp="$complete EOL"
16709  arguments="${tmp#* }"
16710
16711  # Input might be given as Windows format, start by converting to
16712  # unix format.
16713  new_path=`$CYGPATH -u "$path"`
16714
16715  # Now try to locate executable using which
16716  new_path=`$WHICH "$new_path" 2> /dev/null`
16717  # bat and cmd files are not always considered executable in cygwin causing which
16718  # to not find them
16719  if test "x$new_path" = x \
16720      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16721      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16722    new_path=`$CYGPATH -u "$path"`
16723  fi
16724  if test "x$new_path" = x; then
16725    # Oops. Which didn't find the executable.
16726    # The splitting of arguments from the executable at a space might have been incorrect,
16727    # since paths with space are more likely in Windows. Give it another try with the whole
16728    # argument.
16729    path="$complete"
16730    arguments="EOL"
16731    new_path=`$CYGPATH -u "$path"`
16732    new_path=`$WHICH "$new_path" 2> /dev/null`
16733    # bat and cmd files are not always considered executable in cygwin causing which
16734    # to not find them
16735    if test "x$new_path" = x \
16736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16738      new_path=`$CYGPATH -u "$path"`
16739    fi
16740    if test "x$new_path" = x; then
16741      # It's still not found. Now this is an unrecoverable error.
16742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16743$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16744      has_space=`$ECHO "$complete" | $GREP " "`
16745      if test "x$has_space" != x; then
16746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16748      fi
16749      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16750    fi
16751  fi
16752
16753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16756  # "foo.exe" is OK but "foo" is an error.
16757  #
16758  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16759  # It is also a way to make sure we got the proper file name for the real test later on.
16760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16761  if test "x$test_shortpath" = x; then
16762    # Short path failed, file does not exist as specified.
16763    # Try adding .exe or .cmd
16764    if test -f "${new_path}.exe"; then
16765      input_to_shortpath="${new_path}.exe"
16766    elif test -f "${new_path}.cmd"; then
16767      input_to_shortpath="${new_path}.cmd"
16768    else
16769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16770$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16771      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16772$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16773      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16774    fi
16775  else
16776    input_to_shortpath="$new_path"
16777  fi
16778
16779  # Call helper function which possibly converts this using DOS-style short mode.
16780  # If so, the updated path is stored in $new_path.
16781  new_path="$input_to_shortpath"
16782
16783  input_path="$input_to_shortpath"
16784  # Check if we need to convert this using DOS-style short mode. If the path
16785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16786  # take no chances and rewrite it.
16787  # Note: m4 eats our [], so we need to use [ and ] instead.
16788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16789  if test "x$has_forbidden_chars" != x; then
16790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16794      # Going to short mode and back again did indeed matter. Since short mode is
16795      # case insensitive, let's make it lowercase to improve readability.
16796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16797      # Now convert it back to Unix-style (cygpath)
16798      input_path=`$CYGPATH -u "$shortmode_path"`
16799      new_path="$input_path"
16800    fi
16801  fi
16802
16803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16804  if test "x$test_cygdrive_prefix" = x; then
16805    # As a simple fix, exclude /usr/bin since it's not a real path.
16806    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16808      # a path prefixed by /cygdrive for fixpath to work.
16809      new_path="$CYGWIN_ROOT_PATH$input_path"
16810    fi
16811  fi
16812
16813  # remove trailing .exe if any
16814  new_path="${new_path/%.exe/}"
16815
16816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16817
16818  # First separate the path from the arguments. This will split at the first
16819  # space.
16820  complete="$FOUND_MAKE"
16821  path="${complete%% *}"
16822  tmp="$complete EOL"
16823  arguments="${tmp#* }"
16824
16825  # Input might be given as Windows format, start by converting to
16826  # unix format.
16827  new_path="$path"
16828
16829  windows_path="$new_path"
16830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16831    unix_path=`$CYGPATH -u "$windows_path"`
16832    new_path="$unix_path"
16833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16835    new_path="$unix_path"
16836  fi
16837
16838
16839  # Now try to locate executable using which
16840  new_path=`$WHICH "$new_path" 2> /dev/null`
16841
16842  if test "x$new_path" = x; then
16843    # Oops. Which didn't find the executable.
16844    # The splitting of arguments from the executable at a space might have been incorrect,
16845    # since paths with space are more likely in Windows. Give it another try with the whole
16846    # argument.
16847    path="$complete"
16848    arguments="EOL"
16849    new_path="$path"
16850
16851  windows_path="$new_path"
16852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16853    unix_path=`$CYGPATH -u "$windows_path"`
16854    new_path="$unix_path"
16855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16857    new_path="$unix_path"
16858  fi
16859
16860
16861    new_path=`$WHICH "$new_path" 2> /dev/null`
16862    # bat and cmd files are not always considered executable in MSYS causing which
16863    # to not find them
16864    if test "x$new_path" = x \
16865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16867      new_path="$path"
16868
16869  windows_path="$new_path"
16870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16871    unix_path=`$CYGPATH -u "$windows_path"`
16872    new_path="$unix_path"
16873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16875    new_path="$unix_path"
16876  fi
16877
16878    fi
16879
16880    if test "x$new_path" = x; then
16881      # It's still not found. Now this is an unrecoverable error.
16882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16883$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16884      has_space=`$ECHO "$complete" | $GREP " "`
16885      if test "x$has_space" != x; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16888      fi
16889      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16890    fi
16891  fi
16892
16893  # Now new_path has a complete unix path to the binary
16894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16895    # Keep paths in /bin as-is, but remove trailing .exe if any
16896    new_path="${new_path/%.exe/}"
16897    # Do not save /bin paths to all_fixpath_prefixes!
16898  else
16899    # Not in mixed or Windows style, start by that.
16900    new_path=`cmd //c echo $new_path`
16901
16902  input_path="$new_path"
16903  # Check if we need to convert this using DOS-style short mode. If the path
16904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16905  # take no chances and rewrite it.
16906  # Note: m4 eats our [], so we need to use [ and ] instead.
16907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16908  if test "x$has_forbidden_chars" != x; then
16909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16911  fi
16912
16913    # Output is in $new_path
16914
16915  windows_path="$new_path"
16916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16917    unix_path=`$CYGPATH -u "$windows_path"`
16918    new_path="$unix_path"
16919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16921    new_path="$unix_path"
16922  fi
16923
16924    # remove trailing .exe if any
16925    new_path="${new_path/%.exe/}"
16926
16927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16929  fi
16930
16931    else
16932      # We're on a unix platform. Hooray! :)
16933      # First separate the path from the arguments. This will split at the first
16934      # space.
16935      complete="$FOUND_MAKE"
16936      path="${complete%% *}"
16937      tmp="$complete EOL"
16938      arguments="${tmp#* }"
16939
16940      # Cannot rely on the command "which" here since it doesn't always work.
16941      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16942      if test -z "$is_absolute_path"; then
16943        # Path to executable is not absolute. Find it.
16944        IFS_save="$IFS"
16945        IFS=:
16946        for p in $PATH; do
16947          if test -f "$p/$path" && test -x "$p/$path"; then
16948            new_path="$p/$path"
16949            break
16950          fi
16951        done
16952        IFS="$IFS_save"
16953      else
16954        # This is an absolute path, we can use it without further modifications.
16955        new_path="$path"
16956      fi
16957
16958      if test "x$new_path" = x; then
16959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16960$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16961        has_space=`$ECHO "$complete" | $GREP " "`
16962        if test "x$has_space" != x; then
16963          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16964$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16965        fi
16966        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16967      fi
16968    fi
16969
16970    # Now join together the path and the arguments once again
16971    if test "x$arguments" != xEOL; then
16972      new_complete="$new_path ${arguments% *}"
16973    else
16974      new_complete="$new_path"
16975    fi
16976
16977    if test "x$complete" != "x$new_complete"; then
16978      FOUND_MAKE="$new_complete"
16979      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16980$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16981    fi
16982  fi
16983
16984        fi
16985      fi
16986    fi
16987  fi
16988
16989
16990    if test "x$FOUND_MAKE" = x; then
16991      for ac_prog in make
16992do
16993  # Extract the first word of "$ac_prog", so it can be a program name with args.
16994set dummy $ac_prog; ac_word=$2
16995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16996$as_echo_n "checking for $ac_word... " >&6; }
16997if ${ac_cv_path_CHECK_MAKE+:} false; then :
16998  $as_echo_n "(cached) " >&6
16999else
17000  case $CHECK_MAKE in
17001  [\\/]* | ?:[\\/]*)
17002  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17003  ;;
17004  *)
17005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17006for as_dir in $PATH
17007do
17008  IFS=$as_save_IFS
17009  test -z "$as_dir" && as_dir=.
17010    for ac_exec_ext in '' $ac_executable_extensions; do
17011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17012    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17014    break 2
17015  fi
17016done
17017  done
17018IFS=$as_save_IFS
17019
17020  ;;
17021esac
17022fi
17023CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17024if test -n "$CHECK_MAKE"; then
17025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17026$as_echo "$CHECK_MAKE" >&6; }
17027else
17028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17029$as_echo "no" >&6; }
17030fi
17031
17032
17033  test -n "$CHECK_MAKE" && break
17034done
17035
17036
17037  MAKE_CANDIDATE=""$CHECK_MAKE""
17038  DESCRIPTION="make in PATH"
17039
17040  # On Cygwin, we require a newer version of make than on other platforms
17041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17042    MAKE_VERSION_EXPR="-e 4\."
17043    MAKE_REQUIRED_VERSION="4.0"
17044   else
17045    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17046    MAKE_REQUIRED_VERSION="3.81"
17047  fi
17048
17049  if test "x$MAKE_CANDIDATE" != x; then
17050    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17051$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17052    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17053    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17054    if test "x$IS_GNU_MAKE" = x; then
17055      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17056$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17057    else
17058      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17059      if test "x$IS_MODERN_MAKE" = x; then
17060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17061$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17062      else
17063        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17064          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17065            MAKE_EXPECTED_ENV='cygwin'
17066          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17067            MAKE_EXPECTED_ENV='msys'
17068          else
17069            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17070          fi
17071          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17072          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17073        else
17074          # Not relevant for non-Windows
17075          IS_MAKE_CORRECT_ENV=true
17076        fi
17077        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17078          { $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
17079$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;}
17080        else
17081          FOUND_MAKE=$MAKE_CANDIDATE
17082
17083  # Only process if variable expands to non-empty
17084
17085  if test "x$FOUND_MAKE" != x; then
17086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17087
17088  # First separate the path from the arguments. This will split at the first
17089  # space.
17090  complete="$FOUND_MAKE"
17091  path="${complete%% *}"
17092  tmp="$complete EOL"
17093  arguments="${tmp#* }"
17094
17095  # Input might be given as Windows format, start by converting to
17096  # unix format.
17097  new_path=`$CYGPATH -u "$path"`
17098
17099  # Now try to locate executable using which
17100  new_path=`$WHICH "$new_path" 2> /dev/null`
17101  # bat and cmd files are not always considered executable in cygwin causing which
17102  # to not find them
17103  if test "x$new_path" = x \
17104      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17105      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17106    new_path=`$CYGPATH -u "$path"`
17107  fi
17108  if test "x$new_path" = x; then
17109    # Oops. Which didn't find the executable.
17110    # The splitting of arguments from the executable at a space might have been incorrect,
17111    # since paths with space are more likely in Windows. Give it another try with the whole
17112    # argument.
17113    path="$complete"
17114    arguments="EOL"
17115    new_path=`$CYGPATH -u "$path"`
17116    new_path=`$WHICH "$new_path" 2> /dev/null`
17117    # bat and cmd files are not always considered executable in cygwin causing which
17118    # to not find them
17119    if test "x$new_path" = x \
17120        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17121        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17122      new_path=`$CYGPATH -u "$path"`
17123    fi
17124    if test "x$new_path" = x; then
17125      # It's still not found. Now this is an unrecoverable error.
17126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17127$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17128      has_space=`$ECHO "$complete" | $GREP " "`
17129      if test "x$has_space" != x; then
17130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17132      fi
17133      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17134    fi
17135  fi
17136
17137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17140  # "foo.exe" is OK but "foo" is an error.
17141  #
17142  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17143  # It is also a way to make sure we got the proper file name for the real test later on.
17144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17145  if test "x$test_shortpath" = x; then
17146    # Short path failed, file does not exist as specified.
17147    # Try adding .exe or .cmd
17148    if test -f "${new_path}.exe"; then
17149      input_to_shortpath="${new_path}.exe"
17150    elif test -f "${new_path}.cmd"; then
17151      input_to_shortpath="${new_path}.cmd"
17152    else
17153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17154$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17157      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17158    fi
17159  else
17160    input_to_shortpath="$new_path"
17161  fi
17162
17163  # Call helper function which possibly converts this using DOS-style short mode.
17164  # If so, the updated path is stored in $new_path.
17165  new_path="$input_to_shortpath"
17166
17167  input_path="$input_to_shortpath"
17168  # Check if we need to convert this using DOS-style short mode. If the path
17169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17170  # take no chances and rewrite it.
17171  # Note: m4 eats our [], so we need to use [ and ] instead.
17172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17173  if test "x$has_forbidden_chars" != x; then
17174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17178      # Going to short mode and back again did indeed matter. Since short mode is
17179      # case insensitive, let's make it lowercase to improve readability.
17180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17181      # Now convert it back to Unix-style (cygpath)
17182      input_path=`$CYGPATH -u "$shortmode_path"`
17183      new_path="$input_path"
17184    fi
17185  fi
17186
17187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17188  if test "x$test_cygdrive_prefix" = x; then
17189    # As a simple fix, exclude /usr/bin since it's not a real path.
17190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17192      # a path prefixed by /cygdrive for fixpath to work.
17193      new_path="$CYGWIN_ROOT_PATH$input_path"
17194    fi
17195  fi
17196
17197  # remove trailing .exe if any
17198  new_path="${new_path/%.exe/}"
17199
17200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17201
17202  # First separate the path from the arguments. This will split at the first
17203  # space.
17204  complete="$FOUND_MAKE"
17205  path="${complete%% *}"
17206  tmp="$complete EOL"
17207  arguments="${tmp#* }"
17208
17209  # Input might be given as Windows format, start by converting to
17210  # unix format.
17211  new_path="$path"
17212
17213  windows_path="$new_path"
17214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17215    unix_path=`$CYGPATH -u "$windows_path"`
17216    new_path="$unix_path"
17217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17219    new_path="$unix_path"
17220  fi
17221
17222
17223  # Now try to locate executable using which
17224  new_path=`$WHICH "$new_path" 2> /dev/null`
17225
17226  if test "x$new_path" = x; then
17227    # Oops. Which didn't find the executable.
17228    # The splitting of arguments from the executable at a space might have been incorrect,
17229    # since paths with space are more likely in Windows. Give it another try with the whole
17230    # argument.
17231    path="$complete"
17232    arguments="EOL"
17233    new_path="$path"
17234
17235  windows_path="$new_path"
17236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17237    unix_path=`$CYGPATH -u "$windows_path"`
17238    new_path="$unix_path"
17239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17241    new_path="$unix_path"
17242  fi
17243
17244
17245    new_path=`$WHICH "$new_path" 2> /dev/null`
17246    # bat and cmd files are not always considered executable in MSYS causing which
17247    # to not find them
17248    if test "x$new_path" = x \
17249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17251      new_path="$path"
17252
17253  windows_path="$new_path"
17254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17255    unix_path=`$CYGPATH -u "$windows_path"`
17256    new_path="$unix_path"
17257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17259    new_path="$unix_path"
17260  fi
17261
17262    fi
17263
17264    if test "x$new_path" = x; then
17265      # It's still not found. Now this is an unrecoverable error.
17266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17267$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17268      has_space=`$ECHO "$complete" | $GREP " "`
17269      if test "x$has_space" != x; then
17270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17272      fi
17273      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17274    fi
17275  fi
17276
17277  # Now new_path has a complete unix path to the binary
17278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17279    # Keep paths in /bin as-is, but remove trailing .exe if any
17280    new_path="${new_path/%.exe/}"
17281    # Do not save /bin paths to all_fixpath_prefixes!
17282  else
17283    # Not in mixed or Windows style, start by that.
17284    new_path=`cmd //c echo $new_path`
17285
17286  input_path="$new_path"
17287  # Check if we need to convert this using DOS-style short mode. If the path
17288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17289  # take no chances and rewrite it.
17290  # Note: m4 eats our [], so we need to use [ and ] instead.
17291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17292  if test "x$has_forbidden_chars" != x; then
17293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17295  fi
17296
17297    # Output is in $new_path
17298
17299  windows_path="$new_path"
17300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17301    unix_path=`$CYGPATH -u "$windows_path"`
17302    new_path="$unix_path"
17303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17305    new_path="$unix_path"
17306  fi
17307
17308    # remove trailing .exe if any
17309    new_path="${new_path/%.exe/}"
17310
17311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17313  fi
17314
17315    else
17316      # We're on a unix platform. Hooray! :)
17317      # First separate the path from the arguments. This will split at the first
17318      # space.
17319      complete="$FOUND_MAKE"
17320      path="${complete%% *}"
17321      tmp="$complete EOL"
17322      arguments="${tmp#* }"
17323
17324      # Cannot rely on the command "which" here since it doesn't always work.
17325      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17326      if test -z "$is_absolute_path"; then
17327        # Path to executable is not absolute. Find it.
17328        IFS_save="$IFS"
17329        IFS=:
17330        for p in $PATH; do
17331          if test -f "$p/$path" && test -x "$p/$path"; then
17332            new_path="$p/$path"
17333            break
17334          fi
17335        done
17336        IFS="$IFS_save"
17337      else
17338        # This is an absolute path, we can use it without further modifications.
17339        new_path="$path"
17340      fi
17341
17342      if test "x$new_path" = x; then
17343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17344$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17345        has_space=`$ECHO "$complete" | $GREP " "`
17346        if test "x$has_space" != x; then
17347          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17348$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17349        fi
17350        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17351      fi
17352    fi
17353
17354    # Now join together the path and the arguments once again
17355    if test "x$arguments" != xEOL; then
17356      new_complete="$new_path ${arguments% *}"
17357    else
17358      new_complete="$new_path"
17359    fi
17360
17361    if test "x$complete" != "x$new_complete"; then
17362      FOUND_MAKE="$new_complete"
17363      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17364$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17365    fi
17366  fi
17367
17368        fi
17369      fi
17370    fi
17371  fi
17372
17373    fi
17374
17375    if test "x$FOUND_MAKE" = x; then
17376      if test "x$TOOLCHAIN_PATH" != x; then
17377        # We have a toolchain path, check that as well before giving up.
17378        OLD_PATH=$PATH
17379        PATH=$TOOLCHAIN_PATH:$PATH
17380        for ac_prog in gmake
17381do
17382  # Extract the first word of "$ac_prog", so it can be a program name with args.
17383set dummy $ac_prog; ac_word=$2
17384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17385$as_echo_n "checking for $ac_word... " >&6; }
17386if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17387  $as_echo_n "(cached) " >&6
17388else
17389  case $CHECK_TOOLSDIR_GMAKE in
17390  [\\/]* | ?:[\\/]*)
17391  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17392  ;;
17393  *)
17394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17395for as_dir in $PATH
17396do
17397  IFS=$as_save_IFS
17398  test -z "$as_dir" && as_dir=.
17399    for ac_exec_ext in '' $ac_executable_extensions; do
17400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17401    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17403    break 2
17404  fi
17405done
17406  done
17407IFS=$as_save_IFS
17408
17409  ;;
17410esac
17411fi
17412CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17413if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17415$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17416else
17417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17418$as_echo "no" >&6; }
17419fi
17420
17421
17422  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17423done
17424
17425
17426  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17427  DESCRIPTION="gmake in tools-dir"
17428
17429  # On Cygwin, we require a newer version of make than on other platforms
17430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17431    MAKE_VERSION_EXPR="-e 4\."
17432    MAKE_REQUIRED_VERSION="4.0"
17433   else
17434    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17435    MAKE_REQUIRED_VERSION="3.81"
17436  fi
17437
17438  if test "x$MAKE_CANDIDATE" != x; then
17439    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17440$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17441    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17442    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17443    if test "x$IS_GNU_MAKE" = x; then
17444      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17445$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17446    else
17447      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17448      if test "x$IS_MODERN_MAKE" = x; then
17449        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17450$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17451      else
17452        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17453          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17454            MAKE_EXPECTED_ENV='cygwin'
17455          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17456            MAKE_EXPECTED_ENV='msys'
17457          else
17458            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17459          fi
17460          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17461          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17462        else
17463          # Not relevant for non-Windows
17464          IS_MAKE_CORRECT_ENV=true
17465        fi
17466        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17467          { $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
17468$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;}
17469        else
17470          FOUND_MAKE=$MAKE_CANDIDATE
17471
17472  # Only process if variable expands to non-empty
17473
17474  if test "x$FOUND_MAKE" != x; then
17475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17476
17477  # First separate the path from the arguments. This will split at the first
17478  # space.
17479  complete="$FOUND_MAKE"
17480  path="${complete%% *}"
17481  tmp="$complete EOL"
17482  arguments="${tmp#* }"
17483
17484  # Input might be given as Windows format, start by converting to
17485  # unix format.
17486  new_path=`$CYGPATH -u "$path"`
17487
17488  # Now try to locate executable using which
17489  new_path=`$WHICH "$new_path" 2> /dev/null`
17490  # bat and cmd files are not always considered executable in cygwin causing which
17491  # to not find them
17492  if test "x$new_path" = x \
17493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17495    new_path=`$CYGPATH -u "$path"`
17496  fi
17497  if test "x$new_path" = x; then
17498    # Oops. Which didn't find the executable.
17499    # The splitting of arguments from the executable at a space might have been incorrect,
17500    # since paths with space are more likely in Windows. Give it another try with the whole
17501    # argument.
17502    path="$complete"
17503    arguments="EOL"
17504    new_path=`$CYGPATH -u "$path"`
17505    new_path=`$WHICH "$new_path" 2> /dev/null`
17506    # bat and cmd files are not always considered executable in cygwin causing which
17507    # to not find them
17508    if test "x$new_path" = x \
17509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17511      new_path=`$CYGPATH -u "$path"`
17512    fi
17513    if test "x$new_path" = x; then
17514      # It's still not found. Now this is an unrecoverable error.
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17517      has_space=`$ECHO "$complete" | $GREP " "`
17518      if test "x$has_space" != x; then
17519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17521      fi
17522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17523    fi
17524  fi
17525
17526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17529  # "foo.exe" is OK but "foo" is an error.
17530  #
17531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17532  # It is also a way to make sure we got the proper file name for the real test later on.
17533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17534  if test "x$test_shortpath" = x; then
17535    # Short path failed, file does not exist as specified.
17536    # Try adding .exe or .cmd
17537    if test -f "${new_path}.exe"; then
17538      input_to_shortpath="${new_path}.exe"
17539    elif test -f "${new_path}.cmd"; then
17540      input_to_shortpath="${new_path}.cmd"
17541    else
17542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17543$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17546      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17547    fi
17548  else
17549    input_to_shortpath="$new_path"
17550  fi
17551
17552  # Call helper function which possibly converts this using DOS-style short mode.
17553  # If so, the updated path is stored in $new_path.
17554  new_path="$input_to_shortpath"
17555
17556  input_path="$input_to_shortpath"
17557  # Check if we need to convert this using DOS-style short mode. If the path
17558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17559  # take no chances and rewrite it.
17560  # Note: m4 eats our [], so we need to use [ and ] instead.
17561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17562  if test "x$has_forbidden_chars" != x; then
17563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17567      # Going to short mode and back again did indeed matter. Since short mode is
17568      # case insensitive, let's make it lowercase to improve readability.
17569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17570      # Now convert it back to Unix-style (cygpath)
17571      input_path=`$CYGPATH -u "$shortmode_path"`
17572      new_path="$input_path"
17573    fi
17574  fi
17575
17576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17577  if test "x$test_cygdrive_prefix" = x; then
17578    # As a simple fix, exclude /usr/bin since it's not a real path.
17579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17581      # a path prefixed by /cygdrive for fixpath to work.
17582      new_path="$CYGWIN_ROOT_PATH$input_path"
17583    fi
17584  fi
17585
17586  # remove trailing .exe if any
17587  new_path="${new_path/%.exe/}"
17588
17589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17590
17591  # First separate the path from the arguments. This will split at the first
17592  # space.
17593  complete="$FOUND_MAKE"
17594  path="${complete%% *}"
17595  tmp="$complete EOL"
17596  arguments="${tmp#* }"
17597
17598  # Input might be given as Windows format, start by converting to
17599  # unix format.
17600  new_path="$path"
17601
17602  windows_path="$new_path"
17603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17604    unix_path=`$CYGPATH -u "$windows_path"`
17605    new_path="$unix_path"
17606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17608    new_path="$unix_path"
17609  fi
17610
17611
17612  # Now try to locate executable using which
17613  new_path=`$WHICH "$new_path" 2> /dev/null`
17614
17615  if test "x$new_path" = x; then
17616    # Oops. Which didn't find the executable.
17617    # The splitting of arguments from the executable at a space might have been incorrect,
17618    # since paths with space are more likely in Windows. Give it another try with the whole
17619    # argument.
17620    path="$complete"
17621    arguments="EOL"
17622    new_path="$path"
17623
17624  windows_path="$new_path"
17625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17626    unix_path=`$CYGPATH -u "$windows_path"`
17627    new_path="$unix_path"
17628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17630    new_path="$unix_path"
17631  fi
17632
17633
17634    new_path=`$WHICH "$new_path" 2> /dev/null`
17635    # bat and cmd files are not always considered executable in MSYS causing which
17636    # to not find them
17637    if test "x$new_path" = x \
17638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17640      new_path="$path"
17641
17642  windows_path="$new_path"
17643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644    unix_path=`$CYGPATH -u "$windows_path"`
17645    new_path="$unix_path"
17646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648    new_path="$unix_path"
17649  fi
17650
17651    fi
17652
17653    if test "x$new_path" = x; then
17654      # It's still not found. Now this is an unrecoverable error.
17655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17657      has_space=`$ECHO "$complete" | $GREP " "`
17658      if test "x$has_space" != x; then
17659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17661      fi
17662      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17663    fi
17664  fi
17665
17666  # Now new_path has a complete unix path to the binary
17667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17668    # Keep paths in /bin as-is, but remove trailing .exe if any
17669    new_path="${new_path/%.exe/}"
17670    # Do not save /bin paths to all_fixpath_prefixes!
17671  else
17672    # Not in mixed or Windows style, start by that.
17673    new_path=`cmd //c echo $new_path`
17674
17675  input_path="$new_path"
17676  # Check if we need to convert this using DOS-style short mode. If the path
17677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17678  # take no chances and rewrite it.
17679  # Note: m4 eats our [], so we need to use [ and ] instead.
17680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17681  if test "x$has_forbidden_chars" != x; then
17682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17684  fi
17685
17686    # Output is in $new_path
17687
17688  windows_path="$new_path"
17689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17690    unix_path=`$CYGPATH -u "$windows_path"`
17691    new_path="$unix_path"
17692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17694    new_path="$unix_path"
17695  fi
17696
17697    # remove trailing .exe if any
17698    new_path="${new_path/%.exe/}"
17699
17700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17702  fi
17703
17704    else
17705      # We're on a unix platform. Hooray! :)
17706      # First separate the path from the arguments. This will split at the first
17707      # space.
17708      complete="$FOUND_MAKE"
17709      path="${complete%% *}"
17710      tmp="$complete EOL"
17711      arguments="${tmp#* }"
17712
17713      # Cannot rely on the command "which" here since it doesn't always work.
17714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17715      if test -z "$is_absolute_path"; then
17716        # Path to executable is not absolute. Find it.
17717        IFS_save="$IFS"
17718        IFS=:
17719        for p in $PATH; do
17720          if test -f "$p/$path" && test -x "$p/$path"; then
17721            new_path="$p/$path"
17722            break
17723          fi
17724        done
17725        IFS="$IFS_save"
17726      else
17727        # This is an absolute path, we can use it without further modifications.
17728        new_path="$path"
17729      fi
17730
17731      if test "x$new_path" = x; then
17732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17733$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17734        has_space=`$ECHO "$complete" | $GREP " "`
17735        if test "x$has_space" != x; then
17736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17738        fi
17739        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17740      fi
17741    fi
17742
17743    # Now join together the path and the arguments once again
17744    if test "x$arguments" != xEOL; then
17745      new_complete="$new_path ${arguments% *}"
17746    else
17747      new_complete="$new_path"
17748    fi
17749
17750    if test "x$complete" != "x$new_complete"; then
17751      FOUND_MAKE="$new_complete"
17752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17753$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17754    fi
17755  fi
17756
17757        fi
17758      fi
17759    fi
17760  fi
17761
17762        if test "x$FOUND_MAKE" = x; then
17763          for ac_prog in make
17764do
17765  # Extract the first word of "$ac_prog", so it can be a program name with args.
17766set dummy $ac_prog; ac_word=$2
17767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17768$as_echo_n "checking for $ac_word... " >&6; }
17769if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17770  $as_echo_n "(cached) " >&6
17771else
17772  case $CHECK_TOOLSDIR_MAKE in
17773  [\\/]* | ?:[\\/]*)
17774  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17775  ;;
17776  *)
17777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17778for as_dir in $PATH
17779do
17780  IFS=$as_save_IFS
17781  test -z "$as_dir" && as_dir=.
17782    for ac_exec_ext in '' $ac_executable_extensions; do
17783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17784    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17786    break 2
17787  fi
17788done
17789  done
17790IFS=$as_save_IFS
17791
17792  ;;
17793esac
17794fi
17795CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17796if test -n "$CHECK_TOOLSDIR_MAKE"; then
17797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17798$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17799else
17800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17801$as_echo "no" >&6; }
17802fi
17803
17804
17805  test -n "$CHECK_TOOLSDIR_MAKE" && break
17806done
17807
17808
17809  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17810  DESCRIPTION="make in tools-dir"
17811
17812  # On Cygwin, we require a newer version of make than on other platforms
17813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17814    MAKE_VERSION_EXPR="-e 4\."
17815    MAKE_REQUIRED_VERSION="4.0"
17816   else
17817    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17818    MAKE_REQUIRED_VERSION="3.81"
17819  fi
17820
17821  if test "x$MAKE_CANDIDATE" != x; then
17822    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17823$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17824    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17825    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17826    if test "x$IS_GNU_MAKE" = x; then
17827      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17828$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17829    else
17830      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17831      if test "x$IS_MODERN_MAKE" = x; then
17832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17833$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17834      else
17835        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17836          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837            MAKE_EXPECTED_ENV='cygwin'
17838          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17839            MAKE_EXPECTED_ENV='msys'
17840          else
17841            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17842          fi
17843          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17844          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17845        else
17846          # Not relevant for non-Windows
17847          IS_MAKE_CORRECT_ENV=true
17848        fi
17849        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17850          { $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
17851$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;}
17852        else
17853          FOUND_MAKE=$MAKE_CANDIDATE
17854
17855  # Only process if variable expands to non-empty
17856
17857  if test "x$FOUND_MAKE" != x; then
17858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17859
17860  # First separate the path from the arguments. This will split at the first
17861  # space.
17862  complete="$FOUND_MAKE"
17863  path="${complete%% *}"
17864  tmp="$complete EOL"
17865  arguments="${tmp#* }"
17866
17867  # Input might be given as Windows format, start by converting to
17868  # unix format.
17869  new_path=`$CYGPATH -u "$path"`
17870
17871  # Now try to locate executable using which
17872  new_path=`$WHICH "$new_path" 2> /dev/null`
17873  # bat and cmd files are not always considered executable in cygwin causing which
17874  # to not find them
17875  if test "x$new_path" = x \
17876      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17877      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17878    new_path=`$CYGPATH -u "$path"`
17879  fi
17880  if test "x$new_path" = x; then
17881    # Oops. Which didn't find the executable.
17882    # The splitting of arguments from the executable at a space might have been incorrect,
17883    # since paths with space are more likely in Windows. Give it another try with the whole
17884    # argument.
17885    path="$complete"
17886    arguments="EOL"
17887    new_path=`$CYGPATH -u "$path"`
17888    new_path=`$WHICH "$new_path" 2> /dev/null`
17889    # bat and cmd files are not always considered executable in cygwin causing which
17890    # to not find them
17891    if test "x$new_path" = x \
17892        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17893        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17894      new_path=`$CYGPATH -u "$path"`
17895    fi
17896    if test "x$new_path" = x; then
17897      # It's still not found. Now this is an unrecoverable error.
17898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17899$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17900      has_space=`$ECHO "$complete" | $GREP " "`
17901      if test "x$has_space" != x; then
17902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17904      fi
17905      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17906    fi
17907  fi
17908
17909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17912  # "foo.exe" is OK but "foo" is an error.
17913  #
17914  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17915  # It is also a way to make sure we got the proper file name for the real test later on.
17916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17917  if test "x$test_shortpath" = x; then
17918    # Short path failed, file does not exist as specified.
17919    # Try adding .exe or .cmd
17920    if test -f "${new_path}.exe"; then
17921      input_to_shortpath="${new_path}.exe"
17922    elif test -f "${new_path}.cmd"; then
17923      input_to_shortpath="${new_path}.cmd"
17924    else
17925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17926$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17927      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17928$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17929      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17930    fi
17931  else
17932    input_to_shortpath="$new_path"
17933  fi
17934
17935  # Call helper function which possibly converts this using DOS-style short mode.
17936  # If so, the updated path is stored in $new_path.
17937  new_path="$input_to_shortpath"
17938
17939  input_path="$input_to_shortpath"
17940  # Check if we need to convert this using DOS-style short mode. If the path
17941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17942  # take no chances and rewrite it.
17943  # Note: m4 eats our [], so we need to use [ and ] instead.
17944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17945  if test "x$has_forbidden_chars" != x; then
17946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17950      # Going to short mode and back again did indeed matter. Since short mode is
17951      # case insensitive, let's make it lowercase to improve readability.
17952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17953      # Now convert it back to Unix-style (cygpath)
17954      input_path=`$CYGPATH -u "$shortmode_path"`
17955      new_path="$input_path"
17956    fi
17957  fi
17958
17959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17960  if test "x$test_cygdrive_prefix" = x; then
17961    # As a simple fix, exclude /usr/bin since it's not a real path.
17962    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17964      # a path prefixed by /cygdrive for fixpath to work.
17965      new_path="$CYGWIN_ROOT_PATH$input_path"
17966    fi
17967  fi
17968
17969  # remove trailing .exe if any
17970  new_path="${new_path/%.exe/}"
17971
17972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17973
17974  # First separate the path from the arguments. This will split at the first
17975  # space.
17976  complete="$FOUND_MAKE"
17977  path="${complete%% *}"
17978  tmp="$complete EOL"
17979  arguments="${tmp#* }"
17980
17981  # Input might be given as Windows format, start by converting to
17982  # unix format.
17983  new_path="$path"
17984
17985  windows_path="$new_path"
17986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17987    unix_path=`$CYGPATH -u "$windows_path"`
17988    new_path="$unix_path"
17989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17991    new_path="$unix_path"
17992  fi
17993
17994
17995  # Now try to locate executable using which
17996  new_path=`$WHICH "$new_path" 2> /dev/null`
17997
17998  if test "x$new_path" = x; then
17999    # Oops. Which didn't find the executable.
18000    # The splitting of arguments from the executable at a space might have been incorrect,
18001    # since paths with space are more likely in Windows. Give it another try with the whole
18002    # argument.
18003    path="$complete"
18004    arguments="EOL"
18005    new_path="$path"
18006
18007  windows_path="$new_path"
18008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18009    unix_path=`$CYGPATH -u "$windows_path"`
18010    new_path="$unix_path"
18011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18013    new_path="$unix_path"
18014  fi
18015
18016
18017    new_path=`$WHICH "$new_path" 2> /dev/null`
18018    # bat and cmd files are not always considered executable in MSYS causing which
18019    # to not find them
18020    if test "x$new_path" = x \
18021        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18022        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18023      new_path="$path"
18024
18025  windows_path="$new_path"
18026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18027    unix_path=`$CYGPATH -u "$windows_path"`
18028    new_path="$unix_path"
18029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18031    new_path="$unix_path"
18032  fi
18033
18034    fi
18035
18036    if test "x$new_path" = x; then
18037      # It's still not found. Now this is an unrecoverable error.
18038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18040      has_space=`$ECHO "$complete" | $GREP " "`
18041      if test "x$has_space" != x; then
18042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18044      fi
18045      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18046    fi
18047  fi
18048
18049  # Now new_path has a complete unix path to the binary
18050  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18051    # Keep paths in /bin as-is, but remove trailing .exe if any
18052    new_path="${new_path/%.exe/}"
18053    # Do not save /bin paths to all_fixpath_prefixes!
18054  else
18055    # Not in mixed or Windows style, start by that.
18056    new_path=`cmd //c echo $new_path`
18057
18058  input_path="$new_path"
18059  # Check if we need to convert this using DOS-style short mode. If the path
18060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18061  # take no chances and rewrite it.
18062  # Note: m4 eats our [], so we need to use [ and ] instead.
18063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18064  if test "x$has_forbidden_chars" != x; then
18065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18067  fi
18068
18069    # Output is in $new_path
18070
18071  windows_path="$new_path"
18072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18073    unix_path=`$CYGPATH -u "$windows_path"`
18074    new_path="$unix_path"
18075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18077    new_path="$unix_path"
18078  fi
18079
18080    # remove trailing .exe if any
18081    new_path="${new_path/%.exe/}"
18082
18083    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18084    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18085  fi
18086
18087    else
18088      # We're on a unix platform. Hooray! :)
18089      # First separate the path from the arguments. This will split at the first
18090      # space.
18091      complete="$FOUND_MAKE"
18092      path="${complete%% *}"
18093      tmp="$complete EOL"
18094      arguments="${tmp#* }"
18095
18096      # Cannot rely on the command "which" here since it doesn't always work.
18097      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18098      if test -z "$is_absolute_path"; then
18099        # Path to executable is not absolute. Find it.
18100        IFS_save="$IFS"
18101        IFS=:
18102        for p in $PATH; do
18103          if test -f "$p/$path" && test -x "$p/$path"; then
18104            new_path="$p/$path"
18105            break
18106          fi
18107        done
18108        IFS="$IFS_save"
18109      else
18110        # This is an absolute path, we can use it without further modifications.
18111        new_path="$path"
18112      fi
18113
18114      if test "x$new_path" = x; then
18115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18116$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18117        has_space=`$ECHO "$complete" | $GREP " "`
18118        if test "x$has_space" != x; then
18119          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18121        fi
18122        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18123      fi
18124    fi
18125
18126    # Now join together the path and the arguments once again
18127    if test "x$arguments" != xEOL; then
18128      new_complete="$new_path ${arguments% *}"
18129    else
18130      new_complete="$new_path"
18131    fi
18132
18133    if test "x$complete" != "x$new_complete"; then
18134      FOUND_MAKE="$new_complete"
18135      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18136$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18137    fi
18138  fi
18139
18140        fi
18141      fi
18142    fi
18143  fi
18144
18145        fi
18146        PATH=$OLD_PATH
18147      fi
18148    fi
18149
18150    if test "x$FOUND_MAKE" = x; then
18151      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
18152    fi
18153
18154  else
18155    # The variable is set, but is it from the command line or the environment?
18156
18157    # Try to remove the string !MAKE! from our list.
18158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18160      # If it failed, the variable was not from the command line. Ignore it,
18161      # but warn the user (except for BASH, which is always set by the calling BASH).
18162      if test "xMAKE" != xBASH; then
18163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18164$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18165      fi
18166      # Try to locate tool using the code snippet
18167
18168    # Try our hardest to locate a correct version of GNU make
18169    for ac_prog in gmake
18170do
18171  # Extract the first word of "$ac_prog", so it can be a program name with args.
18172set dummy $ac_prog; ac_word=$2
18173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18174$as_echo_n "checking for $ac_word... " >&6; }
18175if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18176  $as_echo_n "(cached) " >&6
18177else
18178  case $CHECK_GMAKE in
18179  [\\/]* | ?:[\\/]*)
18180  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18181  ;;
18182  *)
18183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18184for as_dir in $PATH
18185do
18186  IFS=$as_save_IFS
18187  test -z "$as_dir" && as_dir=.
18188    for ac_exec_ext in '' $ac_executable_extensions; do
18189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18190    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18192    break 2
18193  fi
18194done
18195  done
18196IFS=$as_save_IFS
18197
18198  ;;
18199esac
18200fi
18201CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18202if test -n "$CHECK_GMAKE"; then
18203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18204$as_echo "$CHECK_GMAKE" >&6; }
18205else
18206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18207$as_echo "no" >&6; }
18208fi
18209
18210
18211  test -n "$CHECK_GMAKE" && break
18212done
18213
18214
18215  MAKE_CANDIDATE=""$CHECK_GMAKE""
18216  DESCRIPTION="gmake in PATH"
18217
18218  # On Cygwin, we require a newer version of make than on other platforms
18219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18220    MAKE_VERSION_EXPR="-e 4\."
18221    MAKE_REQUIRED_VERSION="4.0"
18222   else
18223    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18224    MAKE_REQUIRED_VERSION="3.81"
18225  fi
18226
18227  if test "x$MAKE_CANDIDATE" != x; then
18228    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18229$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18230    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18231    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18232    if test "x$IS_GNU_MAKE" = x; then
18233      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18234$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18235    else
18236      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18237      if test "x$IS_MODERN_MAKE" = x; then
18238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18239$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18240      else
18241        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18242          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18243            MAKE_EXPECTED_ENV='cygwin'
18244          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18245            MAKE_EXPECTED_ENV='msys'
18246          else
18247            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18248          fi
18249          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18250          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18251        else
18252          # Not relevant for non-Windows
18253          IS_MAKE_CORRECT_ENV=true
18254        fi
18255        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18256          { $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
18257$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;}
18258        else
18259          FOUND_MAKE=$MAKE_CANDIDATE
18260
18261  # Only process if variable expands to non-empty
18262
18263  if test "x$FOUND_MAKE" != x; then
18264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18265
18266  # First separate the path from the arguments. This will split at the first
18267  # space.
18268  complete="$FOUND_MAKE"
18269  path="${complete%% *}"
18270  tmp="$complete EOL"
18271  arguments="${tmp#* }"
18272
18273  # Input might be given as Windows format, start by converting to
18274  # unix format.
18275  new_path=`$CYGPATH -u "$path"`
18276
18277  # Now try to locate executable using which
18278  new_path=`$WHICH "$new_path" 2> /dev/null`
18279  # bat and cmd files are not always considered executable in cygwin causing which
18280  # to not find them
18281  if test "x$new_path" = x \
18282      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18283      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18284    new_path=`$CYGPATH -u "$path"`
18285  fi
18286  if test "x$new_path" = x; then
18287    # Oops. Which didn't find the executable.
18288    # The splitting of arguments from the executable at a space might have been incorrect,
18289    # since paths with space are more likely in Windows. Give it another try with the whole
18290    # argument.
18291    path="$complete"
18292    arguments="EOL"
18293    new_path=`$CYGPATH -u "$path"`
18294    new_path=`$WHICH "$new_path" 2> /dev/null`
18295    # bat and cmd files are not always considered executable in cygwin causing which
18296    # to not find them
18297    if test "x$new_path" = x \
18298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18300      new_path=`$CYGPATH -u "$path"`
18301    fi
18302    if test "x$new_path" = x; then
18303      # It's still not found. Now this is an unrecoverable error.
18304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18305$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18306      has_space=`$ECHO "$complete" | $GREP " "`
18307      if test "x$has_space" != x; then
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18310      fi
18311      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18312    fi
18313  fi
18314
18315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18318  # "foo.exe" is OK but "foo" is an error.
18319  #
18320  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18321  # It is also a way to make sure we got the proper file name for the real test later on.
18322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18323  if test "x$test_shortpath" = x; then
18324    # Short path failed, file does not exist as specified.
18325    # Try adding .exe or .cmd
18326    if test -f "${new_path}.exe"; then
18327      input_to_shortpath="${new_path}.exe"
18328    elif test -f "${new_path}.cmd"; then
18329      input_to_shortpath="${new_path}.cmd"
18330    else
18331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18332$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18333      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18334$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18335      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18336    fi
18337  else
18338    input_to_shortpath="$new_path"
18339  fi
18340
18341  # Call helper function which possibly converts this using DOS-style short mode.
18342  # If so, the updated path is stored in $new_path.
18343  new_path="$input_to_shortpath"
18344
18345  input_path="$input_to_shortpath"
18346  # Check if we need to convert this using DOS-style short mode. If the path
18347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18348  # take no chances and rewrite it.
18349  # Note: m4 eats our [], so we need to use [ and ] instead.
18350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18351  if test "x$has_forbidden_chars" != x; then
18352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18356      # Going to short mode and back again did indeed matter. Since short mode is
18357      # case insensitive, let's make it lowercase to improve readability.
18358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18359      # Now convert it back to Unix-style (cygpath)
18360      input_path=`$CYGPATH -u "$shortmode_path"`
18361      new_path="$input_path"
18362    fi
18363  fi
18364
18365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18366  if test "x$test_cygdrive_prefix" = x; then
18367    # As a simple fix, exclude /usr/bin since it's not a real path.
18368    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18370      # a path prefixed by /cygdrive for fixpath to work.
18371      new_path="$CYGWIN_ROOT_PATH$input_path"
18372    fi
18373  fi
18374
18375  # remove trailing .exe if any
18376  new_path="${new_path/%.exe/}"
18377
18378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18379
18380  # First separate the path from the arguments. This will split at the first
18381  # space.
18382  complete="$FOUND_MAKE"
18383  path="${complete%% *}"
18384  tmp="$complete EOL"
18385  arguments="${tmp#* }"
18386
18387  # Input might be given as Windows format, start by converting to
18388  # unix format.
18389  new_path="$path"
18390
18391  windows_path="$new_path"
18392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18393    unix_path=`$CYGPATH -u "$windows_path"`
18394    new_path="$unix_path"
18395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18397    new_path="$unix_path"
18398  fi
18399
18400
18401  # Now try to locate executable using which
18402  new_path=`$WHICH "$new_path" 2> /dev/null`
18403
18404  if test "x$new_path" = x; then
18405    # Oops. Which didn't find the executable.
18406    # The splitting of arguments from the executable at a space might have been incorrect,
18407    # since paths with space are more likely in Windows. Give it another try with the whole
18408    # argument.
18409    path="$complete"
18410    arguments="EOL"
18411    new_path="$path"
18412
18413  windows_path="$new_path"
18414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18415    unix_path=`$CYGPATH -u "$windows_path"`
18416    new_path="$unix_path"
18417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18419    new_path="$unix_path"
18420  fi
18421
18422
18423    new_path=`$WHICH "$new_path" 2> /dev/null`
18424    # bat and cmd files are not always considered executable in MSYS causing which
18425    # to not find them
18426    if test "x$new_path" = x \
18427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18429      new_path="$path"
18430
18431  windows_path="$new_path"
18432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18433    unix_path=`$CYGPATH -u "$windows_path"`
18434    new_path="$unix_path"
18435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18437    new_path="$unix_path"
18438  fi
18439
18440    fi
18441
18442    if test "x$new_path" = x; then
18443      # It's still not found. Now this is an unrecoverable error.
18444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18445$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18446      has_space=`$ECHO "$complete" | $GREP " "`
18447      if test "x$has_space" != x; then
18448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18450      fi
18451      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18452    fi
18453  fi
18454
18455  # Now new_path has a complete unix path to the binary
18456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18457    # Keep paths in /bin as-is, but remove trailing .exe if any
18458    new_path="${new_path/%.exe/}"
18459    # Do not save /bin paths to all_fixpath_prefixes!
18460  else
18461    # Not in mixed or Windows style, start by that.
18462    new_path=`cmd //c echo $new_path`
18463
18464  input_path="$new_path"
18465  # Check if we need to convert this using DOS-style short mode. If the path
18466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18467  # take no chances and rewrite it.
18468  # Note: m4 eats our [], so we need to use [ and ] instead.
18469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18470  if test "x$has_forbidden_chars" != x; then
18471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18473  fi
18474
18475    # Output is in $new_path
18476
18477  windows_path="$new_path"
18478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18479    unix_path=`$CYGPATH -u "$windows_path"`
18480    new_path="$unix_path"
18481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18483    new_path="$unix_path"
18484  fi
18485
18486    # remove trailing .exe if any
18487    new_path="${new_path/%.exe/}"
18488
18489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18491  fi
18492
18493    else
18494      # We're on a unix platform. Hooray! :)
18495      # First separate the path from the arguments. This will split at the first
18496      # space.
18497      complete="$FOUND_MAKE"
18498      path="${complete%% *}"
18499      tmp="$complete EOL"
18500      arguments="${tmp#* }"
18501
18502      # Cannot rely on the command "which" here since it doesn't always work.
18503      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18504      if test -z "$is_absolute_path"; then
18505        # Path to executable is not absolute. Find it.
18506        IFS_save="$IFS"
18507        IFS=:
18508        for p in $PATH; do
18509          if test -f "$p/$path" && test -x "$p/$path"; then
18510            new_path="$p/$path"
18511            break
18512          fi
18513        done
18514        IFS="$IFS_save"
18515      else
18516        # This is an absolute path, we can use it without further modifications.
18517        new_path="$path"
18518      fi
18519
18520      if test "x$new_path" = x; then
18521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18522$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18523        has_space=`$ECHO "$complete" | $GREP " "`
18524        if test "x$has_space" != x; then
18525          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18527        fi
18528        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18529      fi
18530    fi
18531
18532    # Now join together the path and the arguments once again
18533    if test "x$arguments" != xEOL; then
18534      new_complete="$new_path ${arguments% *}"
18535    else
18536      new_complete="$new_path"
18537    fi
18538
18539    if test "x$complete" != "x$new_complete"; then
18540      FOUND_MAKE="$new_complete"
18541      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18542$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18543    fi
18544  fi
18545
18546        fi
18547      fi
18548    fi
18549  fi
18550
18551
18552    if test "x$FOUND_MAKE" = x; then
18553      for ac_prog in make
18554do
18555  # Extract the first word of "$ac_prog", so it can be a program name with args.
18556set dummy $ac_prog; ac_word=$2
18557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18558$as_echo_n "checking for $ac_word... " >&6; }
18559if ${ac_cv_path_CHECK_MAKE+:} false; then :
18560  $as_echo_n "(cached) " >&6
18561else
18562  case $CHECK_MAKE in
18563  [\\/]* | ?:[\\/]*)
18564  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18565  ;;
18566  *)
18567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18568for as_dir in $PATH
18569do
18570  IFS=$as_save_IFS
18571  test -z "$as_dir" && as_dir=.
18572    for ac_exec_ext in '' $ac_executable_extensions; do
18573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18574    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18576    break 2
18577  fi
18578done
18579  done
18580IFS=$as_save_IFS
18581
18582  ;;
18583esac
18584fi
18585CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18586if test -n "$CHECK_MAKE"; then
18587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18588$as_echo "$CHECK_MAKE" >&6; }
18589else
18590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18591$as_echo "no" >&6; }
18592fi
18593
18594
18595  test -n "$CHECK_MAKE" && break
18596done
18597
18598
18599  MAKE_CANDIDATE=""$CHECK_MAKE""
18600  DESCRIPTION="make in PATH"
18601
18602  # On Cygwin, we require a newer version of make than on other platforms
18603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18604    MAKE_VERSION_EXPR="-e 4\."
18605    MAKE_REQUIRED_VERSION="4.0"
18606   else
18607    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18608    MAKE_REQUIRED_VERSION="3.81"
18609  fi
18610
18611  if test "x$MAKE_CANDIDATE" != x; then
18612    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18613$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18614    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18615    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18616    if test "x$IS_GNU_MAKE" = x; then
18617      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18618$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18619    else
18620      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18621      if test "x$IS_MODERN_MAKE" = x; then
18622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18623$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18624      else
18625        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18626          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18627            MAKE_EXPECTED_ENV='cygwin'
18628          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18629            MAKE_EXPECTED_ENV='msys'
18630          else
18631            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18632          fi
18633          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18634          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18635        else
18636          # Not relevant for non-Windows
18637          IS_MAKE_CORRECT_ENV=true
18638        fi
18639        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18640          { $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
18641$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;}
18642        else
18643          FOUND_MAKE=$MAKE_CANDIDATE
18644
18645  # Only process if variable expands to non-empty
18646
18647  if test "x$FOUND_MAKE" != x; then
18648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18649
18650  # First separate the path from the arguments. This will split at the first
18651  # space.
18652  complete="$FOUND_MAKE"
18653  path="${complete%% *}"
18654  tmp="$complete EOL"
18655  arguments="${tmp#* }"
18656
18657  # Input might be given as Windows format, start by converting to
18658  # unix format.
18659  new_path=`$CYGPATH -u "$path"`
18660
18661  # Now try to locate executable using which
18662  new_path=`$WHICH "$new_path" 2> /dev/null`
18663  # bat and cmd files are not always considered executable in cygwin causing which
18664  # to not find them
18665  if test "x$new_path" = x \
18666      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18667      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18668    new_path=`$CYGPATH -u "$path"`
18669  fi
18670  if test "x$new_path" = x; then
18671    # Oops. Which didn't find the executable.
18672    # The splitting of arguments from the executable at a space might have been incorrect,
18673    # since paths with space are more likely in Windows. Give it another try with the whole
18674    # argument.
18675    path="$complete"
18676    arguments="EOL"
18677    new_path=`$CYGPATH -u "$path"`
18678    new_path=`$WHICH "$new_path" 2> /dev/null`
18679    # bat and cmd files are not always considered executable in cygwin causing which
18680    # to not find them
18681    if test "x$new_path" = x \
18682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18684      new_path=`$CYGPATH -u "$path"`
18685    fi
18686    if test "x$new_path" = x; then
18687      # It's still not found. Now this is an unrecoverable error.
18688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18689$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18690      has_space=`$ECHO "$complete" | $GREP " "`
18691      if test "x$has_space" != x; then
18692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18694      fi
18695      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18696    fi
18697  fi
18698
18699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18702  # "foo.exe" is OK but "foo" is an error.
18703  #
18704  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18705  # It is also a way to make sure we got the proper file name for the real test later on.
18706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18707  if test "x$test_shortpath" = x; then
18708    # Short path failed, file does not exist as specified.
18709    # Try adding .exe or .cmd
18710    if test -f "${new_path}.exe"; then
18711      input_to_shortpath="${new_path}.exe"
18712    elif test -f "${new_path}.cmd"; then
18713      input_to_shortpath="${new_path}.cmd"
18714    else
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18716$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18717      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18718$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18719      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18720    fi
18721  else
18722    input_to_shortpath="$new_path"
18723  fi
18724
18725  # Call helper function which possibly converts this using DOS-style short mode.
18726  # If so, the updated path is stored in $new_path.
18727  new_path="$input_to_shortpath"
18728
18729  input_path="$input_to_shortpath"
18730  # Check if we need to convert this using DOS-style short mode. If the path
18731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18732  # take no chances and rewrite it.
18733  # Note: m4 eats our [], so we need to use [ and ] instead.
18734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18735  if test "x$has_forbidden_chars" != x; then
18736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18740      # Going to short mode and back again did indeed matter. Since short mode is
18741      # case insensitive, let's make it lowercase to improve readability.
18742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18743      # Now convert it back to Unix-style (cygpath)
18744      input_path=`$CYGPATH -u "$shortmode_path"`
18745      new_path="$input_path"
18746    fi
18747  fi
18748
18749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18750  if test "x$test_cygdrive_prefix" = x; then
18751    # As a simple fix, exclude /usr/bin since it's not a real path.
18752    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18754      # a path prefixed by /cygdrive for fixpath to work.
18755      new_path="$CYGWIN_ROOT_PATH$input_path"
18756    fi
18757  fi
18758
18759  # remove trailing .exe if any
18760  new_path="${new_path/%.exe/}"
18761
18762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763
18764  # First separate the path from the arguments. This will split at the first
18765  # space.
18766  complete="$FOUND_MAKE"
18767  path="${complete%% *}"
18768  tmp="$complete EOL"
18769  arguments="${tmp#* }"
18770
18771  # Input might be given as Windows format, start by converting to
18772  # unix format.
18773  new_path="$path"
18774
18775  windows_path="$new_path"
18776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18777    unix_path=`$CYGPATH -u "$windows_path"`
18778    new_path="$unix_path"
18779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18781    new_path="$unix_path"
18782  fi
18783
18784
18785  # Now try to locate executable using which
18786  new_path=`$WHICH "$new_path" 2> /dev/null`
18787
18788  if test "x$new_path" = x; then
18789    # Oops. Which didn't find the executable.
18790    # The splitting of arguments from the executable at a space might have been incorrect,
18791    # since paths with space are more likely in Windows. Give it another try with the whole
18792    # argument.
18793    path="$complete"
18794    arguments="EOL"
18795    new_path="$path"
18796
18797  windows_path="$new_path"
18798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18799    unix_path=`$CYGPATH -u "$windows_path"`
18800    new_path="$unix_path"
18801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18803    new_path="$unix_path"
18804  fi
18805
18806
18807    new_path=`$WHICH "$new_path" 2> /dev/null`
18808    # bat and cmd files are not always considered executable in MSYS causing which
18809    # to not find them
18810    if test "x$new_path" = x \
18811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18813      new_path="$path"
18814
18815  windows_path="$new_path"
18816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18817    unix_path=`$CYGPATH -u "$windows_path"`
18818    new_path="$unix_path"
18819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18821    new_path="$unix_path"
18822  fi
18823
18824    fi
18825
18826    if test "x$new_path" = x; then
18827      # It's still not found. Now this is an unrecoverable error.
18828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18829$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18830      has_space=`$ECHO "$complete" | $GREP " "`
18831      if test "x$has_space" != x; then
18832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18834      fi
18835      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18836    fi
18837  fi
18838
18839  # Now new_path has a complete unix path to the binary
18840  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18841    # Keep paths in /bin as-is, but remove trailing .exe if any
18842    new_path="${new_path/%.exe/}"
18843    # Do not save /bin paths to all_fixpath_prefixes!
18844  else
18845    # Not in mixed or Windows style, start by that.
18846    new_path=`cmd //c echo $new_path`
18847
18848  input_path="$new_path"
18849  # Check if we need to convert this using DOS-style short mode. If the path
18850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18851  # take no chances and rewrite it.
18852  # Note: m4 eats our [], so we need to use [ and ] instead.
18853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18854  if test "x$has_forbidden_chars" != x; then
18855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18857  fi
18858
18859    # Output is in $new_path
18860
18861  windows_path="$new_path"
18862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18863    unix_path=`$CYGPATH -u "$windows_path"`
18864    new_path="$unix_path"
18865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18867    new_path="$unix_path"
18868  fi
18869
18870    # remove trailing .exe if any
18871    new_path="${new_path/%.exe/}"
18872
18873    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18874    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18875  fi
18876
18877    else
18878      # We're on a unix platform. Hooray! :)
18879      # First separate the path from the arguments. This will split at the first
18880      # space.
18881      complete="$FOUND_MAKE"
18882      path="${complete%% *}"
18883      tmp="$complete EOL"
18884      arguments="${tmp#* }"
18885
18886      # Cannot rely on the command "which" here since it doesn't always work.
18887      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18888      if test -z "$is_absolute_path"; then
18889        # Path to executable is not absolute. Find it.
18890        IFS_save="$IFS"
18891        IFS=:
18892        for p in $PATH; do
18893          if test -f "$p/$path" && test -x "$p/$path"; then
18894            new_path="$p/$path"
18895            break
18896          fi
18897        done
18898        IFS="$IFS_save"
18899      else
18900        # This is an absolute path, we can use it without further modifications.
18901        new_path="$path"
18902      fi
18903
18904      if test "x$new_path" = x; then
18905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18906$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18907        has_space=`$ECHO "$complete" | $GREP " "`
18908        if test "x$has_space" != x; then
18909          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18910$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18911        fi
18912        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18913      fi
18914    fi
18915
18916    # Now join together the path and the arguments once again
18917    if test "x$arguments" != xEOL; then
18918      new_complete="$new_path ${arguments% *}"
18919    else
18920      new_complete="$new_path"
18921    fi
18922
18923    if test "x$complete" != "x$new_complete"; then
18924      FOUND_MAKE="$new_complete"
18925      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18926$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18927    fi
18928  fi
18929
18930        fi
18931      fi
18932    fi
18933  fi
18934
18935    fi
18936
18937    if test "x$FOUND_MAKE" = x; then
18938      if test "x$TOOLCHAIN_PATH" != x; then
18939        # We have a toolchain path, check that as well before giving up.
18940        OLD_PATH=$PATH
18941        PATH=$TOOLCHAIN_PATH:$PATH
18942        for ac_prog in gmake
18943do
18944  # Extract the first word of "$ac_prog", so it can be a program name with args.
18945set dummy $ac_prog; ac_word=$2
18946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18947$as_echo_n "checking for $ac_word... " >&6; }
18948if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18949  $as_echo_n "(cached) " >&6
18950else
18951  case $CHECK_TOOLSDIR_GMAKE in
18952  [\\/]* | ?:[\\/]*)
18953  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18954  ;;
18955  *)
18956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18957for as_dir in $PATH
18958do
18959  IFS=$as_save_IFS
18960  test -z "$as_dir" && as_dir=.
18961    for ac_exec_ext in '' $ac_executable_extensions; do
18962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18963    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18965    break 2
18966  fi
18967done
18968  done
18969IFS=$as_save_IFS
18970
18971  ;;
18972esac
18973fi
18974CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18975if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18977$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18978else
18979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18980$as_echo "no" >&6; }
18981fi
18982
18983
18984  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18985done
18986
18987
18988  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18989  DESCRIPTION="gmake in tools-dir"
18990
18991  # On Cygwin, we require a newer version of make than on other platforms
18992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18993    MAKE_VERSION_EXPR="-e 4\."
18994    MAKE_REQUIRED_VERSION="4.0"
18995   else
18996    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18997    MAKE_REQUIRED_VERSION="3.81"
18998  fi
18999
19000  if test "x$MAKE_CANDIDATE" != x; then
19001    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19002$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19003    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19004    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19005    if test "x$IS_GNU_MAKE" = x; then
19006      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19007$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19008    else
19009      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19010      if test "x$IS_MODERN_MAKE" = x; then
19011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19012$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19013      else
19014        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19015          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19016            MAKE_EXPECTED_ENV='cygwin'
19017          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19018            MAKE_EXPECTED_ENV='msys'
19019          else
19020            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19021          fi
19022          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19023          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19024        else
19025          # Not relevant for non-Windows
19026          IS_MAKE_CORRECT_ENV=true
19027        fi
19028        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19029          { $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
19030$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;}
19031        else
19032          FOUND_MAKE=$MAKE_CANDIDATE
19033
19034  # Only process if variable expands to non-empty
19035
19036  if test "x$FOUND_MAKE" != x; then
19037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19038
19039  # First separate the path from the arguments. This will split at the first
19040  # space.
19041  complete="$FOUND_MAKE"
19042  path="${complete%% *}"
19043  tmp="$complete EOL"
19044  arguments="${tmp#* }"
19045
19046  # Input might be given as Windows format, start by converting to
19047  # unix format.
19048  new_path=`$CYGPATH -u "$path"`
19049
19050  # Now try to locate executable using which
19051  new_path=`$WHICH "$new_path" 2> /dev/null`
19052  # bat and cmd files are not always considered executable in cygwin causing which
19053  # to not find them
19054  if test "x$new_path" = x \
19055      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19056      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19057    new_path=`$CYGPATH -u "$path"`
19058  fi
19059  if test "x$new_path" = x; then
19060    # Oops. Which didn't find the executable.
19061    # The splitting of arguments from the executable at a space might have been incorrect,
19062    # since paths with space are more likely in Windows. Give it another try with the whole
19063    # argument.
19064    path="$complete"
19065    arguments="EOL"
19066    new_path=`$CYGPATH -u "$path"`
19067    new_path=`$WHICH "$new_path" 2> /dev/null`
19068    # bat and cmd files are not always considered executable in cygwin causing which
19069    # to not find them
19070    if test "x$new_path" = x \
19071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19073      new_path=`$CYGPATH -u "$path"`
19074    fi
19075    if test "x$new_path" = x; then
19076      # It's still not found. Now this is an unrecoverable error.
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19079      has_space=`$ECHO "$complete" | $GREP " "`
19080      if test "x$has_space" != x; then
19081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19083      fi
19084      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19085    fi
19086  fi
19087
19088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19091  # "foo.exe" is OK but "foo" is an error.
19092  #
19093  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19094  # It is also a way to make sure we got the proper file name for the real test later on.
19095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19096  if test "x$test_shortpath" = x; then
19097    # Short path failed, file does not exist as specified.
19098    # Try adding .exe or .cmd
19099    if test -f "${new_path}.exe"; then
19100      input_to_shortpath="${new_path}.exe"
19101    elif test -f "${new_path}.cmd"; then
19102      input_to_shortpath="${new_path}.cmd"
19103    else
19104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19105$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19106      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19107$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19108      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19109    fi
19110  else
19111    input_to_shortpath="$new_path"
19112  fi
19113
19114  # Call helper function which possibly converts this using DOS-style short mode.
19115  # If so, the updated path is stored in $new_path.
19116  new_path="$input_to_shortpath"
19117
19118  input_path="$input_to_shortpath"
19119  # Check if we need to convert this using DOS-style short mode. If the path
19120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19121  # take no chances and rewrite it.
19122  # Note: m4 eats our [], so we need to use [ and ] instead.
19123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19124  if test "x$has_forbidden_chars" != x; then
19125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19129      # Going to short mode and back again did indeed matter. Since short mode is
19130      # case insensitive, let's make it lowercase to improve readability.
19131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19132      # Now convert it back to Unix-style (cygpath)
19133      input_path=`$CYGPATH -u "$shortmode_path"`
19134      new_path="$input_path"
19135    fi
19136  fi
19137
19138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19139  if test "x$test_cygdrive_prefix" = x; then
19140    # As a simple fix, exclude /usr/bin since it's not a real path.
19141    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19143      # a path prefixed by /cygdrive for fixpath to work.
19144      new_path="$CYGWIN_ROOT_PATH$input_path"
19145    fi
19146  fi
19147
19148  # remove trailing .exe if any
19149  new_path="${new_path/%.exe/}"
19150
19151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19152
19153  # First separate the path from the arguments. This will split at the first
19154  # space.
19155  complete="$FOUND_MAKE"
19156  path="${complete%% *}"
19157  tmp="$complete EOL"
19158  arguments="${tmp#* }"
19159
19160  # Input might be given as Windows format, start by converting to
19161  # unix format.
19162  new_path="$path"
19163
19164  windows_path="$new_path"
19165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19166    unix_path=`$CYGPATH -u "$windows_path"`
19167    new_path="$unix_path"
19168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19170    new_path="$unix_path"
19171  fi
19172
19173
19174  # Now try to locate executable using which
19175  new_path=`$WHICH "$new_path" 2> /dev/null`
19176
19177  if test "x$new_path" = x; then
19178    # Oops. Which didn't find the executable.
19179    # The splitting of arguments from the executable at a space might have been incorrect,
19180    # since paths with space are more likely in Windows. Give it another try with the whole
19181    # argument.
19182    path="$complete"
19183    arguments="EOL"
19184    new_path="$path"
19185
19186  windows_path="$new_path"
19187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19188    unix_path=`$CYGPATH -u "$windows_path"`
19189    new_path="$unix_path"
19190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19192    new_path="$unix_path"
19193  fi
19194
19195
19196    new_path=`$WHICH "$new_path" 2> /dev/null`
19197    # bat and cmd files are not always considered executable in MSYS causing which
19198    # to not find them
19199    if test "x$new_path" = x \
19200        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19201        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19202      new_path="$path"
19203
19204  windows_path="$new_path"
19205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19206    unix_path=`$CYGPATH -u "$windows_path"`
19207    new_path="$unix_path"
19208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19210    new_path="$unix_path"
19211  fi
19212
19213    fi
19214
19215    if test "x$new_path" = x; then
19216      # It's still not found. Now this is an unrecoverable error.
19217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19219      has_space=`$ECHO "$complete" | $GREP " "`
19220      if test "x$has_space" != x; then
19221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19223      fi
19224      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19225    fi
19226  fi
19227
19228  # Now new_path has a complete unix path to the binary
19229  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19230    # Keep paths in /bin as-is, but remove trailing .exe if any
19231    new_path="${new_path/%.exe/}"
19232    # Do not save /bin paths to all_fixpath_prefixes!
19233  else
19234    # Not in mixed or Windows style, start by that.
19235    new_path=`cmd //c echo $new_path`
19236
19237  input_path="$new_path"
19238  # Check if we need to convert this using DOS-style short mode. If the path
19239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19240  # take no chances and rewrite it.
19241  # Note: m4 eats our [], so we need to use [ and ] instead.
19242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19243  if test "x$has_forbidden_chars" != x; then
19244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19246  fi
19247
19248    # Output is in $new_path
19249
19250  windows_path="$new_path"
19251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19252    unix_path=`$CYGPATH -u "$windows_path"`
19253    new_path="$unix_path"
19254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19256    new_path="$unix_path"
19257  fi
19258
19259    # remove trailing .exe if any
19260    new_path="${new_path/%.exe/}"
19261
19262    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19263    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19264  fi
19265
19266    else
19267      # We're on a unix platform. Hooray! :)
19268      # First separate the path from the arguments. This will split at the first
19269      # space.
19270      complete="$FOUND_MAKE"
19271      path="${complete%% *}"
19272      tmp="$complete EOL"
19273      arguments="${tmp#* }"
19274
19275      # Cannot rely on the command "which" here since it doesn't always work.
19276      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19277      if test -z "$is_absolute_path"; then
19278        # Path to executable is not absolute. Find it.
19279        IFS_save="$IFS"
19280        IFS=:
19281        for p in $PATH; do
19282          if test -f "$p/$path" && test -x "$p/$path"; then
19283            new_path="$p/$path"
19284            break
19285          fi
19286        done
19287        IFS="$IFS_save"
19288      else
19289        # This is an absolute path, we can use it without further modifications.
19290        new_path="$path"
19291      fi
19292
19293      if test "x$new_path" = x; then
19294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19296        has_space=`$ECHO "$complete" | $GREP " "`
19297        if test "x$has_space" != x; then
19298          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19299$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19300        fi
19301        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19302      fi
19303    fi
19304
19305    # Now join together the path and the arguments once again
19306    if test "x$arguments" != xEOL; then
19307      new_complete="$new_path ${arguments% *}"
19308    else
19309      new_complete="$new_path"
19310    fi
19311
19312    if test "x$complete" != "x$new_complete"; then
19313      FOUND_MAKE="$new_complete"
19314      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19315$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19316    fi
19317  fi
19318
19319        fi
19320      fi
19321    fi
19322  fi
19323
19324        if test "x$FOUND_MAKE" = x; then
19325          for ac_prog in make
19326do
19327  # Extract the first word of "$ac_prog", so it can be a program name with args.
19328set dummy $ac_prog; ac_word=$2
19329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19330$as_echo_n "checking for $ac_word... " >&6; }
19331if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19332  $as_echo_n "(cached) " >&6
19333else
19334  case $CHECK_TOOLSDIR_MAKE in
19335  [\\/]* | ?:[\\/]*)
19336  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19337  ;;
19338  *)
19339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19340for as_dir in $PATH
19341do
19342  IFS=$as_save_IFS
19343  test -z "$as_dir" && as_dir=.
19344    for ac_exec_ext in '' $ac_executable_extensions; do
19345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19346    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19348    break 2
19349  fi
19350done
19351  done
19352IFS=$as_save_IFS
19353
19354  ;;
19355esac
19356fi
19357CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19358if test -n "$CHECK_TOOLSDIR_MAKE"; then
19359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19360$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19361else
19362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19363$as_echo "no" >&6; }
19364fi
19365
19366
19367  test -n "$CHECK_TOOLSDIR_MAKE" && break
19368done
19369
19370
19371  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19372  DESCRIPTION="make in tools-dir"
19373
19374  # On Cygwin, we require a newer version of make than on other platforms
19375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19376    MAKE_VERSION_EXPR="-e 4\."
19377    MAKE_REQUIRED_VERSION="4.0"
19378   else
19379    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19380    MAKE_REQUIRED_VERSION="3.81"
19381  fi
19382
19383  if test "x$MAKE_CANDIDATE" != x; then
19384    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19385$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19386    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19387    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19388    if test "x$IS_GNU_MAKE" = x; then
19389      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19390$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19391    else
19392      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19393      if test "x$IS_MODERN_MAKE" = x; then
19394        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19395$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19396      else
19397        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19398          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399            MAKE_EXPECTED_ENV='cygwin'
19400          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19401            MAKE_EXPECTED_ENV='msys'
19402          else
19403            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19404          fi
19405          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19406          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19407        else
19408          # Not relevant for non-Windows
19409          IS_MAKE_CORRECT_ENV=true
19410        fi
19411        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19412          { $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
19413$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;}
19414        else
19415          FOUND_MAKE=$MAKE_CANDIDATE
19416
19417  # Only process if variable expands to non-empty
19418
19419  if test "x$FOUND_MAKE" != x; then
19420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19421
19422  # First separate the path from the arguments. This will split at the first
19423  # space.
19424  complete="$FOUND_MAKE"
19425  path="${complete%% *}"
19426  tmp="$complete EOL"
19427  arguments="${tmp#* }"
19428
19429  # Input might be given as Windows format, start by converting to
19430  # unix format.
19431  new_path=`$CYGPATH -u "$path"`
19432
19433  # Now try to locate executable using which
19434  new_path=`$WHICH "$new_path" 2> /dev/null`
19435  # bat and cmd files are not always considered executable in cygwin causing which
19436  # to not find them
19437  if test "x$new_path" = x \
19438      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19439      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19440    new_path=`$CYGPATH -u "$path"`
19441  fi
19442  if test "x$new_path" = x; then
19443    # Oops. Which didn't find the executable.
19444    # The splitting of arguments from the executable at a space might have been incorrect,
19445    # since paths with space are more likely in Windows. Give it another try with the whole
19446    # argument.
19447    path="$complete"
19448    arguments="EOL"
19449    new_path=`$CYGPATH -u "$path"`
19450    new_path=`$WHICH "$new_path" 2> /dev/null`
19451    # bat and cmd files are not always considered executable in cygwin causing which
19452    # to not find them
19453    if test "x$new_path" = x \
19454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19456      new_path=`$CYGPATH -u "$path"`
19457    fi
19458    if test "x$new_path" = x; then
19459      # It's still not found. Now this is an unrecoverable error.
19460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19461$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19462      has_space=`$ECHO "$complete" | $GREP " "`
19463      if test "x$has_space" != x; then
19464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19466      fi
19467      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19468    fi
19469  fi
19470
19471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19474  # "foo.exe" is OK but "foo" is an error.
19475  #
19476  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19477  # It is also a way to make sure we got the proper file name for the real test later on.
19478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19479  if test "x$test_shortpath" = x; then
19480    # Short path failed, file does not exist as specified.
19481    # Try adding .exe or .cmd
19482    if test -f "${new_path}.exe"; then
19483      input_to_shortpath="${new_path}.exe"
19484    elif test -f "${new_path}.cmd"; then
19485      input_to_shortpath="${new_path}.cmd"
19486    else
19487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19489      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19490$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19491      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19492    fi
19493  else
19494    input_to_shortpath="$new_path"
19495  fi
19496
19497  # Call helper function which possibly converts this using DOS-style short mode.
19498  # If so, the updated path is stored in $new_path.
19499  new_path="$input_to_shortpath"
19500
19501  input_path="$input_to_shortpath"
19502  # Check if we need to convert this using DOS-style short mode. If the path
19503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19504  # take no chances and rewrite it.
19505  # Note: m4 eats our [], so we need to use [ and ] instead.
19506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19507  if test "x$has_forbidden_chars" != x; then
19508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19512      # Going to short mode and back again did indeed matter. Since short mode is
19513      # case insensitive, let's make it lowercase to improve readability.
19514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19515      # Now convert it back to Unix-style (cygpath)
19516      input_path=`$CYGPATH -u "$shortmode_path"`
19517      new_path="$input_path"
19518    fi
19519  fi
19520
19521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19522  if test "x$test_cygdrive_prefix" = x; then
19523    # As a simple fix, exclude /usr/bin since it's not a real path.
19524    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19526      # a path prefixed by /cygdrive for fixpath to work.
19527      new_path="$CYGWIN_ROOT_PATH$input_path"
19528    fi
19529  fi
19530
19531  # remove trailing .exe if any
19532  new_path="${new_path/%.exe/}"
19533
19534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19535
19536  # First separate the path from the arguments. This will split at the first
19537  # space.
19538  complete="$FOUND_MAKE"
19539  path="${complete%% *}"
19540  tmp="$complete EOL"
19541  arguments="${tmp#* }"
19542
19543  # Input might be given as Windows format, start by converting to
19544  # unix format.
19545  new_path="$path"
19546
19547  windows_path="$new_path"
19548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19549    unix_path=`$CYGPATH -u "$windows_path"`
19550    new_path="$unix_path"
19551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19553    new_path="$unix_path"
19554  fi
19555
19556
19557  # Now try to locate executable using which
19558  new_path=`$WHICH "$new_path" 2> /dev/null`
19559
19560  if test "x$new_path" = x; then
19561    # Oops. Which didn't find the executable.
19562    # The splitting of arguments from the executable at a space might have been incorrect,
19563    # since paths with space are more likely in Windows. Give it another try with the whole
19564    # argument.
19565    path="$complete"
19566    arguments="EOL"
19567    new_path="$path"
19568
19569  windows_path="$new_path"
19570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19571    unix_path=`$CYGPATH -u "$windows_path"`
19572    new_path="$unix_path"
19573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19575    new_path="$unix_path"
19576  fi
19577
19578
19579    new_path=`$WHICH "$new_path" 2> /dev/null`
19580    # bat and cmd files are not always considered executable in MSYS causing which
19581    # to not find them
19582    if test "x$new_path" = x \
19583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19585      new_path="$path"
19586
19587  windows_path="$new_path"
19588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19589    unix_path=`$CYGPATH -u "$windows_path"`
19590    new_path="$unix_path"
19591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19593    new_path="$unix_path"
19594  fi
19595
19596    fi
19597
19598    if test "x$new_path" = x; then
19599      # It's still not found. Now this is an unrecoverable error.
19600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19602      has_space=`$ECHO "$complete" | $GREP " "`
19603      if test "x$has_space" != x; then
19604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19606      fi
19607      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19608    fi
19609  fi
19610
19611  # Now new_path has a complete unix path to the binary
19612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19613    # Keep paths in /bin as-is, but remove trailing .exe if any
19614    new_path="${new_path/%.exe/}"
19615    # Do not save /bin paths to all_fixpath_prefixes!
19616  else
19617    # Not in mixed or Windows style, start by that.
19618    new_path=`cmd //c echo $new_path`
19619
19620  input_path="$new_path"
19621  # Check if we need to convert this using DOS-style short mode. If the path
19622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19623  # take no chances and rewrite it.
19624  # Note: m4 eats our [], so we need to use [ and ] instead.
19625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19626  if test "x$has_forbidden_chars" != x; then
19627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19629  fi
19630
19631    # Output is in $new_path
19632
19633  windows_path="$new_path"
19634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19635    unix_path=`$CYGPATH -u "$windows_path"`
19636    new_path="$unix_path"
19637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19639    new_path="$unix_path"
19640  fi
19641
19642    # remove trailing .exe if any
19643    new_path="${new_path/%.exe/}"
19644
19645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19647  fi
19648
19649    else
19650      # We're on a unix platform. Hooray! :)
19651      # First separate the path from the arguments. This will split at the first
19652      # space.
19653      complete="$FOUND_MAKE"
19654      path="${complete%% *}"
19655      tmp="$complete EOL"
19656      arguments="${tmp#* }"
19657
19658      # Cannot rely on the command "which" here since it doesn't always work.
19659      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19660      if test -z "$is_absolute_path"; then
19661        # Path to executable is not absolute. Find it.
19662        IFS_save="$IFS"
19663        IFS=:
19664        for p in $PATH; do
19665          if test -f "$p/$path" && test -x "$p/$path"; then
19666            new_path="$p/$path"
19667            break
19668          fi
19669        done
19670        IFS="$IFS_save"
19671      else
19672        # This is an absolute path, we can use it without further modifications.
19673        new_path="$path"
19674      fi
19675
19676      if test "x$new_path" = x; then
19677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19678$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19679        has_space=`$ECHO "$complete" | $GREP " "`
19680        if test "x$has_space" != x; then
19681          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19683        fi
19684        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19685      fi
19686    fi
19687
19688    # Now join together the path and the arguments once again
19689    if test "x$arguments" != xEOL; then
19690      new_complete="$new_path ${arguments% *}"
19691    else
19692      new_complete="$new_path"
19693    fi
19694
19695    if test "x$complete" != "x$new_complete"; then
19696      FOUND_MAKE="$new_complete"
19697      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19698$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19699    fi
19700  fi
19701
19702        fi
19703      fi
19704    fi
19705  fi
19706
19707        fi
19708        PATH=$OLD_PATH
19709      fi
19710    fi
19711
19712    if test "x$FOUND_MAKE" = x; then
19713      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19714    fi
19715
19716    else
19717      # If it succeeded, then it was overridden by the user. We will use it
19718      # for the tool.
19719
19720      # First remove it from the list of overridden variables, so we can test
19721      # for unknown variables in the end.
19722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19723
19724      # Check if we try to supply an empty value
19725      if test "x$MAKE" = x; then
19726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19727$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19729$as_echo_n "checking for MAKE... " >&6; }
19730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19731$as_echo "disabled" >&6; }
19732      else
19733        # Check if the provided tool contains a complete path.
19734        tool_specified="$MAKE"
19735        tool_basename="${tool_specified##*/}"
19736        if test "x$tool_basename" = "x$tool_specified"; then
19737          # A command without a complete path is provided, search $PATH.
19738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19739$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19740          # Extract the first word of "$tool_basename", so it can be a program name with args.
19741set dummy $tool_basename; ac_word=$2
19742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19743$as_echo_n "checking for $ac_word... " >&6; }
19744if ${ac_cv_path_MAKE+:} false; then :
19745  $as_echo_n "(cached) " >&6
19746else
19747  case $MAKE in
19748  [\\/]* | ?:[\\/]*)
19749  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19750  ;;
19751  *)
19752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19753for as_dir in $PATH
19754do
19755  IFS=$as_save_IFS
19756  test -z "$as_dir" && as_dir=.
19757    for ac_exec_ext in '' $ac_executable_extensions; do
19758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19759    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19761    break 2
19762  fi
19763done
19764  done
19765IFS=$as_save_IFS
19766
19767  ;;
19768esac
19769fi
19770MAKE=$ac_cv_path_MAKE
19771if test -n "$MAKE"; then
19772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19773$as_echo "$MAKE" >&6; }
19774else
19775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19776$as_echo "no" >&6; }
19777fi
19778
19779
19780          if test "x$MAKE" = x; then
19781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19782          fi
19783        else
19784          # Otherwise we believe it is a complete path. Use it as it is.
19785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19786$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19788$as_echo_n "checking for MAKE... " >&6; }
19789          if test ! -x "$tool_specified"; then
19790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19791$as_echo "not found" >&6; }
19792            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19793          fi
19794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19795$as_echo "$tool_specified" >&6; }
19796        fi
19797      fi
19798    fi
19799
19800    # If MAKE was set by user, verify the version
19801
19802  MAKE_CANDIDATE=""$MAKE""
19803  DESCRIPTION="user supplied MAKE=$MAKE"
19804
19805  # On Cygwin, we require a newer version of make than on other platforms
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    MAKE_VERSION_EXPR="-e 4\."
19808    MAKE_REQUIRED_VERSION="4.0"
19809   else
19810    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19811    MAKE_REQUIRED_VERSION="3.81"
19812  fi
19813
19814  if test "x$MAKE_CANDIDATE" != x; then
19815    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19816$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19817    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19818    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19819    if test "x$IS_GNU_MAKE" = x; then
19820      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19821$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19822    else
19823      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19824      if test "x$IS_MODERN_MAKE" = x; then
19825        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19826$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19827      else
19828        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19829          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19830            MAKE_EXPECTED_ENV='cygwin'
19831          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19832            MAKE_EXPECTED_ENV='msys'
19833          else
19834            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19835          fi
19836          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19837          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19838        else
19839          # Not relevant for non-Windows
19840          IS_MAKE_CORRECT_ENV=true
19841        fi
19842        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19843          { $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
19844$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;}
19845        else
19846          FOUND_MAKE=$MAKE_CANDIDATE
19847
19848  # Only process if variable expands to non-empty
19849
19850  if test "x$FOUND_MAKE" != x; then
19851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19852
19853  # First separate the path from the arguments. This will split at the first
19854  # space.
19855  complete="$FOUND_MAKE"
19856  path="${complete%% *}"
19857  tmp="$complete EOL"
19858  arguments="${tmp#* }"
19859
19860  # Input might be given as Windows format, start by converting to
19861  # unix format.
19862  new_path=`$CYGPATH -u "$path"`
19863
19864  # Now try to locate executable using which
19865  new_path=`$WHICH "$new_path" 2> /dev/null`
19866  # bat and cmd files are not always considered executable in cygwin causing which
19867  # to not find them
19868  if test "x$new_path" = x \
19869      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19870      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19871    new_path=`$CYGPATH -u "$path"`
19872  fi
19873  if test "x$new_path" = x; then
19874    # Oops. Which didn't find the executable.
19875    # The splitting of arguments from the executable at a space might have been incorrect,
19876    # since paths with space are more likely in Windows. Give it another try with the whole
19877    # argument.
19878    path="$complete"
19879    arguments="EOL"
19880    new_path=`$CYGPATH -u "$path"`
19881    new_path=`$WHICH "$new_path" 2> /dev/null`
19882    # bat and cmd files are not always considered executable in cygwin causing which
19883    # to not find them
19884    if test "x$new_path" = x \
19885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19887      new_path=`$CYGPATH -u "$path"`
19888    fi
19889    if test "x$new_path" = x; then
19890      # It's still not found. Now this is an unrecoverable error.
19891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19893      has_space=`$ECHO "$complete" | $GREP " "`
19894      if test "x$has_space" != x; then
19895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19897      fi
19898      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19899    fi
19900  fi
19901
19902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19905  # "foo.exe" is OK but "foo" is an error.
19906  #
19907  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19908  # It is also a way to make sure we got the proper file name for the real test later on.
19909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19910  if test "x$test_shortpath" = x; then
19911    # Short path failed, file does not exist as specified.
19912    # Try adding .exe or .cmd
19913    if test -f "${new_path}.exe"; then
19914      input_to_shortpath="${new_path}.exe"
19915    elif test -f "${new_path}.cmd"; then
19916      input_to_shortpath="${new_path}.cmd"
19917    else
19918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19920      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19921$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19922      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19923    fi
19924  else
19925    input_to_shortpath="$new_path"
19926  fi
19927
19928  # Call helper function which possibly converts this using DOS-style short mode.
19929  # If so, the updated path is stored in $new_path.
19930  new_path="$input_to_shortpath"
19931
19932  input_path="$input_to_shortpath"
19933  # Check if we need to convert this using DOS-style short mode. If the path
19934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19935  # take no chances and rewrite it.
19936  # Note: m4 eats our [], so we need to use [ and ] instead.
19937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19938  if test "x$has_forbidden_chars" != x; then
19939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19943      # Going to short mode and back again did indeed matter. Since short mode is
19944      # case insensitive, let's make it lowercase to improve readability.
19945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19946      # Now convert it back to Unix-style (cygpath)
19947      input_path=`$CYGPATH -u "$shortmode_path"`
19948      new_path="$input_path"
19949    fi
19950  fi
19951
19952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19953  if test "x$test_cygdrive_prefix" = x; then
19954    # As a simple fix, exclude /usr/bin since it's not a real path.
19955    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19957      # a path prefixed by /cygdrive for fixpath to work.
19958      new_path="$CYGWIN_ROOT_PATH$input_path"
19959    fi
19960  fi
19961
19962  # remove trailing .exe if any
19963  new_path="${new_path/%.exe/}"
19964
19965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19966
19967  # First separate the path from the arguments. This will split at the first
19968  # space.
19969  complete="$FOUND_MAKE"
19970  path="${complete%% *}"
19971  tmp="$complete EOL"
19972  arguments="${tmp#* }"
19973
19974  # Input might be given as Windows format, start by converting to
19975  # unix format.
19976  new_path="$path"
19977
19978  windows_path="$new_path"
19979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19980    unix_path=`$CYGPATH -u "$windows_path"`
19981    new_path="$unix_path"
19982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19984    new_path="$unix_path"
19985  fi
19986
19987
19988  # Now try to locate executable using which
19989  new_path=`$WHICH "$new_path" 2> /dev/null`
19990
19991  if test "x$new_path" = x; then
19992    # Oops. Which didn't find the executable.
19993    # The splitting of arguments from the executable at a space might have been incorrect,
19994    # since paths with space are more likely in Windows. Give it another try with the whole
19995    # argument.
19996    path="$complete"
19997    arguments="EOL"
19998    new_path="$path"
19999
20000  windows_path="$new_path"
20001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20002    unix_path=`$CYGPATH -u "$windows_path"`
20003    new_path="$unix_path"
20004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20006    new_path="$unix_path"
20007  fi
20008
20009
20010    new_path=`$WHICH "$new_path" 2> /dev/null`
20011    # bat and cmd files are not always considered executable in MSYS causing which
20012    # to not find them
20013    if test "x$new_path" = x \
20014        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20015        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20016      new_path="$path"
20017
20018  windows_path="$new_path"
20019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20020    unix_path=`$CYGPATH -u "$windows_path"`
20021    new_path="$unix_path"
20022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20024    new_path="$unix_path"
20025  fi
20026
20027    fi
20028
20029    if test "x$new_path" = x; then
20030      # It's still not found. Now this is an unrecoverable error.
20031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20033      has_space=`$ECHO "$complete" | $GREP " "`
20034      if test "x$has_space" != x; then
20035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20037      fi
20038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20039    fi
20040  fi
20041
20042  # Now new_path has a complete unix path to the binary
20043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20044    # Keep paths in /bin as-is, but remove trailing .exe if any
20045    new_path="${new_path/%.exe/}"
20046    # Do not save /bin paths to all_fixpath_prefixes!
20047  else
20048    # Not in mixed or Windows style, start by that.
20049    new_path=`cmd //c echo $new_path`
20050
20051  input_path="$new_path"
20052  # Check if we need to convert this using DOS-style short mode. If the path
20053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20054  # take no chances and rewrite it.
20055  # Note: m4 eats our [], so we need to use [ and ] instead.
20056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20057  if test "x$has_forbidden_chars" != x; then
20058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20060  fi
20061
20062    # Output is in $new_path
20063
20064  windows_path="$new_path"
20065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20066    unix_path=`$CYGPATH -u "$windows_path"`
20067    new_path="$unix_path"
20068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20070    new_path="$unix_path"
20071  fi
20072
20073    # remove trailing .exe if any
20074    new_path="${new_path/%.exe/}"
20075
20076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20078  fi
20079
20080    else
20081      # We're on a unix platform. Hooray! :)
20082      # First separate the path from the arguments. This will split at the first
20083      # space.
20084      complete="$FOUND_MAKE"
20085      path="${complete%% *}"
20086      tmp="$complete EOL"
20087      arguments="${tmp#* }"
20088
20089      # Cannot rely on the command "which" here since it doesn't always work.
20090      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20091      if test -z "$is_absolute_path"; then
20092        # Path to executable is not absolute. Find it.
20093        IFS_save="$IFS"
20094        IFS=:
20095        for p in $PATH; do
20096          if test -f "$p/$path" && test -x "$p/$path"; then
20097            new_path="$p/$path"
20098            break
20099          fi
20100        done
20101        IFS="$IFS_save"
20102      else
20103        # This is an absolute path, we can use it without further modifications.
20104        new_path="$path"
20105      fi
20106
20107      if test "x$new_path" = x; then
20108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20110        has_space=`$ECHO "$complete" | $GREP " "`
20111        if test "x$has_space" != x; then
20112          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20113$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20114        fi
20115        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20116      fi
20117    fi
20118
20119    # Now join together the path and the arguments once again
20120    if test "x$arguments" != xEOL; then
20121      new_complete="$new_path ${arguments% *}"
20122    else
20123      new_complete="$new_path"
20124    fi
20125
20126    if test "x$complete" != "x$new_complete"; then
20127      FOUND_MAKE="$new_complete"
20128      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20129$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20130    fi
20131  fi
20132
20133        fi
20134      fi
20135    fi
20136  fi
20137
20138    if test "x$FOUND_MAKE" = x; then
20139      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20140    fi
20141
20142  fi
20143
20144
20145  MAKE=$FOUND_MAKE
20146
20147  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20148$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20149
20150
20151  # Check if make supports the output sync option and if so, setup using it.
20152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20153$as_echo_n "checking if make --output-sync is supported... " >&6; }
20154  if $MAKE --version -O > /dev/null 2>&1; then
20155    OUTPUT_SYNC_SUPPORTED=true
20156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20157$as_echo "yes" >&6; }
20158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20159$as_echo_n "checking for output-sync value... " >&6; }
20160
20161# Check whether --with-output-sync was given.
20162if test "${with_output_sync+set}" = set; then :
20163  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20164fi
20165
20166    if test "x$OUTPUT_SYNC" = "x"; then
20167      OUTPUT_SYNC=none
20168    fi
20169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20170$as_echo "$OUTPUT_SYNC" >&6; }
20171    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20172      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20173    fi
20174  else
20175    OUTPUT_SYNC_SUPPORTED=false
20176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20177$as_echo "no" >&6; }
20178  fi
20179
20180
20181
20182
20183
20184
20185  # Test if find supports -delete
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20187$as_echo_n "checking if find supports -delete... " >&6; }
20188  FIND_DELETE="-delete"
20189
20190  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20191
20192  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20193
20194  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20195  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20196    # No, it does not.
20197    rm $DELETEDIR/TestIfFindSupportsDelete
20198    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20199      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20200      FIND_DELETE="-print | xargs rm"
20201    else
20202      FIND_DELETE="-exec rm \{\} \+"
20203    fi
20204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20205$as_echo "no" >&6; }
20206  else
20207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20208$as_echo "yes" >&6; }
20209  fi
20210  rmdir $DELETEDIR
20211
20212
20213
20214  # These tools might not be installed by default,
20215  # need hint on how to install them.
20216
20217
20218
20219  # Publish this variable in the help.
20220
20221
20222  if [ -z "${UNZIP+x}" ]; then
20223    # The variable is not set by user, try to locate tool using the code snippet
20224    for ac_prog in unzip
20225do
20226  # Extract the first word of "$ac_prog", so it can be a program name with args.
20227set dummy $ac_prog; ac_word=$2
20228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20229$as_echo_n "checking for $ac_word... " >&6; }
20230if ${ac_cv_path_UNZIP+:} false; then :
20231  $as_echo_n "(cached) " >&6
20232else
20233  case $UNZIP in
20234  [\\/]* | ?:[\\/]*)
20235  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20236  ;;
20237  *)
20238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20239for as_dir in $PATH
20240do
20241  IFS=$as_save_IFS
20242  test -z "$as_dir" && as_dir=.
20243    for ac_exec_ext in '' $ac_executable_extensions; do
20244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20245    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20247    break 2
20248  fi
20249done
20250  done
20251IFS=$as_save_IFS
20252
20253  ;;
20254esac
20255fi
20256UNZIP=$ac_cv_path_UNZIP
20257if test -n "$UNZIP"; then
20258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20259$as_echo "$UNZIP" >&6; }
20260else
20261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20262$as_echo "no" >&6; }
20263fi
20264
20265
20266  test -n "$UNZIP" && break
20267done
20268
20269  else
20270    # The variable is set, but is it from the command line or the environment?
20271
20272    # Try to remove the string !UNZIP! from our list.
20273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20275      # If it failed, the variable was not from the command line. Ignore it,
20276      # but warn the user (except for BASH, which is always set by the calling BASH).
20277      if test "xUNZIP" != xBASH; then
20278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20279$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20280      fi
20281      # Try to locate tool using the code snippet
20282      for ac_prog in unzip
20283do
20284  # Extract the first word of "$ac_prog", so it can be a program name with args.
20285set dummy $ac_prog; ac_word=$2
20286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20287$as_echo_n "checking for $ac_word... " >&6; }
20288if ${ac_cv_path_UNZIP+:} false; then :
20289  $as_echo_n "(cached) " >&6
20290else
20291  case $UNZIP in
20292  [\\/]* | ?:[\\/]*)
20293  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20294  ;;
20295  *)
20296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20297for as_dir in $PATH
20298do
20299  IFS=$as_save_IFS
20300  test -z "$as_dir" && as_dir=.
20301    for ac_exec_ext in '' $ac_executable_extensions; do
20302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20303    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20305    break 2
20306  fi
20307done
20308  done
20309IFS=$as_save_IFS
20310
20311  ;;
20312esac
20313fi
20314UNZIP=$ac_cv_path_UNZIP
20315if test -n "$UNZIP"; then
20316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20317$as_echo "$UNZIP" >&6; }
20318else
20319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20320$as_echo "no" >&6; }
20321fi
20322
20323
20324  test -n "$UNZIP" && break
20325done
20326
20327    else
20328      # If it succeeded, then it was overridden by the user. We will use it
20329      # for the tool.
20330
20331      # First remove it from the list of overridden variables, so we can test
20332      # for unknown variables in the end.
20333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20334
20335      # Check if we try to supply an empty value
20336      if test "x$UNZIP" = x; then
20337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20338$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20340$as_echo_n "checking for UNZIP... " >&6; }
20341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20342$as_echo "disabled" >&6; }
20343      else
20344        # Check if the provided tool contains a complete path.
20345        tool_specified="$UNZIP"
20346        tool_basename="${tool_specified##*/}"
20347        if test "x$tool_basename" = "x$tool_specified"; then
20348          # A command without a complete path is provided, search $PATH.
20349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20350$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20351          # Extract the first word of "$tool_basename", so it can be a program name with args.
20352set dummy $tool_basename; ac_word=$2
20353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20354$as_echo_n "checking for $ac_word... " >&6; }
20355if ${ac_cv_path_UNZIP+:} false; then :
20356  $as_echo_n "(cached) " >&6
20357else
20358  case $UNZIP in
20359  [\\/]* | ?:[\\/]*)
20360  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20361  ;;
20362  *)
20363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20364for as_dir in $PATH
20365do
20366  IFS=$as_save_IFS
20367  test -z "$as_dir" && as_dir=.
20368    for ac_exec_ext in '' $ac_executable_extensions; do
20369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20370    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20372    break 2
20373  fi
20374done
20375  done
20376IFS=$as_save_IFS
20377
20378  ;;
20379esac
20380fi
20381UNZIP=$ac_cv_path_UNZIP
20382if test -n "$UNZIP"; then
20383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20384$as_echo "$UNZIP" >&6; }
20385else
20386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20387$as_echo "no" >&6; }
20388fi
20389
20390
20391          if test "x$UNZIP" = x; then
20392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20393          fi
20394        else
20395          # Otherwise we believe it is a complete path. Use it as it is.
20396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20397$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20399$as_echo_n "checking for UNZIP... " >&6; }
20400          if test ! -x "$tool_specified"; then
20401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20402$as_echo "not found" >&6; }
20403            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20404          fi
20405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20406$as_echo "$tool_specified" >&6; }
20407        fi
20408      fi
20409    fi
20410
20411  fi
20412
20413
20414
20415  if test "x$UNZIP" = x; then
20416    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20417  fi
20418
20419
20420
20421
20422
20423  # Publish this variable in the help.
20424
20425
20426  if [ -z "${ZIP+x}" ]; then
20427    # The variable is not set by user, try to locate tool using the code snippet
20428    for ac_prog in zip
20429do
20430  # Extract the first word of "$ac_prog", so it can be a program name with args.
20431set dummy $ac_prog; ac_word=$2
20432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20433$as_echo_n "checking for $ac_word... " >&6; }
20434if ${ac_cv_path_ZIP+:} false; then :
20435  $as_echo_n "(cached) " >&6
20436else
20437  case $ZIP in
20438  [\\/]* | ?:[\\/]*)
20439  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20440  ;;
20441  *)
20442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20443for as_dir in $PATH
20444do
20445  IFS=$as_save_IFS
20446  test -z "$as_dir" && as_dir=.
20447    for ac_exec_ext in '' $ac_executable_extensions; do
20448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20449    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20451    break 2
20452  fi
20453done
20454  done
20455IFS=$as_save_IFS
20456
20457  ;;
20458esac
20459fi
20460ZIP=$ac_cv_path_ZIP
20461if test -n "$ZIP"; then
20462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20463$as_echo "$ZIP" >&6; }
20464else
20465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20466$as_echo "no" >&6; }
20467fi
20468
20469
20470  test -n "$ZIP" && break
20471done
20472
20473  else
20474    # The variable is set, but is it from the command line or the environment?
20475
20476    # Try to remove the string !ZIP! from our list.
20477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20479      # If it failed, the variable was not from the command line. Ignore it,
20480      # but warn the user (except for BASH, which is always set by the calling BASH).
20481      if test "xZIP" != xBASH; then
20482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20483$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20484      fi
20485      # Try to locate tool using the code snippet
20486      for ac_prog in zip
20487do
20488  # Extract the first word of "$ac_prog", so it can be a program name with args.
20489set dummy $ac_prog; ac_word=$2
20490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20491$as_echo_n "checking for $ac_word... " >&6; }
20492if ${ac_cv_path_ZIP+:} false; then :
20493  $as_echo_n "(cached) " >&6
20494else
20495  case $ZIP in
20496  [\\/]* | ?:[\\/]*)
20497  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20498  ;;
20499  *)
20500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20501for as_dir in $PATH
20502do
20503  IFS=$as_save_IFS
20504  test -z "$as_dir" && as_dir=.
20505    for ac_exec_ext in '' $ac_executable_extensions; do
20506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20507    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20509    break 2
20510  fi
20511done
20512  done
20513IFS=$as_save_IFS
20514
20515  ;;
20516esac
20517fi
20518ZIP=$ac_cv_path_ZIP
20519if test -n "$ZIP"; then
20520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20521$as_echo "$ZIP" >&6; }
20522else
20523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20524$as_echo "no" >&6; }
20525fi
20526
20527
20528  test -n "$ZIP" && break
20529done
20530
20531    else
20532      # If it succeeded, then it was overridden by the user. We will use it
20533      # for the tool.
20534
20535      # First remove it from the list of overridden variables, so we can test
20536      # for unknown variables in the end.
20537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20538
20539      # Check if we try to supply an empty value
20540      if test "x$ZIP" = x; then
20541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20542$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20544$as_echo_n "checking for ZIP... " >&6; }
20545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20546$as_echo "disabled" >&6; }
20547      else
20548        # Check if the provided tool contains a complete path.
20549        tool_specified="$ZIP"
20550        tool_basename="${tool_specified##*/}"
20551        if test "x$tool_basename" = "x$tool_specified"; then
20552          # A command without a complete path is provided, search $PATH.
20553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20554$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20555          # Extract the first word of "$tool_basename", so it can be a program name with args.
20556set dummy $tool_basename; ac_word=$2
20557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20558$as_echo_n "checking for $ac_word... " >&6; }
20559if ${ac_cv_path_ZIP+:} false; then :
20560  $as_echo_n "(cached) " >&6
20561else
20562  case $ZIP in
20563  [\\/]* | ?:[\\/]*)
20564  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20565  ;;
20566  *)
20567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20568for as_dir in $PATH
20569do
20570  IFS=$as_save_IFS
20571  test -z "$as_dir" && as_dir=.
20572    for ac_exec_ext in '' $ac_executable_extensions; do
20573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20574    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20576    break 2
20577  fi
20578done
20579  done
20580IFS=$as_save_IFS
20581
20582  ;;
20583esac
20584fi
20585ZIP=$ac_cv_path_ZIP
20586if test -n "$ZIP"; then
20587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20588$as_echo "$ZIP" >&6; }
20589else
20590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20591$as_echo "no" >&6; }
20592fi
20593
20594
20595          if test "x$ZIP" = x; then
20596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20597          fi
20598        else
20599          # Otherwise we believe it is a complete path. Use it as it is.
20600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20601$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20603$as_echo_n "checking for ZIP... " >&6; }
20604          if test ! -x "$tool_specified"; then
20605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20606$as_echo "not found" >&6; }
20607            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20608          fi
20609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20610$as_echo "$tool_specified" >&6; }
20611        fi
20612      fi
20613    fi
20614
20615  fi
20616
20617
20618
20619  if test "x$ZIP" = x; then
20620    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20621  fi
20622
20623
20624
20625  # Non-required basic tools
20626
20627
20628
20629  # Publish this variable in the help.
20630
20631
20632  if [ -z "${LDD+x}" ]; then
20633    # The variable is not set by user, try to locate tool using the code snippet
20634    for ac_prog in ldd
20635do
20636  # Extract the first word of "$ac_prog", so it can be a program name with args.
20637set dummy $ac_prog; ac_word=$2
20638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20639$as_echo_n "checking for $ac_word... " >&6; }
20640if ${ac_cv_path_LDD+:} false; then :
20641  $as_echo_n "(cached) " >&6
20642else
20643  case $LDD in
20644  [\\/]* | ?:[\\/]*)
20645  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20646  ;;
20647  *)
20648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20649for as_dir in $PATH
20650do
20651  IFS=$as_save_IFS
20652  test -z "$as_dir" && as_dir=.
20653    for ac_exec_ext in '' $ac_executable_extensions; do
20654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20655    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20657    break 2
20658  fi
20659done
20660  done
20661IFS=$as_save_IFS
20662
20663  ;;
20664esac
20665fi
20666LDD=$ac_cv_path_LDD
20667if test -n "$LDD"; then
20668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20669$as_echo "$LDD" >&6; }
20670else
20671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20672$as_echo "no" >&6; }
20673fi
20674
20675
20676  test -n "$LDD" && break
20677done
20678
20679  else
20680    # The variable is set, but is it from the command line or the environment?
20681
20682    # Try to remove the string !LDD! from our list.
20683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20685      # If it failed, the variable was not from the command line. Ignore it,
20686      # but warn the user (except for BASH, which is always set by the calling BASH).
20687      if test "xLDD" != xBASH; then
20688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20689$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20690      fi
20691      # Try to locate tool using the code snippet
20692      for ac_prog in ldd
20693do
20694  # Extract the first word of "$ac_prog", so it can be a program name with args.
20695set dummy $ac_prog; ac_word=$2
20696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20697$as_echo_n "checking for $ac_word... " >&6; }
20698if ${ac_cv_path_LDD+:} false; then :
20699  $as_echo_n "(cached) " >&6
20700else
20701  case $LDD in
20702  [\\/]* | ?:[\\/]*)
20703  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20704  ;;
20705  *)
20706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20707for as_dir in $PATH
20708do
20709  IFS=$as_save_IFS
20710  test -z "$as_dir" && as_dir=.
20711    for ac_exec_ext in '' $ac_executable_extensions; do
20712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20713    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20715    break 2
20716  fi
20717done
20718  done
20719IFS=$as_save_IFS
20720
20721  ;;
20722esac
20723fi
20724LDD=$ac_cv_path_LDD
20725if test -n "$LDD"; then
20726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20727$as_echo "$LDD" >&6; }
20728else
20729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20730$as_echo "no" >&6; }
20731fi
20732
20733
20734  test -n "$LDD" && break
20735done
20736
20737    else
20738      # If it succeeded, then it was overridden by the user. We will use it
20739      # for the tool.
20740
20741      # First remove it from the list of overridden variables, so we can test
20742      # for unknown variables in the end.
20743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20744
20745      # Check if we try to supply an empty value
20746      if test "x$LDD" = x; then
20747        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20748$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20750$as_echo_n "checking for LDD... " >&6; }
20751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20752$as_echo "disabled" >&6; }
20753      else
20754        # Check if the provided tool contains a complete path.
20755        tool_specified="$LDD"
20756        tool_basename="${tool_specified##*/}"
20757        if test "x$tool_basename" = "x$tool_specified"; then
20758          # A command without a complete path is provided, search $PATH.
20759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20760$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20761          # Extract the first word of "$tool_basename", so it can be a program name with args.
20762set dummy $tool_basename; ac_word=$2
20763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20764$as_echo_n "checking for $ac_word... " >&6; }
20765if ${ac_cv_path_LDD+:} false; then :
20766  $as_echo_n "(cached) " >&6
20767else
20768  case $LDD in
20769  [\\/]* | ?:[\\/]*)
20770  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20771  ;;
20772  *)
20773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20774for as_dir in $PATH
20775do
20776  IFS=$as_save_IFS
20777  test -z "$as_dir" && as_dir=.
20778    for ac_exec_ext in '' $ac_executable_extensions; do
20779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20780    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20782    break 2
20783  fi
20784done
20785  done
20786IFS=$as_save_IFS
20787
20788  ;;
20789esac
20790fi
20791LDD=$ac_cv_path_LDD
20792if test -n "$LDD"; then
20793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20794$as_echo "$LDD" >&6; }
20795else
20796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20797$as_echo "no" >&6; }
20798fi
20799
20800
20801          if test "x$LDD" = x; then
20802            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20803          fi
20804        else
20805          # Otherwise we believe it is a complete path. Use it as it is.
20806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20807$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20808          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20809$as_echo_n "checking for LDD... " >&6; }
20810          if test ! -x "$tool_specified"; then
20811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20812$as_echo "not found" >&6; }
20813            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20814          fi
20815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20816$as_echo "$tool_specified" >&6; }
20817        fi
20818      fi
20819    fi
20820
20821  fi
20822
20823
20824  if test "x$LDD" = "x"; then
20825    # List shared lib dependencies is used for
20826    # debug output and checking for forbidden dependencies.
20827    # We can build without it.
20828    LDD="true"
20829  fi
20830
20831
20832  # Publish this variable in the help.
20833
20834
20835  if [ -z "${OTOOL+x}" ]; then
20836    # The variable is not set by user, try to locate tool using the code snippet
20837    for ac_prog in otool
20838do
20839  # Extract the first word of "$ac_prog", so it can be a program name with args.
20840set dummy $ac_prog; ac_word=$2
20841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20842$as_echo_n "checking for $ac_word... " >&6; }
20843if ${ac_cv_path_OTOOL+:} false; then :
20844  $as_echo_n "(cached) " >&6
20845else
20846  case $OTOOL in
20847  [\\/]* | ?:[\\/]*)
20848  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20849  ;;
20850  *)
20851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20852for as_dir in $PATH
20853do
20854  IFS=$as_save_IFS
20855  test -z "$as_dir" && as_dir=.
20856    for ac_exec_ext in '' $ac_executable_extensions; do
20857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20858    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20860    break 2
20861  fi
20862done
20863  done
20864IFS=$as_save_IFS
20865
20866  ;;
20867esac
20868fi
20869OTOOL=$ac_cv_path_OTOOL
20870if test -n "$OTOOL"; then
20871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20872$as_echo "$OTOOL" >&6; }
20873else
20874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20875$as_echo "no" >&6; }
20876fi
20877
20878
20879  test -n "$OTOOL" && break
20880done
20881
20882  else
20883    # The variable is set, but is it from the command line or the environment?
20884
20885    # Try to remove the string !OTOOL! from our list.
20886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20888      # If it failed, the variable was not from the command line. Ignore it,
20889      # but warn the user (except for BASH, which is always set by the calling BASH).
20890      if test "xOTOOL" != xBASH; then
20891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20892$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20893      fi
20894      # Try to locate tool using the code snippet
20895      for ac_prog in otool
20896do
20897  # Extract the first word of "$ac_prog", so it can be a program name with args.
20898set dummy $ac_prog; ac_word=$2
20899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20900$as_echo_n "checking for $ac_word... " >&6; }
20901if ${ac_cv_path_OTOOL+:} false; then :
20902  $as_echo_n "(cached) " >&6
20903else
20904  case $OTOOL in
20905  [\\/]* | ?:[\\/]*)
20906  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20907  ;;
20908  *)
20909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20910for as_dir in $PATH
20911do
20912  IFS=$as_save_IFS
20913  test -z "$as_dir" && as_dir=.
20914    for ac_exec_ext in '' $ac_executable_extensions; do
20915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20916    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20918    break 2
20919  fi
20920done
20921  done
20922IFS=$as_save_IFS
20923
20924  ;;
20925esac
20926fi
20927OTOOL=$ac_cv_path_OTOOL
20928if test -n "$OTOOL"; then
20929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20930$as_echo "$OTOOL" >&6; }
20931else
20932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20933$as_echo "no" >&6; }
20934fi
20935
20936
20937  test -n "$OTOOL" && break
20938done
20939
20940    else
20941      # If it succeeded, then it was overridden by the user. We will use it
20942      # for the tool.
20943
20944      # First remove it from the list of overridden variables, so we can test
20945      # for unknown variables in the end.
20946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20947
20948      # Check if we try to supply an empty value
20949      if test "x$OTOOL" = x; then
20950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20951$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20953$as_echo_n "checking for OTOOL... " >&6; }
20954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20955$as_echo "disabled" >&6; }
20956      else
20957        # Check if the provided tool contains a complete path.
20958        tool_specified="$OTOOL"
20959        tool_basename="${tool_specified##*/}"
20960        if test "x$tool_basename" = "x$tool_specified"; then
20961          # A command without a complete path is provided, search $PATH.
20962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20963$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20964          # Extract the first word of "$tool_basename", so it can be a program name with args.
20965set dummy $tool_basename; ac_word=$2
20966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20967$as_echo_n "checking for $ac_word... " >&6; }
20968if ${ac_cv_path_OTOOL+:} false; then :
20969  $as_echo_n "(cached) " >&6
20970else
20971  case $OTOOL in
20972  [\\/]* | ?:[\\/]*)
20973  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20974  ;;
20975  *)
20976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20977for as_dir in $PATH
20978do
20979  IFS=$as_save_IFS
20980  test -z "$as_dir" && as_dir=.
20981    for ac_exec_ext in '' $ac_executable_extensions; do
20982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20983    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20985    break 2
20986  fi
20987done
20988  done
20989IFS=$as_save_IFS
20990
20991  ;;
20992esac
20993fi
20994OTOOL=$ac_cv_path_OTOOL
20995if test -n "$OTOOL"; then
20996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20997$as_echo "$OTOOL" >&6; }
20998else
20999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21000$as_echo "no" >&6; }
21001fi
21002
21003
21004          if test "x$OTOOL" = x; then
21005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21006          fi
21007        else
21008          # Otherwise we believe it is a complete path. Use it as it is.
21009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21010$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21012$as_echo_n "checking for OTOOL... " >&6; }
21013          if test ! -x "$tool_specified"; then
21014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21015$as_echo "not found" >&6; }
21016            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21017          fi
21018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21019$as_echo "$tool_specified" >&6; }
21020        fi
21021      fi
21022    fi
21023
21024  fi
21025
21026
21027  if test "x$OTOOL" = "x"; then
21028    OTOOL="true"
21029  fi
21030
21031
21032  # Publish this variable in the help.
21033
21034
21035  if [ -z "${READELF+x}" ]; then
21036    # The variable is not set by user, try to locate tool using the code snippet
21037    for ac_prog in greadelf readelf
21038do
21039  # Extract the first word of "$ac_prog", so it can be a program name with args.
21040set dummy $ac_prog; ac_word=$2
21041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21042$as_echo_n "checking for $ac_word... " >&6; }
21043if ${ac_cv_path_READELF+:} false; then :
21044  $as_echo_n "(cached) " >&6
21045else
21046  case $READELF in
21047  [\\/]* | ?:[\\/]*)
21048  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21049  ;;
21050  *)
21051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21052for as_dir in $PATH
21053do
21054  IFS=$as_save_IFS
21055  test -z "$as_dir" && as_dir=.
21056    for ac_exec_ext in '' $ac_executable_extensions; do
21057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21058    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21060    break 2
21061  fi
21062done
21063  done
21064IFS=$as_save_IFS
21065
21066  ;;
21067esac
21068fi
21069READELF=$ac_cv_path_READELF
21070if test -n "$READELF"; then
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21072$as_echo "$READELF" >&6; }
21073else
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21075$as_echo "no" >&6; }
21076fi
21077
21078
21079  test -n "$READELF" && break
21080done
21081
21082  else
21083    # The variable is set, but is it from the command line or the environment?
21084
21085    # Try to remove the string !READELF! from our list.
21086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21088      # If it failed, the variable was not from the command line. Ignore it,
21089      # but warn the user (except for BASH, which is always set by the calling BASH).
21090      if test "xREADELF" != xBASH; then
21091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21092$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21093      fi
21094      # Try to locate tool using the code snippet
21095      for ac_prog in greadelf readelf
21096do
21097  # Extract the first word of "$ac_prog", so it can be a program name with args.
21098set dummy $ac_prog; ac_word=$2
21099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21100$as_echo_n "checking for $ac_word... " >&6; }
21101if ${ac_cv_path_READELF+:} false; then :
21102  $as_echo_n "(cached) " >&6
21103else
21104  case $READELF in
21105  [\\/]* | ?:[\\/]*)
21106  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21107  ;;
21108  *)
21109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21110for as_dir in $PATH
21111do
21112  IFS=$as_save_IFS
21113  test -z "$as_dir" && as_dir=.
21114    for ac_exec_ext in '' $ac_executable_extensions; do
21115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21116    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21118    break 2
21119  fi
21120done
21121  done
21122IFS=$as_save_IFS
21123
21124  ;;
21125esac
21126fi
21127READELF=$ac_cv_path_READELF
21128if test -n "$READELF"; then
21129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21130$as_echo "$READELF" >&6; }
21131else
21132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21133$as_echo "no" >&6; }
21134fi
21135
21136
21137  test -n "$READELF" && break
21138done
21139
21140    else
21141      # If it succeeded, then it was overridden by the user. We will use it
21142      # for the tool.
21143
21144      # First remove it from the list of overridden variables, so we can test
21145      # for unknown variables in the end.
21146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21147
21148      # Check if we try to supply an empty value
21149      if test "x$READELF" = x; then
21150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21151$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21153$as_echo_n "checking for READELF... " >&6; }
21154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21155$as_echo "disabled" >&6; }
21156      else
21157        # Check if the provided tool contains a complete path.
21158        tool_specified="$READELF"
21159        tool_basename="${tool_specified##*/}"
21160        if test "x$tool_basename" = "x$tool_specified"; then
21161          # A command without a complete path is provided, search $PATH.
21162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21163$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21164          # Extract the first word of "$tool_basename", so it can be a program name with args.
21165set dummy $tool_basename; ac_word=$2
21166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21167$as_echo_n "checking for $ac_word... " >&6; }
21168if ${ac_cv_path_READELF+:} false; then :
21169  $as_echo_n "(cached) " >&6
21170else
21171  case $READELF in
21172  [\\/]* | ?:[\\/]*)
21173  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21174  ;;
21175  *)
21176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21177for as_dir in $PATH
21178do
21179  IFS=$as_save_IFS
21180  test -z "$as_dir" && as_dir=.
21181    for ac_exec_ext in '' $ac_executable_extensions; do
21182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21183    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21185    break 2
21186  fi
21187done
21188  done
21189IFS=$as_save_IFS
21190
21191  ;;
21192esac
21193fi
21194READELF=$ac_cv_path_READELF
21195if test -n "$READELF"; then
21196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21197$as_echo "$READELF" >&6; }
21198else
21199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21200$as_echo "no" >&6; }
21201fi
21202
21203
21204          if test "x$READELF" = x; then
21205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21206          fi
21207        else
21208          # Otherwise we believe it is a complete path. Use it as it is.
21209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21210$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21212$as_echo_n "checking for READELF... " >&6; }
21213          if test ! -x "$tool_specified"; then
21214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21215$as_echo "not found" >&6; }
21216            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21217          fi
21218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21219$as_echo "$tool_specified" >&6; }
21220        fi
21221      fi
21222    fi
21223
21224  fi
21225
21226
21227
21228
21229  # Publish this variable in the help.
21230
21231
21232  if [ -z "${HG+x}" ]; then
21233    # The variable is not set by user, try to locate tool using the code snippet
21234    for ac_prog in hg
21235do
21236  # Extract the first word of "$ac_prog", so it can be a program name with args.
21237set dummy $ac_prog; ac_word=$2
21238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21239$as_echo_n "checking for $ac_word... " >&6; }
21240if ${ac_cv_path_HG+:} false; then :
21241  $as_echo_n "(cached) " >&6
21242else
21243  case $HG in
21244  [\\/]* | ?:[\\/]*)
21245  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21246  ;;
21247  *)
21248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21249for as_dir in $PATH
21250do
21251  IFS=$as_save_IFS
21252  test -z "$as_dir" && as_dir=.
21253    for ac_exec_ext in '' $ac_executable_extensions; do
21254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21255    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21257    break 2
21258  fi
21259done
21260  done
21261IFS=$as_save_IFS
21262
21263  ;;
21264esac
21265fi
21266HG=$ac_cv_path_HG
21267if test -n "$HG"; then
21268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21269$as_echo "$HG" >&6; }
21270else
21271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21272$as_echo "no" >&6; }
21273fi
21274
21275
21276  test -n "$HG" && break
21277done
21278
21279  else
21280    # The variable is set, but is it from the command line or the environment?
21281
21282    # Try to remove the string !HG! from our list.
21283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21285      # If it failed, the variable was not from the command line. Ignore it,
21286      # but warn the user (except for BASH, which is always set by the calling BASH).
21287      if test "xHG" != xBASH; then
21288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21289$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21290      fi
21291      # Try to locate tool using the code snippet
21292      for ac_prog in hg
21293do
21294  # Extract the first word of "$ac_prog", so it can be a program name with args.
21295set dummy $ac_prog; ac_word=$2
21296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21297$as_echo_n "checking for $ac_word... " >&6; }
21298if ${ac_cv_path_HG+:} false; then :
21299  $as_echo_n "(cached) " >&6
21300else
21301  case $HG in
21302  [\\/]* | ?:[\\/]*)
21303  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21304  ;;
21305  *)
21306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21307for as_dir in $PATH
21308do
21309  IFS=$as_save_IFS
21310  test -z "$as_dir" && as_dir=.
21311    for ac_exec_ext in '' $ac_executable_extensions; do
21312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21313    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21315    break 2
21316  fi
21317done
21318  done
21319IFS=$as_save_IFS
21320
21321  ;;
21322esac
21323fi
21324HG=$ac_cv_path_HG
21325if test -n "$HG"; then
21326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21327$as_echo "$HG" >&6; }
21328else
21329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21330$as_echo "no" >&6; }
21331fi
21332
21333
21334  test -n "$HG" && break
21335done
21336
21337    else
21338      # If it succeeded, then it was overridden by the user. We will use it
21339      # for the tool.
21340
21341      # First remove it from the list of overridden variables, so we can test
21342      # for unknown variables in the end.
21343      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21344
21345      # Check if we try to supply an empty value
21346      if test "x$HG" = x; then
21347        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21348$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21350$as_echo_n "checking for HG... " >&6; }
21351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21352$as_echo "disabled" >&6; }
21353      else
21354        # Check if the provided tool contains a complete path.
21355        tool_specified="$HG"
21356        tool_basename="${tool_specified##*/}"
21357        if test "x$tool_basename" = "x$tool_specified"; then
21358          # A command without a complete path is provided, search $PATH.
21359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21360$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21361          # Extract the first word of "$tool_basename", so it can be a program name with args.
21362set dummy $tool_basename; ac_word=$2
21363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21364$as_echo_n "checking for $ac_word... " >&6; }
21365if ${ac_cv_path_HG+:} false; then :
21366  $as_echo_n "(cached) " >&6
21367else
21368  case $HG in
21369  [\\/]* | ?:[\\/]*)
21370  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21371  ;;
21372  *)
21373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21374for as_dir in $PATH
21375do
21376  IFS=$as_save_IFS
21377  test -z "$as_dir" && as_dir=.
21378    for ac_exec_ext in '' $ac_executable_extensions; do
21379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21380    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21382    break 2
21383  fi
21384done
21385  done
21386IFS=$as_save_IFS
21387
21388  ;;
21389esac
21390fi
21391HG=$ac_cv_path_HG
21392if test -n "$HG"; then
21393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21394$as_echo "$HG" >&6; }
21395else
21396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21397$as_echo "no" >&6; }
21398fi
21399
21400
21401          if test "x$HG" = x; then
21402            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21403          fi
21404        else
21405          # Otherwise we believe it is a complete path. Use it as it is.
21406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21407$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21408          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21409$as_echo_n "checking for HG... " >&6; }
21410          if test ! -x "$tool_specified"; then
21411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21412$as_echo "not found" >&6; }
21413            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21414          fi
21415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21416$as_echo "$tool_specified" >&6; }
21417        fi
21418      fi
21419    fi
21420
21421  fi
21422
21423
21424
21425
21426  # Publish this variable in the help.
21427
21428
21429  if [ -z "${STAT+x}" ]; then
21430    # The variable is not set by user, try to locate tool using the code snippet
21431    for ac_prog in stat
21432do
21433  # Extract the first word of "$ac_prog", so it can be a program name with args.
21434set dummy $ac_prog; ac_word=$2
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21436$as_echo_n "checking for $ac_word... " >&6; }
21437if ${ac_cv_path_STAT+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440  case $STAT in
21441  [\\/]* | ?:[\\/]*)
21442  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21443  ;;
21444  *)
21445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21446for as_dir in $PATH
21447do
21448  IFS=$as_save_IFS
21449  test -z "$as_dir" && as_dir=.
21450    for ac_exec_ext in '' $ac_executable_extensions; do
21451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21452    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21454    break 2
21455  fi
21456done
21457  done
21458IFS=$as_save_IFS
21459
21460  ;;
21461esac
21462fi
21463STAT=$ac_cv_path_STAT
21464if test -n "$STAT"; then
21465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21466$as_echo "$STAT" >&6; }
21467else
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21469$as_echo "no" >&6; }
21470fi
21471
21472
21473  test -n "$STAT" && break
21474done
21475
21476  else
21477    # The variable is set, but is it from the command line or the environment?
21478
21479    # Try to remove the string !STAT! from our list.
21480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21482      # If it failed, the variable was not from the command line. Ignore it,
21483      # but warn the user (except for BASH, which is always set by the calling BASH).
21484      if test "xSTAT" != xBASH; then
21485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21486$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21487      fi
21488      # Try to locate tool using the code snippet
21489      for ac_prog in stat
21490do
21491  # Extract the first word of "$ac_prog", so it can be a program name with args.
21492set dummy $ac_prog; ac_word=$2
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21494$as_echo_n "checking for $ac_word... " >&6; }
21495if ${ac_cv_path_STAT+:} false; then :
21496  $as_echo_n "(cached) " >&6
21497else
21498  case $STAT in
21499  [\\/]* | ?:[\\/]*)
21500  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21501  ;;
21502  *)
21503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21504for as_dir in $PATH
21505do
21506  IFS=$as_save_IFS
21507  test -z "$as_dir" && as_dir=.
21508    for ac_exec_ext in '' $ac_executable_extensions; do
21509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21510    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21512    break 2
21513  fi
21514done
21515  done
21516IFS=$as_save_IFS
21517
21518  ;;
21519esac
21520fi
21521STAT=$ac_cv_path_STAT
21522if test -n "$STAT"; then
21523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21524$as_echo "$STAT" >&6; }
21525else
21526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21527$as_echo "no" >&6; }
21528fi
21529
21530
21531  test -n "$STAT" && break
21532done
21533
21534    else
21535      # If it succeeded, then it was overridden by the user. We will use it
21536      # for the tool.
21537
21538      # First remove it from the list of overridden variables, so we can test
21539      # for unknown variables in the end.
21540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21541
21542      # Check if we try to supply an empty value
21543      if test "x$STAT" = x; then
21544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21545$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21547$as_echo_n "checking for STAT... " >&6; }
21548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21549$as_echo "disabled" >&6; }
21550      else
21551        # Check if the provided tool contains a complete path.
21552        tool_specified="$STAT"
21553        tool_basename="${tool_specified##*/}"
21554        if test "x$tool_basename" = "x$tool_specified"; then
21555          # A command without a complete path is provided, search $PATH.
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21557$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21558          # Extract the first word of "$tool_basename", so it can be a program name with args.
21559set dummy $tool_basename; ac_word=$2
21560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21561$as_echo_n "checking for $ac_word... " >&6; }
21562if ${ac_cv_path_STAT+:} false; then :
21563  $as_echo_n "(cached) " >&6
21564else
21565  case $STAT in
21566  [\\/]* | ?:[\\/]*)
21567  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21568  ;;
21569  *)
21570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21571for as_dir in $PATH
21572do
21573  IFS=$as_save_IFS
21574  test -z "$as_dir" && as_dir=.
21575    for ac_exec_ext in '' $ac_executable_extensions; do
21576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21577    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21579    break 2
21580  fi
21581done
21582  done
21583IFS=$as_save_IFS
21584
21585  ;;
21586esac
21587fi
21588STAT=$ac_cv_path_STAT
21589if test -n "$STAT"; then
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21591$as_echo "$STAT" >&6; }
21592else
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21594$as_echo "no" >&6; }
21595fi
21596
21597
21598          if test "x$STAT" = x; then
21599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21600          fi
21601        else
21602          # Otherwise we believe it is a complete path. Use it as it is.
21603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21604$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21606$as_echo_n "checking for STAT... " >&6; }
21607          if test ! -x "$tool_specified"; then
21608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21609$as_echo "not found" >&6; }
21610            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21611          fi
21612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21613$as_echo "$tool_specified" >&6; }
21614        fi
21615      fi
21616    fi
21617
21618  fi
21619
21620
21621
21622
21623  # Publish this variable in the help.
21624
21625
21626  if [ -z "${TIME+x}" ]; then
21627    # The variable is not set by user, try to locate tool using the code snippet
21628    for ac_prog in time
21629do
21630  # Extract the first word of "$ac_prog", so it can be a program name with args.
21631set dummy $ac_prog; ac_word=$2
21632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21633$as_echo_n "checking for $ac_word... " >&6; }
21634if ${ac_cv_path_TIME+:} false; then :
21635  $as_echo_n "(cached) " >&6
21636else
21637  case $TIME in
21638  [\\/]* | ?:[\\/]*)
21639  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21640  ;;
21641  *)
21642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21643for as_dir in $PATH
21644do
21645  IFS=$as_save_IFS
21646  test -z "$as_dir" && as_dir=.
21647    for ac_exec_ext in '' $ac_executable_extensions; do
21648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21649    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21651    break 2
21652  fi
21653done
21654  done
21655IFS=$as_save_IFS
21656
21657  ;;
21658esac
21659fi
21660TIME=$ac_cv_path_TIME
21661if test -n "$TIME"; then
21662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21663$as_echo "$TIME" >&6; }
21664else
21665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21666$as_echo "no" >&6; }
21667fi
21668
21669
21670  test -n "$TIME" && break
21671done
21672
21673  else
21674    # The variable is set, but is it from the command line or the environment?
21675
21676    # Try to remove the string !TIME! from our list.
21677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21679      # If it failed, the variable was not from the command line. Ignore it,
21680      # but warn the user (except for BASH, which is always set by the calling BASH).
21681      if test "xTIME" != xBASH; then
21682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21683$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21684      fi
21685      # Try to locate tool using the code snippet
21686      for ac_prog in time
21687do
21688  # Extract the first word of "$ac_prog", so it can be a program name with args.
21689set dummy $ac_prog; ac_word=$2
21690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21691$as_echo_n "checking for $ac_word... " >&6; }
21692if ${ac_cv_path_TIME+:} false; then :
21693  $as_echo_n "(cached) " >&6
21694else
21695  case $TIME in
21696  [\\/]* | ?:[\\/]*)
21697  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21698  ;;
21699  *)
21700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21701for as_dir in $PATH
21702do
21703  IFS=$as_save_IFS
21704  test -z "$as_dir" && as_dir=.
21705    for ac_exec_ext in '' $ac_executable_extensions; do
21706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21707    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21709    break 2
21710  fi
21711done
21712  done
21713IFS=$as_save_IFS
21714
21715  ;;
21716esac
21717fi
21718TIME=$ac_cv_path_TIME
21719if test -n "$TIME"; then
21720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21721$as_echo "$TIME" >&6; }
21722else
21723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21724$as_echo "no" >&6; }
21725fi
21726
21727
21728  test -n "$TIME" && break
21729done
21730
21731    else
21732      # If it succeeded, then it was overridden by the user. We will use it
21733      # for the tool.
21734
21735      # First remove it from the list of overridden variables, so we can test
21736      # for unknown variables in the end.
21737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21738
21739      # Check if we try to supply an empty value
21740      if test "x$TIME" = x; then
21741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21742$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21744$as_echo_n "checking for TIME... " >&6; }
21745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21746$as_echo "disabled" >&6; }
21747      else
21748        # Check if the provided tool contains a complete path.
21749        tool_specified="$TIME"
21750        tool_basename="${tool_specified##*/}"
21751        if test "x$tool_basename" = "x$tool_specified"; then
21752          # A command without a complete path is provided, search $PATH.
21753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21754$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21755          # Extract the first word of "$tool_basename", so it can be a program name with args.
21756set dummy $tool_basename; ac_word=$2
21757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21758$as_echo_n "checking for $ac_word... " >&6; }
21759if ${ac_cv_path_TIME+:} false; then :
21760  $as_echo_n "(cached) " >&6
21761else
21762  case $TIME in
21763  [\\/]* | ?:[\\/]*)
21764  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21765  ;;
21766  *)
21767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21768for as_dir in $PATH
21769do
21770  IFS=$as_save_IFS
21771  test -z "$as_dir" && as_dir=.
21772    for ac_exec_ext in '' $ac_executable_extensions; do
21773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21774    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21776    break 2
21777  fi
21778done
21779  done
21780IFS=$as_save_IFS
21781
21782  ;;
21783esac
21784fi
21785TIME=$ac_cv_path_TIME
21786if test -n "$TIME"; then
21787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21788$as_echo "$TIME" >&6; }
21789else
21790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21791$as_echo "no" >&6; }
21792fi
21793
21794
21795          if test "x$TIME" = x; then
21796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21797          fi
21798        else
21799          # Otherwise we believe it is a complete path. Use it as it is.
21800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21801$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21803$as_echo_n "checking for TIME... " >&6; }
21804          if test ! -x "$tool_specified"; then
21805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21806$as_echo "not found" >&6; }
21807            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21808          fi
21809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21810$as_echo "$tool_specified" >&6; }
21811        fi
21812      fi
21813    fi
21814
21815  fi
21816
21817
21818
21819
21820  # Publish this variable in the help.
21821
21822
21823  if [ -z "${PATCH+x}" ]; then
21824    # The variable is not set by user, try to locate tool using the code snippet
21825    for ac_prog in gpatch patch
21826do
21827  # Extract the first word of "$ac_prog", so it can be a program name with args.
21828set dummy $ac_prog; ac_word=$2
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21830$as_echo_n "checking for $ac_word... " >&6; }
21831if ${ac_cv_path_PATCH+:} false; then :
21832  $as_echo_n "(cached) " >&6
21833else
21834  case $PATCH in
21835  [\\/]* | ?:[\\/]*)
21836  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21837  ;;
21838  *)
21839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21840for as_dir in $PATH
21841do
21842  IFS=$as_save_IFS
21843  test -z "$as_dir" && as_dir=.
21844    for ac_exec_ext in '' $ac_executable_extensions; do
21845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21846    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21848    break 2
21849  fi
21850done
21851  done
21852IFS=$as_save_IFS
21853
21854  ;;
21855esac
21856fi
21857PATCH=$ac_cv_path_PATCH
21858if test -n "$PATCH"; then
21859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21860$as_echo "$PATCH" >&6; }
21861else
21862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21863$as_echo "no" >&6; }
21864fi
21865
21866
21867  test -n "$PATCH" && break
21868done
21869
21870  else
21871    # The variable is set, but is it from the command line or the environment?
21872
21873    # Try to remove the string !PATCH! from our list.
21874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21876      # If it failed, the variable was not from the command line. Ignore it,
21877      # but warn the user (except for BASH, which is always set by the calling BASH).
21878      if test "xPATCH" != xBASH; then
21879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21880$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21881      fi
21882      # Try to locate tool using the code snippet
21883      for ac_prog in gpatch patch
21884do
21885  # Extract the first word of "$ac_prog", so it can be a program name with args.
21886set dummy $ac_prog; ac_word=$2
21887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21888$as_echo_n "checking for $ac_word... " >&6; }
21889if ${ac_cv_path_PATCH+:} false; then :
21890  $as_echo_n "(cached) " >&6
21891else
21892  case $PATCH in
21893  [\\/]* | ?:[\\/]*)
21894  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21895  ;;
21896  *)
21897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21898for as_dir in $PATH
21899do
21900  IFS=$as_save_IFS
21901  test -z "$as_dir" && as_dir=.
21902    for ac_exec_ext in '' $ac_executable_extensions; do
21903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21904    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21906    break 2
21907  fi
21908done
21909  done
21910IFS=$as_save_IFS
21911
21912  ;;
21913esac
21914fi
21915PATCH=$ac_cv_path_PATCH
21916if test -n "$PATCH"; then
21917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21918$as_echo "$PATCH" >&6; }
21919else
21920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21921$as_echo "no" >&6; }
21922fi
21923
21924
21925  test -n "$PATCH" && break
21926done
21927
21928    else
21929      # If it succeeded, then it was overridden by the user. We will use it
21930      # for the tool.
21931
21932      # First remove it from the list of overridden variables, so we can test
21933      # for unknown variables in the end.
21934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21935
21936      # Check if we try to supply an empty value
21937      if test "x$PATCH" = x; then
21938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21939$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21941$as_echo_n "checking for PATCH... " >&6; }
21942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21943$as_echo "disabled" >&6; }
21944      else
21945        # Check if the provided tool contains a complete path.
21946        tool_specified="$PATCH"
21947        tool_basename="${tool_specified##*/}"
21948        if test "x$tool_basename" = "x$tool_specified"; then
21949          # A command without a complete path is provided, search $PATH.
21950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21951$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21952          # Extract the first word of "$tool_basename", so it can be a program name with args.
21953set dummy $tool_basename; ac_word=$2
21954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21955$as_echo_n "checking for $ac_word... " >&6; }
21956if ${ac_cv_path_PATCH+:} false; then :
21957  $as_echo_n "(cached) " >&6
21958else
21959  case $PATCH in
21960  [\\/]* | ?:[\\/]*)
21961  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21962  ;;
21963  *)
21964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21965for as_dir in $PATH
21966do
21967  IFS=$as_save_IFS
21968  test -z "$as_dir" && as_dir=.
21969    for ac_exec_ext in '' $ac_executable_extensions; do
21970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21971    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21973    break 2
21974  fi
21975done
21976  done
21977IFS=$as_save_IFS
21978
21979  ;;
21980esac
21981fi
21982PATCH=$ac_cv_path_PATCH
21983if test -n "$PATCH"; then
21984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21985$as_echo "$PATCH" >&6; }
21986else
21987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21988$as_echo "no" >&6; }
21989fi
21990
21991
21992          if test "x$PATCH" = x; then
21993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21994          fi
21995        else
21996          # Otherwise we believe it is a complete path. Use it as it is.
21997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21998$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22000$as_echo_n "checking for PATCH... " >&6; }
22001          if test ! -x "$tool_specified"; then
22002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22003$as_echo "not found" >&6; }
22004            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22005          fi
22006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22007$as_echo "$tool_specified" >&6; }
22008        fi
22009      fi
22010    fi
22011
22012  fi
22013
22014
22015  # Check if it's GNU time
22016  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22017  if test "x$IS_GNU_TIME" != x; then
22018    IS_GNU_TIME=yes
22019  else
22020    IS_GNU_TIME=no
22021  fi
22022
22023
22024  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22025
22026
22027
22028  # Publish this variable in the help.
22029
22030
22031  if [ -z "${DSYMUTIL+x}" ]; then
22032    # The variable is not set by user, try to locate tool using the code snippet
22033    for ac_prog in dsymutil
22034do
22035  # Extract the first word of "$ac_prog", so it can be a program name with args.
22036set dummy $ac_prog; ac_word=$2
22037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22038$as_echo_n "checking for $ac_word... " >&6; }
22039if ${ac_cv_path_DSYMUTIL+:} false; then :
22040  $as_echo_n "(cached) " >&6
22041else
22042  case $DSYMUTIL in
22043  [\\/]* | ?:[\\/]*)
22044  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22045  ;;
22046  *)
22047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22048for as_dir in $PATH
22049do
22050  IFS=$as_save_IFS
22051  test -z "$as_dir" && as_dir=.
22052    for ac_exec_ext in '' $ac_executable_extensions; do
22053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22054    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22056    break 2
22057  fi
22058done
22059  done
22060IFS=$as_save_IFS
22061
22062  ;;
22063esac
22064fi
22065DSYMUTIL=$ac_cv_path_DSYMUTIL
22066if test -n "$DSYMUTIL"; then
22067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22068$as_echo "$DSYMUTIL" >&6; }
22069else
22070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22071$as_echo "no" >&6; }
22072fi
22073
22074
22075  test -n "$DSYMUTIL" && break
22076done
22077
22078  else
22079    # The variable is set, but is it from the command line or the environment?
22080
22081    # Try to remove the string !DSYMUTIL! from our list.
22082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22084      # If it failed, the variable was not from the command line. Ignore it,
22085      # but warn the user (except for BASH, which is always set by the calling BASH).
22086      if test "xDSYMUTIL" != xBASH; then
22087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22088$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22089      fi
22090      # Try to locate tool using the code snippet
22091      for ac_prog in dsymutil
22092do
22093  # Extract the first word of "$ac_prog", so it can be a program name with args.
22094set dummy $ac_prog; ac_word=$2
22095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22096$as_echo_n "checking for $ac_word... " >&6; }
22097if ${ac_cv_path_DSYMUTIL+:} false; then :
22098  $as_echo_n "(cached) " >&6
22099else
22100  case $DSYMUTIL in
22101  [\\/]* | ?:[\\/]*)
22102  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22103  ;;
22104  *)
22105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22106for as_dir in $PATH
22107do
22108  IFS=$as_save_IFS
22109  test -z "$as_dir" && as_dir=.
22110    for ac_exec_ext in '' $ac_executable_extensions; do
22111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22112    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22114    break 2
22115  fi
22116done
22117  done
22118IFS=$as_save_IFS
22119
22120  ;;
22121esac
22122fi
22123DSYMUTIL=$ac_cv_path_DSYMUTIL
22124if test -n "$DSYMUTIL"; then
22125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22126$as_echo "$DSYMUTIL" >&6; }
22127else
22128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22129$as_echo "no" >&6; }
22130fi
22131
22132
22133  test -n "$DSYMUTIL" && break
22134done
22135
22136    else
22137      # If it succeeded, then it was overridden by the user. We will use it
22138      # for the tool.
22139
22140      # First remove it from the list of overridden variables, so we can test
22141      # for unknown variables in the end.
22142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22143
22144      # Check if we try to supply an empty value
22145      if test "x$DSYMUTIL" = x; then
22146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22147$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22149$as_echo_n "checking for DSYMUTIL... " >&6; }
22150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22151$as_echo "disabled" >&6; }
22152      else
22153        # Check if the provided tool contains a complete path.
22154        tool_specified="$DSYMUTIL"
22155        tool_basename="${tool_specified##*/}"
22156        if test "x$tool_basename" = "x$tool_specified"; then
22157          # A command without a complete path is provided, search $PATH.
22158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22159$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22160          # Extract the first word of "$tool_basename", so it can be a program name with args.
22161set dummy $tool_basename; ac_word=$2
22162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22163$as_echo_n "checking for $ac_word... " >&6; }
22164if ${ac_cv_path_DSYMUTIL+:} false; then :
22165  $as_echo_n "(cached) " >&6
22166else
22167  case $DSYMUTIL in
22168  [\\/]* | ?:[\\/]*)
22169  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22170  ;;
22171  *)
22172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22173for as_dir in $PATH
22174do
22175  IFS=$as_save_IFS
22176  test -z "$as_dir" && as_dir=.
22177    for ac_exec_ext in '' $ac_executable_extensions; do
22178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22179    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22181    break 2
22182  fi
22183done
22184  done
22185IFS=$as_save_IFS
22186
22187  ;;
22188esac
22189fi
22190DSYMUTIL=$ac_cv_path_DSYMUTIL
22191if test -n "$DSYMUTIL"; then
22192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22193$as_echo "$DSYMUTIL" >&6; }
22194else
22195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22196$as_echo "no" >&6; }
22197fi
22198
22199
22200          if test "x$DSYMUTIL" = x; then
22201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22202          fi
22203        else
22204          # Otherwise we believe it is a complete path. Use it as it is.
22205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22206$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22208$as_echo_n "checking for DSYMUTIL... " >&6; }
22209          if test ! -x "$tool_specified"; then
22210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22211$as_echo "not found" >&6; }
22212            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22213          fi
22214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22215$as_echo "$tool_specified" >&6; }
22216        fi
22217      fi
22218    fi
22219
22220  fi
22221
22222
22223
22224  if test "x$DSYMUTIL" = x; then
22225    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22226  fi
22227
22228
22229
22230
22231
22232  # Publish this variable in the help.
22233
22234
22235  if [ -z "${XATTR+x}" ]; then
22236    # The variable is not set by user, try to locate tool using the code snippet
22237    for ac_prog in xattr
22238do
22239  # Extract the first word of "$ac_prog", so it can be a program name with args.
22240set dummy $ac_prog; ac_word=$2
22241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22242$as_echo_n "checking for $ac_word... " >&6; }
22243if ${ac_cv_path_XATTR+:} false; then :
22244  $as_echo_n "(cached) " >&6
22245else
22246  case $XATTR in
22247  [\\/]* | ?:[\\/]*)
22248  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22249  ;;
22250  *)
22251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22252for as_dir in $PATH
22253do
22254  IFS=$as_save_IFS
22255  test -z "$as_dir" && as_dir=.
22256    for ac_exec_ext in '' $ac_executable_extensions; do
22257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22258    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22260    break 2
22261  fi
22262done
22263  done
22264IFS=$as_save_IFS
22265
22266  ;;
22267esac
22268fi
22269XATTR=$ac_cv_path_XATTR
22270if test -n "$XATTR"; then
22271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22272$as_echo "$XATTR" >&6; }
22273else
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22275$as_echo "no" >&6; }
22276fi
22277
22278
22279  test -n "$XATTR" && break
22280done
22281
22282  else
22283    # The variable is set, but is it from the command line or the environment?
22284
22285    # Try to remove the string !XATTR! from our list.
22286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22288      # If it failed, the variable was not from the command line. Ignore it,
22289      # but warn the user (except for BASH, which is always set by the calling BASH).
22290      if test "xXATTR" != xBASH; then
22291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22292$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22293      fi
22294      # Try to locate tool using the code snippet
22295      for ac_prog in xattr
22296do
22297  # Extract the first word of "$ac_prog", so it can be a program name with args.
22298set dummy $ac_prog; ac_word=$2
22299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22300$as_echo_n "checking for $ac_word... " >&6; }
22301if ${ac_cv_path_XATTR+:} false; then :
22302  $as_echo_n "(cached) " >&6
22303else
22304  case $XATTR in
22305  [\\/]* | ?:[\\/]*)
22306  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22307  ;;
22308  *)
22309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22310for as_dir in $PATH
22311do
22312  IFS=$as_save_IFS
22313  test -z "$as_dir" && as_dir=.
22314    for ac_exec_ext in '' $ac_executable_extensions; do
22315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22316    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22318    break 2
22319  fi
22320done
22321  done
22322IFS=$as_save_IFS
22323
22324  ;;
22325esac
22326fi
22327XATTR=$ac_cv_path_XATTR
22328if test -n "$XATTR"; then
22329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22330$as_echo "$XATTR" >&6; }
22331else
22332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22333$as_echo "no" >&6; }
22334fi
22335
22336
22337  test -n "$XATTR" && break
22338done
22339
22340    else
22341      # If it succeeded, then it was overridden by the user. We will use it
22342      # for the tool.
22343
22344      # First remove it from the list of overridden variables, so we can test
22345      # for unknown variables in the end.
22346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22347
22348      # Check if we try to supply an empty value
22349      if test "x$XATTR" = x; then
22350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22351$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22353$as_echo_n "checking for XATTR... " >&6; }
22354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22355$as_echo "disabled" >&6; }
22356      else
22357        # Check if the provided tool contains a complete path.
22358        tool_specified="$XATTR"
22359        tool_basename="${tool_specified##*/}"
22360        if test "x$tool_basename" = "x$tool_specified"; then
22361          # A command without a complete path is provided, search $PATH.
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22363$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22364          # Extract the first word of "$tool_basename", so it can be a program name with args.
22365set dummy $tool_basename; ac_word=$2
22366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22367$as_echo_n "checking for $ac_word... " >&6; }
22368if ${ac_cv_path_XATTR+:} false; then :
22369  $as_echo_n "(cached) " >&6
22370else
22371  case $XATTR in
22372  [\\/]* | ?:[\\/]*)
22373  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22374  ;;
22375  *)
22376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22377for as_dir in $PATH
22378do
22379  IFS=$as_save_IFS
22380  test -z "$as_dir" && as_dir=.
22381    for ac_exec_ext in '' $ac_executable_extensions; do
22382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22383    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22385    break 2
22386  fi
22387done
22388  done
22389IFS=$as_save_IFS
22390
22391  ;;
22392esac
22393fi
22394XATTR=$ac_cv_path_XATTR
22395if test -n "$XATTR"; then
22396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22397$as_echo "$XATTR" >&6; }
22398else
22399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22400$as_echo "no" >&6; }
22401fi
22402
22403
22404          if test "x$XATTR" = x; then
22405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22406          fi
22407        else
22408          # Otherwise we believe it is a complete path. Use it as it is.
22409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22410$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22412$as_echo_n "checking for XATTR... " >&6; }
22413          if test ! -x "$tool_specified"; then
22414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22415$as_echo "not found" >&6; }
22416            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22417          fi
22418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22419$as_echo "$tool_specified" >&6; }
22420        fi
22421      fi
22422    fi
22423
22424  fi
22425
22426
22427
22428  if test "x$XATTR" = x; then
22429    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22430  fi
22431
22432
22433
22434
22435  # Publish this variable in the help.
22436
22437
22438  if [ -z "${CODESIGN+x}" ]; then
22439    # The variable is not set by user, try to locate tool using the code snippet
22440    for ac_prog in codesign
22441do
22442  # Extract the first word of "$ac_prog", so it can be a program name with args.
22443set dummy $ac_prog; ac_word=$2
22444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22445$as_echo_n "checking for $ac_word... " >&6; }
22446if ${ac_cv_path_CODESIGN+:} false; then :
22447  $as_echo_n "(cached) " >&6
22448else
22449  case $CODESIGN in
22450  [\\/]* | ?:[\\/]*)
22451  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22452  ;;
22453  *)
22454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22455for as_dir in $PATH
22456do
22457  IFS=$as_save_IFS
22458  test -z "$as_dir" && as_dir=.
22459    for ac_exec_ext in '' $ac_executable_extensions; do
22460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22461    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22463    break 2
22464  fi
22465done
22466  done
22467IFS=$as_save_IFS
22468
22469  ;;
22470esac
22471fi
22472CODESIGN=$ac_cv_path_CODESIGN
22473if test -n "$CODESIGN"; then
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22475$as_echo "$CODESIGN" >&6; }
22476else
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478$as_echo "no" >&6; }
22479fi
22480
22481
22482  test -n "$CODESIGN" && break
22483done
22484
22485  else
22486    # The variable is set, but is it from the command line or the environment?
22487
22488    # Try to remove the string !CODESIGN! from our list.
22489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22491      # If it failed, the variable was not from the command line. Ignore it,
22492      # but warn the user (except for BASH, which is always set by the calling BASH).
22493      if test "xCODESIGN" != xBASH; then
22494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22495$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22496      fi
22497      # Try to locate tool using the code snippet
22498      for ac_prog in codesign
22499do
22500  # Extract the first word of "$ac_prog", so it can be a program name with args.
22501set dummy $ac_prog; ac_word=$2
22502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22503$as_echo_n "checking for $ac_word... " >&6; }
22504if ${ac_cv_path_CODESIGN+:} false; then :
22505  $as_echo_n "(cached) " >&6
22506else
22507  case $CODESIGN in
22508  [\\/]* | ?:[\\/]*)
22509  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22510  ;;
22511  *)
22512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22513for as_dir in $PATH
22514do
22515  IFS=$as_save_IFS
22516  test -z "$as_dir" && as_dir=.
22517    for ac_exec_ext in '' $ac_executable_extensions; do
22518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22519    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22521    break 2
22522  fi
22523done
22524  done
22525IFS=$as_save_IFS
22526
22527  ;;
22528esac
22529fi
22530CODESIGN=$ac_cv_path_CODESIGN
22531if test -n "$CODESIGN"; then
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22533$as_echo "$CODESIGN" >&6; }
22534else
22535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22536$as_echo "no" >&6; }
22537fi
22538
22539
22540  test -n "$CODESIGN" && break
22541done
22542
22543    else
22544      # If it succeeded, then it was overridden by the user. We will use it
22545      # for the tool.
22546
22547      # First remove it from the list of overridden variables, so we can test
22548      # for unknown variables in the end.
22549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22550
22551      # Check if we try to supply an empty value
22552      if test "x$CODESIGN" = x; then
22553        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22554$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22556$as_echo_n "checking for CODESIGN... " >&6; }
22557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22558$as_echo "disabled" >&6; }
22559      else
22560        # Check if the provided tool contains a complete path.
22561        tool_specified="$CODESIGN"
22562        tool_basename="${tool_specified##*/}"
22563        if test "x$tool_basename" = "x$tool_specified"; then
22564          # A command without a complete path is provided, search $PATH.
22565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22566$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22567          # Extract the first word of "$tool_basename", so it can be a program name with args.
22568set dummy $tool_basename; ac_word=$2
22569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22570$as_echo_n "checking for $ac_word... " >&6; }
22571if ${ac_cv_path_CODESIGN+:} false; then :
22572  $as_echo_n "(cached) " >&6
22573else
22574  case $CODESIGN in
22575  [\\/]* | ?:[\\/]*)
22576  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22577  ;;
22578  *)
22579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22580for as_dir in $PATH
22581do
22582  IFS=$as_save_IFS
22583  test -z "$as_dir" && as_dir=.
22584    for ac_exec_ext in '' $ac_executable_extensions; do
22585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22586    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22588    break 2
22589  fi
22590done
22591  done
22592IFS=$as_save_IFS
22593
22594  ;;
22595esac
22596fi
22597CODESIGN=$ac_cv_path_CODESIGN
22598if test -n "$CODESIGN"; then
22599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22600$as_echo "$CODESIGN" >&6; }
22601else
22602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22603$as_echo "no" >&6; }
22604fi
22605
22606
22607          if test "x$CODESIGN" = x; then
22608            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22609          fi
22610        else
22611          # Otherwise we believe it is a complete path. Use it as it is.
22612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22613$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22614          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22615$as_echo_n "checking for CODESIGN... " >&6; }
22616          if test ! -x "$tool_specified"; then
22617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22618$as_echo "not found" >&6; }
22619            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22620          fi
22621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22622$as_echo "$tool_specified" >&6; }
22623        fi
22624      fi
22625    fi
22626
22627  fi
22628
22629
22630    if test "x$CODESIGN" != "x"; then
22631      # Verify that the openjdk_codesign certificate is present
22632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22633$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22634      rm -f codesign-testfile
22635      touch codesign-testfile
22636      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22637      rm -f codesign-testfile
22638      if test "x$CODESIGN" = x; then
22639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22640$as_echo "no" >&6; }
22641      else
22642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22643$as_echo "yes" >&6; }
22644      fi
22645    fi
22646
22647
22648
22649  # Publish this variable in the help.
22650
22651
22652  if [ -z "${SETFILE+x}" ]; then
22653    # The variable is not set by user, try to locate tool using the code snippet
22654    for ac_prog in SetFile
22655do
22656  # Extract the first word of "$ac_prog", so it can be a program name with args.
22657set dummy $ac_prog; ac_word=$2
22658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22659$as_echo_n "checking for $ac_word... " >&6; }
22660if ${ac_cv_path_SETFILE+:} false; then :
22661  $as_echo_n "(cached) " >&6
22662else
22663  case $SETFILE in
22664  [\\/]* | ?:[\\/]*)
22665  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22666  ;;
22667  *)
22668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22669for as_dir in $PATH
22670do
22671  IFS=$as_save_IFS
22672  test -z "$as_dir" && as_dir=.
22673    for ac_exec_ext in '' $ac_executable_extensions; do
22674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22675    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22677    break 2
22678  fi
22679done
22680  done
22681IFS=$as_save_IFS
22682
22683  ;;
22684esac
22685fi
22686SETFILE=$ac_cv_path_SETFILE
22687if test -n "$SETFILE"; then
22688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22689$as_echo "$SETFILE" >&6; }
22690else
22691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22692$as_echo "no" >&6; }
22693fi
22694
22695
22696  test -n "$SETFILE" && break
22697done
22698
22699  else
22700    # The variable is set, but is it from the command line or the environment?
22701
22702    # Try to remove the string !SETFILE! from our list.
22703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22705      # If it failed, the variable was not from the command line. Ignore it,
22706      # but warn the user (except for BASH, which is always set by the calling BASH).
22707      if test "xSETFILE" != xBASH; then
22708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22709$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22710      fi
22711      # Try to locate tool using the code snippet
22712      for ac_prog in SetFile
22713do
22714  # Extract the first word of "$ac_prog", so it can be a program name with args.
22715set dummy $ac_prog; ac_word=$2
22716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22717$as_echo_n "checking for $ac_word... " >&6; }
22718if ${ac_cv_path_SETFILE+:} false; then :
22719  $as_echo_n "(cached) " >&6
22720else
22721  case $SETFILE in
22722  [\\/]* | ?:[\\/]*)
22723  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22724  ;;
22725  *)
22726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22727for as_dir in $PATH
22728do
22729  IFS=$as_save_IFS
22730  test -z "$as_dir" && as_dir=.
22731    for ac_exec_ext in '' $ac_executable_extensions; do
22732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22733    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22735    break 2
22736  fi
22737done
22738  done
22739IFS=$as_save_IFS
22740
22741  ;;
22742esac
22743fi
22744SETFILE=$ac_cv_path_SETFILE
22745if test -n "$SETFILE"; then
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22747$as_echo "$SETFILE" >&6; }
22748else
22749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22750$as_echo "no" >&6; }
22751fi
22752
22753
22754  test -n "$SETFILE" && break
22755done
22756
22757    else
22758      # If it succeeded, then it was overridden by the user. We will use it
22759      # for the tool.
22760
22761      # First remove it from the list of overridden variables, so we can test
22762      # for unknown variables in the end.
22763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22764
22765      # Check if we try to supply an empty value
22766      if test "x$SETFILE" = x; then
22767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22768$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22770$as_echo_n "checking for SETFILE... " >&6; }
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22772$as_echo "disabled" >&6; }
22773      else
22774        # Check if the provided tool contains a complete path.
22775        tool_specified="$SETFILE"
22776        tool_basename="${tool_specified##*/}"
22777        if test "x$tool_basename" = "x$tool_specified"; then
22778          # A command without a complete path is provided, search $PATH.
22779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22780$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22781          # Extract the first word of "$tool_basename", so it can be a program name with args.
22782set dummy $tool_basename; ac_word=$2
22783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22784$as_echo_n "checking for $ac_word... " >&6; }
22785if ${ac_cv_path_SETFILE+:} false; then :
22786  $as_echo_n "(cached) " >&6
22787else
22788  case $SETFILE in
22789  [\\/]* | ?:[\\/]*)
22790  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22791  ;;
22792  *)
22793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22794for as_dir in $PATH
22795do
22796  IFS=$as_save_IFS
22797  test -z "$as_dir" && as_dir=.
22798    for ac_exec_ext in '' $ac_executable_extensions; do
22799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22800    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22802    break 2
22803  fi
22804done
22805  done
22806IFS=$as_save_IFS
22807
22808  ;;
22809esac
22810fi
22811SETFILE=$ac_cv_path_SETFILE
22812if test -n "$SETFILE"; then
22813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22814$as_echo "$SETFILE" >&6; }
22815else
22816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22817$as_echo "no" >&6; }
22818fi
22819
22820
22821          if test "x$SETFILE" = x; then
22822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22823          fi
22824        else
22825          # Otherwise we believe it is a complete path. Use it as it is.
22826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22827$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22829$as_echo_n "checking for SETFILE... " >&6; }
22830          if test ! -x "$tool_specified"; then
22831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22832$as_echo "not found" >&6; }
22833            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22834          fi
22835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22836$as_echo "$tool_specified" >&6; }
22837        fi
22838      fi
22839    fi
22840
22841  fi
22842
22843
22844
22845  if test "x$SETFILE" = x; then
22846    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22847  fi
22848
22849
22850  fi
22851
22852
22853  # Test if bash supports pipefail.
22854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22855$as_echo_n "checking if bash supports pipefail... " >&6; }
22856  if ${BASH} -c 'set -o pipefail'; then
22857    BASH_ARGS="$BASH_ARGS -o pipefail"
22858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22859$as_echo "yes" >&6; }
22860  else
22861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22862$as_echo "no" >&6; }
22863  fi
22864
22865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22866$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22867  if ${BASH} -e -c 'true'; then
22868    BASH_ARGS="$BASH_ARGS -e"
22869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22870$as_echo "yes" >&6; }
22871  else
22872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22873$as_echo "no" >&6; }
22874  fi
22875
22876
22877
22878
22879# Check if pkg-config is available.
22880
22881
22882if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22883	if test -n "$ac_tool_prefix"; then
22884  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22885set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22887$as_echo_n "checking for $ac_word... " >&6; }
22888if ${ac_cv_path_PKG_CONFIG+:} false; then :
22889  $as_echo_n "(cached) " >&6
22890else
22891  case $PKG_CONFIG in
22892  [\\/]* | ?:[\\/]*)
22893  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22894  ;;
22895  *)
22896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22897for as_dir in $PATH
22898do
22899  IFS=$as_save_IFS
22900  test -z "$as_dir" && as_dir=.
22901    for ac_exec_ext in '' $ac_executable_extensions; do
22902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22903    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22905    break 2
22906  fi
22907done
22908  done
22909IFS=$as_save_IFS
22910
22911  ;;
22912esac
22913fi
22914PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22915if test -n "$PKG_CONFIG"; then
22916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22917$as_echo "$PKG_CONFIG" >&6; }
22918else
22919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22920$as_echo "no" >&6; }
22921fi
22922
22923
22924fi
22925if test -z "$ac_cv_path_PKG_CONFIG"; then
22926  ac_pt_PKG_CONFIG=$PKG_CONFIG
22927  # Extract the first word of "pkg-config", so it can be a program name with args.
22928set dummy pkg-config; ac_word=$2
22929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22930$as_echo_n "checking for $ac_word... " >&6; }
22931if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22932  $as_echo_n "(cached) " >&6
22933else
22934  case $ac_pt_PKG_CONFIG in
22935  [\\/]* | ?:[\\/]*)
22936  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22937  ;;
22938  *)
22939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22940for as_dir in $PATH
22941do
22942  IFS=$as_save_IFS
22943  test -z "$as_dir" && as_dir=.
22944    for ac_exec_ext in '' $ac_executable_extensions; do
22945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22946    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22948    break 2
22949  fi
22950done
22951  done
22952IFS=$as_save_IFS
22953
22954  ;;
22955esac
22956fi
22957ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22958if test -n "$ac_pt_PKG_CONFIG"; then
22959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22960$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22961else
22962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22963$as_echo "no" >&6; }
22964fi
22965
22966  if test "x$ac_pt_PKG_CONFIG" = x; then
22967    PKG_CONFIG=""
22968  else
22969    case $cross_compiling:$ac_tool_warned in
22970yes:)
22971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22973ac_tool_warned=yes ;;
22974esac
22975    PKG_CONFIG=$ac_pt_PKG_CONFIG
22976  fi
22977else
22978  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22979fi
22980
22981fi
22982if test -n "$PKG_CONFIG"; then
22983	_pkg_min_version=0.9.0
22984	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22985$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22986	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22987		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22988$as_echo "yes" >&6; }
22989	else
22990		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22991$as_echo "no" >&6; }
22992		PKG_CONFIG=""
22993	fi
22994
22995fi
22996
22997# After basic tools have been setup, we can check build os specific details.
22998
22999  ###############################################################################
23000
23001  # Note that this is the build platform OS version!
23002
23003  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23004  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23005  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23006  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23007
23008
23009
23010
23011
23012###############################################################################
23013#
23014# Determine OpenJDK variants, options and version numbers.
23015#
23016###############################################################################
23017
23018# We need build & target for this.
23019
23020
23021  ###############################################################################
23022  #
23023  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23024  # We always build headless support.
23025  #
23026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23027$as_echo_n "checking headful support... " >&6; }
23028  # Check whether --enable-headful was given.
23029if test "${enable_headful+set}" = set; then :
23030  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23031else
23032  SUPPORT_HEADFUL=yes
23033fi
23034
23035
23036  SUPPORT_HEADLESS=yes
23037  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23038
23039  if test "x$SUPPORT_HEADFUL" = xyes; then
23040    # We are building both headful and headless.
23041    headful_msg="include support for both headful and headless"
23042  fi
23043
23044  if test "x$SUPPORT_HEADFUL" = xno; then
23045    # Thus we are building headless only.
23046    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23047    headful_msg="headless only"
23048  fi
23049
23050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23051$as_echo "$headful_msg" >&6; }
23052
23053
23054
23055
23056
23057  # Control wether Hotspot runs Queens test after build.
23058  # Check whether --enable-hotspot-test-in-build was given.
23059if test "${enable_hotspot_test_in_build+set}" = set; then :
23060  enableval=$enable_hotspot_test_in_build;
23061else
23062  enable_hotspot_test_in_build=no
23063fi
23064
23065  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23066    TEST_IN_BUILD=true
23067  else
23068    TEST_IN_BUILD=false
23069  fi
23070
23071
23072  ###############################################################################
23073  #
23074  # Choose cacerts source file
23075  #
23076
23077# Check whether --with-cacerts-file was given.
23078if test "${with_cacerts_file+set}" = set; then :
23079  withval=$with_cacerts_file;
23080fi
23081
23082  if test "x$with_cacerts_file" != x; then
23083    CACERTS_FILE=$with_cacerts_file
23084  fi
23085
23086
23087  ###############################################################################
23088  #
23089  # Enable or disable unlimited crypto
23090  #
23091  # Check whether --enable-unlimited-crypto was given.
23092if test "${enable_unlimited_crypto+set}" = set; then :
23093  enableval=$enable_unlimited_crypto;
23094else
23095  enable_unlimited_crypto=no
23096fi
23097
23098  if test "x$enable_unlimited_crypto" = "xyes"; then
23099    UNLIMITED_CRYPTO=true
23100  else
23101    UNLIMITED_CRYPTO=false
23102  fi
23103
23104
23105  ###############################################################################
23106  #
23107  # Compress jars
23108  #
23109  COMPRESS_JARS=false
23110
23111
23112
23113  # Setup default copyright year. Mostly overridden when building close to a new year.
23114
23115# Check whether --with-copyright-year was given.
23116if test "${with_copyright_year+set}" = set; then :
23117  withval=$with_copyright_year;
23118fi
23119
23120  if test "x$with_copyright_year" = xyes; then
23121    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23122  elif test "x$with_copyright_year" != x; then
23123    COPYRIGHT_YEAR="$with_copyright_year"
23124  else
23125    COPYRIGHT_YEAR=`date +'%Y'`
23126  fi
23127
23128
23129
23130  # Warn user that old version arguments are deprecated.
23131
23132
23133# Check whether --with-milestone was given.
23134if test "${with_milestone+set}" = set; then :
23135  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23136$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23137fi
23138
23139
23140
23141
23142# Check whether --with-update-version was given.
23143if test "${with_update_version+set}" = set; then :
23144  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23145$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23146fi
23147
23148
23149
23150
23151# Check whether --with-user-release-suffix was given.
23152if test "${with_user_release_suffix+set}" = set; then :
23153  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
23154$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23155fi
23156
23157
23158
23159
23160# Check whether --with-build-number was given.
23161if test "${with_build_number+set}" = set; then :
23162  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23163$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23164fi
23165
23166
23167
23168  # Source the version numbers file
23169  . $AUTOCONF_DIR/version-numbers
23170
23171  # Some non-version number information is set in that file
23172
23173
23174
23175
23176
23177
23178
23179
23180  # Override version from arguments
23181
23182  # If --with-version-string is set, process it first. It is possible to
23183  # override parts with more specific flags, since these are processed later.
23184
23185# Check whether --with-version-string was given.
23186if test "${with_version_string+set}" = set; then :
23187  withval=$with_version_string;
23188fi
23189
23190  if test "x$with_version_string" = xyes; then
23191    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23192  elif test "x$with_version_string" != x; then
23193    # Additional [] needed to keep m4 from mangling shell constructs.
23194    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23195      VERSION_MAJOR=${BASH_REMATCH[1]}
23196      VERSION_MINOR=${BASH_REMATCH[3]}
23197      VERSION_SECURITY=${BASH_REMATCH[5]}
23198      VERSION_PATCH=${BASH_REMATCH[7]}
23199      VERSION_PRE=${BASH_REMATCH[9]}
23200      version_plus_separator=${BASH_REMATCH[11]}
23201      VERSION_BUILD=${BASH_REMATCH[12]}
23202      VERSION_OPT=${BASH_REMATCH[14]}
23203      # Unspecified numerical fields are interpreted as 0.
23204      if test "x$VERSION_MINOR" = x; then
23205        VERSION_MINOR=0
23206      fi
23207      if test "x$VERSION_SECURITY" = x; then
23208        VERSION_SECURITY=0
23209      fi
23210      if test "x$VERSION_PATCH" = x; then
23211        VERSION_PATCH=0
23212      fi
23213      if test "x$version_plus_separator" != x \
23214          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23215        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23216      fi
23217      # Stop the version part process from setting default values.
23218      # We still allow them to explicitely override though.
23219      NO_DEFAULT_VERSION_PARTS=true
23220    else
23221      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23222    fi
23223  fi
23224
23225
23226# Check whether --with-version-pre was given.
23227if test "${with_version_pre+set}" = set; then :
23228  withval=$with_version_pre; with_version_pre_present=true
23229else
23230  with_version_pre_present=false
23231fi
23232
23233
23234  if test "x$with_version_pre_present" = xtrue; then
23235    if test "x$with_version_pre" = xyes; then
23236      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23237    elif test "x$with_version_pre" = xno; then
23238      # Interpret --without-* as empty string instead of the literal "no"
23239      VERSION_PRE=
23240    else
23241      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23242       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23243      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23245$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23246      fi
23247    fi
23248  else
23249    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23250      # Default is to use "internal" as pre
23251      VERSION_PRE="internal"
23252    fi
23253  fi
23254
23255
23256# Check whether --with-version-opt was given.
23257if test "${with_version_opt+set}" = set; then :
23258  withval=$with_version_opt; with_version_opt_present=true
23259else
23260  with_version_opt_present=false
23261fi
23262
23263
23264  if test "x$with_version_opt_present" = xtrue; then
23265    if test "x$with_version_opt" = xyes; then
23266      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23267    elif test "x$with_version_opt" = xno; then
23268      # Interpret --without-* as empty string instead of the literal "no"
23269      VERSION_OPT=
23270    else
23271      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23272       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23273      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23275$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23276      fi
23277    fi
23278  else
23279    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23280      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23281      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23282      # Outer [ ] to quote m4.
23283       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23284       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23285      VERSION_OPT="$timestamp.$username.$basedirname"
23286    fi
23287  fi
23288
23289
23290# Check whether --with-version-build was given.
23291if test "${with_version_build+set}" = set; then :
23292  withval=$with_version_build; with_version_build_present=true
23293else
23294  with_version_build_present=false
23295fi
23296
23297
23298  if test "x$with_version_build_present" = xtrue; then
23299    if test "x$with_version_build" = xyes; then
23300      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23301    elif test "x$with_version_build" = xno; then
23302      # Interpret --without-* as empty string instead of the literal "no"
23303      VERSION_BUILD=
23304    elif test "x$with_version_build" = x; then
23305      VERSION_BUILD=
23306    else
23307
23308  # Additional [] needed to keep m4 from mangling shell constructs.
23309  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23310    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23311  fi
23312  # Extract the version number without leading zeros.
23313  cleaned_value=${BASH_REMATCH[1]}
23314  if test "x$cleaned_value" = x; then
23315    # Special case for zero
23316    cleaned_value=${BASH_REMATCH[2]}
23317  fi
23318
23319  if test $cleaned_value -gt 255; then
23320    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23321  fi
23322  if test "x$cleaned_value" != "x$with_version_build"; then
23323    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23324$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23325  fi
23326  VERSION_BUILD=$cleaned_value
23327
23328    fi
23329  else
23330    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23331      # Default is to not have a build number.
23332      VERSION_BUILD=""
23333      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23334      VERSION_BUILD=0
23335    fi
23336  fi
23337
23338
23339# Check whether --with-version-major was given.
23340if test "${with_version_major+set}" = set; then :
23341  withval=$with_version_major; with_version_major_present=true
23342else
23343  with_version_major_present=false
23344fi
23345
23346
23347  if test "x$with_version_major_present" = xtrue; then
23348    if test "x$with_version_major" = xyes; then
23349      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23350    else
23351
23352  # Additional [] needed to keep m4 from mangling shell constructs.
23353  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23354    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23355  fi
23356  # Extract the version number without leading zeros.
23357  cleaned_value=${BASH_REMATCH[1]}
23358  if test "x$cleaned_value" = x; then
23359    # Special case for zero
23360    cleaned_value=${BASH_REMATCH[2]}
23361  fi
23362
23363  if test $cleaned_value -gt 255; then
23364    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23365  fi
23366  if test "x$cleaned_value" != "x$with_version_major"; then
23367    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23368$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23369  fi
23370  VERSION_MAJOR=$cleaned_value
23371
23372    fi
23373  else
23374    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23375      # Default is to get value from version-numbers
23376      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23377    fi
23378  fi
23379
23380
23381# Check whether --with-version-minor was given.
23382if test "${with_version_minor+set}" = set; then :
23383  withval=$with_version_minor; with_version_minor_present=true
23384else
23385  with_version_minor_present=false
23386fi
23387
23388
23389  if test "x$with_version_minor_present" = xtrue; then
23390    if test "x$with_version_minor" = xyes; then
23391      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23392    elif test "x$with_version_minor" = xno; then
23393      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23394      VERSION_MINOR=0
23395    elif test "x$with_version_minor" = x; then
23396      VERSION_MINOR=0
23397    else
23398
23399  # Additional [] needed to keep m4 from mangling shell constructs.
23400  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23401    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23402  fi
23403  # Extract the version number without leading zeros.
23404  cleaned_value=${BASH_REMATCH[1]}
23405  if test "x$cleaned_value" = x; then
23406    # Special case for zero
23407    cleaned_value=${BASH_REMATCH[2]}
23408  fi
23409
23410  if test $cleaned_value -gt 255; then
23411    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23412  fi
23413  if test "x$cleaned_value" != "x$with_version_minor"; then
23414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23415$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23416  fi
23417  VERSION_MINOR=$cleaned_value
23418
23419    fi
23420  else
23421    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23422      # Default is 0, if unspecified
23423      VERSION_MINOR=0
23424    fi
23425  fi
23426
23427
23428# Check whether --with-version-security was given.
23429if test "${with_version_security+set}" = set; then :
23430  withval=$with_version_security; with_version_security_present=true
23431else
23432  with_version_security_present=false
23433fi
23434
23435
23436  if test "x$with_version_security_present" = xtrue; then
23437    if test "x$with_version_security" = xyes; then
23438      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23439    elif test "x$with_version_security" = xno; then
23440      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23441      VERSION_SECURITY=0
23442    elif test "x$with_version_security" = x; then
23443      VERSION_SECURITY=0
23444    else
23445
23446  # Additional [] needed to keep m4 from mangling shell constructs.
23447  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23448    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23449  fi
23450  # Extract the version number without leading zeros.
23451  cleaned_value=${BASH_REMATCH[1]}
23452  if test "x$cleaned_value" = x; then
23453    # Special case for zero
23454    cleaned_value=${BASH_REMATCH[2]}
23455  fi
23456
23457  if test $cleaned_value -gt 255; then
23458    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23459  fi
23460  if test "x$cleaned_value" != "x$with_version_security"; then
23461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23462$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23463  fi
23464  VERSION_SECURITY=$cleaned_value
23465
23466    fi
23467  else
23468    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23469      # Default is 0, if unspecified
23470      VERSION_SECURITY=0
23471    fi
23472  fi
23473
23474
23475# Check whether --with-version-patch was given.
23476if test "${with_version_patch+set}" = set; then :
23477  withval=$with_version_patch; with_version_patch_present=true
23478else
23479  with_version_patch_present=false
23480fi
23481
23482
23483  if test "x$with_version_patch_present" = xtrue; then
23484    if test "x$with_version_patch" = xyes; then
23485      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23486    elif test "x$with_version_patch" = xno; then
23487      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23488      VERSION_PATCH=0
23489    elif test "x$with_version_patch" = x; then
23490      VERSION_PATCH=0
23491    else
23492
23493  # Additional [] needed to keep m4 from mangling shell constructs.
23494  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23495    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23496  fi
23497  # Extract the version number without leading zeros.
23498  cleaned_value=${BASH_REMATCH[1]}
23499  if test "x$cleaned_value" = x; then
23500    # Special case for zero
23501    cleaned_value=${BASH_REMATCH[2]}
23502  fi
23503
23504  if test $cleaned_value -gt 255; then
23505    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23506  fi
23507  if test "x$cleaned_value" != "x$with_version_patch"; then
23508    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23509$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23510  fi
23511  VERSION_PATCH=$cleaned_value
23512
23513    fi
23514  else
23515    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23516      # Default is 0, if unspecified
23517      VERSION_PATCH=0
23518    fi
23519  fi
23520
23521  # Calculate derived version properties
23522
23523  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23524  if test "x$VERSION_PRE" = x; then
23525    VERSION_IS_GA=true
23526  else
23527    VERSION_IS_GA=false
23528  fi
23529
23530  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23531  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23532
23533  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23534  # Strip trailing zeroes from stripped_version_number
23535  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23536  VERSION_NUMBER=$stripped_version_number
23537
23538  # The complete version string, with additional build information
23539  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23540    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23541  else
23542    # If either build or opt is set, we need a + separator
23543    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23544  fi
23545
23546  # The short version string, just VERSION_NUMBER and PRE, if present.
23547  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23548
23549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23550$as_echo_n "checking for version string... " >&6; }
23551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23552$as_echo "$VERSION_STRING" >&6; }
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568###############################################################################
23569#
23570# Setup BootJDK, used to bootstrap the build.
23571#
23572###############################################################################
23573
23574
23575  BOOT_JDK_FOUND=no
23576
23577# Check whether --with-boot-jdk was given.
23578if test "${with_boot_jdk+set}" = set; then :
23579  withval=$with_boot_jdk;
23580fi
23581
23582
23583  # We look for the Boot JDK through various means, going from more certain to
23584  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23585  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23586  # must check if this is indeed valid; otherwise we'll continue looking.
23587
23588  # Test: Is bootjdk explicitely set by command line arguments?
23589
23590  if test "x$BOOT_JDK_FOUND" = xno; then
23591    # Now execute the test
23592
23593  if test "x$with_boot_jdk" != x; then
23594    BOOT_JDK=$with_boot_jdk
23595    BOOT_JDK_FOUND=maybe
23596    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23597$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23598  fi
23599
23600
23601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23603      # Do we have a bin/java?
23604      if test ! -x "$BOOT_JDK/bin/java"; then
23605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23607        BOOT_JDK_FOUND=no
23608      else
23609        # Do we have a bin/javac?
23610        if test ! -x "$BOOT_JDK/bin/javac"; then
23611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23615          BOOT_JDK_FOUND=no
23616        else
23617          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23618          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23619
23620          # Extra M4 quote needed to protect [] in grep expression.
23621          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23622          if test "x$FOUND_CORRECT_VERSION" = x; then
23623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23625            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23626$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23627            BOOT_JDK_FOUND=no
23628          else
23629            # We're done! :-)
23630            BOOT_JDK_FOUND=yes
23631
23632  # Only process if variable expands to non-empty
23633
23634  if test "x$BOOT_JDK" != x; then
23635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23636
23637  # Input might be given as Windows format, start by converting to
23638  # unix format.
23639  path="$BOOT_JDK"
23640  new_path=`$CYGPATH -u "$path"`
23641
23642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23645  # "foo.exe" is OK but "foo" is an error.
23646  #
23647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23648  # It is also a way to make sure we got the proper file name for the real test later on.
23649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23650  if test "x$test_shortpath" = x; then
23651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23654  fi
23655
23656  # Call helper function which possibly converts this using DOS-style short mode.
23657  # If so, the updated path is stored in $new_path.
23658
23659  input_path="$new_path"
23660  # Check if we need to convert this using DOS-style short mode. If the path
23661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23662  # take no chances and rewrite it.
23663  # Note: m4 eats our [], so we need to use [ and ] instead.
23664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23665  if test "x$has_forbidden_chars" != x; then
23666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23670      # Going to short mode and back again did indeed matter. Since short mode is
23671      # case insensitive, let's make it lowercase to improve readability.
23672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23673      # Now convert it back to Unix-style (cygpath)
23674      input_path=`$CYGPATH -u "$shortmode_path"`
23675      new_path="$input_path"
23676    fi
23677  fi
23678
23679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23680  if test "x$test_cygdrive_prefix" = x; then
23681    # As a simple fix, exclude /usr/bin since it's not a real path.
23682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23684      # a path prefixed by /cygdrive for fixpath to work.
23685      new_path="$CYGWIN_ROOT_PATH$input_path"
23686    fi
23687  fi
23688
23689
23690  if test "x$path" != "x$new_path"; then
23691    BOOT_JDK="$new_path"
23692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23694  fi
23695
23696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23697
23698  path="$BOOT_JDK"
23699  has_colon=`$ECHO $path | $GREP ^.:`
23700  new_path="$path"
23701  if test "x$has_colon" = x; then
23702    # Not in mixed or Windows style, start by that.
23703    new_path=`cmd //c echo $path`
23704  fi
23705
23706
23707  input_path="$new_path"
23708  # Check if we need to convert this using DOS-style short mode. If the path
23709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23710  # take no chances and rewrite it.
23711  # Note: m4 eats our [], so we need to use [ and ] instead.
23712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23713  if test "x$has_forbidden_chars" != x; then
23714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23716  fi
23717
23718
23719  windows_path="$new_path"
23720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23721    unix_path=`$CYGPATH -u "$windows_path"`
23722    new_path="$unix_path"
23723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23725    new_path="$unix_path"
23726  fi
23727
23728  if test "x$path" != "x$new_path"; then
23729    BOOT_JDK="$new_path"
23730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23732  fi
23733
23734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23736
23737    else
23738      # We're on a unix platform. Hooray! :)
23739      path="$BOOT_JDK"
23740      has_space=`$ECHO "$path" | $GREP " "`
23741      if test "x$has_space" != x; then
23742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23745      fi
23746
23747      # Use eval to expand a potential ~
23748      eval path="$path"
23749      if test ! -f "$path" && test ! -d "$path"; then
23750        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23751      fi
23752
23753      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23754    fi
23755  fi
23756
23757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23758$as_echo_n "checking for Boot JDK... " >&6; }
23759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23760$as_echo "$BOOT_JDK" >&6; }
23761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23762$as_echo_n "checking Boot JDK version... " >&6; }
23763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23765$as_echo "$BOOT_JDK_VERSION" >&6; }
23766          fi # end check jdk version
23767        fi # end check javac
23768      fi # end check java
23769    fi # end check boot jdk found
23770  fi
23771
23772  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23773    # Having specified an argument which is incorrect will produce an instant failure;
23774    # we should not go on looking
23775    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23776  fi
23777
23778  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23779
23780  if test "x$BOOT_JDK_FOUND" = xno; then
23781    # Now execute the test
23782
23783  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23784    # First check at user selected default
23785
23786  if test "x$BOOT_JDK_FOUND" = xno; then
23787    # Now execute the test
23788
23789  if test -x /usr/libexec/java_home; then
23790    BOOT_JDK=`/usr/libexec/java_home `
23791    BOOT_JDK_FOUND=maybe
23792    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23793$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23794  fi
23795
23796
23797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23799      # Do we have a bin/java?
23800      if test ! -x "$BOOT_JDK/bin/java"; then
23801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23803        BOOT_JDK_FOUND=no
23804      else
23805        # Do we have a bin/javac?
23806        if test ! -x "$BOOT_JDK/bin/javac"; then
23807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23811          BOOT_JDK_FOUND=no
23812        else
23813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23815
23816          # Extra M4 quote needed to protect [] in grep expression.
23817          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23818          if test "x$FOUND_CORRECT_VERSION" = x; then
23819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23823            BOOT_JDK_FOUND=no
23824          else
23825            # We're done! :-)
23826            BOOT_JDK_FOUND=yes
23827
23828  # Only process if variable expands to non-empty
23829
23830  if test "x$BOOT_JDK" != x; then
23831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23832
23833  # Input might be given as Windows format, start by converting to
23834  # unix format.
23835  path="$BOOT_JDK"
23836  new_path=`$CYGPATH -u "$path"`
23837
23838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23841  # "foo.exe" is OK but "foo" is an error.
23842  #
23843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23844  # It is also a way to make sure we got the proper file name for the real test later on.
23845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23846  if test "x$test_shortpath" = x; then
23847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23850  fi
23851
23852  # Call helper function which possibly converts this using DOS-style short mode.
23853  # If so, the updated path is stored in $new_path.
23854
23855  input_path="$new_path"
23856  # Check if we need to convert this using DOS-style short mode. If the path
23857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23858  # take no chances and rewrite it.
23859  # Note: m4 eats our [], so we need to use [ and ] instead.
23860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23861  if test "x$has_forbidden_chars" != x; then
23862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23866      # Going to short mode and back again did indeed matter. Since short mode is
23867      # case insensitive, let's make it lowercase to improve readability.
23868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23869      # Now convert it back to Unix-style (cygpath)
23870      input_path=`$CYGPATH -u "$shortmode_path"`
23871      new_path="$input_path"
23872    fi
23873  fi
23874
23875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23876  if test "x$test_cygdrive_prefix" = x; then
23877    # As a simple fix, exclude /usr/bin since it's not a real path.
23878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23880      # a path prefixed by /cygdrive for fixpath to work.
23881      new_path="$CYGWIN_ROOT_PATH$input_path"
23882    fi
23883  fi
23884
23885
23886  if test "x$path" != "x$new_path"; then
23887    BOOT_JDK="$new_path"
23888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23890  fi
23891
23892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23893
23894  path="$BOOT_JDK"
23895  has_colon=`$ECHO $path | $GREP ^.:`
23896  new_path="$path"
23897  if test "x$has_colon" = x; then
23898    # Not in mixed or Windows style, start by that.
23899    new_path=`cmd //c echo $path`
23900  fi
23901
23902
23903  input_path="$new_path"
23904  # Check if we need to convert this using DOS-style short mode. If the path
23905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23906  # take no chances and rewrite it.
23907  # Note: m4 eats our [], so we need to use [ and ] instead.
23908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23909  if test "x$has_forbidden_chars" != x; then
23910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23912  fi
23913
23914
23915  windows_path="$new_path"
23916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23917    unix_path=`$CYGPATH -u "$windows_path"`
23918    new_path="$unix_path"
23919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23921    new_path="$unix_path"
23922  fi
23923
23924  if test "x$path" != "x$new_path"; then
23925    BOOT_JDK="$new_path"
23926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23928  fi
23929
23930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23932
23933    else
23934      # We're on a unix platform. Hooray! :)
23935      path="$BOOT_JDK"
23936      has_space=`$ECHO "$path" | $GREP " "`
23937      if test "x$has_space" != x; then
23938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23941      fi
23942
23943      # Use eval to expand a potential ~
23944      eval path="$path"
23945      if test ! -f "$path" && test ! -d "$path"; then
23946        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23947      fi
23948
23949      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23950    fi
23951  fi
23952
23953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23954$as_echo_n "checking for Boot JDK... " >&6; }
23955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23956$as_echo "$BOOT_JDK" >&6; }
23957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23958$as_echo_n "checking Boot JDK version... " >&6; }
23959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23961$as_echo "$BOOT_JDK_VERSION" >&6; }
23962          fi # end check jdk version
23963        fi # end check javac
23964      fi # end check java
23965    fi # end check boot jdk found
23966  fi
23967
23968    # If that did not work out (e.g. too old), try explicit versions instead
23969
23970  if test "x$BOOT_JDK_FOUND" = xno; then
23971    # Now execute the test
23972
23973  if test -x /usr/libexec/java_home; then
23974    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23975    BOOT_JDK_FOUND=maybe
23976    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23977$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23978  fi
23979
23980
23981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23983      # Do we have a bin/java?
23984      if test ! -x "$BOOT_JDK/bin/java"; then
23985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23987        BOOT_JDK_FOUND=no
23988      else
23989        # Do we have a bin/javac?
23990        if test ! -x "$BOOT_JDK/bin/javac"; then
23991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23995          BOOT_JDK_FOUND=no
23996        else
23997          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23998          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23999
24000          # Extra M4 quote needed to protect [] in grep expression.
24001          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24002          if test "x$FOUND_CORRECT_VERSION" = x; then
24003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24005            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24006$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24007            BOOT_JDK_FOUND=no
24008          else
24009            # We're done! :-)
24010            BOOT_JDK_FOUND=yes
24011
24012  # Only process if variable expands to non-empty
24013
24014  if test "x$BOOT_JDK" != x; then
24015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24016
24017  # Input might be given as Windows format, start by converting to
24018  # unix format.
24019  path="$BOOT_JDK"
24020  new_path=`$CYGPATH -u "$path"`
24021
24022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24025  # "foo.exe" is OK but "foo" is an error.
24026  #
24027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24028  # It is also a way to make sure we got the proper file name for the real test later on.
24029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24030  if test "x$test_shortpath" = x; then
24031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24033    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24034  fi
24035
24036  # Call helper function which possibly converts this using DOS-style short mode.
24037  # If so, the updated path is stored in $new_path.
24038
24039  input_path="$new_path"
24040  # Check if we need to convert this using DOS-style short mode. If the path
24041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24042  # take no chances and rewrite it.
24043  # Note: m4 eats our [], so we need to use [ and ] instead.
24044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24045  if test "x$has_forbidden_chars" != x; then
24046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24050      # Going to short mode and back again did indeed matter. Since short mode is
24051      # case insensitive, let's make it lowercase to improve readability.
24052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24053      # Now convert it back to Unix-style (cygpath)
24054      input_path=`$CYGPATH -u "$shortmode_path"`
24055      new_path="$input_path"
24056    fi
24057  fi
24058
24059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24060  if test "x$test_cygdrive_prefix" = x; then
24061    # As a simple fix, exclude /usr/bin since it's not a real path.
24062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24064      # a path prefixed by /cygdrive for fixpath to work.
24065      new_path="$CYGWIN_ROOT_PATH$input_path"
24066    fi
24067  fi
24068
24069
24070  if test "x$path" != "x$new_path"; then
24071    BOOT_JDK="$new_path"
24072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24074  fi
24075
24076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24077
24078  path="$BOOT_JDK"
24079  has_colon=`$ECHO $path | $GREP ^.:`
24080  new_path="$path"
24081  if test "x$has_colon" = x; then
24082    # Not in mixed or Windows style, start by that.
24083    new_path=`cmd //c echo $path`
24084  fi
24085
24086
24087  input_path="$new_path"
24088  # Check if we need to convert this using DOS-style short mode. If the path
24089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24090  # take no chances and rewrite it.
24091  # Note: m4 eats our [], so we need to use [ and ] instead.
24092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24093  if test "x$has_forbidden_chars" != x; then
24094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24096  fi
24097
24098
24099  windows_path="$new_path"
24100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24101    unix_path=`$CYGPATH -u "$windows_path"`
24102    new_path="$unix_path"
24103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24105    new_path="$unix_path"
24106  fi
24107
24108  if test "x$path" != "x$new_path"; then
24109    BOOT_JDK="$new_path"
24110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24112  fi
24113
24114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24116
24117    else
24118      # We're on a unix platform. Hooray! :)
24119      path="$BOOT_JDK"
24120      has_space=`$ECHO "$path" | $GREP " "`
24121      if test "x$has_space" != x; then
24122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24125      fi
24126
24127      # Use eval to expand a potential ~
24128      eval path="$path"
24129      if test ! -f "$path" && test ! -d "$path"; then
24130        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24131      fi
24132
24133      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24134    fi
24135  fi
24136
24137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24138$as_echo_n "checking for Boot JDK... " >&6; }
24139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24140$as_echo "$BOOT_JDK" >&6; }
24141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24142$as_echo_n "checking Boot JDK version... " >&6; }
24143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24145$as_echo "$BOOT_JDK_VERSION" >&6; }
24146          fi # end check jdk version
24147        fi # end check javac
24148      fi # end check java
24149    fi # end check boot jdk found
24150  fi
24151
24152
24153  if test "x$BOOT_JDK_FOUND" = xno; then
24154    # Now execute the test
24155
24156  if test -x /usr/libexec/java_home; then
24157    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24158    BOOT_JDK_FOUND=maybe
24159    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24160$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24161  fi
24162
24163
24164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24166      # Do we have a bin/java?
24167      if test ! -x "$BOOT_JDK/bin/java"; then
24168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24170        BOOT_JDK_FOUND=no
24171      else
24172        # Do we have a bin/javac?
24173        if test ! -x "$BOOT_JDK/bin/javac"; then
24174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24178          BOOT_JDK_FOUND=no
24179        else
24180          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24181          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24182
24183          # Extra M4 quote needed to protect [] in grep expression.
24184          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24185          if test "x$FOUND_CORRECT_VERSION" = x; then
24186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24188            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24189$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24190            BOOT_JDK_FOUND=no
24191          else
24192            # We're done! :-)
24193            BOOT_JDK_FOUND=yes
24194
24195  # Only process if variable expands to non-empty
24196
24197  if test "x$BOOT_JDK" != x; then
24198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24199
24200  # Input might be given as Windows format, start by converting to
24201  # unix format.
24202  path="$BOOT_JDK"
24203  new_path=`$CYGPATH -u "$path"`
24204
24205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24208  # "foo.exe" is OK but "foo" is an error.
24209  #
24210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24211  # It is also a way to make sure we got the proper file name for the real test later on.
24212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24213  if test "x$test_shortpath" = x; then
24214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24217  fi
24218
24219  # Call helper function which possibly converts this using DOS-style short mode.
24220  # If so, the updated path is stored in $new_path.
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24233      # Going to short mode and back again did indeed matter. Since short mode is
24234      # case insensitive, let's make it lowercase to improve readability.
24235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24236      # Now convert it back to Unix-style (cygpath)
24237      input_path=`$CYGPATH -u "$shortmode_path"`
24238      new_path="$input_path"
24239    fi
24240  fi
24241
24242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24243  if test "x$test_cygdrive_prefix" = x; then
24244    # As a simple fix, exclude /usr/bin since it's not a real path.
24245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24247      # a path prefixed by /cygdrive for fixpath to work.
24248      new_path="$CYGWIN_ROOT_PATH$input_path"
24249    fi
24250  fi
24251
24252
24253  if test "x$path" != "x$new_path"; then
24254    BOOT_JDK="$new_path"
24255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24257  fi
24258
24259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24260
24261  path="$BOOT_JDK"
24262  has_colon=`$ECHO $path | $GREP ^.:`
24263  new_path="$path"
24264  if test "x$has_colon" = x; then
24265    # Not in mixed or Windows style, start by that.
24266    new_path=`cmd //c echo $path`
24267  fi
24268
24269
24270  input_path="$new_path"
24271  # Check if we need to convert this using DOS-style short mode. If the path
24272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24273  # take no chances and rewrite it.
24274  # Note: m4 eats our [], so we need to use [ and ] instead.
24275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24276  if test "x$has_forbidden_chars" != x; then
24277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24279  fi
24280
24281
24282  windows_path="$new_path"
24283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24284    unix_path=`$CYGPATH -u "$windows_path"`
24285    new_path="$unix_path"
24286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24288    new_path="$unix_path"
24289  fi
24290
24291  if test "x$path" != "x$new_path"; then
24292    BOOT_JDK="$new_path"
24293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24295  fi
24296
24297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24299
24300    else
24301      # We're on a unix platform. Hooray! :)
24302      path="$BOOT_JDK"
24303      has_space=`$ECHO "$path" | $GREP " "`
24304      if test "x$has_space" != x; then
24305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24308      fi
24309
24310      # Use eval to expand a potential ~
24311      eval path="$path"
24312      if test ! -f "$path" && test ! -d "$path"; then
24313        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24314      fi
24315
24316      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24317    fi
24318  fi
24319
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24321$as_echo_n "checking for Boot JDK... " >&6; }
24322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24323$as_echo "$BOOT_JDK" >&6; }
24324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24325$as_echo_n "checking Boot JDK version... " >&6; }
24326            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24328$as_echo "$BOOT_JDK_VERSION" >&6; }
24329          fi # end check jdk version
24330        fi # end check javac
24331      fi # end check java
24332    fi # end check boot jdk found
24333  fi
24334
24335
24336  if test "x$BOOT_JDK_FOUND" = xno; then
24337    # Now execute the test
24338
24339  if test -x /usr/libexec/java_home; then
24340    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24341    BOOT_JDK_FOUND=maybe
24342    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24343$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24344  fi
24345
24346
24347    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24348    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24349      # Do we have a bin/java?
24350      if test ! -x "$BOOT_JDK/bin/java"; then
24351        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24353        BOOT_JDK_FOUND=no
24354      else
24355        # Do we have a bin/javac?
24356        if test ! -x "$BOOT_JDK/bin/javac"; then
24357          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24359          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24360$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24361          BOOT_JDK_FOUND=no
24362        else
24363          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24364          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24365
24366          # Extra M4 quote needed to protect [] in grep expression.
24367          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24368          if test "x$FOUND_CORRECT_VERSION" = x; then
24369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24371            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24372$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24373            BOOT_JDK_FOUND=no
24374          else
24375            # We're done! :-)
24376            BOOT_JDK_FOUND=yes
24377
24378  # Only process if variable expands to non-empty
24379
24380  if test "x$BOOT_JDK" != x; then
24381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24382
24383  # Input might be given as Windows format, start by converting to
24384  # unix format.
24385  path="$BOOT_JDK"
24386  new_path=`$CYGPATH -u "$path"`
24387
24388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24391  # "foo.exe" is OK but "foo" is an error.
24392  #
24393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24394  # It is also a way to make sure we got the proper file name for the real test later on.
24395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24396  if test "x$test_shortpath" = x; then
24397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24399    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24400  fi
24401
24402  # Call helper function which possibly converts this using DOS-style short mode.
24403  # If so, the updated path is stored in $new_path.
24404
24405  input_path="$new_path"
24406  # Check if we need to convert this using DOS-style short mode. If the path
24407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24408  # take no chances and rewrite it.
24409  # Note: m4 eats our [], so we need to use [ and ] instead.
24410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24411  if test "x$has_forbidden_chars" != x; then
24412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24416      # Going to short mode and back again did indeed matter. Since short mode is
24417      # case insensitive, let's make it lowercase to improve readability.
24418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24419      # Now convert it back to Unix-style (cygpath)
24420      input_path=`$CYGPATH -u "$shortmode_path"`
24421      new_path="$input_path"
24422    fi
24423  fi
24424
24425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24426  if test "x$test_cygdrive_prefix" = x; then
24427    # As a simple fix, exclude /usr/bin since it's not a real path.
24428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24430      # a path prefixed by /cygdrive for fixpath to work.
24431      new_path="$CYGWIN_ROOT_PATH$input_path"
24432    fi
24433  fi
24434
24435
24436  if test "x$path" != "x$new_path"; then
24437    BOOT_JDK="$new_path"
24438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24440  fi
24441
24442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443
24444  path="$BOOT_JDK"
24445  has_colon=`$ECHO $path | $GREP ^.:`
24446  new_path="$path"
24447  if test "x$has_colon" = x; then
24448    # Not in mixed or Windows style, start by that.
24449    new_path=`cmd //c echo $path`
24450  fi
24451
24452
24453  input_path="$new_path"
24454  # Check if we need to convert this using DOS-style short mode. If the path
24455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24456  # take no chances and rewrite it.
24457  # Note: m4 eats our [], so we need to use [ and ] instead.
24458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24459  if test "x$has_forbidden_chars" != x; then
24460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24462  fi
24463
24464
24465  windows_path="$new_path"
24466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24467    unix_path=`$CYGPATH -u "$windows_path"`
24468    new_path="$unix_path"
24469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24471    new_path="$unix_path"
24472  fi
24473
24474  if test "x$path" != "x$new_path"; then
24475    BOOT_JDK="$new_path"
24476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24478  fi
24479
24480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24482
24483    else
24484      # We're on a unix platform. Hooray! :)
24485      path="$BOOT_JDK"
24486      has_space=`$ECHO "$path" | $GREP " "`
24487      if test "x$has_space" != x; then
24488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24489$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24490        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24491      fi
24492
24493      # Use eval to expand a potential ~
24494      eval path="$path"
24495      if test ! -f "$path" && test ! -d "$path"; then
24496        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24497      fi
24498
24499      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24500    fi
24501  fi
24502
24503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24504$as_echo_n "checking for Boot JDK... " >&6; }
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24506$as_echo "$BOOT_JDK" >&6; }
24507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24508$as_echo_n "checking Boot JDK version... " >&6; }
24509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24511$as_echo "$BOOT_JDK_VERSION" >&6; }
24512          fi # end check jdk version
24513        fi # end check javac
24514      fi # end check java
24515    fi # end check boot jdk found
24516  fi
24517
24518  fi
24519
24520
24521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24523      # Do we have a bin/java?
24524      if test ! -x "$BOOT_JDK/bin/java"; then
24525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24527        BOOT_JDK_FOUND=no
24528      else
24529        # Do we have a bin/javac?
24530        if test ! -x "$BOOT_JDK/bin/javac"; then
24531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24535          BOOT_JDK_FOUND=no
24536        else
24537          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24538          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24539
24540          # Extra M4 quote needed to protect [] in grep expression.
24541          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24542          if test "x$FOUND_CORRECT_VERSION" = x; then
24543            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24545            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24546$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24547            BOOT_JDK_FOUND=no
24548          else
24549            # We're done! :-)
24550            BOOT_JDK_FOUND=yes
24551
24552  # Only process if variable expands to non-empty
24553
24554  if test "x$BOOT_JDK" != x; then
24555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24556
24557  # Input might be given as Windows format, start by converting to
24558  # unix format.
24559  path="$BOOT_JDK"
24560  new_path=`$CYGPATH -u "$path"`
24561
24562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24565  # "foo.exe" is OK but "foo" is an error.
24566  #
24567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24568  # It is also a way to make sure we got the proper file name for the real test later on.
24569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24570  if test "x$test_shortpath" = x; then
24571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24573    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24574  fi
24575
24576  # Call helper function which possibly converts this using DOS-style short mode.
24577  # If so, the updated path is stored in $new_path.
24578
24579  input_path="$new_path"
24580  # Check if we need to convert this using DOS-style short mode. If the path
24581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24582  # take no chances and rewrite it.
24583  # Note: m4 eats our [], so we need to use [ and ] instead.
24584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24585  if test "x$has_forbidden_chars" != x; then
24586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24590      # Going to short mode and back again did indeed matter. Since short mode is
24591      # case insensitive, let's make it lowercase to improve readability.
24592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24593      # Now convert it back to Unix-style (cygpath)
24594      input_path=`$CYGPATH -u "$shortmode_path"`
24595      new_path="$input_path"
24596    fi
24597  fi
24598
24599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24600  if test "x$test_cygdrive_prefix" = x; then
24601    # As a simple fix, exclude /usr/bin since it's not a real path.
24602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24604      # a path prefixed by /cygdrive for fixpath to work.
24605      new_path="$CYGWIN_ROOT_PATH$input_path"
24606    fi
24607  fi
24608
24609
24610  if test "x$path" != "x$new_path"; then
24611    BOOT_JDK="$new_path"
24612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24614  fi
24615
24616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24617
24618  path="$BOOT_JDK"
24619  has_colon=`$ECHO $path | $GREP ^.:`
24620  new_path="$path"
24621  if test "x$has_colon" = x; then
24622    # Not in mixed or Windows style, start by that.
24623    new_path=`cmd //c echo $path`
24624  fi
24625
24626
24627  input_path="$new_path"
24628  # Check if we need to convert this using DOS-style short mode. If the path
24629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24630  # take no chances and rewrite it.
24631  # Note: m4 eats our [], so we need to use [ and ] instead.
24632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24633  if test "x$has_forbidden_chars" != x; then
24634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24636  fi
24637
24638
24639  windows_path="$new_path"
24640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24641    unix_path=`$CYGPATH -u "$windows_path"`
24642    new_path="$unix_path"
24643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24645    new_path="$unix_path"
24646  fi
24647
24648  if test "x$path" != "x$new_path"; then
24649    BOOT_JDK="$new_path"
24650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24652  fi
24653
24654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24656
24657    else
24658      # We're on a unix platform. Hooray! :)
24659      path="$BOOT_JDK"
24660      has_space=`$ECHO "$path" | $GREP " "`
24661      if test "x$has_space" != x; then
24662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24665      fi
24666
24667      # Use eval to expand a potential ~
24668      eval path="$path"
24669      if test ! -f "$path" && test ! -d "$path"; then
24670        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24671      fi
24672
24673      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24674    fi
24675  fi
24676
24677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24678$as_echo_n "checking for Boot JDK... " >&6; }
24679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24680$as_echo "$BOOT_JDK" >&6; }
24681            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24682$as_echo_n "checking Boot JDK version... " >&6; }
24683            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24685$as_echo "$BOOT_JDK_VERSION" >&6; }
24686          fi # end check jdk version
24687        fi # end check javac
24688      fi # end check java
24689    fi # end check boot jdk found
24690  fi
24691
24692
24693  # Test: Is $JAVA_HOME set?
24694
24695  if test "x$BOOT_JDK_FOUND" = xno; then
24696    # Now execute the test
24697
24698  if test "x$JAVA_HOME" != x; then
24699    JAVA_HOME_PROCESSED="$JAVA_HOME"
24700
24701  # Only process if variable expands to non-empty
24702
24703  if test "x$JAVA_HOME_PROCESSED" != x; then
24704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24705
24706  # Input might be given as Windows format, start by converting to
24707  # unix format.
24708  path="$JAVA_HOME_PROCESSED"
24709  new_path=`$CYGPATH -u "$path"`
24710
24711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24714  # "foo.exe" is OK but "foo" is an error.
24715  #
24716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24717  # It is also a way to make sure we got the proper file name for the real test later on.
24718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24719  if test "x$test_shortpath" = x; then
24720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24721$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24722    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24723  fi
24724
24725  # Call helper function which possibly converts this using DOS-style short mode.
24726  # If so, the updated path is stored in $new_path.
24727
24728  input_path="$new_path"
24729  # Check if we need to convert this using DOS-style short mode. If the path
24730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24731  # take no chances and rewrite it.
24732  # Note: m4 eats our [], so we need to use [ and ] instead.
24733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24734  if test "x$has_forbidden_chars" != x; then
24735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24739      # Going to short mode and back again did indeed matter. Since short mode is
24740      # case insensitive, let's make it lowercase to improve readability.
24741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24742      # Now convert it back to Unix-style (cygpath)
24743      input_path=`$CYGPATH -u "$shortmode_path"`
24744      new_path="$input_path"
24745    fi
24746  fi
24747
24748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24749  if test "x$test_cygdrive_prefix" = x; then
24750    # As a simple fix, exclude /usr/bin since it's not a real path.
24751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24753      # a path prefixed by /cygdrive for fixpath to work.
24754      new_path="$CYGWIN_ROOT_PATH$input_path"
24755    fi
24756  fi
24757
24758
24759  if test "x$path" != "x$new_path"; then
24760    JAVA_HOME_PROCESSED="$new_path"
24761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24762$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24763  fi
24764
24765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24766
24767  path="$JAVA_HOME_PROCESSED"
24768  has_colon=`$ECHO $path | $GREP ^.:`
24769  new_path="$path"
24770  if test "x$has_colon" = x; then
24771    # Not in mixed or Windows style, start by that.
24772    new_path=`cmd //c echo $path`
24773  fi
24774
24775
24776  input_path="$new_path"
24777  # Check if we need to convert this using DOS-style short mode. If the path
24778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24779  # take no chances and rewrite it.
24780  # Note: m4 eats our [], so we need to use [ and ] instead.
24781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24782  if test "x$has_forbidden_chars" != x; then
24783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24785  fi
24786
24787
24788  windows_path="$new_path"
24789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24790    unix_path=`$CYGPATH -u "$windows_path"`
24791    new_path="$unix_path"
24792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24794    new_path="$unix_path"
24795  fi
24796
24797  if test "x$path" != "x$new_path"; then
24798    JAVA_HOME_PROCESSED="$new_path"
24799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24800$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24801  fi
24802
24803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24805
24806    else
24807      # We're on a unix platform. Hooray! :)
24808      path="$JAVA_HOME_PROCESSED"
24809      has_space=`$ECHO "$path" | $GREP " "`
24810      if test "x$has_space" != x; then
24811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24812$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24814      fi
24815
24816      # Use eval to expand a potential ~
24817      eval path="$path"
24818      if test ! -f "$path" && test ! -d "$path"; then
24819        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24820      fi
24821
24822      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24823    fi
24824  fi
24825
24826    if test ! -d "$JAVA_HOME_PROCESSED"; then
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24828$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24829    else
24830      # Aha, the user has set a JAVA_HOME
24831      # let us use that as the Boot JDK.
24832      BOOT_JDK="$JAVA_HOME_PROCESSED"
24833      BOOT_JDK_FOUND=maybe
24834      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24835$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24836    fi
24837  fi
24838
24839
24840    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24841    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24842      # Do we have a bin/java?
24843      if test ! -x "$BOOT_JDK/bin/java"; then
24844        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24846        BOOT_JDK_FOUND=no
24847      else
24848        # Do we have a bin/javac?
24849        if test ! -x "$BOOT_JDK/bin/javac"; then
24850          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24852          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24853$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24854          BOOT_JDK_FOUND=no
24855        else
24856          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24857          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24858
24859          # Extra M4 quote needed to protect [] in grep expression.
24860          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24861          if test "x$FOUND_CORRECT_VERSION" = x; then
24862            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24864            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24865$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24866            BOOT_JDK_FOUND=no
24867          else
24868            # We're done! :-)
24869            BOOT_JDK_FOUND=yes
24870
24871  # Only process if variable expands to non-empty
24872
24873  if test "x$BOOT_JDK" != x; then
24874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24875
24876  # Input might be given as Windows format, start by converting to
24877  # unix format.
24878  path="$BOOT_JDK"
24879  new_path=`$CYGPATH -u "$path"`
24880
24881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24884  # "foo.exe" is OK but "foo" is an error.
24885  #
24886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24887  # It is also a way to make sure we got the proper file name for the real test later on.
24888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24889  if test "x$test_shortpath" = x; then
24890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24893  fi
24894
24895  # Call helper function which possibly converts this using DOS-style short mode.
24896  # If so, the updated path is stored in $new_path.
24897
24898  input_path="$new_path"
24899  # Check if we need to convert this using DOS-style short mode. If the path
24900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24901  # take no chances and rewrite it.
24902  # Note: m4 eats our [], so we need to use [ and ] instead.
24903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24904  if test "x$has_forbidden_chars" != x; then
24905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24909      # Going to short mode and back again did indeed matter. Since short mode is
24910      # case insensitive, let's make it lowercase to improve readability.
24911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24912      # Now convert it back to Unix-style (cygpath)
24913      input_path=`$CYGPATH -u "$shortmode_path"`
24914      new_path="$input_path"
24915    fi
24916  fi
24917
24918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24919  if test "x$test_cygdrive_prefix" = x; then
24920    # As a simple fix, exclude /usr/bin since it's not a real path.
24921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24923      # a path prefixed by /cygdrive for fixpath to work.
24924      new_path="$CYGWIN_ROOT_PATH$input_path"
24925    fi
24926  fi
24927
24928
24929  if test "x$path" != "x$new_path"; then
24930    BOOT_JDK="$new_path"
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24933  fi
24934
24935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24936
24937  path="$BOOT_JDK"
24938  has_colon=`$ECHO $path | $GREP ^.:`
24939  new_path="$path"
24940  if test "x$has_colon" = x; then
24941    # Not in mixed or Windows style, start by that.
24942    new_path=`cmd //c echo $path`
24943  fi
24944
24945
24946  input_path="$new_path"
24947  # Check if we need to convert this using DOS-style short mode. If the path
24948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24949  # take no chances and rewrite it.
24950  # Note: m4 eats our [], so we need to use [ and ] instead.
24951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24952  if test "x$has_forbidden_chars" != x; then
24953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24955  fi
24956
24957
24958  windows_path="$new_path"
24959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960    unix_path=`$CYGPATH -u "$windows_path"`
24961    new_path="$unix_path"
24962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24964    new_path="$unix_path"
24965  fi
24966
24967  if test "x$path" != "x$new_path"; then
24968    BOOT_JDK="$new_path"
24969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24971  fi
24972
24973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24975
24976    else
24977      # We're on a unix platform. Hooray! :)
24978      path="$BOOT_JDK"
24979      has_space=`$ECHO "$path" | $GREP " "`
24980      if test "x$has_space" != x; then
24981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24984      fi
24985
24986      # Use eval to expand a potential ~
24987      eval path="$path"
24988      if test ! -f "$path" && test ! -d "$path"; then
24989        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24990      fi
24991
24992      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24993    fi
24994  fi
24995
24996            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24997$as_echo_n "checking for Boot JDK... " >&6; }
24998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24999$as_echo "$BOOT_JDK" >&6; }
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25001$as_echo_n "checking Boot JDK version... " >&6; }
25002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25004$as_echo "$BOOT_JDK_VERSION" >&6; }
25005          fi # end check jdk version
25006        fi # end check javac
25007      fi # end check java
25008    fi # end check boot jdk found
25009  fi
25010
25011
25012  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25013
25014  if test "x$BOOT_JDK_FOUND" = xno; then
25015    # Now execute the test
25016
25017  # Extract the first word of "javac", so it can be a program name with args.
25018set dummy javac; ac_word=$2
25019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25020$as_echo_n "checking for $ac_word... " >&6; }
25021if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25022  $as_echo_n "(cached) " >&6
25023else
25024  case $JAVAC_CHECK in
25025  [\\/]* | ?:[\\/]*)
25026  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25027  ;;
25028  *)
25029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25030for as_dir in $PATH
25031do
25032  IFS=$as_save_IFS
25033  test -z "$as_dir" && as_dir=.
25034    for ac_exec_ext in '' $ac_executable_extensions; do
25035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25036    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25038    break 2
25039  fi
25040done
25041  done
25042IFS=$as_save_IFS
25043
25044  ;;
25045esac
25046fi
25047JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25048if test -n "$JAVAC_CHECK"; then
25049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25050$as_echo "$JAVAC_CHECK" >&6; }
25051else
25052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25053$as_echo "no" >&6; }
25054fi
25055
25056
25057  # Extract the first word of "java", so it can be a program name with args.
25058set dummy java; ac_word=$2
25059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25060$as_echo_n "checking for $ac_word... " >&6; }
25061if ${ac_cv_path_JAVA_CHECK+:} false; then :
25062  $as_echo_n "(cached) " >&6
25063else
25064  case $JAVA_CHECK in
25065  [\\/]* | ?:[\\/]*)
25066  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25067  ;;
25068  *)
25069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25070for as_dir in $PATH
25071do
25072  IFS=$as_save_IFS
25073  test -z "$as_dir" && as_dir=.
25074    for ac_exec_ext in '' $ac_executable_extensions; do
25075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25076    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25078    break 2
25079  fi
25080done
25081  done
25082IFS=$as_save_IFS
25083
25084  ;;
25085esac
25086fi
25087JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25088if test -n "$JAVA_CHECK"; then
25089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25090$as_echo "$JAVA_CHECK" >&6; }
25091else
25092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25093$as_echo "no" >&6; }
25094fi
25095
25096
25097  BINARY="$JAVAC_CHECK"
25098  if test "x$JAVAC_CHECK" = x; then
25099    BINARY="$JAVA_CHECK"
25100  fi
25101  if test "x$BINARY" != x; then
25102    # So there is a java(c) binary, it might be part of a JDK.
25103    # Lets find the JDK/JRE directory by following symbolic links.
25104    # Linux/GNU systems often have links from /usr/bin/java to
25105    # /etc/alternatives/java to the real JDK binary.
25106
25107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25108    # Follow a chain of symbolic links. Use readlink
25109    # where it exists, else fall back to horribly
25110    # complicated shell code.
25111    if test "x$READLINK_TESTED" != yes; then
25112      # On MacOSX there is a readlink tool with a different
25113      # purpose than the GNU readlink tool. Check the found readlink.
25114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25115      if test "x$ISGNU" = x; then
25116        # A readlink that we do not know how to use.
25117        # Are there other non-GNU readlinks out there?
25118        READLINK_TESTED=yes
25119        READLINK=
25120      fi
25121    fi
25122
25123    if test "x$READLINK" != x; then
25124      BINARY=`$READLINK -f $BINARY`
25125    else
25126      # Save the current directory for restoring afterwards
25127      STARTDIR=$PWD
25128      COUNTER=0
25129      sym_link_dir=`$DIRNAME $BINARY`
25130      sym_link_file=`$BASENAME $BINARY`
25131      cd $sym_link_dir
25132      # Use -P flag to resolve symlinks in directories.
25133      cd `$THEPWDCMD -P`
25134      sym_link_dir=`$THEPWDCMD -P`
25135      # Resolve file symlinks
25136      while test $COUNTER -lt 20; do
25137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25138        if test "x$ISLINK" == x; then
25139          # This is not a symbolic link! We are done!
25140          break
25141        fi
25142        # Again resolve directory symlinks since the target of the just found
25143        # link could be in a different directory
25144        cd `$DIRNAME $ISLINK`
25145        sym_link_dir=`$THEPWDCMD -P`
25146        sym_link_file=`$BASENAME $ISLINK`
25147        let COUNTER=COUNTER+1
25148      done
25149      cd $STARTDIR
25150      BINARY=$sym_link_dir/$sym_link_file
25151    fi
25152  fi
25153
25154    BOOT_JDK=`dirname "$BINARY"`
25155    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25156    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25157      # Looks like we found ourselves an JDK
25158      BOOT_JDK_FOUND=maybe
25159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25160$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25161    fi
25162  fi
25163
25164
25165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25167      # Do we have a bin/java?
25168      if test ! -x "$BOOT_JDK/bin/java"; then
25169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25171        BOOT_JDK_FOUND=no
25172      else
25173        # Do we have a bin/javac?
25174        if test ! -x "$BOOT_JDK/bin/javac"; then
25175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25179          BOOT_JDK_FOUND=no
25180        else
25181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25183
25184          # Extra M4 quote needed to protect [] in grep expression.
25185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25186          if test "x$FOUND_CORRECT_VERSION" = x; then
25187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25191            BOOT_JDK_FOUND=no
25192          else
25193            # We're done! :-)
25194            BOOT_JDK_FOUND=yes
25195
25196  # Only process if variable expands to non-empty
25197
25198  if test "x$BOOT_JDK" != x; then
25199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  path="$BOOT_JDK"
25204  new_path=`$CYGPATH -u "$path"`
25205
25206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25209  # "foo.exe" is OK but "foo" is an error.
25210  #
25211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25212  # It is also a way to make sure we got the proper file name for the real test later on.
25213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25214  if test "x$test_shortpath" = x; then
25215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25218  fi
25219
25220  # Call helper function which possibly converts this using DOS-style short mode.
25221  # If so, the updated path is stored in $new_path.
25222
25223  input_path="$new_path"
25224  # Check if we need to convert this using DOS-style short mode. If the path
25225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25226  # take no chances and rewrite it.
25227  # Note: m4 eats our [], so we need to use [ and ] instead.
25228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25229  if test "x$has_forbidden_chars" != x; then
25230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25234      # Going to short mode and back again did indeed matter. Since short mode is
25235      # case insensitive, let's make it lowercase to improve readability.
25236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25237      # Now convert it back to Unix-style (cygpath)
25238      input_path=`$CYGPATH -u "$shortmode_path"`
25239      new_path="$input_path"
25240    fi
25241  fi
25242
25243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25244  if test "x$test_cygdrive_prefix" = x; then
25245    # As a simple fix, exclude /usr/bin since it's not a real path.
25246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25248      # a path prefixed by /cygdrive for fixpath to work.
25249      new_path="$CYGWIN_ROOT_PATH$input_path"
25250    fi
25251  fi
25252
25253
25254  if test "x$path" != "x$new_path"; then
25255    BOOT_JDK="$new_path"
25256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25258  fi
25259
25260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261
25262  path="$BOOT_JDK"
25263  has_colon=`$ECHO $path | $GREP ^.:`
25264  new_path="$path"
25265  if test "x$has_colon" = x; then
25266    # Not in mixed or Windows style, start by that.
25267    new_path=`cmd //c echo $path`
25268  fi
25269
25270
25271  input_path="$new_path"
25272  # Check if we need to convert this using DOS-style short mode. If the path
25273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25274  # take no chances and rewrite it.
25275  # Note: m4 eats our [], so we need to use [ and ] instead.
25276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25277  if test "x$has_forbidden_chars" != x; then
25278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25280  fi
25281
25282
25283  windows_path="$new_path"
25284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285    unix_path=`$CYGPATH -u "$windows_path"`
25286    new_path="$unix_path"
25287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25289    new_path="$unix_path"
25290  fi
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25300
25301    else
25302      # We're on a unix platform. Hooray! :)
25303      path="$BOOT_JDK"
25304      has_space=`$ECHO "$path" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25309      fi
25310
25311      # Use eval to expand a potential ~
25312      eval path="$path"
25313      if test ! -f "$path" && test ! -d "$path"; then
25314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25315      fi
25316
25317      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25318    fi
25319  fi
25320
25321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25322$as_echo_n "checking for Boot JDK... " >&6; }
25323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25324$as_echo "$BOOT_JDK" >&6; }
25325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25326$as_echo_n "checking Boot JDK version... " >&6; }
25327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25329$as_echo "$BOOT_JDK_VERSION" >&6; }
25330          fi # end check jdk version
25331        fi # end check javac
25332      fi # end check java
25333    fi # end check boot jdk found
25334  fi
25335
25336
25337  # Test: Is there a JDK installed in default, well-known locations?
25338
25339  if test "x$BOOT_JDK_FOUND" = xno; then
25340    # Now execute the test
25341
25342  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25343
25344  if test "x$BOOT_JDK_FOUND" = xno; then
25345    # Now execute the test
25346
25347  if test "x$ProgramW6432" != x; then
25348    VIRTUAL_DIR="$ProgramW6432/Java"
25349
25350  windows_path="$VIRTUAL_DIR"
25351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25352    unix_path=`$CYGPATH -u "$windows_path"`
25353    VIRTUAL_DIR="$unix_path"
25354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25356    VIRTUAL_DIR="$unix_path"
25357  fi
25358
25359
25360  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25361  BOOT_JDK_SUFFIX=""
25362  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25363  if test "x$ALL_JDKS_FOUND" != x; then
25364    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25365
25366  if test "x$BOOT_JDK_FOUND" = xno; then
25367    # Now execute the test
25368
25369        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25370        if test -d "$BOOT_JDK"; then
25371          BOOT_JDK_FOUND=maybe
25372          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25373$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25374        fi
25375
25376
25377    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25378    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25379      # Do we have a bin/java?
25380      if test ! -x "$BOOT_JDK/bin/java"; then
25381        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25383        BOOT_JDK_FOUND=no
25384      else
25385        # Do we have a bin/javac?
25386        if test ! -x "$BOOT_JDK/bin/javac"; then
25387          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25389          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25390$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25391          BOOT_JDK_FOUND=no
25392        else
25393          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25394          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25395
25396          # Extra M4 quote needed to protect [] in grep expression.
25397          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25398          if test "x$FOUND_CORRECT_VERSION" = x; then
25399            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25401            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25402$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25403            BOOT_JDK_FOUND=no
25404          else
25405            # We're done! :-)
25406            BOOT_JDK_FOUND=yes
25407
25408  # Only process if variable expands to non-empty
25409
25410  if test "x$BOOT_JDK" != x; then
25411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25412
25413  # Input might be given as Windows format, start by converting to
25414  # unix format.
25415  path="$BOOT_JDK"
25416  new_path=`$CYGPATH -u "$path"`
25417
25418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25421  # "foo.exe" is OK but "foo" is an error.
25422  #
25423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25424  # It is also a way to make sure we got the proper file name for the real test later on.
25425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25426  if test "x$test_shortpath" = x; then
25427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25429    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25430  fi
25431
25432  # Call helper function which possibly converts this using DOS-style short mode.
25433  # If so, the updated path is stored in $new_path.
25434
25435  input_path="$new_path"
25436  # Check if we need to convert this using DOS-style short mode. If the path
25437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25438  # take no chances and rewrite it.
25439  # Note: m4 eats our [], so we need to use [ and ] instead.
25440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25441  if test "x$has_forbidden_chars" != x; then
25442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25446      # Going to short mode and back again did indeed matter. Since short mode is
25447      # case insensitive, let's make it lowercase to improve readability.
25448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25449      # Now convert it back to Unix-style (cygpath)
25450      input_path=`$CYGPATH -u "$shortmode_path"`
25451      new_path="$input_path"
25452    fi
25453  fi
25454
25455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25456  if test "x$test_cygdrive_prefix" = x; then
25457    # As a simple fix, exclude /usr/bin since it's not a real path.
25458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25460      # a path prefixed by /cygdrive for fixpath to work.
25461      new_path="$CYGWIN_ROOT_PATH$input_path"
25462    fi
25463  fi
25464
25465
25466  if test "x$path" != "x$new_path"; then
25467    BOOT_JDK="$new_path"
25468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25469$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25470  fi
25471
25472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25473
25474  path="$BOOT_JDK"
25475  has_colon=`$ECHO $path | $GREP ^.:`
25476  new_path="$path"
25477  if test "x$has_colon" = x; then
25478    # Not in mixed or Windows style, start by that.
25479    new_path=`cmd //c echo $path`
25480  fi
25481
25482
25483  input_path="$new_path"
25484  # Check if we need to convert this using DOS-style short mode. If the path
25485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25486  # take no chances and rewrite it.
25487  # Note: m4 eats our [], so we need to use [ and ] instead.
25488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25489  if test "x$has_forbidden_chars" != x; then
25490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25492  fi
25493
25494
25495  windows_path="$new_path"
25496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25497    unix_path=`$CYGPATH -u "$windows_path"`
25498    new_path="$unix_path"
25499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25501    new_path="$unix_path"
25502  fi
25503
25504  if test "x$path" != "x$new_path"; then
25505    BOOT_JDK="$new_path"
25506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25507$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25508  fi
25509
25510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25512
25513    else
25514      # We're on a unix platform. Hooray! :)
25515      path="$BOOT_JDK"
25516      has_space=`$ECHO "$path" | $GREP " "`
25517      if test "x$has_space" != x; then
25518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25520        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25521      fi
25522
25523      # Use eval to expand a potential ~
25524      eval path="$path"
25525      if test ! -f "$path" && test ! -d "$path"; then
25526        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25527      fi
25528
25529      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25530    fi
25531  fi
25532
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25534$as_echo_n "checking for Boot JDK... " >&6; }
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25536$as_echo "$BOOT_JDK" >&6; }
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25538$as_echo_n "checking Boot JDK version... " >&6; }
25539            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25541$as_echo "$BOOT_JDK_VERSION" >&6; }
25542          fi # end check jdk version
25543        fi # end check javac
25544      fi # end check java
25545    fi # end check boot jdk found
25546  fi
25547
25548    done
25549  fi
25550
25551  fi
25552
25553
25554    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25555    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25556      # Do we have a bin/java?
25557      if test ! -x "$BOOT_JDK/bin/java"; then
25558        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25560        BOOT_JDK_FOUND=no
25561      else
25562        # Do we have a bin/javac?
25563        if test ! -x "$BOOT_JDK/bin/javac"; then
25564          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25566          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25567$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25568          BOOT_JDK_FOUND=no
25569        else
25570          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25571          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25572
25573          # Extra M4 quote needed to protect [] in grep expression.
25574          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25575          if test "x$FOUND_CORRECT_VERSION" = x; then
25576            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25578            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25579$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25580            BOOT_JDK_FOUND=no
25581          else
25582            # We're done! :-)
25583            BOOT_JDK_FOUND=yes
25584
25585  # Only process if variable expands to non-empty
25586
25587  if test "x$BOOT_JDK" != x; then
25588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25589
25590  # Input might be given as Windows format, start by converting to
25591  # unix format.
25592  path="$BOOT_JDK"
25593  new_path=`$CYGPATH -u "$path"`
25594
25595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25598  # "foo.exe" is OK but "foo" is an error.
25599  #
25600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25601  # It is also a way to make sure we got the proper file name for the real test later on.
25602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25603  if test "x$test_shortpath" = x; then
25604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25606    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25607  fi
25608
25609  # Call helper function which possibly converts this using DOS-style short mode.
25610  # If so, the updated path is stored in $new_path.
25611
25612  input_path="$new_path"
25613  # Check if we need to convert this using DOS-style short mode. If the path
25614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25615  # take no chances and rewrite it.
25616  # Note: m4 eats our [], so we need to use [ and ] instead.
25617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25618  if test "x$has_forbidden_chars" != x; then
25619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25623      # Going to short mode and back again did indeed matter. Since short mode is
25624      # case insensitive, let's make it lowercase to improve readability.
25625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25626      # Now convert it back to Unix-style (cygpath)
25627      input_path=`$CYGPATH -u "$shortmode_path"`
25628      new_path="$input_path"
25629    fi
25630  fi
25631
25632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25633  if test "x$test_cygdrive_prefix" = x; then
25634    # As a simple fix, exclude /usr/bin since it's not a real path.
25635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25637      # a path prefixed by /cygdrive for fixpath to work.
25638      new_path="$CYGWIN_ROOT_PATH$input_path"
25639    fi
25640  fi
25641
25642
25643  if test "x$path" != "x$new_path"; then
25644    BOOT_JDK="$new_path"
25645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25647  fi
25648
25649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25650
25651  path="$BOOT_JDK"
25652  has_colon=`$ECHO $path | $GREP ^.:`
25653  new_path="$path"
25654  if test "x$has_colon" = x; then
25655    # Not in mixed or Windows style, start by that.
25656    new_path=`cmd //c echo $path`
25657  fi
25658
25659
25660  input_path="$new_path"
25661  # Check if we need to convert this using DOS-style short mode. If the path
25662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25663  # take no chances and rewrite it.
25664  # Note: m4 eats our [], so we need to use [ and ] instead.
25665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25666  if test "x$has_forbidden_chars" != x; then
25667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25669  fi
25670
25671
25672  windows_path="$new_path"
25673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25674    unix_path=`$CYGPATH -u "$windows_path"`
25675    new_path="$unix_path"
25676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25678    new_path="$unix_path"
25679  fi
25680
25681  if test "x$path" != "x$new_path"; then
25682    BOOT_JDK="$new_path"
25683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25685  fi
25686
25687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25689
25690    else
25691      # We're on a unix platform. Hooray! :)
25692      path="$BOOT_JDK"
25693      has_space=`$ECHO "$path" | $GREP " "`
25694      if test "x$has_space" != x; then
25695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25698      fi
25699
25700      # Use eval to expand a potential ~
25701      eval path="$path"
25702      if test ! -f "$path" && test ! -d "$path"; then
25703        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25704      fi
25705
25706      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707    fi
25708  fi
25709
25710            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25711$as_echo_n "checking for Boot JDK... " >&6; }
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25713$as_echo "$BOOT_JDK" >&6; }
25714            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25715$as_echo_n "checking Boot JDK version... " >&6; }
25716            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25718$as_echo "$BOOT_JDK_VERSION" >&6; }
25719          fi # end check jdk version
25720        fi # end check javac
25721      fi # end check java
25722    fi # end check boot jdk found
25723  fi
25724
25725
25726  if test "x$BOOT_JDK_FOUND" = xno; then
25727    # Now execute the test
25728
25729  if test "x$PROGRAMW6432" != x; then
25730    VIRTUAL_DIR="$PROGRAMW6432/Java"
25731
25732  windows_path="$VIRTUAL_DIR"
25733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25734    unix_path=`$CYGPATH -u "$windows_path"`
25735    VIRTUAL_DIR="$unix_path"
25736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25738    VIRTUAL_DIR="$unix_path"
25739  fi
25740
25741
25742  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25743  BOOT_JDK_SUFFIX=""
25744  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25745  if test "x$ALL_JDKS_FOUND" != x; then
25746    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25747
25748  if test "x$BOOT_JDK_FOUND" = xno; then
25749    # Now execute the test
25750
25751        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25752        if test -d "$BOOT_JDK"; then
25753          BOOT_JDK_FOUND=maybe
25754          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25755$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25756        fi
25757
25758
25759    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25760    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25761      # Do we have a bin/java?
25762      if test ! -x "$BOOT_JDK/bin/java"; then
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25765        BOOT_JDK_FOUND=no
25766      else
25767        # Do we have a bin/javac?
25768        if test ! -x "$BOOT_JDK/bin/javac"; then
25769          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25771          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25772$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25773          BOOT_JDK_FOUND=no
25774        else
25775          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25776          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25777
25778          # Extra M4 quote needed to protect [] in grep expression.
25779          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25780          if test "x$FOUND_CORRECT_VERSION" = x; then
25781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25783            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25784$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25785            BOOT_JDK_FOUND=no
25786          else
25787            # We're done! :-)
25788            BOOT_JDK_FOUND=yes
25789
25790  # Only process if variable expands to non-empty
25791
25792  if test "x$BOOT_JDK" != x; then
25793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25794
25795  # Input might be given as Windows format, start by converting to
25796  # unix format.
25797  path="$BOOT_JDK"
25798  new_path=`$CYGPATH -u "$path"`
25799
25800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25803  # "foo.exe" is OK but "foo" is an error.
25804  #
25805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25806  # It is also a way to make sure we got the proper file name for the real test later on.
25807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25808  if test "x$test_shortpath" = x; then
25809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25811    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25812  fi
25813
25814  # Call helper function which possibly converts this using DOS-style short mode.
25815  # If so, the updated path is stored in $new_path.
25816
25817  input_path="$new_path"
25818  # Check if we need to convert this using DOS-style short mode. If the path
25819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25820  # take no chances and rewrite it.
25821  # Note: m4 eats our [], so we need to use [ and ] instead.
25822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25823  if test "x$has_forbidden_chars" != x; then
25824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25828      # Going to short mode and back again did indeed matter. Since short mode is
25829      # case insensitive, let's make it lowercase to improve readability.
25830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25831      # Now convert it back to Unix-style (cygpath)
25832      input_path=`$CYGPATH -u "$shortmode_path"`
25833      new_path="$input_path"
25834    fi
25835  fi
25836
25837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25838  if test "x$test_cygdrive_prefix" = x; then
25839    # As a simple fix, exclude /usr/bin since it's not a real path.
25840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25842      # a path prefixed by /cygdrive for fixpath to work.
25843      new_path="$CYGWIN_ROOT_PATH$input_path"
25844    fi
25845  fi
25846
25847
25848  if test "x$path" != "x$new_path"; then
25849    BOOT_JDK="$new_path"
25850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25852  fi
25853
25854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25855
25856  path="$BOOT_JDK"
25857  has_colon=`$ECHO $path | $GREP ^.:`
25858  new_path="$path"
25859  if test "x$has_colon" = x; then
25860    # Not in mixed or Windows style, start by that.
25861    new_path=`cmd //c echo $path`
25862  fi
25863
25864
25865  input_path="$new_path"
25866  # Check if we need to convert this using DOS-style short mode. If the path
25867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25868  # take no chances and rewrite it.
25869  # Note: m4 eats our [], so we need to use [ and ] instead.
25870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25871  if test "x$has_forbidden_chars" != x; then
25872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25874  fi
25875
25876
25877  windows_path="$new_path"
25878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25879    unix_path=`$CYGPATH -u "$windows_path"`
25880    new_path="$unix_path"
25881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25883    new_path="$unix_path"
25884  fi
25885
25886  if test "x$path" != "x$new_path"; then
25887    BOOT_JDK="$new_path"
25888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25890  fi
25891
25892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25894
25895    else
25896      # We're on a unix platform. Hooray! :)
25897      path="$BOOT_JDK"
25898      has_space=`$ECHO "$path" | $GREP " "`
25899      if test "x$has_space" != x; then
25900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25903      fi
25904
25905      # Use eval to expand a potential ~
25906      eval path="$path"
25907      if test ! -f "$path" && test ! -d "$path"; then
25908        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25909      fi
25910
25911      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25912    fi
25913  fi
25914
25915            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25916$as_echo_n "checking for Boot JDK... " >&6; }
25917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25918$as_echo "$BOOT_JDK" >&6; }
25919            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25920$as_echo_n "checking Boot JDK version... " >&6; }
25921            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25923$as_echo "$BOOT_JDK_VERSION" >&6; }
25924          fi # end check jdk version
25925        fi # end check javac
25926      fi # end check java
25927    fi # end check boot jdk found
25928  fi
25929
25930    done
25931  fi
25932
25933  fi
25934
25935
25936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25938      # Do we have a bin/java?
25939      if test ! -x "$BOOT_JDK/bin/java"; then
25940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25942        BOOT_JDK_FOUND=no
25943      else
25944        # Do we have a bin/javac?
25945        if test ! -x "$BOOT_JDK/bin/javac"; then
25946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25950          BOOT_JDK_FOUND=no
25951        else
25952          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25953          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25954
25955          # Extra M4 quote needed to protect [] in grep expression.
25956          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25957          if test "x$FOUND_CORRECT_VERSION" = x; then
25958            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25960            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25961$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25962            BOOT_JDK_FOUND=no
25963          else
25964            # We're done! :-)
25965            BOOT_JDK_FOUND=yes
25966
25967  # Only process if variable expands to non-empty
25968
25969  if test "x$BOOT_JDK" != x; then
25970    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25971
25972  # Input might be given as Windows format, start by converting to
25973  # unix format.
25974  path="$BOOT_JDK"
25975  new_path=`$CYGPATH -u "$path"`
25976
25977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25980  # "foo.exe" is OK but "foo" is an error.
25981  #
25982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25983  # It is also a way to make sure we got the proper file name for the real test later on.
25984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25985  if test "x$test_shortpath" = x; then
25986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25988    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25989  fi
25990
25991  # Call helper function which possibly converts this using DOS-style short mode.
25992  # If so, the updated path is stored in $new_path.
25993
25994  input_path="$new_path"
25995  # Check if we need to convert this using DOS-style short mode. If the path
25996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25997  # take no chances and rewrite it.
25998  # Note: m4 eats our [], so we need to use [ and ] instead.
25999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26000  if test "x$has_forbidden_chars" != x; then
26001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26005      # Going to short mode and back again did indeed matter. Since short mode is
26006      # case insensitive, let's make it lowercase to improve readability.
26007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26008      # Now convert it back to Unix-style (cygpath)
26009      input_path=`$CYGPATH -u "$shortmode_path"`
26010      new_path="$input_path"
26011    fi
26012  fi
26013
26014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26015  if test "x$test_cygdrive_prefix" = x; then
26016    # As a simple fix, exclude /usr/bin since it's not a real path.
26017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26019      # a path prefixed by /cygdrive for fixpath to work.
26020      new_path="$CYGWIN_ROOT_PATH$input_path"
26021    fi
26022  fi
26023
26024
26025  if test "x$path" != "x$new_path"; then
26026    BOOT_JDK="$new_path"
26027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26029  fi
26030
26031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26032
26033  path="$BOOT_JDK"
26034  has_colon=`$ECHO $path | $GREP ^.:`
26035  new_path="$path"
26036  if test "x$has_colon" = x; then
26037    # Not in mixed or Windows style, start by that.
26038    new_path=`cmd //c echo $path`
26039  fi
26040
26041
26042  input_path="$new_path"
26043  # Check if we need to convert this using DOS-style short mode. If the path
26044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26045  # take no chances and rewrite it.
26046  # Note: m4 eats our [], so we need to use [ and ] instead.
26047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26048  if test "x$has_forbidden_chars" != x; then
26049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26051  fi
26052
26053
26054  windows_path="$new_path"
26055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26056    unix_path=`$CYGPATH -u "$windows_path"`
26057    new_path="$unix_path"
26058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26060    new_path="$unix_path"
26061  fi
26062
26063  if test "x$path" != "x$new_path"; then
26064    BOOT_JDK="$new_path"
26065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26067  fi
26068
26069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26071
26072    else
26073      # We're on a unix platform. Hooray! :)
26074      path="$BOOT_JDK"
26075      has_space=`$ECHO "$path" | $GREP " "`
26076      if test "x$has_space" != x; then
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26079        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26080      fi
26081
26082      # Use eval to expand a potential ~
26083      eval path="$path"
26084      if test ! -f "$path" && test ! -d "$path"; then
26085        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26086      fi
26087
26088      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26089    fi
26090  fi
26091
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26093$as_echo_n "checking for Boot JDK... " >&6; }
26094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26095$as_echo "$BOOT_JDK" >&6; }
26096            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26097$as_echo_n "checking Boot JDK version... " >&6; }
26098            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26100$as_echo "$BOOT_JDK_VERSION" >&6; }
26101          fi # end check jdk version
26102        fi # end check javac
26103      fi # end check java
26104    fi # end check boot jdk found
26105  fi
26106
26107
26108  if test "x$BOOT_JDK_FOUND" = xno; then
26109    # Now execute the test
26110
26111  if test "x$PROGRAMFILES" != x; then
26112    VIRTUAL_DIR="$PROGRAMFILES/Java"
26113
26114  windows_path="$VIRTUAL_DIR"
26115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26116    unix_path=`$CYGPATH -u "$windows_path"`
26117    VIRTUAL_DIR="$unix_path"
26118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26120    VIRTUAL_DIR="$unix_path"
26121  fi
26122
26123
26124  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26125  BOOT_JDK_SUFFIX=""
26126  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26127  if test "x$ALL_JDKS_FOUND" != x; then
26128    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26129
26130  if test "x$BOOT_JDK_FOUND" = xno; then
26131    # Now execute the test
26132
26133        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26134        if test -d "$BOOT_JDK"; then
26135          BOOT_JDK_FOUND=maybe
26136          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26137$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26138        fi
26139
26140
26141    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26142    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26143      # Do we have a bin/java?
26144      if test ! -x "$BOOT_JDK/bin/java"; then
26145        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26147        BOOT_JDK_FOUND=no
26148      else
26149        # Do we have a bin/javac?
26150        if test ! -x "$BOOT_JDK/bin/javac"; then
26151          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26153          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26154$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26155          BOOT_JDK_FOUND=no
26156        else
26157          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26158          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26159
26160          # Extra M4 quote needed to protect [] in grep expression.
26161          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26162          if test "x$FOUND_CORRECT_VERSION" = x; then
26163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26165            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26166$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26167            BOOT_JDK_FOUND=no
26168          else
26169            # We're done! :-)
26170            BOOT_JDK_FOUND=yes
26171
26172  # Only process if variable expands to non-empty
26173
26174  if test "x$BOOT_JDK" != x; then
26175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26176
26177  # Input might be given as Windows format, start by converting to
26178  # unix format.
26179  path="$BOOT_JDK"
26180  new_path=`$CYGPATH -u "$path"`
26181
26182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26185  # "foo.exe" is OK but "foo" is an error.
26186  #
26187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26188  # It is also a way to make sure we got the proper file name for the real test later on.
26189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26190  if test "x$test_shortpath" = x; then
26191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26194  fi
26195
26196  # Call helper function which possibly converts this using DOS-style short mode.
26197  # If so, the updated path is stored in $new_path.
26198
26199  input_path="$new_path"
26200  # Check if we need to convert this using DOS-style short mode. If the path
26201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26202  # take no chances and rewrite it.
26203  # Note: m4 eats our [], so we need to use [ and ] instead.
26204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26205  if test "x$has_forbidden_chars" != x; then
26206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26210      # Going to short mode and back again did indeed matter. Since short mode is
26211      # case insensitive, let's make it lowercase to improve readability.
26212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26213      # Now convert it back to Unix-style (cygpath)
26214      input_path=`$CYGPATH -u "$shortmode_path"`
26215      new_path="$input_path"
26216    fi
26217  fi
26218
26219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26220  if test "x$test_cygdrive_prefix" = x; then
26221    # As a simple fix, exclude /usr/bin since it's not a real path.
26222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26224      # a path prefixed by /cygdrive for fixpath to work.
26225      new_path="$CYGWIN_ROOT_PATH$input_path"
26226    fi
26227  fi
26228
26229
26230  if test "x$path" != "x$new_path"; then
26231    BOOT_JDK="$new_path"
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26234  fi
26235
26236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26237
26238  path="$BOOT_JDK"
26239  has_colon=`$ECHO $path | $GREP ^.:`
26240  new_path="$path"
26241  if test "x$has_colon" = x; then
26242    # Not in mixed or Windows style, start by that.
26243    new_path=`cmd //c echo $path`
26244  fi
26245
26246
26247  input_path="$new_path"
26248  # Check if we need to convert this using DOS-style short mode. If the path
26249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26250  # take no chances and rewrite it.
26251  # Note: m4 eats our [], so we need to use [ and ] instead.
26252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26253  if test "x$has_forbidden_chars" != x; then
26254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26256  fi
26257
26258
26259  windows_path="$new_path"
26260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26261    unix_path=`$CYGPATH -u "$windows_path"`
26262    new_path="$unix_path"
26263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26265    new_path="$unix_path"
26266  fi
26267
26268  if test "x$path" != "x$new_path"; then
26269    BOOT_JDK="$new_path"
26270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26272  fi
26273
26274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26276
26277    else
26278      # We're on a unix platform. Hooray! :)
26279      path="$BOOT_JDK"
26280      has_space=`$ECHO "$path" | $GREP " "`
26281      if test "x$has_space" != x; then
26282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26285      fi
26286
26287      # Use eval to expand a potential ~
26288      eval path="$path"
26289      if test ! -f "$path" && test ! -d "$path"; then
26290        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26291      fi
26292
26293      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26294    fi
26295  fi
26296
26297            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26298$as_echo_n "checking for Boot JDK... " >&6; }
26299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26300$as_echo "$BOOT_JDK" >&6; }
26301            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26302$as_echo_n "checking Boot JDK version... " >&6; }
26303            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26305$as_echo "$BOOT_JDK_VERSION" >&6; }
26306          fi # end check jdk version
26307        fi # end check javac
26308      fi # end check java
26309    fi # end check boot jdk found
26310  fi
26311
26312    done
26313  fi
26314
26315  fi
26316
26317
26318    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26319    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26320      # Do we have a bin/java?
26321      if test ! -x "$BOOT_JDK/bin/java"; then
26322        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26324        BOOT_JDK_FOUND=no
26325      else
26326        # Do we have a bin/javac?
26327        if test ! -x "$BOOT_JDK/bin/javac"; then
26328          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26330          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26331$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26332          BOOT_JDK_FOUND=no
26333        else
26334          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26335          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26336
26337          # Extra M4 quote needed to protect [] in grep expression.
26338          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26339          if test "x$FOUND_CORRECT_VERSION" = x; then
26340            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26342            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26343$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26344            BOOT_JDK_FOUND=no
26345          else
26346            # We're done! :-)
26347            BOOT_JDK_FOUND=yes
26348
26349  # Only process if variable expands to non-empty
26350
26351  if test "x$BOOT_JDK" != x; then
26352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26353
26354  # Input might be given as Windows format, start by converting to
26355  # unix format.
26356  path="$BOOT_JDK"
26357  new_path=`$CYGPATH -u "$path"`
26358
26359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26362  # "foo.exe" is OK but "foo" is an error.
26363  #
26364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26365  # It is also a way to make sure we got the proper file name for the real test later on.
26366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26367  if test "x$test_shortpath" = x; then
26368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26370    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26371  fi
26372
26373  # Call helper function which possibly converts this using DOS-style short mode.
26374  # If so, the updated path is stored in $new_path.
26375
26376  input_path="$new_path"
26377  # Check if we need to convert this using DOS-style short mode. If the path
26378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26379  # take no chances and rewrite it.
26380  # Note: m4 eats our [], so we need to use [ and ] instead.
26381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26382  if test "x$has_forbidden_chars" != x; then
26383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26387      # Going to short mode and back again did indeed matter. Since short mode is
26388      # case insensitive, let's make it lowercase to improve readability.
26389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26390      # Now convert it back to Unix-style (cygpath)
26391      input_path=`$CYGPATH -u "$shortmode_path"`
26392      new_path="$input_path"
26393    fi
26394  fi
26395
26396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26397  if test "x$test_cygdrive_prefix" = x; then
26398    # As a simple fix, exclude /usr/bin since it's not a real path.
26399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26401      # a path prefixed by /cygdrive for fixpath to work.
26402      new_path="$CYGWIN_ROOT_PATH$input_path"
26403    fi
26404  fi
26405
26406
26407  if test "x$path" != "x$new_path"; then
26408    BOOT_JDK="$new_path"
26409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26411  fi
26412
26413    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26414
26415  path="$BOOT_JDK"
26416  has_colon=`$ECHO $path | $GREP ^.:`
26417  new_path="$path"
26418  if test "x$has_colon" = x; then
26419    # Not in mixed or Windows style, start by that.
26420    new_path=`cmd //c echo $path`
26421  fi
26422
26423
26424  input_path="$new_path"
26425  # Check if we need to convert this using DOS-style short mode. If the path
26426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26427  # take no chances and rewrite it.
26428  # Note: m4 eats our [], so we need to use [ and ] instead.
26429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26430  if test "x$has_forbidden_chars" != x; then
26431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26433  fi
26434
26435
26436  windows_path="$new_path"
26437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26438    unix_path=`$CYGPATH -u "$windows_path"`
26439    new_path="$unix_path"
26440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26442    new_path="$unix_path"
26443  fi
26444
26445  if test "x$path" != "x$new_path"; then
26446    BOOT_JDK="$new_path"
26447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26449  fi
26450
26451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26453
26454    else
26455      # We're on a unix platform. Hooray! :)
26456      path="$BOOT_JDK"
26457      has_space=`$ECHO "$path" | $GREP " "`
26458      if test "x$has_space" != x; then
26459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26461        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26462      fi
26463
26464      # Use eval to expand a potential ~
26465      eval path="$path"
26466      if test ! -f "$path" && test ! -d "$path"; then
26467        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26468      fi
26469
26470      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26471    fi
26472  fi
26473
26474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26475$as_echo_n "checking for Boot JDK... " >&6; }
26476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26477$as_echo "$BOOT_JDK" >&6; }
26478            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26479$as_echo_n "checking Boot JDK version... " >&6; }
26480            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26482$as_echo "$BOOT_JDK_VERSION" >&6; }
26483          fi # end check jdk version
26484        fi # end check javac
26485      fi # end check java
26486    fi # end check boot jdk found
26487  fi
26488
26489
26490  if test "x$BOOT_JDK_FOUND" = xno; then
26491    # Now execute the test
26492
26493  if test "x$ProgramFiles" != x; then
26494    VIRTUAL_DIR="$ProgramFiles/Java"
26495
26496  windows_path="$VIRTUAL_DIR"
26497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26498    unix_path=`$CYGPATH -u "$windows_path"`
26499    VIRTUAL_DIR="$unix_path"
26500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26502    VIRTUAL_DIR="$unix_path"
26503  fi
26504
26505
26506  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26507  BOOT_JDK_SUFFIX=""
26508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26509  if test "x$ALL_JDKS_FOUND" != x; then
26510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26511
26512  if test "x$BOOT_JDK_FOUND" = xno; then
26513    # Now execute the test
26514
26515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26516        if test -d "$BOOT_JDK"; then
26517          BOOT_JDK_FOUND=maybe
26518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26520        fi
26521
26522
26523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26525      # Do we have a bin/java?
26526      if test ! -x "$BOOT_JDK/bin/java"; then
26527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26529        BOOT_JDK_FOUND=no
26530      else
26531        # Do we have a bin/javac?
26532        if test ! -x "$BOOT_JDK/bin/javac"; then
26533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26537          BOOT_JDK_FOUND=no
26538        else
26539          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26540          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26541
26542          # Extra M4 quote needed to protect [] in grep expression.
26543          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26544          if test "x$FOUND_CORRECT_VERSION" = x; then
26545            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26547            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26548$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26549            BOOT_JDK_FOUND=no
26550          else
26551            # We're done! :-)
26552            BOOT_JDK_FOUND=yes
26553
26554  # Only process if variable expands to non-empty
26555
26556  if test "x$BOOT_JDK" != x; then
26557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26558
26559  # Input might be given as Windows format, start by converting to
26560  # unix format.
26561  path="$BOOT_JDK"
26562  new_path=`$CYGPATH -u "$path"`
26563
26564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26567  # "foo.exe" is OK but "foo" is an error.
26568  #
26569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26570  # It is also a way to make sure we got the proper file name for the real test later on.
26571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26572  if test "x$test_shortpath" = x; then
26573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26575    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26576  fi
26577
26578  # Call helper function which possibly converts this using DOS-style short mode.
26579  # If so, the updated path is stored in $new_path.
26580
26581  input_path="$new_path"
26582  # Check if we need to convert this using DOS-style short mode. If the path
26583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26584  # take no chances and rewrite it.
26585  # Note: m4 eats our [], so we need to use [ and ] instead.
26586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26587  if test "x$has_forbidden_chars" != x; then
26588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26592      # Going to short mode and back again did indeed matter. Since short mode is
26593      # case insensitive, let's make it lowercase to improve readability.
26594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26595      # Now convert it back to Unix-style (cygpath)
26596      input_path=`$CYGPATH -u "$shortmode_path"`
26597      new_path="$input_path"
26598    fi
26599  fi
26600
26601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26602  if test "x$test_cygdrive_prefix" = x; then
26603    # As a simple fix, exclude /usr/bin since it's not a real path.
26604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26606      # a path prefixed by /cygdrive for fixpath to work.
26607      new_path="$CYGWIN_ROOT_PATH$input_path"
26608    fi
26609  fi
26610
26611
26612  if test "x$path" != "x$new_path"; then
26613    BOOT_JDK="$new_path"
26614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26616  fi
26617
26618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619
26620  path="$BOOT_JDK"
26621  has_colon=`$ECHO $path | $GREP ^.:`
26622  new_path="$path"
26623  if test "x$has_colon" = x; then
26624    # Not in mixed or Windows style, start by that.
26625    new_path=`cmd //c echo $path`
26626  fi
26627
26628
26629  input_path="$new_path"
26630  # Check if we need to convert this using DOS-style short mode. If the path
26631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26632  # take no chances and rewrite it.
26633  # Note: m4 eats our [], so we need to use [ and ] instead.
26634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26635  if test "x$has_forbidden_chars" != x; then
26636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26638  fi
26639
26640
26641  windows_path="$new_path"
26642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26643    unix_path=`$CYGPATH -u "$windows_path"`
26644    new_path="$unix_path"
26645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26647    new_path="$unix_path"
26648  fi
26649
26650  if test "x$path" != "x$new_path"; then
26651    BOOT_JDK="$new_path"
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26654  fi
26655
26656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26658
26659    else
26660      # We're on a unix platform. Hooray! :)
26661      path="$BOOT_JDK"
26662      has_space=`$ECHO "$path" | $GREP " "`
26663      if test "x$has_space" != x; then
26664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26667      fi
26668
26669      # Use eval to expand a potential ~
26670      eval path="$path"
26671      if test ! -f "$path" && test ! -d "$path"; then
26672        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26673      fi
26674
26675      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26676    fi
26677  fi
26678
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26680$as_echo_n "checking for Boot JDK... " >&6; }
26681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26682$as_echo "$BOOT_JDK" >&6; }
26683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26684$as_echo_n "checking Boot JDK version... " >&6; }
26685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26687$as_echo "$BOOT_JDK_VERSION" >&6; }
26688          fi # end check jdk version
26689        fi # end check javac
26690      fi # end check java
26691    fi # end check boot jdk found
26692  fi
26693
26694    done
26695  fi
26696
26697  fi
26698
26699
26700    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26701    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26702      # Do we have a bin/java?
26703      if test ! -x "$BOOT_JDK/bin/java"; then
26704        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26706        BOOT_JDK_FOUND=no
26707      else
26708        # Do we have a bin/javac?
26709        if test ! -x "$BOOT_JDK/bin/javac"; then
26710          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26712          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26713$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26714          BOOT_JDK_FOUND=no
26715        else
26716          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26717          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26718
26719          # Extra M4 quote needed to protect [] in grep expression.
26720          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26721          if test "x$FOUND_CORRECT_VERSION" = x; then
26722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26724            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26725$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26726            BOOT_JDK_FOUND=no
26727          else
26728            # We're done! :-)
26729            BOOT_JDK_FOUND=yes
26730
26731  # Only process if variable expands to non-empty
26732
26733  if test "x$BOOT_JDK" != x; then
26734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735
26736  # Input might be given as Windows format, start by converting to
26737  # unix format.
26738  path="$BOOT_JDK"
26739  new_path=`$CYGPATH -u "$path"`
26740
26741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26744  # "foo.exe" is OK but "foo" is an error.
26745  #
26746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26747  # It is also a way to make sure we got the proper file name for the real test later on.
26748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26749  if test "x$test_shortpath" = x; then
26750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26752    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26753  fi
26754
26755  # Call helper function which possibly converts this using DOS-style short mode.
26756  # If so, the updated path is stored in $new_path.
26757
26758  input_path="$new_path"
26759  # Check if we need to convert this using DOS-style short mode. If the path
26760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26761  # take no chances and rewrite it.
26762  # Note: m4 eats our [], so we need to use [ and ] instead.
26763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26764  if test "x$has_forbidden_chars" != x; then
26765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26769      # Going to short mode and back again did indeed matter. Since short mode is
26770      # case insensitive, let's make it lowercase to improve readability.
26771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26772      # Now convert it back to Unix-style (cygpath)
26773      input_path=`$CYGPATH -u "$shortmode_path"`
26774      new_path="$input_path"
26775    fi
26776  fi
26777
26778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26779  if test "x$test_cygdrive_prefix" = x; then
26780    # As a simple fix, exclude /usr/bin since it's not a real path.
26781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26783      # a path prefixed by /cygdrive for fixpath to work.
26784      new_path="$CYGWIN_ROOT_PATH$input_path"
26785    fi
26786  fi
26787
26788
26789  if test "x$path" != "x$new_path"; then
26790    BOOT_JDK="$new_path"
26791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26793  fi
26794
26795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26796
26797  path="$BOOT_JDK"
26798  has_colon=`$ECHO $path | $GREP ^.:`
26799  new_path="$path"
26800  if test "x$has_colon" = x; then
26801    # Not in mixed or Windows style, start by that.
26802    new_path=`cmd //c echo $path`
26803  fi
26804
26805
26806  input_path="$new_path"
26807  # Check if we need to convert this using DOS-style short mode. If the path
26808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26809  # take no chances and rewrite it.
26810  # Note: m4 eats our [], so we need to use [ and ] instead.
26811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26812  if test "x$has_forbidden_chars" != x; then
26813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26815  fi
26816
26817
26818  windows_path="$new_path"
26819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26820    unix_path=`$CYGPATH -u "$windows_path"`
26821    new_path="$unix_path"
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26824    new_path="$unix_path"
26825  fi
26826
26827  if test "x$path" != "x$new_path"; then
26828    BOOT_JDK="$new_path"
26829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26831  fi
26832
26833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26835
26836    else
26837      # We're on a unix platform. Hooray! :)
26838      path="$BOOT_JDK"
26839      has_space=`$ECHO "$path" | $GREP " "`
26840      if test "x$has_space" != x; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26844      fi
26845
26846      # Use eval to expand a potential ~
26847      eval path="$path"
26848      if test ! -f "$path" && test ! -d "$path"; then
26849        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26850      fi
26851
26852      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26853    fi
26854  fi
26855
26856            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26857$as_echo_n "checking for Boot JDK... " >&6; }
26858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26859$as_echo "$BOOT_JDK" >&6; }
26860            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26861$as_echo_n "checking Boot JDK version... " >&6; }
26862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26864$as_echo "$BOOT_JDK_VERSION" >&6; }
26865          fi # end check jdk version
26866        fi # end check javac
26867      fi # end check java
26868    fi # end check boot jdk found
26869  fi
26870
26871
26872  if test "x$BOOT_JDK_FOUND" = xno; then
26873    # Now execute the test
26874
26875  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26876  BOOT_JDK_SUFFIX=""
26877  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26878  if test "x$ALL_JDKS_FOUND" != x; then
26879    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26880
26881  if test "x$BOOT_JDK_FOUND" = xno; then
26882    # Now execute the test
26883
26884        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26885        if test -d "$BOOT_JDK"; then
26886          BOOT_JDK_FOUND=maybe
26887          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26888$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26889        fi
26890
26891
26892    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26893    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26894      # Do we have a bin/java?
26895      if test ! -x "$BOOT_JDK/bin/java"; then
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26898        BOOT_JDK_FOUND=no
26899      else
26900        # Do we have a bin/javac?
26901        if test ! -x "$BOOT_JDK/bin/javac"; then
26902          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26904          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26905$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26906          BOOT_JDK_FOUND=no
26907        else
26908          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26909          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26910
26911          # Extra M4 quote needed to protect [] in grep expression.
26912          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26913          if test "x$FOUND_CORRECT_VERSION" = x; then
26914            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26916            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26917$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26918            BOOT_JDK_FOUND=no
26919          else
26920            # We're done! :-)
26921            BOOT_JDK_FOUND=yes
26922
26923  # Only process if variable expands to non-empty
26924
26925  if test "x$BOOT_JDK" != x; then
26926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26927
26928  # Input might be given as Windows format, start by converting to
26929  # unix format.
26930  path="$BOOT_JDK"
26931  new_path=`$CYGPATH -u "$path"`
26932
26933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26936  # "foo.exe" is OK but "foo" is an error.
26937  #
26938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26939  # It is also a way to make sure we got the proper file name for the real test later on.
26940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26941  if test "x$test_shortpath" = x; then
26942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26944    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26945  fi
26946
26947  # Call helper function which possibly converts this using DOS-style short mode.
26948  # If so, the updated path is stored in $new_path.
26949
26950  input_path="$new_path"
26951  # Check if we need to convert this using DOS-style short mode. If the path
26952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26953  # take no chances and rewrite it.
26954  # Note: m4 eats our [], so we need to use [ and ] instead.
26955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26956  if test "x$has_forbidden_chars" != x; then
26957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26961      # Going to short mode and back again did indeed matter. Since short mode is
26962      # case insensitive, let's make it lowercase to improve readability.
26963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26964      # Now convert it back to Unix-style (cygpath)
26965      input_path=`$CYGPATH -u "$shortmode_path"`
26966      new_path="$input_path"
26967    fi
26968  fi
26969
26970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26971  if test "x$test_cygdrive_prefix" = x; then
26972    # As a simple fix, exclude /usr/bin since it's not a real path.
26973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26975      # a path prefixed by /cygdrive for fixpath to work.
26976      new_path="$CYGWIN_ROOT_PATH$input_path"
26977    fi
26978  fi
26979
26980
26981  if test "x$path" != "x$new_path"; then
26982    BOOT_JDK="$new_path"
26983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26985  fi
26986
26987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26988
26989  path="$BOOT_JDK"
26990  has_colon=`$ECHO $path | $GREP ^.:`
26991  new_path="$path"
26992  if test "x$has_colon" = x; then
26993    # Not in mixed or Windows style, start by that.
26994    new_path=`cmd //c echo $path`
26995  fi
26996
26997
26998  input_path="$new_path"
26999  # Check if we need to convert this using DOS-style short mode. If the path
27000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27001  # take no chances and rewrite it.
27002  # Note: m4 eats our [], so we need to use [ and ] instead.
27003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27004  if test "x$has_forbidden_chars" != x; then
27005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27007  fi
27008
27009
27010  windows_path="$new_path"
27011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27012    unix_path=`$CYGPATH -u "$windows_path"`
27013    new_path="$unix_path"
27014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27016    new_path="$unix_path"
27017  fi
27018
27019  if test "x$path" != "x$new_path"; then
27020    BOOT_JDK="$new_path"
27021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27023  fi
27024
27025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27027
27028    else
27029      # We're on a unix platform. Hooray! :)
27030      path="$BOOT_JDK"
27031      has_space=`$ECHO "$path" | $GREP " "`
27032      if test "x$has_space" != x; then
27033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27036      fi
27037
27038      # Use eval to expand a potential ~
27039      eval path="$path"
27040      if test ! -f "$path" && test ! -d "$path"; then
27041        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27042      fi
27043
27044      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27045    fi
27046  fi
27047
27048            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27049$as_echo_n "checking for Boot JDK... " >&6; }
27050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27051$as_echo "$BOOT_JDK" >&6; }
27052            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27053$as_echo_n "checking Boot JDK version... " >&6; }
27054            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27056$as_echo "$BOOT_JDK_VERSION" >&6; }
27057          fi # end check jdk version
27058        fi # end check javac
27059      fi # end check java
27060    fi # end check boot jdk found
27061  fi
27062
27063    done
27064  fi
27065
27066
27067    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27068    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27069      # Do we have a bin/java?
27070      if test ! -x "$BOOT_JDK/bin/java"; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27073        BOOT_JDK_FOUND=no
27074      else
27075        # Do we have a bin/javac?
27076        if test ! -x "$BOOT_JDK/bin/javac"; then
27077          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27079          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27080$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27081          BOOT_JDK_FOUND=no
27082        else
27083          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27084          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27085
27086          # Extra M4 quote needed to protect [] in grep expression.
27087          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27088          if test "x$FOUND_CORRECT_VERSION" = x; then
27089            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27091            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27092$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27093            BOOT_JDK_FOUND=no
27094          else
27095            # We're done! :-)
27096            BOOT_JDK_FOUND=yes
27097
27098  # Only process if variable expands to non-empty
27099
27100  if test "x$BOOT_JDK" != x; then
27101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102
27103  # Input might be given as Windows format, start by converting to
27104  # unix format.
27105  path="$BOOT_JDK"
27106  new_path=`$CYGPATH -u "$path"`
27107
27108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27111  # "foo.exe" is OK but "foo" is an error.
27112  #
27113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27114  # It is also a way to make sure we got the proper file name for the real test later on.
27115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27116  if test "x$test_shortpath" = x; then
27117    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27119    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27120  fi
27121
27122  # Call helper function which possibly converts this using DOS-style short mode.
27123  # If so, the updated path is stored in $new_path.
27124
27125  input_path="$new_path"
27126  # Check if we need to convert this using DOS-style short mode. If the path
27127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27128  # take no chances and rewrite it.
27129  # Note: m4 eats our [], so we need to use [ and ] instead.
27130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27131  if test "x$has_forbidden_chars" != x; then
27132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27136      # Going to short mode and back again did indeed matter. Since short mode is
27137      # case insensitive, let's make it lowercase to improve readability.
27138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27139      # Now convert it back to Unix-style (cygpath)
27140      input_path=`$CYGPATH -u "$shortmode_path"`
27141      new_path="$input_path"
27142    fi
27143  fi
27144
27145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27146  if test "x$test_cygdrive_prefix" = x; then
27147    # As a simple fix, exclude /usr/bin since it's not a real path.
27148    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27150      # a path prefixed by /cygdrive for fixpath to work.
27151      new_path="$CYGWIN_ROOT_PATH$input_path"
27152    fi
27153  fi
27154
27155
27156  if test "x$path" != "x$new_path"; then
27157    BOOT_JDK="$new_path"
27158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27159$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27160  fi
27161
27162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27163
27164  path="$BOOT_JDK"
27165  has_colon=`$ECHO $path | $GREP ^.:`
27166  new_path="$path"
27167  if test "x$has_colon" = x; then
27168    # Not in mixed or Windows style, start by that.
27169    new_path=`cmd //c echo $path`
27170  fi
27171
27172
27173  input_path="$new_path"
27174  # Check if we need to convert this using DOS-style short mode. If the path
27175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27176  # take no chances and rewrite it.
27177  # Note: m4 eats our [], so we need to use [ and ] instead.
27178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27179  if test "x$has_forbidden_chars" != x; then
27180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27182  fi
27183
27184
27185  windows_path="$new_path"
27186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27187    unix_path=`$CYGPATH -u "$windows_path"`
27188    new_path="$unix_path"
27189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27191    new_path="$unix_path"
27192  fi
27193
27194  if test "x$path" != "x$new_path"; then
27195    BOOT_JDK="$new_path"
27196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27198  fi
27199
27200  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27201  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27202
27203    else
27204      # We're on a unix platform. Hooray! :)
27205      path="$BOOT_JDK"
27206      has_space=`$ECHO "$path" | $GREP " "`
27207      if test "x$has_space" != x; then
27208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27210        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27211      fi
27212
27213      # Use eval to expand a potential ~
27214      eval path="$path"
27215      if test ! -f "$path" && test ! -d "$path"; then
27216        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27217      fi
27218
27219      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27220    fi
27221  fi
27222
27223            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27224$as_echo_n "checking for Boot JDK... " >&6; }
27225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27226$as_echo "$BOOT_JDK" >&6; }
27227            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27228$as_echo_n "checking Boot JDK version... " >&6; }
27229            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27231$as_echo "$BOOT_JDK_VERSION" >&6; }
27232          fi # end check jdk version
27233        fi # end check javac
27234      fi # end check java
27235    fi # end check boot jdk found
27236  fi
27237
27238  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27239
27240  if test "x$BOOT_JDK_FOUND" = xno; then
27241    # Now execute the test
27242
27243  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27244  BOOT_JDK_SUFFIX="/Contents/Home"
27245  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27246  if test "x$ALL_JDKS_FOUND" != x; then
27247    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27248
27249  if test "x$BOOT_JDK_FOUND" = xno; then
27250    # Now execute the test
27251
27252        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27253        if test -d "$BOOT_JDK"; then
27254          BOOT_JDK_FOUND=maybe
27255          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27256$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27257        fi
27258
27259
27260    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27261    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27262      # Do we have a bin/java?
27263      if test ! -x "$BOOT_JDK/bin/java"; then
27264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27266        BOOT_JDK_FOUND=no
27267      else
27268        # Do we have a bin/javac?
27269        if test ! -x "$BOOT_JDK/bin/javac"; then
27270          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27272          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27273$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27274          BOOT_JDK_FOUND=no
27275        else
27276          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27277          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27278
27279          # Extra M4 quote needed to protect [] in grep expression.
27280          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27281          if test "x$FOUND_CORRECT_VERSION" = x; then
27282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27284            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27285$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27286            BOOT_JDK_FOUND=no
27287          else
27288            # We're done! :-)
27289            BOOT_JDK_FOUND=yes
27290
27291  # Only process if variable expands to non-empty
27292
27293  if test "x$BOOT_JDK" != x; then
27294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27295
27296  # Input might be given as Windows format, start by converting to
27297  # unix format.
27298  path="$BOOT_JDK"
27299  new_path=`$CYGPATH -u "$path"`
27300
27301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27304  # "foo.exe" is OK but "foo" is an error.
27305  #
27306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27307  # It is also a way to make sure we got the proper file name for the real test later on.
27308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27309  if test "x$test_shortpath" = x; then
27310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27312    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27313  fi
27314
27315  # Call helper function which possibly converts this using DOS-style short mode.
27316  # If so, the updated path is stored in $new_path.
27317
27318  input_path="$new_path"
27319  # Check if we need to convert this using DOS-style short mode. If the path
27320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27321  # take no chances and rewrite it.
27322  # Note: m4 eats our [], so we need to use [ and ] instead.
27323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27324  if test "x$has_forbidden_chars" != x; then
27325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27329      # Going to short mode and back again did indeed matter. Since short mode is
27330      # case insensitive, let's make it lowercase to improve readability.
27331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27332      # Now convert it back to Unix-style (cygpath)
27333      input_path=`$CYGPATH -u "$shortmode_path"`
27334      new_path="$input_path"
27335    fi
27336  fi
27337
27338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27339  if test "x$test_cygdrive_prefix" = x; then
27340    # As a simple fix, exclude /usr/bin since it's not a real path.
27341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27343      # a path prefixed by /cygdrive for fixpath to work.
27344      new_path="$CYGWIN_ROOT_PATH$input_path"
27345    fi
27346  fi
27347
27348
27349  if test "x$path" != "x$new_path"; then
27350    BOOT_JDK="$new_path"
27351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27353  fi
27354
27355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27356
27357  path="$BOOT_JDK"
27358  has_colon=`$ECHO $path | $GREP ^.:`
27359  new_path="$path"
27360  if test "x$has_colon" = x; then
27361    # Not in mixed or Windows style, start by that.
27362    new_path=`cmd //c echo $path`
27363  fi
27364
27365
27366  input_path="$new_path"
27367  # Check if we need to convert this using DOS-style short mode. If the path
27368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27369  # take no chances and rewrite it.
27370  # Note: m4 eats our [], so we need to use [ and ] instead.
27371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27372  if test "x$has_forbidden_chars" != x; then
27373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27375  fi
27376
27377
27378  windows_path="$new_path"
27379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380    unix_path=`$CYGPATH -u "$windows_path"`
27381    new_path="$unix_path"
27382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27384    new_path="$unix_path"
27385  fi
27386
27387  if test "x$path" != "x$new_path"; then
27388    BOOT_JDK="$new_path"
27389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27391  fi
27392
27393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27395
27396    else
27397      # We're on a unix platform. Hooray! :)
27398      path="$BOOT_JDK"
27399      has_space=`$ECHO "$path" | $GREP " "`
27400      if test "x$has_space" != x; then
27401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27404      fi
27405
27406      # Use eval to expand a potential ~
27407      eval path="$path"
27408      if test ! -f "$path" && test ! -d "$path"; then
27409        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27410      fi
27411
27412      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27413    fi
27414  fi
27415
27416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27417$as_echo_n "checking for Boot JDK... " >&6; }
27418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27419$as_echo "$BOOT_JDK" >&6; }
27420            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27421$as_echo_n "checking Boot JDK version... " >&6; }
27422            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27424$as_echo "$BOOT_JDK_VERSION" >&6; }
27425          fi # end check jdk version
27426        fi # end check javac
27427      fi # end check java
27428    fi # end check boot jdk found
27429  fi
27430
27431    done
27432  fi
27433
27434
27435    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27436    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27437      # Do we have a bin/java?
27438      if test ! -x "$BOOT_JDK/bin/java"; then
27439        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27441        BOOT_JDK_FOUND=no
27442      else
27443        # Do we have a bin/javac?
27444        if test ! -x "$BOOT_JDK/bin/javac"; then
27445          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27447          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27448$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27449          BOOT_JDK_FOUND=no
27450        else
27451          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27452          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27453
27454          # Extra M4 quote needed to protect [] in grep expression.
27455          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27456          if test "x$FOUND_CORRECT_VERSION" = x; then
27457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27459            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27460$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27461            BOOT_JDK_FOUND=no
27462          else
27463            # We're done! :-)
27464            BOOT_JDK_FOUND=yes
27465
27466  # Only process if variable expands to non-empty
27467
27468  if test "x$BOOT_JDK" != x; then
27469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27470
27471  # Input might be given as Windows format, start by converting to
27472  # unix format.
27473  path="$BOOT_JDK"
27474  new_path=`$CYGPATH -u "$path"`
27475
27476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27479  # "foo.exe" is OK but "foo" is an error.
27480  #
27481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27482  # It is also a way to make sure we got the proper file name for the real test later on.
27483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27484  if test "x$test_shortpath" = x; then
27485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27488  fi
27489
27490  # Call helper function which possibly converts this using DOS-style short mode.
27491  # If so, the updated path is stored in $new_path.
27492
27493  input_path="$new_path"
27494  # Check if we need to convert this using DOS-style short mode. If the path
27495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27496  # take no chances and rewrite it.
27497  # Note: m4 eats our [], so we need to use [ and ] instead.
27498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27499  if test "x$has_forbidden_chars" != x; then
27500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27504      # Going to short mode and back again did indeed matter. Since short mode is
27505      # case insensitive, let's make it lowercase to improve readability.
27506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27507      # Now convert it back to Unix-style (cygpath)
27508      input_path=`$CYGPATH -u "$shortmode_path"`
27509      new_path="$input_path"
27510    fi
27511  fi
27512
27513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27514  if test "x$test_cygdrive_prefix" = x; then
27515    # As a simple fix, exclude /usr/bin since it's not a real path.
27516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27518      # a path prefixed by /cygdrive for fixpath to work.
27519      new_path="$CYGWIN_ROOT_PATH$input_path"
27520    fi
27521  fi
27522
27523
27524  if test "x$path" != "x$new_path"; then
27525    BOOT_JDK="$new_path"
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27528  fi
27529
27530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27531
27532  path="$BOOT_JDK"
27533  has_colon=`$ECHO $path | $GREP ^.:`
27534  new_path="$path"
27535  if test "x$has_colon" = x; then
27536    # Not in mixed or Windows style, start by that.
27537    new_path=`cmd //c echo $path`
27538  fi
27539
27540
27541  input_path="$new_path"
27542  # Check if we need to convert this using DOS-style short mode. If the path
27543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27544  # take no chances and rewrite it.
27545  # Note: m4 eats our [], so we need to use [ and ] instead.
27546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27547  if test "x$has_forbidden_chars" != x; then
27548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27550  fi
27551
27552
27553  windows_path="$new_path"
27554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27555    unix_path=`$CYGPATH -u "$windows_path"`
27556    new_path="$unix_path"
27557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27559    new_path="$unix_path"
27560  fi
27561
27562  if test "x$path" != "x$new_path"; then
27563    BOOT_JDK="$new_path"
27564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27566  fi
27567
27568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27570
27571    else
27572      # We're on a unix platform. Hooray! :)
27573      path="$BOOT_JDK"
27574      has_space=`$ECHO "$path" | $GREP " "`
27575      if test "x$has_space" != x; then
27576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27579      fi
27580
27581      # Use eval to expand a potential ~
27582      eval path="$path"
27583      if test ! -f "$path" && test ! -d "$path"; then
27584        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27585      fi
27586
27587      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27588    fi
27589  fi
27590
27591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27592$as_echo_n "checking for Boot JDK... " >&6; }
27593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27594$as_echo "$BOOT_JDK" >&6; }
27595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27596$as_echo_n "checking Boot JDK version... " >&6; }
27597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27599$as_echo "$BOOT_JDK_VERSION" >&6; }
27600          fi # end check jdk version
27601        fi # end check javac
27602      fi # end check java
27603    fi # end check boot jdk found
27604  fi
27605
27606
27607  if test "x$BOOT_JDK_FOUND" = xno; then
27608    # Now execute the test
27609
27610  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27611  BOOT_JDK_SUFFIX="/Contents/Home"
27612  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27613  if test "x$ALL_JDKS_FOUND" != x; then
27614    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27615
27616  if test "x$BOOT_JDK_FOUND" = xno; then
27617    # Now execute the test
27618
27619        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27620        if test -d "$BOOT_JDK"; then
27621          BOOT_JDK_FOUND=maybe
27622          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27623$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27624        fi
27625
27626
27627    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27628    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27629      # Do we have a bin/java?
27630      if test ! -x "$BOOT_JDK/bin/java"; then
27631        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27633        BOOT_JDK_FOUND=no
27634      else
27635        # Do we have a bin/javac?
27636        if test ! -x "$BOOT_JDK/bin/javac"; then
27637          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27639          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27640$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27641          BOOT_JDK_FOUND=no
27642        else
27643          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27644          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27645
27646          # Extra M4 quote needed to protect [] in grep expression.
27647          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27648          if test "x$FOUND_CORRECT_VERSION" = x; then
27649            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27651            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27652$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27653            BOOT_JDK_FOUND=no
27654          else
27655            # We're done! :-)
27656            BOOT_JDK_FOUND=yes
27657
27658  # Only process if variable expands to non-empty
27659
27660  if test "x$BOOT_JDK" != x; then
27661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27662
27663  # Input might be given as Windows format, start by converting to
27664  # unix format.
27665  path="$BOOT_JDK"
27666  new_path=`$CYGPATH -u "$path"`
27667
27668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27671  # "foo.exe" is OK but "foo" is an error.
27672  #
27673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27674  # It is also a way to make sure we got the proper file name for the real test later on.
27675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27676  if test "x$test_shortpath" = x; then
27677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27679    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27680  fi
27681
27682  # Call helper function which possibly converts this using DOS-style short mode.
27683  # If so, the updated path is stored in $new_path.
27684
27685  input_path="$new_path"
27686  # Check if we need to convert this using DOS-style short mode. If the path
27687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27688  # take no chances and rewrite it.
27689  # Note: m4 eats our [], so we need to use [ and ] instead.
27690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27691  if test "x$has_forbidden_chars" != x; then
27692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27696      # Going to short mode and back again did indeed matter. Since short mode is
27697      # case insensitive, let's make it lowercase to improve readability.
27698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27699      # Now convert it back to Unix-style (cygpath)
27700      input_path=`$CYGPATH -u "$shortmode_path"`
27701      new_path="$input_path"
27702    fi
27703  fi
27704
27705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27706  if test "x$test_cygdrive_prefix" = x; then
27707    # As a simple fix, exclude /usr/bin since it's not a real path.
27708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27710      # a path prefixed by /cygdrive for fixpath to work.
27711      new_path="$CYGWIN_ROOT_PATH$input_path"
27712    fi
27713  fi
27714
27715
27716  if test "x$path" != "x$new_path"; then
27717    BOOT_JDK="$new_path"
27718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27720  fi
27721
27722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27723
27724  path="$BOOT_JDK"
27725  has_colon=`$ECHO $path | $GREP ^.:`
27726  new_path="$path"
27727  if test "x$has_colon" = x; then
27728    # Not in mixed or Windows style, start by that.
27729    new_path=`cmd //c echo $path`
27730  fi
27731
27732
27733  input_path="$new_path"
27734  # Check if we need to convert this using DOS-style short mode. If the path
27735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27736  # take no chances and rewrite it.
27737  # Note: m4 eats our [], so we need to use [ and ] instead.
27738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27739  if test "x$has_forbidden_chars" != x; then
27740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27742  fi
27743
27744
27745  windows_path="$new_path"
27746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27747    unix_path=`$CYGPATH -u "$windows_path"`
27748    new_path="$unix_path"
27749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27751    new_path="$unix_path"
27752  fi
27753
27754  if test "x$path" != "x$new_path"; then
27755    BOOT_JDK="$new_path"
27756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27758  fi
27759
27760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27762
27763    else
27764      # We're on a unix platform. Hooray! :)
27765      path="$BOOT_JDK"
27766      has_space=`$ECHO "$path" | $GREP " "`
27767      if test "x$has_space" != x; then
27768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27771      fi
27772
27773      # Use eval to expand a potential ~
27774      eval path="$path"
27775      if test ! -f "$path" && test ! -d "$path"; then
27776        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27777      fi
27778
27779      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27780    fi
27781  fi
27782
27783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27784$as_echo_n "checking for Boot JDK... " >&6; }
27785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27786$as_echo "$BOOT_JDK" >&6; }
27787            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27788$as_echo_n "checking Boot JDK version... " >&6; }
27789            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27791$as_echo "$BOOT_JDK_VERSION" >&6; }
27792          fi # end check jdk version
27793        fi # end check javac
27794      fi # end check java
27795    fi # end check boot jdk found
27796  fi
27797
27798    done
27799  fi
27800
27801
27802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27804      # Do we have a bin/java?
27805      if test ! -x "$BOOT_JDK/bin/java"; then
27806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27808        BOOT_JDK_FOUND=no
27809      else
27810        # Do we have a bin/javac?
27811        if test ! -x "$BOOT_JDK/bin/javac"; then
27812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27816          BOOT_JDK_FOUND=no
27817        else
27818          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27819          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27820
27821          # Extra M4 quote needed to protect [] in grep expression.
27822          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27823          if test "x$FOUND_CORRECT_VERSION" = x; then
27824            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27826            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27827$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27828            BOOT_JDK_FOUND=no
27829          else
27830            # We're done! :-)
27831            BOOT_JDK_FOUND=yes
27832
27833  # Only process if variable expands to non-empty
27834
27835  if test "x$BOOT_JDK" != x; then
27836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27837
27838  # Input might be given as Windows format, start by converting to
27839  # unix format.
27840  path="$BOOT_JDK"
27841  new_path=`$CYGPATH -u "$path"`
27842
27843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27846  # "foo.exe" is OK but "foo" is an error.
27847  #
27848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27849  # It is also a way to make sure we got the proper file name for the real test later on.
27850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27851  if test "x$test_shortpath" = x; then
27852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27855  fi
27856
27857  # Call helper function which possibly converts this using DOS-style short mode.
27858  # If so, the updated path is stored in $new_path.
27859
27860  input_path="$new_path"
27861  # Check if we need to convert this using DOS-style short mode. If the path
27862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27863  # take no chances and rewrite it.
27864  # Note: m4 eats our [], so we need to use [ and ] instead.
27865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27866  if test "x$has_forbidden_chars" != x; then
27867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27871      # Going to short mode and back again did indeed matter. Since short mode is
27872      # case insensitive, let's make it lowercase to improve readability.
27873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27874      # Now convert it back to Unix-style (cygpath)
27875      input_path=`$CYGPATH -u "$shortmode_path"`
27876      new_path="$input_path"
27877    fi
27878  fi
27879
27880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27881  if test "x$test_cygdrive_prefix" = x; then
27882    # As a simple fix, exclude /usr/bin since it's not a real path.
27883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27885      # a path prefixed by /cygdrive for fixpath to work.
27886      new_path="$CYGWIN_ROOT_PATH$input_path"
27887    fi
27888  fi
27889
27890
27891  if test "x$path" != "x$new_path"; then
27892    BOOT_JDK="$new_path"
27893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27895  fi
27896
27897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27898
27899  path="$BOOT_JDK"
27900  has_colon=`$ECHO $path | $GREP ^.:`
27901  new_path="$path"
27902  if test "x$has_colon" = x; then
27903    # Not in mixed or Windows style, start by that.
27904    new_path=`cmd //c echo $path`
27905  fi
27906
27907
27908  input_path="$new_path"
27909  # Check if we need to convert this using DOS-style short mode. If the path
27910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27911  # take no chances and rewrite it.
27912  # Note: m4 eats our [], so we need to use [ and ] instead.
27913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27914  if test "x$has_forbidden_chars" != x; then
27915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27917  fi
27918
27919
27920  windows_path="$new_path"
27921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27922    unix_path=`$CYGPATH -u "$windows_path"`
27923    new_path="$unix_path"
27924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27926    new_path="$unix_path"
27927  fi
27928
27929  if test "x$path" != "x$new_path"; then
27930    BOOT_JDK="$new_path"
27931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27933  fi
27934
27935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27937
27938    else
27939      # We're on a unix platform. Hooray! :)
27940      path="$BOOT_JDK"
27941      has_space=`$ECHO "$path" | $GREP " "`
27942      if test "x$has_space" != x; then
27943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27946      fi
27947
27948      # Use eval to expand a potential ~
27949      eval path="$path"
27950      if test ! -f "$path" && test ! -d "$path"; then
27951        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27952      fi
27953
27954      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27955    fi
27956  fi
27957
27958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27959$as_echo_n "checking for Boot JDK... " >&6; }
27960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27961$as_echo "$BOOT_JDK" >&6; }
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27963$as_echo_n "checking Boot JDK version... " >&6; }
27964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27966$as_echo "$BOOT_JDK_VERSION" >&6; }
27967          fi # end check jdk version
27968        fi # end check javac
27969      fi # end check java
27970    fi # end check boot jdk found
27971  fi
27972
27973  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27974
27975  if test "x$BOOT_JDK_FOUND" = xno; then
27976    # Now execute the test
27977
27978  BOOT_JDK_PREFIX="/usr/lib/jvm"
27979  BOOT_JDK_SUFFIX=""
27980  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27981  if test "x$ALL_JDKS_FOUND" != x; then
27982    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27983
27984  if test "x$BOOT_JDK_FOUND" = xno; then
27985    # Now execute the test
27986
27987        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27988        if test -d "$BOOT_JDK"; then
27989          BOOT_JDK_FOUND=maybe
27990          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27991$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27992        fi
27993
27994
27995    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27996    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27997      # Do we have a bin/java?
27998      if test ! -x "$BOOT_JDK/bin/java"; then
27999        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28001        BOOT_JDK_FOUND=no
28002      else
28003        # Do we have a bin/javac?
28004        if test ! -x "$BOOT_JDK/bin/javac"; then
28005          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28007          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28008$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28009          BOOT_JDK_FOUND=no
28010        else
28011          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28012          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28013
28014          # Extra M4 quote needed to protect [] in grep expression.
28015          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28016          if test "x$FOUND_CORRECT_VERSION" = x; then
28017            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28019            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28020$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28021            BOOT_JDK_FOUND=no
28022          else
28023            # We're done! :-)
28024            BOOT_JDK_FOUND=yes
28025
28026  # Only process if variable expands to non-empty
28027
28028  if test "x$BOOT_JDK" != x; then
28029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28030
28031  # Input might be given as Windows format, start by converting to
28032  # unix format.
28033  path="$BOOT_JDK"
28034  new_path=`$CYGPATH -u "$path"`
28035
28036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28039  # "foo.exe" is OK but "foo" is an error.
28040  #
28041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28042  # It is also a way to make sure we got the proper file name for the real test later on.
28043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28044  if test "x$test_shortpath" = x; then
28045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28047    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28048  fi
28049
28050  # Call helper function which possibly converts this using DOS-style short mode.
28051  # If so, the updated path is stored in $new_path.
28052
28053  input_path="$new_path"
28054  # Check if we need to convert this using DOS-style short mode. If the path
28055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28056  # take no chances and rewrite it.
28057  # Note: m4 eats our [], so we need to use [ and ] instead.
28058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28059  if test "x$has_forbidden_chars" != x; then
28060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28064      # Going to short mode and back again did indeed matter. Since short mode is
28065      # case insensitive, let's make it lowercase to improve readability.
28066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28067      # Now convert it back to Unix-style (cygpath)
28068      input_path=`$CYGPATH -u "$shortmode_path"`
28069      new_path="$input_path"
28070    fi
28071  fi
28072
28073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28074  if test "x$test_cygdrive_prefix" = x; then
28075    # As a simple fix, exclude /usr/bin since it's not a real path.
28076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28078      # a path prefixed by /cygdrive for fixpath to work.
28079      new_path="$CYGWIN_ROOT_PATH$input_path"
28080    fi
28081  fi
28082
28083
28084  if test "x$path" != "x$new_path"; then
28085    BOOT_JDK="$new_path"
28086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28088  fi
28089
28090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28091
28092  path="$BOOT_JDK"
28093  has_colon=`$ECHO $path | $GREP ^.:`
28094  new_path="$path"
28095  if test "x$has_colon" = x; then
28096    # Not in mixed or Windows style, start by that.
28097    new_path=`cmd //c echo $path`
28098  fi
28099
28100
28101  input_path="$new_path"
28102  # Check if we need to convert this using DOS-style short mode. If the path
28103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28104  # take no chances and rewrite it.
28105  # Note: m4 eats our [], so we need to use [ and ] instead.
28106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28107  if test "x$has_forbidden_chars" != x; then
28108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28110  fi
28111
28112
28113  windows_path="$new_path"
28114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28115    unix_path=`$CYGPATH -u "$windows_path"`
28116    new_path="$unix_path"
28117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28119    new_path="$unix_path"
28120  fi
28121
28122  if test "x$path" != "x$new_path"; then
28123    BOOT_JDK="$new_path"
28124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28126  fi
28127
28128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28130
28131    else
28132      # We're on a unix platform. Hooray! :)
28133      path="$BOOT_JDK"
28134      has_space=`$ECHO "$path" | $GREP " "`
28135      if test "x$has_space" != x; then
28136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28137$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28139      fi
28140
28141      # Use eval to expand a potential ~
28142      eval path="$path"
28143      if test ! -f "$path" && test ! -d "$path"; then
28144        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28145      fi
28146
28147      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28148    fi
28149  fi
28150
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28152$as_echo_n "checking for Boot JDK... " >&6; }
28153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28154$as_echo "$BOOT_JDK" >&6; }
28155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28156$as_echo_n "checking Boot JDK version... " >&6; }
28157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28159$as_echo "$BOOT_JDK_VERSION" >&6; }
28160          fi # end check jdk version
28161        fi # end check javac
28162      fi # end check java
28163    fi # end check boot jdk found
28164  fi
28165
28166    done
28167  fi
28168
28169
28170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28172      # Do we have a bin/java?
28173      if test ! -x "$BOOT_JDK/bin/java"; then
28174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28176        BOOT_JDK_FOUND=no
28177      else
28178        # Do we have a bin/javac?
28179        if test ! -x "$BOOT_JDK/bin/javac"; then
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28184          BOOT_JDK_FOUND=no
28185        else
28186          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28187          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28188
28189          # Extra M4 quote needed to protect [] in grep expression.
28190          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28191          if test "x$FOUND_CORRECT_VERSION" = x; then
28192            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28194            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28195$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28196            BOOT_JDK_FOUND=no
28197          else
28198            # We're done! :-)
28199            BOOT_JDK_FOUND=yes
28200
28201  # Only process if variable expands to non-empty
28202
28203  if test "x$BOOT_JDK" != x; then
28204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28205
28206  # Input might be given as Windows format, start by converting to
28207  # unix format.
28208  path="$BOOT_JDK"
28209  new_path=`$CYGPATH -u "$path"`
28210
28211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28214  # "foo.exe" is OK but "foo" is an error.
28215  #
28216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28217  # It is also a way to make sure we got the proper file name for the real test later on.
28218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28219  if test "x$test_shortpath" = x; then
28220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28222    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28223  fi
28224
28225  # Call helper function which possibly converts this using DOS-style short mode.
28226  # If so, the updated path is stored in $new_path.
28227
28228  input_path="$new_path"
28229  # Check if we need to convert this using DOS-style short mode. If the path
28230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28231  # take no chances and rewrite it.
28232  # Note: m4 eats our [], so we need to use [ and ] instead.
28233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28234  if test "x$has_forbidden_chars" != x; then
28235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28239      # Going to short mode and back again did indeed matter. Since short mode is
28240      # case insensitive, let's make it lowercase to improve readability.
28241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28242      # Now convert it back to Unix-style (cygpath)
28243      input_path=`$CYGPATH -u "$shortmode_path"`
28244      new_path="$input_path"
28245    fi
28246  fi
28247
28248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28249  if test "x$test_cygdrive_prefix" = x; then
28250    # As a simple fix, exclude /usr/bin since it's not a real path.
28251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28253      # a path prefixed by /cygdrive for fixpath to work.
28254      new_path="$CYGWIN_ROOT_PATH$input_path"
28255    fi
28256  fi
28257
28258
28259  if test "x$path" != "x$new_path"; then
28260    BOOT_JDK="$new_path"
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28263  fi
28264
28265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28266
28267  path="$BOOT_JDK"
28268  has_colon=`$ECHO $path | $GREP ^.:`
28269  new_path="$path"
28270  if test "x$has_colon" = x; then
28271    # Not in mixed or Windows style, start by that.
28272    new_path=`cmd //c echo $path`
28273  fi
28274
28275
28276  input_path="$new_path"
28277  # Check if we need to convert this using DOS-style short mode. If the path
28278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28279  # take no chances and rewrite it.
28280  # Note: m4 eats our [], so we need to use [ and ] instead.
28281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28282  if test "x$has_forbidden_chars" != x; then
28283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28285  fi
28286
28287
28288  windows_path="$new_path"
28289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28290    unix_path=`$CYGPATH -u "$windows_path"`
28291    new_path="$unix_path"
28292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28294    new_path="$unix_path"
28295  fi
28296
28297  if test "x$path" != "x$new_path"; then
28298    BOOT_JDK="$new_path"
28299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28301  fi
28302
28303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28305
28306    else
28307      # We're on a unix platform. Hooray! :)
28308      path="$BOOT_JDK"
28309      has_space=`$ECHO "$path" | $GREP " "`
28310      if test "x$has_space" != x; then
28311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28314      fi
28315
28316      # Use eval to expand a potential ~
28317      eval path="$path"
28318      if test ! -f "$path" && test ! -d "$path"; then
28319        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28320      fi
28321
28322      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28323    fi
28324  fi
28325
28326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28327$as_echo_n "checking for Boot JDK... " >&6; }
28328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28329$as_echo "$BOOT_JDK" >&6; }
28330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28331$as_echo_n "checking Boot JDK version... " >&6; }
28332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28334$as_echo "$BOOT_JDK_VERSION" >&6; }
28335          fi # end check jdk version
28336        fi # end check javac
28337      fi # end check java
28338    fi # end check boot jdk found
28339  fi
28340
28341  fi
28342
28343
28344    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28345    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28346      # Do we have a bin/java?
28347      if test ! -x "$BOOT_JDK/bin/java"; then
28348        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28350        BOOT_JDK_FOUND=no
28351      else
28352        # Do we have a bin/javac?
28353        if test ! -x "$BOOT_JDK/bin/javac"; then
28354          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28356          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28357$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28358          BOOT_JDK_FOUND=no
28359        else
28360          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28361          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28362
28363          # Extra M4 quote needed to protect [] in grep expression.
28364          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28365          if test "x$FOUND_CORRECT_VERSION" = x; then
28366            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28368            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28369$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28370            BOOT_JDK_FOUND=no
28371          else
28372            # We're done! :-)
28373            BOOT_JDK_FOUND=yes
28374
28375  # Only process if variable expands to non-empty
28376
28377  if test "x$BOOT_JDK" != x; then
28378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28379
28380  # Input might be given as Windows format, start by converting to
28381  # unix format.
28382  path="$BOOT_JDK"
28383  new_path=`$CYGPATH -u "$path"`
28384
28385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28388  # "foo.exe" is OK but "foo" is an error.
28389  #
28390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28391  # It is also a way to make sure we got the proper file name for the real test later on.
28392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28393  if test "x$test_shortpath" = x; then
28394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28396    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28397  fi
28398
28399  # Call helper function which possibly converts this using DOS-style short mode.
28400  # If so, the updated path is stored in $new_path.
28401
28402  input_path="$new_path"
28403  # Check if we need to convert this using DOS-style short mode. If the path
28404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28405  # take no chances and rewrite it.
28406  # Note: m4 eats our [], so we need to use [ and ] instead.
28407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28408  if test "x$has_forbidden_chars" != x; then
28409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28413      # Going to short mode and back again did indeed matter. Since short mode is
28414      # case insensitive, let's make it lowercase to improve readability.
28415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28416      # Now convert it back to Unix-style (cygpath)
28417      input_path=`$CYGPATH -u "$shortmode_path"`
28418      new_path="$input_path"
28419    fi
28420  fi
28421
28422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28423  if test "x$test_cygdrive_prefix" = x; then
28424    # As a simple fix, exclude /usr/bin since it's not a real path.
28425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28427      # a path prefixed by /cygdrive for fixpath to work.
28428      new_path="$CYGWIN_ROOT_PATH$input_path"
28429    fi
28430  fi
28431
28432
28433  if test "x$path" != "x$new_path"; then
28434    BOOT_JDK="$new_path"
28435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28437  fi
28438
28439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28440
28441  path="$BOOT_JDK"
28442  has_colon=`$ECHO $path | $GREP ^.:`
28443  new_path="$path"
28444  if test "x$has_colon" = x; then
28445    # Not in mixed or Windows style, start by that.
28446    new_path=`cmd //c echo $path`
28447  fi
28448
28449
28450  input_path="$new_path"
28451  # Check if we need to convert this using DOS-style short mode. If the path
28452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28453  # take no chances and rewrite it.
28454  # Note: m4 eats our [], so we need to use [ and ] instead.
28455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28456  if test "x$has_forbidden_chars" != x; then
28457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28459  fi
28460
28461
28462  windows_path="$new_path"
28463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28464    unix_path=`$CYGPATH -u "$windows_path"`
28465    new_path="$unix_path"
28466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28468    new_path="$unix_path"
28469  fi
28470
28471  if test "x$path" != "x$new_path"; then
28472    BOOT_JDK="$new_path"
28473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28475  fi
28476
28477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28479
28480    else
28481      # We're on a unix platform. Hooray! :)
28482      path="$BOOT_JDK"
28483      has_space=`$ECHO "$path" | $GREP " "`
28484      if test "x$has_space" != x; then
28485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28487        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28488      fi
28489
28490      # Use eval to expand a potential ~
28491      eval path="$path"
28492      if test ! -f "$path" && test ! -d "$path"; then
28493        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28494      fi
28495
28496      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28497    fi
28498  fi
28499
28500            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28501$as_echo_n "checking for Boot JDK... " >&6; }
28502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28503$as_echo "$BOOT_JDK" >&6; }
28504            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28505$as_echo_n "checking Boot JDK version... " >&6; }
28506            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28508$as_echo "$BOOT_JDK_VERSION" >&6; }
28509          fi # end check jdk version
28510        fi # end check javac
28511      fi # end check java
28512    fi # end check boot jdk found
28513  fi
28514
28515
28516  # If we haven't found anything yet, we've truly lost. Give up.
28517  if test "x$BOOT_JDK_FOUND" = xno; then
28518
28519  # Print a helpful message on how to acquire the necessary build dependency.
28520  # openjdk is the help tag: freetype, cups, alsa etc
28521  MISSING_DEPENDENCY=openjdk
28522
28523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28524    cygwin_help $MISSING_DEPENDENCY
28525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28526    msys_help $MISSING_DEPENDENCY
28527  else
28528    PKGHANDLER_COMMAND=
28529
28530    case $PKGHANDLER in
28531      apt-get)
28532        apt_help     $MISSING_DEPENDENCY ;;
28533      yum)
28534        yum_help     $MISSING_DEPENDENCY ;;
28535      port)
28536        port_help    $MISSING_DEPENDENCY ;;
28537      pkgutil)
28538        pkgutil_help $MISSING_DEPENDENCY ;;
28539      pkgadd)
28540        pkgadd_help  $MISSING_DEPENDENCY ;;
28541    esac
28542
28543    if test "x$PKGHANDLER_COMMAND" != x; then
28544      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28545    fi
28546  fi
28547
28548    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28549$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28550    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28551$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28552    as_fn_error $? "Cannot continue" "$LINENO" 5
28553  fi
28554
28555
28556
28557  # Setup tools from the Boot JDK.
28558
28559  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28560
28561  # Publish this variable in the help.
28562
28563
28564  if [ -z "${JAVA+x}" ]; then
28565    # The variable is not set by user, try to locate tool using the code snippet
28566
28567      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28568$as_echo_n "checking for java in Boot JDK... " >&6; }
28569      JAVA=$BOOT_JDK/bin/java
28570      if test ! -x $JAVA; then
28571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28572$as_echo "not found" >&6; }
28573        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28574$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28575        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28576      fi
28577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28578$as_echo "ok" >&6; }
28579
28580
28581  else
28582    # The variable is set, but is it from the command line or the environment?
28583
28584    # Try to remove the string !JAVA! from our list.
28585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28587      # If it failed, the variable was not from the command line. Ignore it,
28588      # but warn the user (except for BASH, which is always set by the calling BASH).
28589      if test "xJAVA" != xBASH; then
28590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28591$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28592      fi
28593      # Try to locate tool using the code snippet
28594
28595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28596$as_echo_n "checking for java in Boot JDK... " >&6; }
28597      JAVA=$BOOT_JDK/bin/java
28598      if test ! -x $JAVA; then
28599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28600$as_echo "not found" >&6; }
28601        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28602$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28603        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28604      fi
28605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28606$as_echo "ok" >&6; }
28607
28608
28609    else
28610      # If it succeeded, then it was overridden by the user. We will use it
28611      # for the tool.
28612
28613      # First remove it from the list of overridden variables, so we can test
28614      # for unknown variables in the end.
28615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28616
28617      # Check if we try to supply an empty value
28618      if test "x$JAVA" = x; then
28619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28620$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28622$as_echo_n "checking for JAVA... " >&6; }
28623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28624$as_echo "disabled" >&6; }
28625      else
28626        # Check if the provided tool contains a complete path.
28627        tool_specified="$JAVA"
28628        tool_basename="${tool_specified##*/}"
28629        if test "x$tool_basename" = "x$tool_specified"; then
28630          # A command without a complete path is provided, search $PATH.
28631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28632$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28633          # Extract the first word of "$tool_basename", so it can be a program name with args.
28634set dummy $tool_basename; ac_word=$2
28635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28636$as_echo_n "checking for $ac_word... " >&6; }
28637if ${ac_cv_path_JAVA+:} false; then :
28638  $as_echo_n "(cached) " >&6
28639else
28640  case $JAVA in
28641  [\\/]* | ?:[\\/]*)
28642  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28643  ;;
28644  *)
28645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28646for as_dir in $PATH
28647do
28648  IFS=$as_save_IFS
28649  test -z "$as_dir" && as_dir=.
28650    for ac_exec_ext in '' $ac_executable_extensions; do
28651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28652    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28654    break 2
28655  fi
28656done
28657  done
28658IFS=$as_save_IFS
28659
28660  ;;
28661esac
28662fi
28663JAVA=$ac_cv_path_JAVA
28664if test -n "$JAVA"; then
28665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28666$as_echo "$JAVA" >&6; }
28667else
28668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28669$as_echo "no" >&6; }
28670fi
28671
28672
28673          if test "x$JAVA" = x; then
28674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28675          fi
28676        else
28677          # Otherwise we believe it is a complete path. Use it as it is.
28678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28679$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28681$as_echo_n "checking for JAVA... " >&6; }
28682          if test ! -x "$tool_specified"; then
28683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28684$as_echo "not found" >&6; }
28685            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28686          fi
28687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28688$as_echo "$tool_specified" >&6; }
28689        fi
28690      fi
28691    fi
28692
28693  fi
28694
28695
28696
28697  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28698
28699  # Publish this variable in the help.
28700
28701
28702  if [ -z "${JAVAC+x}" ]; then
28703    # The variable is not set by user, try to locate tool using the code snippet
28704
28705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28706$as_echo_n "checking for javac in Boot JDK... " >&6; }
28707      JAVAC=$BOOT_JDK/bin/javac
28708      if test ! -x $JAVAC; then
28709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28710$as_echo "not found" >&6; }
28711        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28712$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28713        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28714      fi
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28716$as_echo "ok" >&6; }
28717
28718
28719  else
28720    # The variable is set, but is it from the command line or the environment?
28721
28722    # Try to remove the string !JAVAC! from our list.
28723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28725      # If it failed, the variable was not from the command line. Ignore it,
28726      # but warn the user (except for BASH, which is always set by the calling BASH).
28727      if test "xJAVAC" != xBASH; then
28728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28729$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28730      fi
28731      # Try to locate tool using the code snippet
28732
28733      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28734$as_echo_n "checking for javac in Boot JDK... " >&6; }
28735      JAVAC=$BOOT_JDK/bin/javac
28736      if test ! -x $JAVAC; then
28737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28738$as_echo "not found" >&6; }
28739        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28740$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28741        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28742      fi
28743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28744$as_echo "ok" >&6; }
28745
28746
28747    else
28748      # If it succeeded, then it was overridden by the user. We will use it
28749      # for the tool.
28750
28751      # First remove it from the list of overridden variables, so we can test
28752      # for unknown variables in the end.
28753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28754
28755      # Check if we try to supply an empty value
28756      if test "x$JAVAC" = x; then
28757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28758$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28760$as_echo_n "checking for JAVAC... " >&6; }
28761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28762$as_echo "disabled" >&6; }
28763      else
28764        # Check if the provided tool contains a complete path.
28765        tool_specified="$JAVAC"
28766        tool_basename="${tool_specified##*/}"
28767        if test "x$tool_basename" = "x$tool_specified"; then
28768          # A command without a complete path is provided, search $PATH.
28769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28770$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28771          # Extract the first word of "$tool_basename", so it can be a program name with args.
28772set dummy $tool_basename; ac_word=$2
28773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28774$as_echo_n "checking for $ac_word... " >&6; }
28775if ${ac_cv_path_JAVAC+:} false; then :
28776  $as_echo_n "(cached) " >&6
28777else
28778  case $JAVAC in
28779  [\\/]* | ?:[\\/]*)
28780  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28781  ;;
28782  *)
28783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28784for as_dir in $PATH
28785do
28786  IFS=$as_save_IFS
28787  test -z "$as_dir" && as_dir=.
28788    for ac_exec_ext in '' $ac_executable_extensions; do
28789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28790    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28792    break 2
28793  fi
28794done
28795  done
28796IFS=$as_save_IFS
28797
28798  ;;
28799esac
28800fi
28801JAVAC=$ac_cv_path_JAVAC
28802if test -n "$JAVAC"; then
28803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28804$as_echo "$JAVAC" >&6; }
28805else
28806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28807$as_echo "no" >&6; }
28808fi
28809
28810
28811          if test "x$JAVAC" = x; then
28812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28813          fi
28814        else
28815          # Otherwise we believe it is a complete path. Use it as it is.
28816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28817$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28819$as_echo_n "checking for JAVAC... " >&6; }
28820          if test ! -x "$tool_specified"; then
28821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28822$as_echo "not found" >&6; }
28823            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28824          fi
28825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28826$as_echo "$tool_specified" >&6; }
28827        fi
28828      fi
28829    fi
28830
28831  fi
28832
28833
28834
28835  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28836
28837  # Publish this variable in the help.
28838
28839
28840  if [ -z "${JAVAH+x}" ]; then
28841    # The variable is not set by user, try to locate tool using the code snippet
28842
28843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28844$as_echo_n "checking for javah in Boot JDK... " >&6; }
28845      JAVAH=$BOOT_JDK/bin/javah
28846      if test ! -x $JAVAH; then
28847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28848$as_echo "not found" >&6; }
28849        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28850$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28851        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28852      fi
28853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28854$as_echo "ok" >&6; }
28855
28856
28857  else
28858    # The variable is set, but is it from the command line or the environment?
28859
28860    # Try to remove the string !JAVAH! from our list.
28861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28863      # If it failed, the variable was not from the command line. Ignore it,
28864      # but warn the user (except for BASH, which is always set by the calling BASH).
28865      if test "xJAVAH" != xBASH; then
28866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28867$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28868      fi
28869      # Try to locate tool using the code snippet
28870
28871      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28872$as_echo_n "checking for javah in Boot JDK... " >&6; }
28873      JAVAH=$BOOT_JDK/bin/javah
28874      if test ! -x $JAVAH; then
28875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28876$as_echo "not found" >&6; }
28877        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28878$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28879        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28880      fi
28881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28882$as_echo "ok" >&6; }
28883
28884
28885    else
28886      # If it succeeded, then it was overridden by the user. We will use it
28887      # for the tool.
28888
28889      # First remove it from the list of overridden variables, so we can test
28890      # for unknown variables in the end.
28891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28892
28893      # Check if we try to supply an empty value
28894      if test "x$JAVAH" = x; then
28895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28896$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28898$as_echo_n "checking for JAVAH... " >&6; }
28899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28900$as_echo "disabled" >&6; }
28901      else
28902        # Check if the provided tool contains a complete path.
28903        tool_specified="$JAVAH"
28904        tool_basename="${tool_specified##*/}"
28905        if test "x$tool_basename" = "x$tool_specified"; then
28906          # A command without a complete path is provided, search $PATH.
28907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28908$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28909          # Extract the first word of "$tool_basename", so it can be a program name with args.
28910set dummy $tool_basename; ac_word=$2
28911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28912$as_echo_n "checking for $ac_word... " >&6; }
28913if ${ac_cv_path_JAVAH+:} false; then :
28914  $as_echo_n "(cached) " >&6
28915else
28916  case $JAVAH in
28917  [\\/]* | ?:[\\/]*)
28918  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28919  ;;
28920  *)
28921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28922for as_dir in $PATH
28923do
28924  IFS=$as_save_IFS
28925  test -z "$as_dir" && as_dir=.
28926    for ac_exec_ext in '' $ac_executable_extensions; do
28927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28928    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28930    break 2
28931  fi
28932done
28933  done
28934IFS=$as_save_IFS
28935
28936  ;;
28937esac
28938fi
28939JAVAH=$ac_cv_path_JAVAH
28940if test -n "$JAVAH"; then
28941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28942$as_echo "$JAVAH" >&6; }
28943else
28944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28945$as_echo "no" >&6; }
28946fi
28947
28948
28949          if test "x$JAVAH" = x; then
28950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28951          fi
28952        else
28953          # Otherwise we believe it is a complete path. Use it as it is.
28954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28955$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28957$as_echo_n "checking for JAVAH... " >&6; }
28958          if test ! -x "$tool_specified"; then
28959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28960$as_echo "not found" >&6; }
28961            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28962          fi
28963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28964$as_echo "$tool_specified" >&6; }
28965        fi
28966      fi
28967    fi
28968
28969  fi
28970
28971
28972
28973  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28974
28975  # Publish this variable in the help.
28976
28977
28978  if [ -z "${JAR+x}" ]; then
28979    # The variable is not set by user, try to locate tool using the code snippet
28980
28981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28982$as_echo_n "checking for jar in Boot JDK... " >&6; }
28983      JAR=$BOOT_JDK/bin/jar
28984      if test ! -x $JAR; then
28985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28986$as_echo "not found" >&6; }
28987        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28988$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28989        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28990      fi
28991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28992$as_echo "ok" >&6; }
28993
28994
28995  else
28996    # The variable is set, but is it from the command line or the environment?
28997
28998    # Try to remove the string !JAR! from our list.
28999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29001      # If it failed, the variable was not from the command line. Ignore it,
29002      # but warn the user (except for BASH, which is always set by the calling BASH).
29003      if test "xJAR" != xBASH; then
29004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29005$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29006      fi
29007      # Try to locate tool using the code snippet
29008
29009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29010$as_echo_n "checking for jar in Boot JDK... " >&6; }
29011      JAR=$BOOT_JDK/bin/jar
29012      if test ! -x $JAR; then
29013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29014$as_echo "not found" >&6; }
29015        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29016$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29017        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29018      fi
29019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29020$as_echo "ok" >&6; }
29021
29022
29023    else
29024      # If it succeeded, then it was overridden by the user. We will use it
29025      # for the tool.
29026
29027      # First remove it from the list of overridden variables, so we can test
29028      # for unknown variables in the end.
29029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29030
29031      # Check if we try to supply an empty value
29032      if test "x$JAR" = x; then
29033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29034$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29036$as_echo_n "checking for JAR... " >&6; }
29037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29038$as_echo "disabled" >&6; }
29039      else
29040        # Check if the provided tool contains a complete path.
29041        tool_specified="$JAR"
29042        tool_basename="${tool_specified##*/}"
29043        if test "x$tool_basename" = "x$tool_specified"; then
29044          # A command without a complete path is provided, search $PATH.
29045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29046$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29047          # Extract the first word of "$tool_basename", so it can be a program name with args.
29048set dummy $tool_basename; ac_word=$2
29049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29050$as_echo_n "checking for $ac_word... " >&6; }
29051if ${ac_cv_path_JAR+:} false; then :
29052  $as_echo_n "(cached) " >&6
29053else
29054  case $JAR in
29055  [\\/]* | ?:[\\/]*)
29056  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29057  ;;
29058  *)
29059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29060for as_dir in $PATH
29061do
29062  IFS=$as_save_IFS
29063  test -z "$as_dir" && as_dir=.
29064    for ac_exec_ext in '' $ac_executable_extensions; do
29065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29066    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29068    break 2
29069  fi
29070done
29071  done
29072IFS=$as_save_IFS
29073
29074  ;;
29075esac
29076fi
29077JAR=$ac_cv_path_JAR
29078if test -n "$JAR"; then
29079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29080$as_echo "$JAR" >&6; }
29081else
29082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29083$as_echo "no" >&6; }
29084fi
29085
29086
29087          if test "x$JAR" = x; then
29088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29089          fi
29090        else
29091          # Otherwise we believe it is a complete path. Use it as it is.
29092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29093$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29095$as_echo_n "checking for JAR... " >&6; }
29096          if test ! -x "$tool_specified"; then
29097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29098$as_echo "not found" >&6; }
29099            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29100          fi
29101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29102$as_echo "$tool_specified" >&6; }
29103        fi
29104      fi
29105    fi
29106
29107  fi
29108
29109
29110
29111  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29112
29113  # Publish this variable in the help.
29114
29115
29116  if [ -z "${JARSIGNER+x}" ]; then
29117    # The variable is not set by user, try to locate tool using the code snippet
29118
29119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29120$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29121      JARSIGNER=$BOOT_JDK/bin/jarsigner
29122      if test ! -x $JARSIGNER; then
29123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29124$as_echo "not found" >&6; }
29125        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29126$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29127        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29128      fi
29129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29130$as_echo "ok" >&6; }
29131
29132
29133  else
29134    # The variable is set, but is it from the command line or the environment?
29135
29136    # Try to remove the string !JARSIGNER! from our list.
29137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29139      # If it failed, the variable was not from the command line. Ignore it,
29140      # but warn the user (except for BASH, which is always set by the calling BASH).
29141      if test "xJARSIGNER" != xBASH; then
29142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29143$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29144      fi
29145      # Try to locate tool using the code snippet
29146
29147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29148$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29149      JARSIGNER=$BOOT_JDK/bin/jarsigner
29150      if test ! -x $JARSIGNER; then
29151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29152$as_echo "not found" >&6; }
29153        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29154$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29155        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29156      fi
29157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29158$as_echo "ok" >&6; }
29159
29160
29161    else
29162      # If it succeeded, then it was overridden by the user. We will use it
29163      # for the tool.
29164
29165      # First remove it from the list of overridden variables, so we can test
29166      # for unknown variables in the end.
29167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29168
29169      # Check if we try to supply an empty value
29170      if test "x$JARSIGNER" = x; then
29171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29172$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29174$as_echo_n "checking for JARSIGNER... " >&6; }
29175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29176$as_echo "disabled" >&6; }
29177      else
29178        # Check if the provided tool contains a complete path.
29179        tool_specified="$JARSIGNER"
29180        tool_basename="${tool_specified##*/}"
29181        if test "x$tool_basename" = "x$tool_specified"; then
29182          # A command without a complete path is provided, search $PATH.
29183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29184$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29185          # Extract the first word of "$tool_basename", so it can be a program name with args.
29186set dummy $tool_basename; ac_word=$2
29187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29188$as_echo_n "checking for $ac_word... " >&6; }
29189if ${ac_cv_path_JARSIGNER+:} false; then :
29190  $as_echo_n "(cached) " >&6
29191else
29192  case $JARSIGNER in
29193  [\\/]* | ?:[\\/]*)
29194  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29195  ;;
29196  *)
29197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29198for as_dir in $PATH
29199do
29200  IFS=$as_save_IFS
29201  test -z "$as_dir" && as_dir=.
29202    for ac_exec_ext in '' $ac_executable_extensions; do
29203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29204    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29206    break 2
29207  fi
29208done
29209  done
29210IFS=$as_save_IFS
29211
29212  ;;
29213esac
29214fi
29215JARSIGNER=$ac_cv_path_JARSIGNER
29216if test -n "$JARSIGNER"; then
29217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29218$as_echo "$JARSIGNER" >&6; }
29219else
29220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29221$as_echo "no" >&6; }
29222fi
29223
29224
29225          if test "x$JARSIGNER" = x; then
29226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29227          fi
29228        else
29229          # Otherwise we believe it is a complete path. Use it as it is.
29230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29231$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29233$as_echo_n "checking for JARSIGNER... " >&6; }
29234          if test ! -x "$tool_specified"; then
29235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29236$as_echo "not found" >&6; }
29237            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29238          fi
29239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29240$as_echo "$tool_specified" >&6; }
29241        fi
29242      fi
29243    fi
29244
29245  fi
29246
29247
29248
29249  # Finally, set some other options...
29250
29251  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29252  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29253
29254
29255
29256  # Check if the boot jdk is 32 or 64 bit
29257  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29258    BOOT_JDK_BITS="64"
29259  else
29260    BOOT_JDK_BITS="32"
29261  fi
29262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29263$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29265$as_echo "$BOOT_JDK_BITS" >&6; }
29266
29267
29268
29269###############################################################################
29270#
29271# Configure the sources to use. We can add or override individual directories.
29272#
29273###############################################################################
29274
29275
29276  # Where are the sources.
29277  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29278  CORBA_TOPDIR="$SRC_ROOT/corba"
29279  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29280  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29281  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29282  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29283  JDK_TOPDIR="$SRC_ROOT/jdk"
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293  # This feature is no longer supported.
29294
29295
29296
29297# Check whether --with-add-source-root was given.
29298if test "${with_add_source_root+set}" = set; then :
29299  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29300$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29301fi
29302
29303
29304
29305
29306# Check whether --with-override-source-root was given.
29307if test "${with_override_source_root+set}" = set; then :
29308  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29309$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29310fi
29311
29312
29313
29314
29315# Check whether --with-adds-and-overrides was given.
29316if test "${with_adds_and_overrides+set}" = set; then :
29317  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29318$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29319fi
29320
29321
29322
29323
29324# Check whether --with-override-langtools was given.
29325if test "${with_override_langtools+set}" = set; then :
29326  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29327$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29328fi
29329
29330
29331
29332
29333# Check whether --with-override-corba was given.
29334if test "${with_override_corba+set}" = set; then :
29335  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29336$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29337fi
29338
29339
29340
29341
29342# Check whether --with-override-jaxp was given.
29343if test "${with_override_jaxp+set}" = set; then :
29344  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29345$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29346fi
29347
29348
29349
29350
29351# Check whether --with-override-jaxws was given.
29352if test "${with_override_jaxws+set}" = set; then :
29353  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29354$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29355fi
29356
29357
29358
29359
29360# Check whether --with-override-hotspot was given.
29361if test "${with_override_hotspot+set}" = set; then :
29362  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29363$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29364fi
29365
29366
29367
29368
29369# Check whether --with-override-nashorn was given.
29370if test "${with_override_nashorn+set}" = set; then :
29371  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29372$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29373fi
29374
29375
29376
29377
29378# Check whether --with-override-jdk was given.
29379if test "${with_override_jdk+set}" = set; then :
29380  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29381$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29382fi
29383
29384
29385
29386
29387  BUILD_OUTPUT="$OUTPUT_ROOT"
29388
29389
29390  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29391  BUILD_HOTSPOT=true
29392
29393
29394
29395# Check whether --with-import-hotspot was given.
29396if test "${with_import_hotspot+set}" = set; then :
29397  withval=$with_import_hotspot;
29398fi
29399
29400  if test "x$with_import_hotspot" != x; then
29401    CURDIR="$PWD"
29402    cd "$with_import_hotspot"
29403    HOTSPOT_DIST="`pwd`"
29404    cd "$CURDIR"
29405    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29406      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29407    fi
29408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29409$as_echo_n "checking if hotspot should be imported... " >&6; }
29410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29411$as_echo "yes from $HOTSPOT_DIST" >&6; }
29412    BUILD_HOTSPOT=false
29413  fi
29414
29415  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29416
29417
29418###############################################################################
29419#
29420# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29421# native code.
29422#
29423###############################################################################
29424
29425# First determine the toolchain type (compiler family)
29426
29427
29428# Check whether --with-toolchain-type was given.
29429if test "${with_toolchain_type+set}" = set; then :
29430  withval=$with_toolchain_type;
29431fi
29432
29433
29434  # Use indirect variable referencing
29435  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29436  VALID_TOOLCHAINS=${!toolchain_var_name}
29437
29438  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29439    if test -n "$XCODEBUILD"; then
29440      # On Mac OS X, default toolchain to clang after Xcode 5
29441      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29442      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29443      if test $? -ne 0; then
29444        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29445      fi
29446      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29447          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29448          $CUT -f 1 -d .`
29449      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29450$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29451      if test $XCODE_MAJOR_VERSION -ge 5; then
29452          DEFAULT_TOOLCHAIN="clang"
29453      else
29454          DEFAULT_TOOLCHAIN="gcc"
29455      fi
29456    else
29457      # If Xcode is not installed, but the command line tools are
29458      # then we can't run xcodebuild. On these systems we should
29459      # default to clang
29460      DEFAULT_TOOLCHAIN="clang"
29461    fi
29462  else
29463    # First toolchain type in the list is the default
29464    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29465  fi
29466
29467  if test "x$with_toolchain_type" = xlist; then
29468    # List all toolchains
29469    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29470$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29471    for toolchain in $VALID_TOOLCHAINS; do
29472      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29473      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29474      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29475    done
29476
29477    exit 0
29478  elif test "x$with_toolchain_type" != x; then
29479    # User override; check that it is valid
29480    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29481      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29482$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29483      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29484$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29485      as_fn_error $? "Cannot continue." "$LINENO" 5
29486    fi
29487    TOOLCHAIN_TYPE=$with_toolchain_type
29488  else
29489    # No flag given, use default
29490    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29491  fi
29492
29493
29494  TOOLCHAIN_CC_BINARY_clang="clang"
29495  TOOLCHAIN_CC_BINARY_gcc="gcc"
29496  TOOLCHAIN_CC_BINARY_microsoft="cl"
29497  TOOLCHAIN_CC_BINARY_solstudio="cc"
29498  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29499
29500  TOOLCHAIN_CXX_BINARY_clang="clang++"
29501  TOOLCHAIN_CXX_BINARY_gcc="g++"
29502  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29503  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29504  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29505
29506  # Use indirect variable referencing
29507  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29508  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29509  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29510  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29511  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29512  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29513
29514
29515  # Define filename patterns
29516  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29517    LIBRARY_PREFIX=
29518    SHARED_LIBRARY_SUFFIX='.dll'
29519    STATIC_LIBRARY_SUFFIX='.lib'
29520    SHARED_LIBRARY='$1.dll'
29521    STATIC_LIBRARY='$1.lib'
29522    OBJ_SUFFIX='.obj'
29523    EXE_SUFFIX='.exe'
29524  else
29525    LIBRARY_PREFIX=lib
29526    SHARED_LIBRARY_SUFFIX='.so'
29527    STATIC_LIBRARY_SUFFIX='.a'
29528    SHARED_LIBRARY='lib$1.so'
29529    STATIC_LIBRARY='lib$1.a'
29530    OBJ_SUFFIX='.o'
29531    EXE_SUFFIX=''
29532    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29533      SHARED_LIBRARY='lib$1.dylib'
29534      SHARED_LIBRARY_SUFFIX='.dylib'
29535    fi
29536  fi
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29548    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29549$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29550  else
29551    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29552$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29553  fi
29554
29555
29556# User supplied flags should be used when configure detects compilers
29557
29558  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29559    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29560$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29561  fi
29562
29563  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29564    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29565$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29566  fi
29567
29568  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29569    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29570$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29571  fi
29572
29573
29574# Check whether --with-extra-cflags was given.
29575if test "${with_extra_cflags+set}" = set; then :
29576  withval=$with_extra_cflags;
29577fi
29578
29579
29580
29581# Check whether --with-extra-cxxflags was given.
29582if test "${with_extra_cxxflags+set}" = set; then :
29583  withval=$with_extra_cxxflags;
29584fi
29585
29586
29587
29588# Check whether --with-extra-ldflags was given.
29589if test "${with_extra_ldflags+set}" = set; then :
29590  withval=$with_extra_ldflags;
29591fi
29592
29593
29594  EXTRA_CFLAGS="$with_extra_cflags"
29595  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29596  EXTRA_LDFLAGS="$with_extra_ldflags"
29597
29598  # Hotspot needs these set in their legacy form
29599  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29600  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29601  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29602
29603
29604
29605
29606
29607  # The global CFLAGS and LDLAGS variables are used by configure tests and
29608  # should include the extra parameters
29609  CFLAGS="$EXTRA_CFLAGS"
29610  CXXFLAGS="$EXTRA_CXXFLAGS"
29611  LDFLAGS="$EXTRA_LDFLAGS"
29612  CPPFLAGS=""
29613
29614# The sysroot cflags are needed for configure to be able to run the compilers
29615
29616  if test "x$SYSROOT" != "x"; then
29617    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29618      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29619        # Solaris Studio does not have a concept of sysroot. Instead we must
29620        # make sure the default include and lib dirs are appended to each
29621        # compile and link command line.
29622        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29623        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29624            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29625            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29626      fi
29627    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29628      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29629      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29630    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29631      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29632      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29633    fi
29634    # Propagate the sysroot args to hotspot
29635    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29636    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29637    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29638    # The global CFLAGS and LDFLAGS variables need these for configure to function
29639    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29640    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29641    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29642    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29643  fi
29644
29645  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29646    # We also need -iframework<path>/System/Library/Frameworks
29647    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29648    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29649    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29650    # set this here so it doesn't have to be peppered throughout the forest
29651    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29652    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29653  fi
29654
29655
29656
29657
29658
29659# Then detect the actual binaries needed
29660
29661  # FIXME: Is this needed?
29662  ac_ext=cpp
29663ac_cpp='$CXXCPP $CPPFLAGS'
29664ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29665ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29666ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29667
29668
29669  # Store the CFLAGS etc passed to the configure script.
29670  ORG_CFLAGS="$CFLAGS"
29671  ORG_CXXFLAGS="$CXXFLAGS"
29672
29673  # autoconf magic only relies on PATH, so update it if tools dir is specified
29674  OLD_PATH="$PATH"
29675
29676  # On Windows, we need to detect the visual studio installation first.
29677  # This will change the PATH, but we need to keep that new PATH even
29678  # after toolchain detection is done, since the compiler (on x86) uses
29679  # it for DLL resolution in runtime.
29680  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29681      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29682
29683  # Store path to cygwin link.exe to help excluding it when searching for
29684  # VS linker. This must be done before changing the PATH when looking for VS.
29685  # Extract the first word of "link", so it can be a program name with args.
29686set dummy link; ac_word=$2
29687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29688$as_echo_n "checking for $ac_word... " >&6; }
29689if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29690  $as_echo_n "(cached) " >&6
29691else
29692  case $CYGWIN_LINK in
29693  [\\/]* | ?:[\\/]*)
29694  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29695  ;;
29696  *)
29697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29698for as_dir in $PATH
29699do
29700  IFS=$as_save_IFS
29701  test -z "$as_dir" && as_dir=.
29702    for ac_exec_ext in '' $ac_executable_extensions; do
29703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29704    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29706    break 2
29707  fi
29708done
29709  done
29710IFS=$as_save_IFS
29711
29712  ;;
29713esac
29714fi
29715CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29716if test -n "$CYGWIN_LINK"; then
29717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29718$as_echo "$CYGWIN_LINK" >&6; }
29719else
29720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29721$as_echo "no" >&6; }
29722fi
29723
29724
29725  if test "x$CYGWIN_LINK" != x; then
29726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29727$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29728    "$CYGWIN_LINK" --version > /dev/null
29729    if test $? -eq 0 ; then
29730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29731$as_echo "yes" >&6; }
29732    else
29733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29734$as_echo "no" >&6; }
29735      # This might be the VS linker. Don't exclude it later on.
29736      CYGWIN_LINK=""
29737    fi
29738  fi
29739
29740  # First-hand choice is to locate and run the vsvars bat file.
29741
29742
29743# Check whether --with-toolchain-version was given.
29744if test "${with_toolchain_version+set}" = set; then :
29745  withval=$with_toolchain_version;
29746fi
29747
29748
29749  if test "x$with_toolchain_version" = xlist; then
29750    # List all toolchains
29751    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29752$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29753    for version in $VALID_VS_VERSIONS; do
29754      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29755      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29756    done
29757
29758    exit 0
29759  elif test "x$DEVKIT_VS_VERSION" != x; then
29760    VS_VERSION=$DEVKIT_VS_VERSION
29761    TOOLCHAIN_VERSION=$VS_VERSION
29762    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29763    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29764    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29765    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29766    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29767    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29768
29769    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29770    # can still be exported as INCLUDE for compiler invocations without
29771    # SYSROOT_CFLAGS
29772    OLDIFS="$IFS"
29773    IFS=";"
29774    for i in $DEVKIT_VS_INCLUDE; do
29775      ipath=$i
29776
29777  unix_path="$ipath"
29778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29779    windows_path=`$CYGPATH -m "$unix_path"`
29780    ipath="$windows_path"
29781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29782    windows_path=`cmd //c echo $unix_path`
29783    ipath="$windows_path"
29784  fi
29785
29786      VS_INCLUDE="$VS_INCLUDE;$ipath"
29787    done
29788    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29789    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29790    for i in $DEVKIT_VS_LIB; do
29791      libpath=$i
29792
29793  unix_path="$libpath"
29794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29795    windows_path=`$CYGPATH -m "$unix_path"`
29796    libpath="$windows_path"
29797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29798    windows_path=`cmd //c echo $unix_path`
29799    libpath="$windows_path"
29800  fi
29801
29802      VS_LIB="$VS_LIB;$libpath"
29803    done
29804    IFS="$OLDIFS"
29805
29806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29807$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29808
29809  elif test "x$with_toolchain_version" != x; then
29810    # User override; check that it is valid
29811    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29812      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29813$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29814      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29815$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29816      as_fn_error $? "Cannot continue." "$LINENO" 5
29817    fi
29818    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29819  else
29820    # No flag given, use default
29821    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29822  fi
29823
29824  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29825
29826  VS_VERSION="$VS_VERSION"
29827  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29828  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29829  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29830  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29831
29832  # When using --with-tools-dir, assume it points to the correct and default
29833  # version of Visual Studio or that --with-toolchain-version was also set.
29834  if test "x$with_tools_dir" != x; then
29835
29836  if test "x$VS_ENV_CMD" = x; then
29837    VS_VERSION="${VS_VERSION}"
29838    VS_BASE="$with_tools_dir/../.."
29839    METHOD="--with-tools-dir"
29840
29841    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29842      VCVARSFILE="vc/bin/vcvars32.bat"
29843    else
29844      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29845    fi
29846
29847
29848  windows_path="$VS_BASE"
29849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29850    unix_path=`$CYGPATH -u "$windows_path"`
29851    VS_BASE="$unix_path"
29852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29854    VS_BASE="$unix_path"
29855  fi
29856
29857    if test -d "$VS_BASE"; then
29858      if test -f "$VS_BASE/$VCVARSFILE"; then
29859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29860$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29861        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29862        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29863        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29864        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29865      else
29866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29867$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29868        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29869$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29870      fi
29871    fi
29872  fi
29873
29874
29875  if test "x$VS_ENV_CMD" = x; then
29876    VS_VERSION="${VS_VERSION}"
29877    VS_BASE="$with_tools_dir/../../.."
29878    METHOD="--with-tools-dir"
29879
29880    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29881      VCVARSFILE="vc/bin/vcvars32.bat"
29882    else
29883      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29884    fi
29885
29886
29887  windows_path="$VS_BASE"
29888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29889    unix_path=`$CYGPATH -u "$windows_path"`
29890    VS_BASE="$unix_path"
29891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29893    VS_BASE="$unix_path"
29894  fi
29895
29896    if test -d "$VS_BASE"; then
29897      if test -f "$VS_BASE/$VCVARSFILE"; then
29898        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29899$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29900        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29901        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29902        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29903        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29904      else
29905        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29906$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29907        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29908$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29909      fi
29910    fi
29911  fi
29912
29913    if test "x$VS_ENV_CMD" = x; then
29914      # Having specified an argument which is incorrect will produce an instant failure;
29915      # we should not go on looking
29916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29917$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29918      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29919$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29920      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29921$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29922      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29923    fi
29924  fi
29925
29926  VS_ENV_CMD=""
29927  VS_ENV_ARGS=""
29928
29929  if test "x$VS_COMNTOOLS" != x; then
29930
29931  if test "x$VS_ENV_CMD" = x; then
29932    VS_VERSION="${VS_VERSION}"
29933    VS_BASE="$VS_COMNTOOLS/../.."
29934    METHOD="$VS_COMNTOOLS_VAR variable"
29935
29936    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29937      VCVARSFILE="vc/bin/vcvars32.bat"
29938    else
29939      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29940    fi
29941
29942
29943  windows_path="$VS_BASE"
29944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29945    unix_path=`$CYGPATH -u "$windows_path"`
29946    VS_BASE="$unix_path"
29947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29949    VS_BASE="$unix_path"
29950  fi
29951
29952    if test -d "$VS_BASE"; then
29953      if test -f "$VS_BASE/$VCVARSFILE"; then
29954        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29955$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29956        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29957        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29958        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29959        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29960      else
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29962$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29964$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29965      fi
29966    fi
29967  fi
29968
29969  fi
29970  if test "x$PROGRAMFILES" != x; then
29971
29972  if test "x$VS_ENV_CMD" = x; then
29973    VS_VERSION="${VS_VERSION}"
29974    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29975    METHOD="well-known name"
29976
29977    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29978      VCVARSFILE="vc/bin/vcvars32.bat"
29979    else
29980      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29981    fi
29982
29983
29984  windows_path="$VS_BASE"
29985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29986    unix_path=`$CYGPATH -u "$windows_path"`
29987    VS_BASE="$unix_path"
29988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29990    VS_BASE="$unix_path"
29991  fi
29992
29993    if test -d "$VS_BASE"; then
29994      if test -f "$VS_BASE/$VCVARSFILE"; then
29995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29996$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29997        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29998        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29999        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30000        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30001      else
30002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30003$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30005$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30006      fi
30007    fi
30008  fi
30009
30010  fi
30011  # Work around the insanely named ProgramFiles(x86) env variable
30012  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30013  if test "x$PROGRAMFILES_X86" != x; then
30014
30015  if test "x$VS_ENV_CMD" = x; then
30016    VS_VERSION="${VS_VERSION}"
30017    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30018    METHOD="well-known name"
30019
30020    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30021      VCVARSFILE="vc/bin/vcvars32.bat"
30022    else
30023      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30024    fi
30025
30026
30027  windows_path="$VS_BASE"
30028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30029    unix_path=`$CYGPATH -u "$windows_path"`
30030    VS_BASE="$unix_path"
30031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30033    VS_BASE="$unix_path"
30034  fi
30035
30036    if test -d "$VS_BASE"; then
30037      if test -f "$VS_BASE/$VCVARSFILE"; then
30038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30039$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30040        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30041        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30042        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30043        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30044      else
30045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30046$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30047        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30048$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30049      fi
30050    fi
30051  fi
30052
30053  fi
30054
30055  if test "x$VS_ENV_CMD" = x; then
30056    VS_VERSION="${VS_VERSION}"
30057    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30058    METHOD="well-known name"
30059
30060    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30061      VCVARSFILE="vc/bin/vcvars32.bat"
30062    else
30063      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30064    fi
30065
30066
30067  windows_path="$VS_BASE"
30068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30069    unix_path=`$CYGPATH -u "$windows_path"`
30070    VS_BASE="$unix_path"
30071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30073    VS_BASE="$unix_path"
30074  fi
30075
30076    if test -d "$VS_BASE"; then
30077      if test -f "$VS_BASE/$VCVARSFILE"; then
30078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30079$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30080        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30081        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30082        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30083        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30084      else
30085        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30086$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30087        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30088$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30089      fi
30090    fi
30091  fi
30092
30093
30094  if test "x$VS_ENV_CMD" = x; then
30095    VS_VERSION="${VS_VERSION}"
30096    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30097    METHOD="well-known name"
30098
30099    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30100      VCVARSFILE="vc/bin/vcvars32.bat"
30101    else
30102      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30103    fi
30104
30105
30106  windows_path="$VS_BASE"
30107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30108    unix_path=`$CYGPATH -u "$windows_path"`
30109    VS_BASE="$unix_path"
30110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30112    VS_BASE="$unix_path"
30113  fi
30114
30115    if test -d "$VS_BASE"; then
30116      if test -f "$VS_BASE/$VCVARSFILE"; then
30117        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30118$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30119        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30120        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30121        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30122        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30123      else
30124        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30125$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30126        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30127$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30128      fi
30129    fi
30130  fi
30131
30132
30133  if test "x$SDK_INSTALL_DIR" != x; then
30134    if test "x$ProgramW6432" != x; then
30135
30136  if test "x$VS_ENV_CMD" = x; then
30137    VS_VERSION="${VS_VERSION}"
30138    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30139    METHOD="well-known name"
30140
30141  windows_path="$WIN_SDK_BASE"
30142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30143    unix_path=`$CYGPATH -u "$windows_path"`
30144    WIN_SDK_BASE="$unix_path"
30145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30147    WIN_SDK_BASE="$unix_path"
30148  fi
30149
30150    if test -d "$WIN_SDK_BASE"; then
30151      # There have been cases of partial or broken SDK installations. A missing
30152      # lib dir is not going to work.
30153      if test ! -d "$WIN_SDK_BASE/lib"; then
30154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30155$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30156        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30157$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30158      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30160$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30161        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30162        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30163          VS_ENV_ARGS="/x86"
30164        else
30165          VS_ENV_ARGS="/x64"
30166        fi
30167        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30168        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30169        # TODO: improve detection for other versions of SDK
30170        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30171      else
30172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30175$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30176      fi
30177    fi
30178  fi
30179
30180    fi
30181    if test "x$PROGRAMW6432" != x; then
30182
30183  if test "x$VS_ENV_CMD" = x; then
30184    VS_VERSION="${VS_VERSION}"
30185    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30186    METHOD="well-known name"
30187
30188  windows_path="$WIN_SDK_BASE"
30189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30190    unix_path=`$CYGPATH -u "$windows_path"`
30191    WIN_SDK_BASE="$unix_path"
30192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30194    WIN_SDK_BASE="$unix_path"
30195  fi
30196
30197    if test -d "$WIN_SDK_BASE"; then
30198      # There have been cases of partial or broken SDK installations. A missing
30199      # lib dir is not going to work.
30200      if test ! -d "$WIN_SDK_BASE/lib"; then
30201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30204$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30205      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30208        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30209        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30210          VS_ENV_ARGS="/x86"
30211        else
30212          VS_ENV_ARGS="/x64"
30213        fi
30214        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30215        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30216        # TODO: improve detection for other versions of SDK
30217        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30218      else
30219        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30220$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30221        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30222$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30223      fi
30224    fi
30225  fi
30226
30227    fi
30228    if test "x$PROGRAMFILES" != x; then
30229
30230  if test "x$VS_ENV_CMD" = x; then
30231    VS_VERSION="${VS_VERSION}"
30232    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30233    METHOD="well-known name"
30234
30235  windows_path="$WIN_SDK_BASE"
30236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30237    unix_path=`$CYGPATH -u "$windows_path"`
30238    WIN_SDK_BASE="$unix_path"
30239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30241    WIN_SDK_BASE="$unix_path"
30242  fi
30243
30244    if test -d "$WIN_SDK_BASE"; then
30245      # There have been cases of partial or broken SDK installations. A missing
30246      # lib dir is not going to work.
30247      if test ! -d "$WIN_SDK_BASE/lib"; then
30248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30251$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30252      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30255        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30256        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30257          VS_ENV_ARGS="/x86"
30258        else
30259          VS_ENV_ARGS="/x64"
30260        fi
30261        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30262        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30263        # TODO: improve detection for other versions of SDK
30264        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30265      else
30266        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30267$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30268        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30269$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30270      fi
30271    fi
30272  fi
30273
30274    fi
30275
30276  if test "x$VS_ENV_CMD" = x; then
30277    VS_VERSION="${VS_VERSION}"
30278    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30279    METHOD="well-known name"
30280
30281  windows_path="$WIN_SDK_BASE"
30282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30283    unix_path=`$CYGPATH -u "$windows_path"`
30284    WIN_SDK_BASE="$unix_path"
30285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30287    WIN_SDK_BASE="$unix_path"
30288  fi
30289
30290    if test -d "$WIN_SDK_BASE"; then
30291      # There have been cases of partial or broken SDK installations. A missing
30292      # lib dir is not going to work.
30293      if test ! -d "$WIN_SDK_BASE/lib"; then
30294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30295$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30296        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30297$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30298      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30299        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30300$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30301        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30302        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30303          VS_ENV_ARGS="/x86"
30304        else
30305          VS_ENV_ARGS="/x64"
30306        fi
30307        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30308        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30309        # TODO: improve detection for other versions of SDK
30310        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30311      else
30312        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30313$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30314        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30315$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30316      fi
30317    fi
30318  fi
30319
30320
30321  if test "x$VS_ENV_CMD" = x; then
30322    VS_VERSION="${VS_VERSION}"
30323    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30324    METHOD="well-known name"
30325
30326  windows_path="$WIN_SDK_BASE"
30327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30328    unix_path=`$CYGPATH -u "$windows_path"`
30329    WIN_SDK_BASE="$unix_path"
30330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30332    WIN_SDK_BASE="$unix_path"
30333  fi
30334
30335    if test -d "$WIN_SDK_BASE"; then
30336      # There have been cases of partial or broken SDK installations. A missing
30337      # lib dir is not going to work.
30338      if test ! -d "$WIN_SDK_BASE/lib"; then
30339        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30340$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30341        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30342$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30343      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30345$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30346        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30347        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30348          VS_ENV_ARGS="/x86"
30349        else
30350          VS_ENV_ARGS="/x64"
30351        fi
30352        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30353        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30354        # TODO: improve detection for other versions of SDK
30355        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30356      else
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30358$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30359        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30360$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30361      fi
30362    fi
30363  fi
30364
30365  fi
30366
30367    if test "x$VS_ENV_CMD" != x; then
30368      TOOLCHAIN_VERSION=$VS_VERSION
30369      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30370      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30371      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30372      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30373      # The rest of the variables are already evaled while probing
30374      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30375$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30376      break
30377    fi
30378  done
30379
30380
30381  # If we have a devkit, skip all of the below.
30382  if test "x$DEVKIT_VS_VERSION" = x; then
30383    if test "x$VS_ENV_CMD" != x; then
30384      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30385
30386  # Only process if variable expands to non-empty
30387
30388  if test "x$VS_ENV_CMD" != x; then
30389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30390
30391  # First separate the path from the arguments. This will split at the first
30392  # space.
30393  complete="$VS_ENV_CMD"
30394  path="${complete%% *}"
30395  tmp="$complete EOL"
30396  arguments="${tmp#* }"
30397
30398  # Input might be given as Windows format, start by converting to
30399  # unix format.
30400  new_path=`$CYGPATH -u "$path"`
30401
30402  # Now try to locate executable using which
30403  new_path=`$WHICH "$new_path" 2> /dev/null`
30404  # bat and cmd files are not always considered executable in cygwin causing which
30405  # to not find them
30406  if test "x$new_path" = x \
30407      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30408      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30409    new_path=`$CYGPATH -u "$path"`
30410  fi
30411  if test "x$new_path" = x; then
30412    # Oops. Which didn't find the executable.
30413    # The splitting of arguments from the executable at a space might have been incorrect,
30414    # since paths with space are more likely in Windows. Give it another try with the whole
30415    # argument.
30416    path="$complete"
30417    arguments="EOL"
30418    new_path=`$CYGPATH -u "$path"`
30419    new_path=`$WHICH "$new_path" 2> /dev/null`
30420    # bat and cmd files are not always considered executable in cygwin causing which
30421    # to not find them
30422    if test "x$new_path" = x \
30423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30425      new_path=`$CYGPATH -u "$path"`
30426    fi
30427    if test "x$new_path" = x; then
30428      # It's still not found. Now this is an unrecoverable error.
30429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30430$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30431      has_space=`$ECHO "$complete" | $GREP " "`
30432      if test "x$has_space" != x; then
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30435      fi
30436      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30437    fi
30438  fi
30439
30440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30443  # "foo.exe" is OK but "foo" is an error.
30444  #
30445  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30446  # It is also a way to make sure we got the proper file name for the real test later on.
30447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30448  if test "x$test_shortpath" = x; then
30449    # Short path failed, file does not exist as specified.
30450    # Try adding .exe or .cmd
30451    if test -f "${new_path}.exe"; then
30452      input_to_shortpath="${new_path}.exe"
30453    elif test -f "${new_path}.cmd"; then
30454      input_to_shortpath="${new_path}.cmd"
30455    else
30456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30457$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30460      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30461    fi
30462  else
30463    input_to_shortpath="$new_path"
30464  fi
30465
30466  # Call helper function which possibly converts this using DOS-style short mode.
30467  # If so, the updated path is stored in $new_path.
30468  new_path="$input_to_shortpath"
30469
30470  input_path="$input_to_shortpath"
30471  # Check if we need to convert this using DOS-style short mode. If the path
30472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30473  # take no chances and rewrite it.
30474  # Note: m4 eats our [], so we need to use [ and ] instead.
30475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30476  if test "x$has_forbidden_chars" != x; then
30477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30481      # Going to short mode and back again did indeed matter. Since short mode is
30482      # case insensitive, let's make it lowercase to improve readability.
30483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30484      # Now convert it back to Unix-style (cygpath)
30485      input_path=`$CYGPATH -u "$shortmode_path"`
30486      new_path="$input_path"
30487    fi
30488  fi
30489
30490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30491  if test "x$test_cygdrive_prefix" = x; then
30492    # As a simple fix, exclude /usr/bin since it's not a real path.
30493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30495      # a path prefixed by /cygdrive for fixpath to work.
30496      new_path="$CYGWIN_ROOT_PATH$input_path"
30497    fi
30498  fi
30499
30500  # remove trailing .exe if any
30501  new_path="${new_path/%.exe/}"
30502
30503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30504
30505  # First separate the path from the arguments. This will split at the first
30506  # space.
30507  complete="$VS_ENV_CMD"
30508  path="${complete%% *}"
30509  tmp="$complete EOL"
30510  arguments="${tmp#* }"
30511
30512  # Input might be given as Windows format, start by converting to
30513  # unix format.
30514  new_path="$path"
30515
30516  windows_path="$new_path"
30517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30518    unix_path=`$CYGPATH -u "$windows_path"`
30519    new_path="$unix_path"
30520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30522    new_path="$unix_path"
30523  fi
30524
30525
30526  # Now try to locate executable using which
30527  new_path=`$WHICH "$new_path" 2> /dev/null`
30528
30529  if test "x$new_path" = x; then
30530    # Oops. Which didn't find the executable.
30531    # The splitting of arguments from the executable at a space might have been incorrect,
30532    # since paths with space are more likely in Windows. Give it another try with the whole
30533    # argument.
30534    path="$complete"
30535    arguments="EOL"
30536    new_path="$path"
30537
30538  windows_path="$new_path"
30539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30540    unix_path=`$CYGPATH -u "$windows_path"`
30541    new_path="$unix_path"
30542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30544    new_path="$unix_path"
30545  fi
30546
30547
30548    new_path=`$WHICH "$new_path" 2> /dev/null`
30549    # bat and cmd files are not always considered executable in MSYS causing which
30550    # to not find them
30551    if test "x$new_path" = x \
30552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30554      new_path="$path"
30555
30556  windows_path="$new_path"
30557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30558    unix_path=`$CYGPATH -u "$windows_path"`
30559    new_path="$unix_path"
30560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30562    new_path="$unix_path"
30563  fi
30564
30565    fi
30566
30567    if test "x$new_path" = x; then
30568      # It's still not found. Now this is an unrecoverable error.
30569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30570$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30571      has_space=`$ECHO "$complete" | $GREP " "`
30572      if test "x$has_space" != x; then
30573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30575      fi
30576      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30577    fi
30578  fi
30579
30580  # Now new_path has a complete unix path to the binary
30581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30582    # Keep paths in /bin as-is, but remove trailing .exe if any
30583    new_path="${new_path/%.exe/}"
30584    # Do not save /bin paths to all_fixpath_prefixes!
30585  else
30586    # Not in mixed or Windows style, start by that.
30587    new_path=`cmd //c echo $new_path`
30588
30589  input_path="$new_path"
30590  # Check if we need to convert this using DOS-style short mode. If the path
30591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30592  # take no chances and rewrite it.
30593  # Note: m4 eats our [], so we need to use [ and ] instead.
30594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30595  if test "x$has_forbidden_chars" != x; then
30596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30598  fi
30599
30600    # Output is in $new_path
30601
30602  windows_path="$new_path"
30603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30604    unix_path=`$CYGPATH -u "$windows_path"`
30605    new_path="$unix_path"
30606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30608    new_path="$unix_path"
30609  fi
30610
30611    # remove trailing .exe if any
30612    new_path="${new_path/%.exe/}"
30613
30614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30616  fi
30617
30618    else
30619      # We're on a unix platform. Hooray! :)
30620      # First separate the path from the arguments. This will split at the first
30621      # space.
30622      complete="$VS_ENV_CMD"
30623      path="${complete%% *}"
30624      tmp="$complete EOL"
30625      arguments="${tmp#* }"
30626
30627      # Cannot rely on the command "which" here since it doesn't always work.
30628      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30629      if test -z "$is_absolute_path"; then
30630        # Path to executable is not absolute. Find it.
30631        IFS_save="$IFS"
30632        IFS=:
30633        for p in $PATH; do
30634          if test -f "$p/$path" && test -x "$p/$path"; then
30635            new_path="$p/$path"
30636            break
30637          fi
30638        done
30639        IFS="$IFS_save"
30640      else
30641        # This is an absolute path, we can use it without further modifications.
30642        new_path="$path"
30643      fi
30644
30645      if test "x$new_path" = x; then
30646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30647$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30648        has_space=`$ECHO "$complete" | $GREP " "`
30649        if test "x$has_space" != x; then
30650          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30652        fi
30653        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30654      fi
30655    fi
30656
30657    # Now join together the path and the arguments once again
30658    if test "x$arguments" != xEOL; then
30659      new_complete="$new_path ${arguments% *}"
30660    else
30661      new_complete="$new_path"
30662    fi
30663
30664    if test "x$complete" != "x$new_complete"; then
30665      VS_ENV_CMD="$new_complete"
30666      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30667$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30668    fi
30669  fi
30670
30671
30672      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30673      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30674$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30675
30676      # We need to create a couple of temporary files.
30677      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30678      $MKDIR -p $VS_ENV_TMP_DIR
30679
30680      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30681      # Instead create a shell script which will set the relevant variables when run.
30682      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30683
30684  unix_path="$WINPATH_VS_ENV_CMD"
30685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30686    windows_path=`$CYGPATH -m "$unix_path"`
30687    WINPATH_VS_ENV_CMD="$windows_path"
30688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30689    windows_path=`cmd //c echo $unix_path`
30690    WINPATH_VS_ENV_CMD="$windows_path"
30691  fi
30692
30693      WINPATH_BASH="$BASH"
30694
30695  unix_path="$WINPATH_BASH"
30696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30697    windows_path=`$CYGPATH -m "$unix_path"`
30698    WINPATH_BASH="$windows_path"
30699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30700    windows_path=`cmd //c echo $unix_path`
30701    WINPATH_BASH="$windows_path"
30702  fi
30703
30704
30705      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30706      # script (executable by bash) that will setup the important variables.
30707      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30708      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30709      # This will end up something like:
30710      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30711      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30712      # These will end up something like:
30713      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30714      # The trailing space for everyone except PATH is no typo, but is needed due
30715      # to trailing \ in the Windows paths. These will be stripped later.
30716      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30717          >> $EXTRACT_VC_ENV_BAT_FILE
30718      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30719          >> $EXTRACT_VC_ENV_BAT_FILE
30720      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30721          >> $EXTRACT_VC_ENV_BAT_FILE
30722      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30723          >> $EXTRACT_VC_ENV_BAT_FILE
30724      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30725          >> $EXTRACT_VC_ENV_BAT_FILE
30726      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30727          >> $EXTRACT_VC_ENV_BAT_FILE
30728
30729      # Now execute the newly created bat file.
30730      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30731      # Change directory so we don't need to mess with Windows paths in redirects.
30732      cd $VS_ENV_TMP_DIR
30733      cmd /c extract-vs-env.bat | $CAT
30734      cd $CURDIR
30735
30736      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30737        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30738$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30739        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30740$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30741        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30742$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30743        as_fn_error $? "Cannot continue" "$LINENO" 5
30744      fi
30745
30746      # Now set all paths and other env variables. This will allow the rest of
30747      # the configure script to find and run the compiler in the proper way.
30748      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30749$as_echo "$as_me: Setting extracted environment variables" >&6;}
30750      . $VS_ENV_TMP_DIR/set-vs-env.sh
30751      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30752      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30753    else
30754      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30755      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30756$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30757    fi
30758  fi
30759
30760  # At this point, we should have correct variables in the environment, or we can't continue.
30761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30762$as_echo_n "checking for Visual Studio variables... " >&6; }
30763
30764  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30765      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30766    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30768$as_echo "present but broken" >&6; }
30769      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30770    else
30771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30772$as_echo "ok" >&6; }
30773      # Remove any trailing "\" ";" and " " from the variables.
30774      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30775      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30776      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30777      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30778      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30779      # Remove any paths containing # (typically F#) as that messes up make. This
30780      # is needed if visual studio was installed with F# support.
30781      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30782
30783
30784
30785
30786
30787      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30788      OLDIFS="$IFS"
30789      IFS=";"
30790      for i in $VS_INCLUDE; do
30791        ipath=$i
30792        # Only process non-empty elements
30793        if test "x$ipath" != x; then
30794          IFS="$OLDIFS"
30795          # Check that directory exists before calling fixup_path
30796          testpath=$ipath
30797
30798  windows_path="$testpath"
30799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30800    unix_path=`$CYGPATH -u "$windows_path"`
30801    testpath="$unix_path"
30802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30804    testpath="$unix_path"
30805  fi
30806
30807          if test -d "$testpath"; then
30808
30809  # Only process if variable expands to non-empty
30810
30811  if test "x$ipath" != x; then
30812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30813
30814  # Input might be given as Windows format, start by converting to
30815  # unix format.
30816  path="$ipath"
30817  new_path=`$CYGPATH -u "$path"`
30818
30819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30822  # "foo.exe" is OK but "foo" is an error.
30823  #
30824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30825  # It is also a way to make sure we got the proper file name for the real test later on.
30826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30827  if test "x$test_shortpath" = x; then
30828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30829$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30830    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30831  fi
30832
30833  # Call helper function which possibly converts this using DOS-style short mode.
30834  # If so, the updated path is stored in $new_path.
30835
30836  input_path="$new_path"
30837  # Check if we need to convert this using DOS-style short mode. If the path
30838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30839  # take no chances and rewrite it.
30840  # Note: m4 eats our [], so we need to use [ and ] instead.
30841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30842  if test "x$has_forbidden_chars" != x; then
30843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30847      # Going to short mode and back again did indeed matter. Since short mode is
30848      # case insensitive, let's make it lowercase to improve readability.
30849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30850      # Now convert it back to Unix-style (cygpath)
30851      input_path=`$CYGPATH -u "$shortmode_path"`
30852      new_path="$input_path"
30853    fi
30854  fi
30855
30856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30857  if test "x$test_cygdrive_prefix" = x; then
30858    # As a simple fix, exclude /usr/bin since it's not a real path.
30859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30861      # a path prefixed by /cygdrive for fixpath to work.
30862      new_path="$CYGWIN_ROOT_PATH$input_path"
30863    fi
30864  fi
30865
30866
30867  if test "x$path" != "x$new_path"; then
30868    ipath="$new_path"
30869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30870$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30871  fi
30872
30873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30874
30875  path="$ipath"
30876  has_colon=`$ECHO $path | $GREP ^.:`
30877  new_path="$path"
30878  if test "x$has_colon" = x; then
30879    # Not in mixed or Windows style, start by that.
30880    new_path=`cmd //c echo $path`
30881  fi
30882
30883
30884  input_path="$new_path"
30885  # Check if we need to convert this using DOS-style short mode. If the path
30886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30887  # take no chances and rewrite it.
30888  # Note: m4 eats our [], so we need to use [ and ] instead.
30889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30890  if test "x$has_forbidden_chars" != x; then
30891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30893  fi
30894
30895
30896  windows_path="$new_path"
30897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30898    unix_path=`$CYGPATH -u "$windows_path"`
30899    new_path="$unix_path"
30900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30902    new_path="$unix_path"
30903  fi
30904
30905  if test "x$path" != "x$new_path"; then
30906    ipath="$new_path"
30907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30908$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30909  fi
30910
30911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30913
30914    else
30915      # We're on a unix platform. Hooray! :)
30916      path="$ipath"
30917      has_space=`$ECHO "$path" | $GREP " "`
30918      if test "x$has_space" != x; then
30919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30920$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30922      fi
30923
30924      # Use eval to expand a potential ~
30925      eval path="$path"
30926      if test ! -f "$path" && test ! -d "$path"; then
30927        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30928      fi
30929
30930      ipath="`cd "$path"; $THEPWDCMD -L`"
30931    fi
30932  fi
30933
30934            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30935          fi
30936          IFS=";"
30937        fi
30938      done
30939      # Convert VS_LIB into SYSROOT_LDFLAGS
30940      for i in $VS_LIB; do
30941        libpath=$i
30942        # Only process non-empty elements
30943        if test "x$libpath" != x; then
30944          IFS="$OLDIFS"
30945          # Check that directory exists before calling fixup_path
30946          testpath=$libpath
30947
30948  windows_path="$testpath"
30949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30950    unix_path=`$CYGPATH -u "$windows_path"`
30951    testpath="$unix_path"
30952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30954    testpath="$unix_path"
30955  fi
30956
30957          if test -d "$testpath"; then
30958
30959  # Only process if variable expands to non-empty
30960
30961  if test "x$libpath" != x; then
30962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30963
30964  # Input might be given as Windows format, start by converting to
30965  # unix format.
30966  path="$libpath"
30967  new_path=`$CYGPATH -u "$path"`
30968
30969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30972  # "foo.exe" is OK but "foo" is an error.
30973  #
30974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30975  # It is also a way to make sure we got the proper file name for the real test later on.
30976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30977  if test "x$test_shortpath" = x; then
30978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30979$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30980    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30981  fi
30982
30983  # Call helper function which possibly converts this using DOS-style short mode.
30984  # If so, the updated path is stored in $new_path.
30985
30986  input_path="$new_path"
30987  # Check if we need to convert this using DOS-style short mode. If the path
30988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30989  # take no chances and rewrite it.
30990  # Note: m4 eats our [], so we need to use [ and ] instead.
30991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30992  if test "x$has_forbidden_chars" != x; then
30993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30997      # Going to short mode and back again did indeed matter. Since short mode is
30998      # case insensitive, let's make it lowercase to improve readability.
30999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31000      # Now convert it back to Unix-style (cygpath)
31001      input_path=`$CYGPATH -u "$shortmode_path"`
31002      new_path="$input_path"
31003    fi
31004  fi
31005
31006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31007  if test "x$test_cygdrive_prefix" = x; then
31008    # As a simple fix, exclude /usr/bin since it's not a real path.
31009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31011      # a path prefixed by /cygdrive for fixpath to work.
31012      new_path="$CYGWIN_ROOT_PATH$input_path"
31013    fi
31014  fi
31015
31016
31017  if test "x$path" != "x$new_path"; then
31018    libpath="$new_path"
31019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31020$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31021  fi
31022
31023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31024
31025  path="$libpath"
31026  has_colon=`$ECHO $path | $GREP ^.:`
31027  new_path="$path"
31028  if test "x$has_colon" = x; then
31029    # Not in mixed or Windows style, start by that.
31030    new_path=`cmd //c echo $path`
31031  fi
31032
31033
31034  input_path="$new_path"
31035  # Check if we need to convert this using DOS-style short mode. If the path
31036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31037  # take no chances and rewrite it.
31038  # Note: m4 eats our [], so we need to use [ and ] instead.
31039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31040  if test "x$has_forbidden_chars" != x; then
31041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31043  fi
31044
31045
31046  windows_path="$new_path"
31047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31048    unix_path=`$CYGPATH -u "$windows_path"`
31049    new_path="$unix_path"
31050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31052    new_path="$unix_path"
31053  fi
31054
31055  if test "x$path" != "x$new_path"; then
31056    libpath="$new_path"
31057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31058$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31059  fi
31060
31061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31063
31064    else
31065      # We're on a unix platform. Hooray! :)
31066      path="$libpath"
31067      has_space=`$ECHO "$path" | $GREP " "`
31068      if test "x$has_space" != x; then
31069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31070$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31072      fi
31073
31074      # Use eval to expand a potential ~
31075      eval path="$path"
31076      if test ! -f "$path" && test ! -d "$path"; then
31077        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31078      fi
31079
31080      libpath="`cd "$path"; $THEPWDCMD -L`"
31081    fi
31082  fi
31083
31084            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31085          fi
31086          IFS=";"
31087        fi
31088      done
31089      IFS="$OLDIFS"
31090    fi
31091  else
31092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31093$as_echo "not found" >&6; }
31094
31095    if test "x$VS_ENV_CMD" = x; then
31096      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31097$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31099$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31100    else
31101      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31102$as_echo "$as_me: Running the extraction script failed." >&6;}
31103    fi
31104    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31105$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31106    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31107$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31108    as_fn_error $? "Cannot continue" "$LINENO" 5
31109  fi
31110
31111    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31112    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31113    PATH="$VS_PATH"
31114    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31115    export INCLUDE="$VS_INCLUDE"
31116    export LIB="$VS_LIB"
31117  fi
31118
31119  # For solaris we really need solaris tools, and not the GNU equivalent.
31120  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31121  # so add that to path before starting to probe.
31122  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31123  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31124    PATH="/usr/ccs/bin:$PATH"
31125  fi
31126
31127  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31128  # override all other locations.
31129  if test "x$TOOLCHAIN_PATH" != x; then
31130    PATH=$TOOLCHAIN_PATH:$PATH
31131  fi
31132
31133
31134  #
31135  # Setup the compilers (CC and CXX)
31136  #
31137
31138  COMPILER_NAME=C
31139  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31140
31141  if test "x$CC" != x; then
31142    # User has supplied compiler name already, always let that override.
31143    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31144$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31145    if test "x`basename $CC`" = "x$CC"; then
31146      # A command without a complete path is provided, search $PATH.
31147
31148      for ac_prog in $CC
31149do
31150  # Extract the first word of "$ac_prog", so it can be a program name with args.
31151set dummy $ac_prog; ac_word=$2
31152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31153$as_echo_n "checking for $ac_word... " >&6; }
31154if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31155  $as_echo_n "(cached) " >&6
31156else
31157  case $POTENTIAL_CC in
31158  [\\/]* | ?:[\\/]*)
31159  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31160  ;;
31161  *)
31162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31163for as_dir in $PATH
31164do
31165  IFS=$as_save_IFS
31166  test -z "$as_dir" && as_dir=.
31167    for ac_exec_ext in '' $ac_executable_extensions; do
31168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31169    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31171    break 2
31172  fi
31173done
31174  done
31175IFS=$as_save_IFS
31176
31177  ;;
31178esac
31179fi
31180POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31181if test -n "$POTENTIAL_CC"; then
31182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31183$as_echo "$POTENTIAL_CC" >&6; }
31184else
31185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31186$as_echo "no" >&6; }
31187fi
31188
31189
31190  test -n "$POTENTIAL_CC" && break
31191done
31192
31193      if test "x$POTENTIAL_CC" != x; then
31194        CC=$POTENTIAL_CC
31195      else
31196        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31197      fi
31198    else
31199      # Otherwise it might already be a complete path
31200      if test ! -x "$CC"; then
31201        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31202      fi
31203    fi
31204  else
31205    # No user supplied value. Locate compiler ourselves.
31206
31207    # If we are cross compiling, assume cross compilation tools follows the
31208    # cross compilation standard where they are prefixed with the autoconf
31209    # standard name for the target. For example the binary
31210    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31211    # If we are not cross compiling, then the default compiler name will be
31212    # used.
31213
31214    CC=
31215    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31216    # before checking the rest of the PATH.
31217    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31218    # step, this should not be necessary.
31219    if test -n "$TOOLCHAIN_PATH"; then
31220      PATH_save="$PATH"
31221      PATH="$TOOLCHAIN_PATH"
31222      for ac_prog in $SEARCH_LIST
31223do
31224  # Extract the first word of "$ac_prog", so it can be a program name with args.
31225set dummy $ac_prog; ac_word=$2
31226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31227$as_echo_n "checking for $ac_word... " >&6; }
31228if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31229  $as_echo_n "(cached) " >&6
31230else
31231  case $TOOLCHAIN_PATH_CC in
31232  [\\/]* | ?:[\\/]*)
31233  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31234  ;;
31235  *)
31236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31237for as_dir in $PATH
31238do
31239  IFS=$as_save_IFS
31240  test -z "$as_dir" && as_dir=.
31241    for ac_exec_ext in '' $ac_executable_extensions; do
31242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31243    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31245    break 2
31246  fi
31247done
31248  done
31249IFS=$as_save_IFS
31250
31251  ;;
31252esac
31253fi
31254TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31255if test -n "$TOOLCHAIN_PATH_CC"; then
31256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31257$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31258else
31259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31260$as_echo "no" >&6; }
31261fi
31262
31263
31264  test -n "$TOOLCHAIN_PATH_CC" && break
31265done
31266
31267      CC=$TOOLCHAIN_PATH_CC
31268      PATH="$PATH_save"
31269    fi
31270
31271    # AC_PATH_PROGS can't be run multiple times with the same variable,
31272    # so create a new name for this run.
31273    if test "x$CC" = x; then
31274      for ac_prog in $SEARCH_LIST
31275do
31276  # Extract the first word of "$ac_prog", so it can be a program name with args.
31277set dummy $ac_prog; ac_word=$2
31278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31279$as_echo_n "checking for $ac_word... " >&6; }
31280if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31281  $as_echo_n "(cached) " >&6
31282else
31283  case $POTENTIAL_CC in
31284  [\\/]* | ?:[\\/]*)
31285  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31286  ;;
31287  *)
31288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31289for as_dir in $PATH
31290do
31291  IFS=$as_save_IFS
31292  test -z "$as_dir" && as_dir=.
31293    for ac_exec_ext in '' $ac_executable_extensions; do
31294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31295    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31297    break 2
31298  fi
31299done
31300  done
31301IFS=$as_save_IFS
31302
31303  ;;
31304esac
31305fi
31306POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31307if test -n "$POTENTIAL_CC"; then
31308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31309$as_echo "$POTENTIAL_CC" >&6; }
31310else
31311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31312$as_echo "no" >&6; }
31313fi
31314
31315
31316  test -n "$POTENTIAL_CC" && break
31317done
31318
31319      CC=$POTENTIAL_CC
31320    fi
31321
31322    if test "x$CC" = x; then
31323
31324  # Print a helpful message on how to acquire the necessary build dependency.
31325  # devkit is the help tag: freetype, cups, alsa etc
31326  MISSING_DEPENDENCY=devkit
31327
31328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31329    cygwin_help $MISSING_DEPENDENCY
31330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31331    msys_help $MISSING_DEPENDENCY
31332  else
31333    PKGHANDLER_COMMAND=
31334
31335    case $PKGHANDLER in
31336      apt-get)
31337        apt_help     $MISSING_DEPENDENCY ;;
31338      yum)
31339        yum_help     $MISSING_DEPENDENCY ;;
31340      port)
31341        port_help    $MISSING_DEPENDENCY ;;
31342      pkgutil)
31343        pkgutil_help $MISSING_DEPENDENCY ;;
31344      pkgadd)
31345        pkgadd_help  $MISSING_DEPENDENCY ;;
31346    esac
31347
31348    if test "x$PKGHANDLER_COMMAND" != x; then
31349      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31350    fi
31351  fi
31352
31353      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31354    fi
31355  fi
31356
31357  # Now we have a compiler binary in CC. Make sure it's okay.
31358
31359  # Only process if variable expands to non-empty
31360
31361  if test "x$CC" != x; then
31362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31363
31364  # First separate the path from the arguments. This will split at the first
31365  # space.
31366  complete="$CC"
31367  path="${complete%% *}"
31368  tmp="$complete EOL"
31369  arguments="${tmp#* }"
31370
31371  # Input might be given as Windows format, start by converting to
31372  # unix format.
31373  new_path=`$CYGPATH -u "$path"`
31374
31375  # Now try to locate executable using which
31376  new_path=`$WHICH "$new_path" 2> /dev/null`
31377  # bat and cmd files are not always considered executable in cygwin causing which
31378  # to not find them
31379  if test "x$new_path" = x \
31380      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31381      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31382    new_path=`$CYGPATH -u "$path"`
31383  fi
31384  if test "x$new_path" = x; then
31385    # Oops. Which didn't find the executable.
31386    # The splitting of arguments from the executable at a space might have been incorrect,
31387    # since paths with space are more likely in Windows. Give it another try with the whole
31388    # argument.
31389    path="$complete"
31390    arguments="EOL"
31391    new_path=`$CYGPATH -u "$path"`
31392    new_path=`$WHICH "$new_path" 2> /dev/null`
31393    # bat and cmd files are not always considered executable in cygwin causing which
31394    # to not find them
31395    if test "x$new_path" = x \
31396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31398      new_path=`$CYGPATH -u "$path"`
31399    fi
31400    if test "x$new_path" = x; then
31401      # It's still not found. Now this is an unrecoverable error.
31402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31403$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31404      has_space=`$ECHO "$complete" | $GREP " "`
31405      if test "x$has_space" != x; then
31406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31408      fi
31409      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31410    fi
31411  fi
31412
31413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31416  # "foo.exe" is OK but "foo" is an error.
31417  #
31418  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31419  # It is also a way to make sure we got the proper file name for the real test later on.
31420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31421  if test "x$test_shortpath" = x; then
31422    # Short path failed, file does not exist as specified.
31423    # Try adding .exe or .cmd
31424    if test -f "${new_path}.exe"; then
31425      input_to_shortpath="${new_path}.exe"
31426    elif test -f "${new_path}.cmd"; then
31427      input_to_shortpath="${new_path}.cmd"
31428    else
31429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31430$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31433      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31434    fi
31435  else
31436    input_to_shortpath="$new_path"
31437  fi
31438
31439  # Call helper function which possibly converts this using DOS-style short mode.
31440  # If so, the updated path is stored in $new_path.
31441  new_path="$input_to_shortpath"
31442
31443  input_path="$input_to_shortpath"
31444  # Check if we need to convert this using DOS-style short mode. If the path
31445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31446  # take no chances and rewrite it.
31447  # Note: m4 eats our [], so we need to use [ and ] instead.
31448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31449  if test "x$has_forbidden_chars" != x; then
31450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31454      # Going to short mode and back again did indeed matter. Since short mode is
31455      # case insensitive, let's make it lowercase to improve readability.
31456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31457      # Now convert it back to Unix-style (cygpath)
31458      input_path=`$CYGPATH -u "$shortmode_path"`
31459      new_path="$input_path"
31460    fi
31461  fi
31462
31463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31464  if test "x$test_cygdrive_prefix" = x; then
31465    # As a simple fix, exclude /usr/bin since it's not a real path.
31466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31468      # a path prefixed by /cygdrive for fixpath to work.
31469      new_path="$CYGWIN_ROOT_PATH$input_path"
31470    fi
31471  fi
31472
31473  # remove trailing .exe if any
31474  new_path="${new_path/%.exe/}"
31475
31476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31477
31478  # First separate the path from the arguments. This will split at the first
31479  # space.
31480  complete="$CC"
31481  path="${complete%% *}"
31482  tmp="$complete EOL"
31483  arguments="${tmp#* }"
31484
31485  # Input might be given as Windows format, start by converting to
31486  # unix format.
31487  new_path="$path"
31488
31489  windows_path="$new_path"
31490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31491    unix_path=`$CYGPATH -u "$windows_path"`
31492    new_path="$unix_path"
31493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31495    new_path="$unix_path"
31496  fi
31497
31498
31499  # Now try to locate executable using which
31500  new_path=`$WHICH "$new_path" 2> /dev/null`
31501
31502  if test "x$new_path" = x; then
31503    # Oops. Which didn't find the executable.
31504    # The splitting of arguments from the executable at a space might have been incorrect,
31505    # since paths with space are more likely in Windows. Give it another try with the whole
31506    # argument.
31507    path="$complete"
31508    arguments="EOL"
31509    new_path="$path"
31510
31511  windows_path="$new_path"
31512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31513    unix_path=`$CYGPATH -u "$windows_path"`
31514    new_path="$unix_path"
31515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31517    new_path="$unix_path"
31518  fi
31519
31520
31521    new_path=`$WHICH "$new_path" 2> /dev/null`
31522    # bat and cmd files are not always considered executable in MSYS causing which
31523    # to not find them
31524    if test "x$new_path" = x \
31525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31527      new_path="$path"
31528
31529  windows_path="$new_path"
31530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31531    unix_path=`$CYGPATH -u "$windows_path"`
31532    new_path="$unix_path"
31533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31535    new_path="$unix_path"
31536  fi
31537
31538    fi
31539
31540    if test "x$new_path" = x; then
31541      # It's still not found. Now this is an unrecoverable error.
31542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31543$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31544      has_space=`$ECHO "$complete" | $GREP " "`
31545      if test "x$has_space" != x; then
31546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31548      fi
31549      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31550    fi
31551  fi
31552
31553  # Now new_path has a complete unix path to the binary
31554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31555    # Keep paths in /bin as-is, but remove trailing .exe if any
31556    new_path="${new_path/%.exe/}"
31557    # Do not save /bin paths to all_fixpath_prefixes!
31558  else
31559    # Not in mixed or Windows style, start by that.
31560    new_path=`cmd //c echo $new_path`
31561
31562  input_path="$new_path"
31563  # Check if we need to convert this using DOS-style short mode. If the path
31564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31565  # take no chances and rewrite it.
31566  # Note: m4 eats our [], so we need to use [ and ] instead.
31567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31568  if test "x$has_forbidden_chars" != x; then
31569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31571  fi
31572
31573    # Output is in $new_path
31574
31575  windows_path="$new_path"
31576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31577    unix_path=`$CYGPATH -u "$windows_path"`
31578    new_path="$unix_path"
31579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31581    new_path="$unix_path"
31582  fi
31583
31584    # remove trailing .exe if any
31585    new_path="${new_path/%.exe/}"
31586
31587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31589  fi
31590
31591    else
31592      # We're on a unix platform. Hooray! :)
31593      # First separate the path from the arguments. This will split at the first
31594      # space.
31595      complete="$CC"
31596      path="${complete%% *}"
31597      tmp="$complete EOL"
31598      arguments="${tmp#* }"
31599
31600      # Cannot rely on the command "which" here since it doesn't always work.
31601      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31602      if test -z "$is_absolute_path"; then
31603        # Path to executable is not absolute. Find it.
31604        IFS_save="$IFS"
31605        IFS=:
31606        for p in $PATH; do
31607          if test -f "$p/$path" && test -x "$p/$path"; then
31608            new_path="$p/$path"
31609            break
31610          fi
31611        done
31612        IFS="$IFS_save"
31613      else
31614        # This is an absolute path, we can use it without further modifications.
31615        new_path="$path"
31616      fi
31617
31618      if test "x$new_path" = x; then
31619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31620$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31621        has_space=`$ECHO "$complete" | $GREP " "`
31622        if test "x$has_space" != x; then
31623          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31625        fi
31626        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31627      fi
31628    fi
31629
31630    # Now join together the path and the arguments once again
31631    if test "x$arguments" != xEOL; then
31632      new_complete="$new_path ${arguments% *}"
31633    else
31634      new_complete="$new_path"
31635    fi
31636
31637    if test "x$complete" != "x$new_complete"; then
31638      CC="$new_complete"
31639      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31640$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31641    fi
31642  fi
31643
31644  TEST_COMPILER="$CC"
31645  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31646  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31647  if test "x$OPENJDK_BUILD_OS" != xaix; then
31648    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31650$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31651
31652  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31653    # Follow a chain of symbolic links. Use readlink
31654    # where it exists, else fall back to horribly
31655    # complicated shell code.
31656    if test "x$READLINK_TESTED" != yes; then
31657      # On MacOSX there is a readlink tool with a different
31658      # purpose than the GNU readlink tool. Check the found readlink.
31659      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31660      if test "x$ISGNU" = x; then
31661        # A readlink that we do not know how to use.
31662        # Are there other non-GNU readlinks out there?
31663        READLINK_TESTED=yes
31664        READLINK=
31665      fi
31666    fi
31667
31668    if test "x$READLINK" != x; then
31669      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31670    else
31671      # Save the current directory for restoring afterwards
31672      STARTDIR=$PWD
31673      COUNTER=0
31674      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31675      sym_link_file=`$BASENAME $TEST_COMPILER`
31676      cd $sym_link_dir
31677      # Use -P flag to resolve symlinks in directories.
31678      cd `$THEPWDCMD -P`
31679      sym_link_dir=`$THEPWDCMD -P`
31680      # Resolve file symlinks
31681      while test $COUNTER -lt 20; do
31682        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31683        if test "x$ISLINK" == x; then
31684          # This is not a symbolic link! We are done!
31685          break
31686        fi
31687        # Again resolve directory symlinks since the target of the just found
31688        # link could be in a different directory
31689        cd `$DIRNAME $ISLINK`
31690        sym_link_dir=`$THEPWDCMD -P`
31691        sym_link_file=`$BASENAME $ISLINK`
31692        let COUNTER=COUNTER+1
31693      done
31694      cd $STARTDIR
31695      TEST_COMPILER=$sym_link_dir/$sym_link_file
31696    fi
31697  fi
31698
31699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31700$as_echo "$TEST_COMPILER" >&6; }
31701  fi
31702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31703$as_echo_n "checking if CC is disguised ccache... " >&6; }
31704
31705  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31706  if test "x$COMPILER_BASENAME" = "xccache"; then
31707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31708$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31709    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31710    # We want to control ccache invocation ourselves, so ignore this cc and try
31711    # searching again.
31712
31713    # Remove the path to the fake ccache cc from the PATH
31714    RETRY_COMPILER_SAVED_PATH="$PATH"
31715    COMPILER_DIRNAME=`$DIRNAME $CC`
31716    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31717
31718    # Try again looking for our compiler
31719    if test -n "$ac_tool_prefix"; then
31720  for ac_prog in $TOOLCHAIN_CC_BINARY
31721  do
31722    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31723set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31725$as_echo_n "checking for $ac_word... " >&6; }
31726if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31727  $as_echo_n "(cached) " >&6
31728else
31729  if test -n "$PROPER_COMPILER_CC"; then
31730  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31731else
31732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31733for as_dir in $PATH
31734do
31735  IFS=$as_save_IFS
31736  test -z "$as_dir" && as_dir=.
31737    for ac_exec_ext in '' $ac_executable_extensions; do
31738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31739    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31741    break 2
31742  fi
31743done
31744  done
31745IFS=$as_save_IFS
31746
31747fi
31748fi
31749PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31750if test -n "$PROPER_COMPILER_CC"; then
31751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31752$as_echo "$PROPER_COMPILER_CC" >&6; }
31753else
31754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31755$as_echo "no" >&6; }
31756fi
31757
31758
31759    test -n "$PROPER_COMPILER_CC" && break
31760  done
31761fi
31762if test -z "$PROPER_COMPILER_CC"; then
31763  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31764  for ac_prog in $TOOLCHAIN_CC_BINARY
31765do
31766  # Extract the first word of "$ac_prog", so it can be a program name with args.
31767set dummy $ac_prog; ac_word=$2
31768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31769$as_echo_n "checking for $ac_word... " >&6; }
31770if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31771  $as_echo_n "(cached) " >&6
31772else
31773  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31774  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31775else
31776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31777for as_dir in $PATH
31778do
31779  IFS=$as_save_IFS
31780  test -z "$as_dir" && as_dir=.
31781    for ac_exec_ext in '' $ac_executable_extensions; do
31782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31783    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31785    break 2
31786  fi
31787done
31788  done
31789IFS=$as_save_IFS
31790
31791fi
31792fi
31793ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31794if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31796$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31797else
31798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31799$as_echo "no" >&6; }
31800fi
31801
31802
31803  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31804done
31805
31806  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31807    PROPER_COMPILER_CC=""
31808  else
31809    case $cross_compiling:$ac_tool_warned in
31810yes:)
31811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31813ac_tool_warned=yes ;;
31814esac
31815    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31816  fi
31817fi
31818
31819
31820  # Only process if variable expands to non-empty
31821
31822  if test "x$PROPER_COMPILER_CC" != x; then
31823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31824
31825  # First separate the path from the arguments. This will split at the first
31826  # space.
31827  complete="$PROPER_COMPILER_CC"
31828  path="${complete%% *}"
31829  tmp="$complete EOL"
31830  arguments="${tmp#* }"
31831
31832  # Input might be given as Windows format, start by converting to
31833  # unix format.
31834  new_path=`$CYGPATH -u "$path"`
31835
31836  # Now try to locate executable using which
31837  new_path=`$WHICH "$new_path" 2> /dev/null`
31838  # bat and cmd files are not always considered executable in cygwin causing which
31839  # to not find them
31840  if test "x$new_path" = x \
31841      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31842      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31843    new_path=`$CYGPATH -u "$path"`
31844  fi
31845  if test "x$new_path" = x; then
31846    # Oops. Which didn't find the executable.
31847    # The splitting of arguments from the executable at a space might have been incorrect,
31848    # since paths with space are more likely in Windows. Give it another try with the whole
31849    # argument.
31850    path="$complete"
31851    arguments="EOL"
31852    new_path=`$CYGPATH -u "$path"`
31853    new_path=`$WHICH "$new_path" 2> /dev/null`
31854    # bat and cmd files are not always considered executable in cygwin causing which
31855    # to not find them
31856    if test "x$new_path" = x \
31857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31859      new_path=`$CYGPATH -u "$path"`
31860    fi
31861    if test "x$new_path" = x; then
31862      # It's still not found. Now this is an unrecoverable error.
31863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31864$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31865      has_space=`$ECHO "$complete" | $GREP " "`
31866      if test "x$has_space" != x; then
31867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31869      fi
31870      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31871    fi
31872  fi
31873
31874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31877  # "foo.exe" is OK but "foo" is an error.
31878  #
31879  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31880  # It is also a way to make sure we got the proper file name for the real test later on.
31881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31882  if test "x$test_shortpath" = x; then
31883    # Short path failed, file does not exist as specified.
31884    # Try adding .exe or .cmd
31885    if test -f "${new_path}.exe"; then
31886      input_to_shortpath="${new_path}.exe"
31887    elif test -f "${new_path}.cmd"; then
31888      input_to_shortpath="${new_path}.cmd"
31889    else
31890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31891$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31892      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31893$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31894      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31895    fi
31896  else
31897    input_to_shortpath="$new_path"
31898  fi
31899
31900  # Call helper function which possibly converts this using DOS-style short mode.
31901  # If so, the updated path is stored in $new_path.
31902  new_path="$input_to_shortpath"
31903
31904  input_path="$input_to_shortpath"
31905  # Check if we need to convert this using DOS-style short mode. If the path
31906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31907  # take no chances and rewrite it.
31908  # Note: m4 eats our [], so we need to use [ and ] instead.
31909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31910  if test "x$has_forbidden_chars" != x; then
31911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31915      # Going to short mode and back again did indeed matter. Since short mode is
31916      # case insensitive, let's make it lowercase to improve readability.
31917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31918      # Now convert it back to Unix-style (cygpath)
31919      input_path=`$CYGPATH -u "$shortmode_path"`
31920      new_path="$input_path"
31921    fi
31922  fi
31923
31924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31925  if test "x$test_cygdrive_prefix" = x; then
31926    # As a simple fix, exclude /usr/bin since it's not a real path.
31927    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31929      # a path prefixed by /cygdrive for fixpath to work.
31930      new_path="$CYGWIN_ROOT_PATH$input_path"
31931    fi
31932  fi
31933
31934  # remove trailing .exe if any
31935  new_path="${new_path/%.exe/}"
31936
31937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31938
31939  # First separate the path from the arguments. This will split at the first
31940  # space.
31941  complete="$PROPER_COMPILER_CC"
31942  path="${complete%% *}"
31943  tmp="$complete EOL"
31944  arguments="${tmp#* }"
31945
31946  # Input might be given as Windows format, start by converting to
31947  # unix format.
31948  new_path="$path"
31949
31950  windows_path="$new_path"
31951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31952    unix_path=`$CYGPATH -u "$windows_path"`
31953    new_path="$unix_path"
31954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31956    new_path="$unix_path"
31957  fi
31958
31959
31960  # Now try to locate executable using which
31961  new_path=`$WHICH "$new_path" 2> /dev/null`
31962
31963  if test "x$new_path" = x; then
31964    # Oops. Which didn't find the executable.
31965    # The splitting of arguments from the executable at a space might have been incorrect,
31966    # since paths with space are more likely in Windows. Give it another try with the whole
31967    # argument.
31968    path="$complete"
31969    arguments="EOL"
31970    new_path="$path"
31971
31972  windows_path="$new_path"
31973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31974    unix_path=`$CYGPATH -u "$windows_path"`
31975    new_path="$unix_path"
31976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31978    new_path="$unix_path"
31979  fi
31980
31981
31982    new_path=`$WHICH "$new_path" 2> /dev/null`
31983    # bat and cmd files are not always considered executable in MSYS causing which
31984    # to not find them
31985    if test "x$new_path" = x \
31986        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31987        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31988      new_path="$path"
31989
31990  windows_path="$new_path"
31991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31992    unix_path=`$CYGPATH -u "$windows_path"`
31993    new_path="$unix_path"
31994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31996    new_path="$unix_path"
31997  fi
31998
31999    fi
32000
32001    if test "x$new_path" = x; then
32002      # It's still not found. Now this is an unrecoverable error.
32003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32004$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32005      has_space=`$ECHO "$complete" | $GREP " "`
32006      if test "x$has_space" != x; then
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32009      fi
32010      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32011    fi
32012  fi
32013
32014  # Now new_path has a complete unix path to the binary
32015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32016    # Keep paths in /bin as-is, but remove trailing .exe if any
32017    new_path="${new_path/%.exe/}"
32018    # Do not save /bin paths to all_fixpath_prefixes!
32019  else
32020    # Not in mixed or Windows style, start by that.
32021    new_path=`cmd //c echo $new_path`
32022
32023  input_path="$new_path"
32024  # Check if we need to convert this using DOS-style short mode. If the path
32025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32026  # take no chances and rewrite it.
32027  # Note: m4 eats our [], so we need to use [ and ] instead.
32028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32029  if test "x$has_forbidden_chars" != x; then
32030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32032  fi
32033
32034    # Output is in $new_path
32035
32036  windows_path="$new_path"
32037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32038    unix_path=`$CYGPATH -u "$windows_path"`
32039    new_path="$unix_path"
32040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32042    new_path="$unix_path"
32043  fi
32044
32045    # remove trailing .exe if any
32046    new_path="${new_path/%.exe/}"
32047
32048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32050  fi
32051
32052    else
32053      # We're on a unix platform. Hooray! :)
32054      # First separate the path from the arguments. This will split at the first
32055      # space.
32056      complete="$PROPER_COMPILER_CC"
32057      path="${complete%% *}"
32058      tmp="$complete EOL"
32059      arguments="${tmp#* }"
32060
32061      # Cannot rely on the command "which" here since it doesn't always work.
32062      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32063      if test -z "$is_absolute_path"; then
32064        # Path to executable is not absolute. Find it.
32065        IFS_save="$IFS"
32066        IFS=:
32067        for p in $PATH; do
32068          if test -f "$p/$path" && test -x "$p/$path"; then
32069            new_path="$p/$path"
32070            break
32071          fi
32072        done
32073        IFS="$IFS_save"
32074      else
32075        # This is an absolute path, we can use it without further modifications.
32076        new_path="$path"
32077      fi
32078
32079      if test "x$new_path" = x; then
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32081$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32082        has_space=`$ECHO "$complete" | $GREP " "`
32083        if test "x$has_space" != x; then
32084          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32086        fi
32087        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32088      fi
32089    fi
32090
32091    # Now join together the path and the arguments once again
32092    if test "x$arguments" != xEOL; then
32093      new_complete="$new_path ${arguments% *}"
32094    else
32095      new_complete="$new_path"
32096    fi
32097
32098    if test "x$complete" != "x$new_complete"; then
32099      PROPER_COMPILER_CC="$new_complete"
32100      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32101$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32102    fi
32103  fi
32104
32105    PATH="$RETRY_COMPILER_SAVED_PATH"
32106
32107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32108$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32109
32110  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32111    # Follow a chain of symbolic links. Use readlink
32112    # where it exists, else fall back to horribly
32113    # complicated shell code.
32114    if test "x$READLINK_TESTED" != yes; then
32115      # On MacOSX there is a readlink tool with a different
32116      # purpose than the GNU readlink tool. Check the found readlink.
32117      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32118      if test "x$ISGNU" = x; then
32119        # A readlink that we do not know how to use.
32120        # Are there other non-GNU readlinks out there?
32121        READLINK_TESTED=yes
32122        READLINK=
32123      fi
32124    fi
32125
32126    if test "x$READLINK" != x; then
32127      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32128    else
32129      # Save the current directory for restoring afterwards
32130      STARTDIR=$PWD
32131      COUNTER=0
32132      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32133      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32134      cd $sym_link_dir
32135      # Use -P flag to resolve symlinks in directories.
32136      cd `$THEPWDCMD -P`
32137      sym_link_dir=`$THEPWDCMD -P`
32138      # Resolve file symlinks
32139      while test $COUNTER -lt 20; do
32140        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32141        if test "x$ISLINK" == x; then
32142          # This is not a symbolic link! We are done!
32143          break
32144        fi
32145        # Again resolve directory symlinks since the target of the just found
32146        # link could be in a different directory
32147        cd `$DIRNAME $ISLINK`
32148        sym_link_dir=`$THEPWDCMD -P`
32149        sym_link_file=`$BASENAME $ISLINK`
32150        let COUNTER=COUNTER+1
32151      done
32152      cd $STARTDIR
32153      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32154    fi
32155  fi
32156
32157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32158$as_echo "$PROPER_COMPILER_CC" >&6; }
32159    CC="$PROPER_COMPILER_CC"
32160  else
32161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32162$as_echo "no, keeping CC" >&6; }
32163  fi
32164
32165
32166  COMPILER=$CC
32167  COMPILER_NAME=$COMPILER_NAME
32168
32169  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32170    # cc -V output typically looks like
32171    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32172    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32173    # Check that this is likely to be the Solaris Studio cc.
32174    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32175    if test $? -ne 0; then
32176      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32177      { $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
32178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32180$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32181      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32182$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32183      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32184    fi
32185    # Remove usage instructions (if present), and
32186    # collapse compiler output into a single line
32187    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32188        $SED -e 's/ *[Uu]sage:.*//'`
32189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32190        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32191  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32192    # xlc -qversion output typically looks like
32193    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32194    #     Version: 11.01.0000.0015
32195    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32196    # Check that this is likely to be the IBM XL C compiler.
32197    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32198    if test $? -ne 0; then
32199      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32200      { $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
32201$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32202      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32203$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32204      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32205$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32206      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32207    fi
32208    # Collapse compiler output into a single line
32209    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32210    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32211        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32212  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32213    # There is no specific version flag, but all output starts with a version string.
32214    # First line typically looks something like:
32215    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32216    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32217    # Check that this is likely to be Microsoft CL.EXE.
32218    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32219    if test $? -ne 0; then
32220      { $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
32221$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32222      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32223$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32224      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32225    fi
32226    # Collapse compiler output into a single line
32227    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32228    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32229        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32230  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32231    # gcc --version output typically looks like
32232    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32233    #     Copyright (C) 2013 Free Software Foundation, Inc.
32234    #     This is free software; see the source for copying conditions.  There is NO
32235    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32236    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32237    # Check that this is likely to be GCC.
32238    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32239    if test $? -ne 0; then
32240      { $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
32241$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32242      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32243$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32244      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32245    fi
32246    # Remove Copyright and legalese from version string, and
32247    # collapse into a single line
32248    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32249        $SED -e 's/ *Copyright .*//'`
32250    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32251        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32252  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32253    # clang --version output typically looks like
32254    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32255    #    clang version 3.3 (tags/RELEASE_33/final)
32256    # or
32257    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32258    #    Target: x86_64-pc-linux-gnu
32259    #    Thread model: posix
32260    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32261    # Check that this is likely to be clang
32262    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32263    if test $? -ne 0; then
32264      { $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
32265$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32266      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32267$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32268      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32269    fi
32270    # Collapse compiler output into a single line
32271    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32272    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32273        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32274  else
32275      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32276  fi
32277  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32278  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32279  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32280  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32281
32282  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32283$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32284
32285
32286  # Now that we have resolved CC ourself, let autoconf have its go at it
32287  ac_ext=c
32288ac_cpp='$CPP $CPPFLAGS'
32289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32291ac_compiler_gnu=$ac_cv_c_compiler_gnu
32292if test -n "$ac_tool_prefix"; then
32293  for ac_prog in $CC
32294  do
32295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32298$as_echo_n "checking for $ac_word... " >&6; }
32299if ${ac_cv_prog_CC+:} false; then :
32300  $as_echo_n "(cached) " >&6
32301else
32302  if test -n "$CC"; then
32303  ac_cv_prog_CC="$CC" # Let the user override the test.
32304else
32305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32306for as_dir in $PATH
32307do
32308  IFS=$as_save_IFS
32309  test -z "$as_dir" && as_dir=.
32310    for ac_exec_ext in '' $ac_executable_extensions; do
32311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32312    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32314    break 2
32315  fi
32316done
32317  done
32318IFS=$as_save_IFS
32319
32320fi
32321fi
32322CC=$ac_cv_prog_CC
32323if test -n "$CC"; then
32324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32325$as_echo "$CC" >&6; }
32326else
32327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32328$as_echo "no" >&6; }
32329fi
32330
32331
32332    test -n "$CC" && break
32333  done
32334fi
32335if test -z "$CC"; then
32336  ac_ct_CC=$CC
32337  for ac_prog in $CC
32338do
32339  # Extract the first word of "$ac_prog", so it can be a program name with args.
32340set dummy $ac_prog; ac_word=$2
32341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32342$as_echo_n "checking for $ac_word... " >&6; }
32343if ${ac_cv_prog_ac_ct_CC+:} false; then :
32344  $as_echo_n "(cached) " >&6
32345else
32346  if test -n "$ac_ct_CC"; then
32347  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32348else
32349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32350for as_dir in $PATH
32351do
32352  IFS=$as_save_IFS
32353  test -z "$as_dir" && as_dir=.
32354    for ac_exec_ext in '' $ac_executable_extensions; do
32355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32356    ac_cv_prog_ac_ct_CC="$ac_prog"
32357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32358    break 2
32359  fi
32360done
32361  done
32362IFS=$as_save_IFS
32363
32364fi
32365fi
32366ac_ct_CC=$ac_cv_prog_ac_ct_CC
32367if test -n "$ac_ct_CC"; then
32368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32369$as_echo "$ac_ct_CC" >&6; }
32370else
32371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32372$as_echo "no" >&6; }
32373fi
32374
32375
32376  test -n "$ac_ct_CC" && break
32377done
32378
32379  if test "x$ac_ct_CC" = x; then
32380    CC=""
32381  else
32382    case $cross_compiling:$ac_tool_warned in
32383yes:)
32384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32386ac_tool_warned=yes ;;
32387esac
32388    CC=$ac_ct_CC
32389  fi
32390fi
32391
32392
32393test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32394$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32395as_fn_error $? "no acceptable C compiler found in \$PATH
32396See \`config.log' for more details" "$LINENO" 5; }
32397
32398# Provide some information about the compiler.
32399$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32400set X $ac_compile
32401ac_compiler=$2
32402for ac_option in --version -v -V -qversion; do
32403  { { ac_try="$ac_compiler $ac_option >&5"
32404case "(($ac_try" in
32405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32406  *) ac_try_echo=$ac_try;;
32407esac
32408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32409$as_echo "$ac_try_echo"; } >&5
32410  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32411  ac_status=$?
32412  if test -s conftest.err; then
32413    sed '10a\
32414... rest of stderr output deleted ...
32415         10q' conftest.err >conftest.er1
32416    cat conftest.er1 >&5
32417  fi
32418  rm -f conftest.er1 conftest.err
32419  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32420  test $ac_status = 0; }
32421done
32422
32423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32424/* end confdefs.h.  */
32425
32426int
32427main ()
32428{
32429
32430  ;
32431  return 0;
32432}
32433_ACEOF
32434ac_clean_files_save=$ac_clean_files
32435ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32436# Try to create an executable without -o first, disregard a.out.
32437# It will help us diagnose broken compilers, and finding out an intuition
32438# of exeext.
32439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32440$as_echo_n "checking whether the C compiler works... " >&6; }
32441ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32442
32443# The possible output files:
32444ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32445
32446ac_rmfiles=
32447for ac_file in $ac_files
32448do
32449  case $ac_file in
32450    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32451    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32452  esac
32453done
32454rm -f $ac_rmfiles
32455
32456if { { ac_try="$ac_link_default"
32457case "(($ac_try" in
32458  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32459  *) ac_try_echo=$ac_try;;
32460esac
32461eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32462$as_echo "$ac_try_echo"; } >&5
32463  (eval "$ac_link_default") 2>&5
32464  ac_status=$?
32465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32466  test $ac_status = 0; }; then :
32467  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32468# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32469# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32470# so that the user can short-circuit this test for compilers unknown to
32471# Autoconf.
32472for ac_file in $ac_files ''
32473do
32474  test -f "$ac_file" || continue
32475  case $ac_file in
32476    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32477	;;
32478    [ab].out )
32479	# We found the default executable, but exeext='' is most
32480	# certainly right.
32481	break;;
32482    *.* )
32483	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32484	then :; else
32485	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32486	fi
32487	# We set ac_cv_exeext here because the later test for it is not
32488	# safe: cross compilers may not add the suffix if given an `-o'
32489	# argument, so we may need to know it at that point already.
32490	# Even if this section looks crufty: it has the advantage of
32491	# actually working.
32492	break;;
32493    * )
32494	break;;
32495  esac
32496done
32497test "$ac_cv_exeext" = no && ac_cv_exeext=
32498
32499else
32500  ac_file=''
32501fi
32502if test -z "$ac_file"; then :
32503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32504$as_echo "no" >&6; }
32505$as_echo "$as_me: failed program was:" >&5
32506sed 's/^/| /' conftest.$ac_ext >&5
32507
32508{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32510as_fn_error 77 "C compiler cannot create executables
32511See \`config.log' for more details" "$LINENO" 5; }
32512else
32513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32514$as_echo "yes" >&6; }
32515fi
32516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32517$as_echo_n "checking for C compiler default output file name... " >&6; }
32518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32519$as_echo "$ac_file" >&6; }
32520ac_exeext=$ac_cv_exeext
32521
32522rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32523ac_clean_files=$ac_clean_files_save
32524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32525$as_echo_n "checking for suffix of executables... " >&6; }
32526if { { ac_try="$ac_link"
32527case "(($ac_try" in
32528  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32529  *) ac_try_echo=$ac_try;;
32530esac
32531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32532$as_echo "$ac_try_echo"; } >&5
32533  (eval "$ac_link") 2>&5
32534  ac_status=$?
32535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32536  test $ac_status = 0; }; then :
32537  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32538# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32539# work properly (i.e., refer to `conftest.exe'), while it won't with
32540# `rm'.
32541for ac_file in conftest.exe conftest conftest.*; do
32542  test -f "$ac_file" || continue
32543  case $ac_file in
32544    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32545    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32546	  break;;
32547    * ) break;;
32548  esac
32549done
32550else
32551  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32553as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32554See \`config.log' for more details" "$LINENO" 5; }
32555fi
32556rm -f conftest conftest$ac_cv_exeext
32557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32558$as_echo "$ac_cv_exeext" >&6; }
32559
32560rm -f conftest.$ac_ext
32561EXEEXT=$ac_cv_exeext
32562ac_exeext=$EXEEXT
32563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32564/* end confdefs.h.  */
32565#include <stdio.h>
32566int
32567main ()
32568{
32569FILE *f = fopen ("conftest.out", "w");
32570 return ferror (f) || fclose (f) != 0;
32571
32572  ;
32573  return 0;
32574}
32575_ACEOF
32576ac_clean_files="$ac_clean_files conftest.out"
32577# Check that the compiler produces executables we can run.  If not, either
32578# the compiler is broken, or we cross compile.
32579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32580$as_echo_n "checking whether we are cross compiling... " >&6; }
32581if test "$cross_compiling" != yes; then
32582  { { ac_try="$ac_link"
32583case "(($ac_try" in
32584  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32585  *) ac_try_echo=$ac_try;;
32586esac
32587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32588$as_echo "$ac_try_echo"; } >&5
32589  (eval "$ac_link") 2>&5
32590  ac_status=$?
32591  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32592  test $ac_status = 0; }
32593  if { ac_try='./conftest$ac_cv_exeext'
32594  { { case "(($ac_try" in
32595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32596  *) ac_try_echo=$ac_try;;
32597esac
32598eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32599$as_echo "$ac_try_echo"; } >&5
32600  (eval "$ac_try") 2>&5
32601  ac_status=$?
32602  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32603  test $ac_status = 0; }; }; then
32604    cross_compiling=no
32605  else
32606    if test "$cross_compiling" = maybe; then
32607	cross_compiling=yes
32608    else
32609	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32611as_fn_error $? "cannot run C compiled programs.
32612If you meant to cross compile, use \`--host'.
32613See \`config.log' for more details" "$LINENO" 5; }
32614    fi
32615  fi
32616fi
32617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32618$as_echo "$cross_compiling" >&6; }
32619
32620rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32621ac_clean_files=$ac_clean_files_save
32622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32623$as_echo_n "checking for suffix of object files... " >&6; }
32624if ${ac_cv_objext+:} false; then :
32625  $as_echo_n "(cached) " >&6
32626else
32627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32628/* end confdefs.h.  */
32629
32630int
32631main ()
32632{
32633
32634  ;
32635  return 0;
32636}
32637_ACEOF
32638rm -f conftest.o conftest.obj
32639if { { ac_try="$ac_compile"
32640case "(($ac_try" in
32641  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32642  *) ac_try_echo=$ac_try;;
32643esac
32644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32645$as_echo "$ac_try_echo"; } >&5
32646  (eval "$ac_compile") 2>&5
32647  ac_status=$?
32648  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32649  test $ac_status = 0; }; then :
32650  for ac_file in conftest.o conftest.obj conftest.*; do
32651  test -f "$ac_file" || continue;
32652  case $ac_file in
32653    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32654    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32655       break;;
32656  esac
32657done
32658else
32659  $as_echo "$as_me: failed program was:" >&5
32660sed 's/^/| /' conftest.$ac_ext >&5
32661
32662{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32664as_fn_error $? "cannot compute suffix of object files: cannot compile
32665See \`config.log' for more details" "$LINENO" 5; }
32666fi
32667rm -f conftest.$ac_cv_objext conftest.$ac_ext
32668fi
32669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32670$as_echo "$ac_cv_objext" >&6; }
32671OBJEXT=$ac_cv_objext
32672ac_objext=$OBJEXT
32673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32674$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32675if ${ac_cv_c_compiler_gnu+:} false; then :
32676  $as_echo_n "(cached) " >&6
32677else
32678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32679/* end confdefs.h.  */
32680
32681int
32682main ()
32683{
32684#ifndef __GNUC__
32685       choke me
32686#endif
32687
32688  ;
32689  return 0;
32690}
32691_ACEOF
32692if ac_fn_c_try_compile "$LINENO"; then :
32693  ac_compiler_gnu=yes
32694else
32695  ac_compiler_gnu=no
32696fi
32697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32698ac_cv_c_compiler_gnu=$ac_compiler_gnu
32699
32700fi
32701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32702$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32703if test $ac_compiler_gnu = yes; then
32704  GCC=yes
32705else
32706  GCC=
32707fi
32708ac_test_CFLAGS=${CFLAGS+set}
32709ac_save_CFLAGS=$CFLAGS
32710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32711$as_echo_n "checking whether $CC accepts -g... " >&6; }
32712if ${ac_cv_prog_cc_g+:} false; then :
32713  $as_echo_n "(cached) " >&6
32714else
32715  ac_save_c_werror_flag=$ac_c_werror_flag
32716   ac_c_werror_flag=yes
32717   ac_cv_prog_cc_g=no
32718   CFLAGS="-g"
32719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32720/* end confdefs.h.  */
32721
32722int
32723main ()
32724{
32725
32726  ;
32727  return 0;
32728}
32729_ACEOF
32730if ac_fn_c_try_compile "$LINENO"; then :
32731  ac_cv_prog_cc_g=yes
32732else
32733  CFLAGS=""
32734      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32735/* end confdefs.h.  */
32736
32737int
32738main ()
32739{
32740
32741  ;
32742  return 0;
32743}
32744_ACEOF
32745if ac_fn_c_try_compile "$LINENO"; then :
32746
32747else
32748  ac_c_werror_flag=$ac_save_c_werror_flag
32749	 CFLAGS="-g"
32750	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32751/* end confdefs.h.  */
32752
32753int
32754main ()
32755{
32756
32757  ;
32758  return 0;
32759}
32760_ACEOF
32761if ac_fn_c_try_compile "$LINENO"; then :
32762  ac_cv_prog_cc_g=yes
32763fi
32764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32765fi
32766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32767fi
32768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32769   ac_c_werror_flag=$ac_save_c_werror_flag
32770fi
32771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32772$as_echo "$ac_cv_prog_cc_g" >&6; }
32773if test "$ac_test_CFLAGS" = set; then
32774  CFLAGS=$ac_save_CFLAGS
32775elif test $ac_cv_prog_cc_g = yes; then
32776  if test "$GCC" = yes; then
32777    CFLAGS="-g -O2"
32778  else
32779    CFLAGS="-g"
32780  fi
32781else
32782  if test "$GCC" = yes; then
32783    CFLAGS="-O2"
32784  else
32785    CFLAGS=
32786  fi
32787fi
32788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32789$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32790if ${ac_cv_prog_cc_c89+:} false; then :
32791  $as_echo_n "(cached) " >&6
32792else
32793  ac_cv_prog_cc_c89=no
32794ac_save_CC=$CC
32795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32796/* end confdefs.h.  */
32797#include <stdarg.h>
32798#include <stdio.h>
32799struct stat;
32800/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32801struct buf { int x; };
32802FILE * (*rcsopen) (struct buf *, struct stat *, int);
32803static char *e (p, i)
32804     char **p;
32805     int i;
32806{
32807  return p[i];
32808}
32809static char *f (char * (*g) (char **, int), char **p, ...)
32810{
32811  char *s;
32812  va_list v;
32813  va_start (v,p);
32814  s = g (p, va_arg (v,int));
32815  va_end (v);
32816  return s;
32817}
32818
32819/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32820   function prototypes and stuff, but not '\xHH' hex character constants.
32821   These don't provoke an error unfortunately, instead are silently treated
32822   as 'x'.  The following induces an error, until -std is added to get
32823   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32824   array size at least.  It's necessary to write '\x00'==0 to get something
32825   that's true only with -std.  */
32826int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32827
32828/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32829   inside strings and character constants.  */
32830#define FOO(x) 'x'
32831int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32832
32833int test (int i, double x);
32834struct s1 {int (*f) (int a);};
32835struct s2 {int (*f) (double a);};
32836int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32837int argc;
32838char **argv;
32839int
32840main ()
32841{
32842return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32843  ;
32844  return 0;
32845}
32846_ACEOF
32847for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32848	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32849do
32850  CC="$ac_save_CC $ac_arg"
32851  if ac_fn_c_try_compile "$LINENO"; then :
32852  ac_cv_prog_cc_c89=$ac_arg
32853fi
32854rm -f core conftest.err conftest.$ac_objext
32855  test "x$ac_cv_prog_cc_c89" != "xno" && break
32856done
32857rm -f conftest.$ac_ext
32858CC=$ac_save_CC
32859
32860fi
32861# AC_CACHE_VAL
32862case "x$ac_cv_prog_cc_c89" in
32863  x)
32864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32865$as_echo "none needed" >&6; } ;;
32866  xno)
32867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32868$as_echo "unsupported" >&6; } ;;
32869  *)
32870    CC="$CC $ac_cv_prog_cc_c89"
32871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32872$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32873esac
32874if test "x$ac_cv_prog_cc_c89" != xno; then :
32875
32876fi
32877
32878ac_ext=cpp
32879ac_cpp='$CXXCPP $CPPFLAGS'
32880ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32881ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32882ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32883
32884
32885
32886  COMPILER_NAME=C++
32887  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32888
32889  if test "x$CXX" != x; then
32890    # User has supplied compiler name already, always let that override.
32891    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32892$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32893    if test "x`basename $CXX`" = "x$CXX"; then
32894      # A command without a complete path is provided, search $PATH.
32895
32896      for ac_prog in $CXX
32897do
32898  # Extract the first word of "$ac_prog", so it can be a program name with args.
32899set dummy $ac_prog; ac_word=$2
32900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32901$as_echo_n "checking for $ac_word... " >&6; }
32902if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32903  $as_echo_n "(cached) " >&6
32904else
32905  case $POTENTIAL_CXX in
32906  [\\/]* | ?:[\\/]*)
32907  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32908  ;;
32909  *)
32910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32911for as_dir in $PATH
32912do
32913  IFS=$as_save_IFS
32914  test -z "$as_dir" && as_dir=.
32915    for ac_exec_ext in '' $ac_executable_extensions; do
32916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32917    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32919    break 2
32920  fi
32921done
32922  done
32923IFS=$as_save_IFS
32924
32925  ;;
32926esac
32927fi
32928POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32929if test -n "$POTENTIAL_CXX"; then
32930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32931$as_echo "$POTENTIAL_CXX" >&6; }
32932else
32933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32934$as_echo "no" >&6; }
32935fi
32936
32937
32938  test -n "$POTENTIAL_CXX" && break
32939done
32940
32941      if test "x$POTENTIAL_CXX" != x; then
32942        CXX=$POTENTIAL_CXX
32943      else
32944        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32945      fi
32946    else
32947      # Otherwise it might already be a complete path
32948      if test ! -x "$CXX"; then
32949        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32950      fi
32951    fi
32952  else
32953    # No user supplied value. Locate compiler ourselves.
32954
32955    # If we are cross compiling, assume cross compilation tools follows the
32956    # cross compilation standard where they are prefixed with the autoconf
32957    # standard name for the target. For example the binary
32958    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32959    # If we are not cross compiling, then the default compiler name will be
32960    # used.
32961
32962    CXX=
32963    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32964    # before checking the rest of the PATH.
32965    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32966    # step, this should not be necessary.
32967    if test -n "$TOOLCHAIN_PATH"; then
32968      PATH_save="$PATH"
32969      PATH="$TOOLCHAIN_PATH"
32970      for ac_prog in $SEARCH_LIST
32971do
32972  # Extract the first word of "$ac_prog", so it can be a program name with args.
32973set dummy $ac_prog; ac_word=$2
32974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32975$as_echo_n "checking for $ac_word... " >&6; }
32976if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32977  $as_echo_n "(cached) " >&6
32978else
32979  case $TOOLCHAIN_PATH_CXX in
32980  [\\/]* | ?:[\\/]*)
32981  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32982  ;;
32983  *)
32984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32985for as_dir in $PATH
32986do
32987  IFS=$as_save_IFS
32988  test -z "$as_dir" && as_dir=.
32989    for ac_exec_ext in '' $ac_executable_extensions; do
32990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32991    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32993    break 2
32994  fi
32995done
32996  done
32997IFS=$as_save_IFS
32998
32999  ;;
33000esac
33001fi
33002TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33003if test -n "$TOOLCHAIN_PATH_CXX"; then
33004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33005$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33006else
33007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33008$as_echo "no" >&6; }
33009fi
33010
33011
33012  test -n "$TOOLCHAIN_PATH_CXX" && break
33013done
33014
33015      CXX=$TOOLCHAIN_PATH_CXX
33016      PATH="$PATH_save"
33017    fi
33018
33019    # AC_PATH_PROGS can't be run multiple times with the same variable,
33020    # so create a new name for this run.
33021    if test "x$CXX" = x; then
33022      for ac_prog in $SEARCH_LIST
33023do
33024  # Extract the first word of "$ac_prog", so it can be a program name with args.
33025set dummy $ac_prog; ac_word=$2
33026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33027$as_echo_n "checking for $ac_word... " >&6; }
33028if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33029  $as_echo_n "(cached) " >&6
33030else
33031  case $POTENTIAL_CXX in
33032  [\\/]* | ?:[\\/]*)
33033  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33034  ;;
33035  *)
33036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33037for as_dir in $PATH
33038do
33039  IFS=$as_save_IFS
33040  test -z "$as_dir" && as_dir=.
33041    for ac_exec_ext in '' $ac_executable_extensions; do
33042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33043    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33045    break 2
33046  fi
33047done
33048  done
33049IFS=$as_save_IFS
33050
33051  ;;
33052esac
33053fi
33054POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33055if test -n "$POTENTIAL_CXX"; then
33056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33057$as_echo "$POTENTIAL_CXX" >&6; }
33058else
33059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33060$as_echo "no" >&6; }
33061fi
33062
33063
33064  test -n "$POTENTIAL_CXX" && break
33065done
33066
33067      CXX=$POTENTIAL_CXX
33068    fi
33069
33070    if test "x$CXX" = x; then
33071
33072  # Print a helpful message on how to acquire the necessary build dependency.
33073  # devkit is the help tag: freetype, cups, alsa etc
33074  MISSING_DEPENDENCY=devkit
33075
33076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33077    cygwin_help $MISSING_DEPENDENCY
33078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33079    msys_help $MISSING_DEPENDENCY
33080  else
33081    PKGHANDLER_COMMAND=
33082
33083    case $PKGHANDLER in
33084      apt-get)
33085        apt_help     $MISSING_DEPENDENCY ;;
33086      yum)
33087        yum_help     $MISSING_DEPENDENCY ;;
33088      port)
33089        port_help    $MISSING_DEPENDENCY ;;
33090      pkgutil)
33091        pkgutil_help $MISSING_DEPENDENCY ;;
33092      pkgadd)
33093        pkgadd_help  $MISSING_DEPENDENCY ;;
33094    esac
33095
33096    if test "x$PKGHANDLER_COMMAND" != x; then
33097      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33098    fi
33099  fi
33100
33101      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33102    fi
33103  fi
33104
33105  # Now we have a compiler binary in CXX. Make sure it's okay.
33106
33107  # Only process if variable expands to non-empty
33108
33109  if test "x$CXX" != x; then
33110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33111
33112  # First separate the path from the arguments. This will split at the first
33113  # space.
33114  complete="$CXX"
33115  path="${complete%% *}"
33116  tmp="$complete EOL"
33117  arguments="${tmp#* }"
33118
33119  # Input might be given as Windows format, start by converting to
33120  # unix format.
33121  new_path=`$CYGPATH -u "$path"`
33122
33123  # Now try to locate executable using which
33124  new_path=`$WHICH "$new_path" 2> /dev/null`
33125  # bat and cmd files are not always considered executable in cygwin causing which
33126  # to not find them
33127  if test "x$new_path" = x \
33128      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33129      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33130    new_path=`$CYGPATH -u "$path"`
33131  fi
33132  if test "x$new_path" = x; then
33133    # Oops. Which didn't find the executable.
33134    # The splitting of arguments from the executable at a space might have been incorrect,
33135    # since paths with space are more likely in Windows. Give it another try with the whole
33136    # argument.
33137    path="$complete"
33138    arguments="EOL"
33139    new_path=`$CYGPATH -u "$path"`
33140    new_path=`$WHICH "$new_path" 2> /dev/null`
33141    # bat and cmd files are not always considered executable in cygwin causing which
33142    # to not find them
33143    if test "x$new_path" = x \
33144        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33145        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33146      new_path=`$CYGPATH -u "$path"`
33147    fi
33148    if test "x$new_path" = x; then
33149      # It's still not found. Now this is an unrecoverable error.
33150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33151$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33152      has_space=`$ECHO "$complete" | $GREP " "`
33153      if test "x$has_space" != x; then
33154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33156      fi
33157      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33158    fi
33159  fi
33160
33161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33164  # "foo.exe" is OK but "foo" is an error.
33165  #
33166  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33167  # It is also a way to make sure we got the proper file name for the real test later on.
33168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33169  if test "x$test_shortpath" = x; then
33170    # Short path failed, file does not exist as specified.
33171    # Try adding .exe or .cmd
33172    if test -f "${new_path}.exe"; then
33173      input_to_shortpath="${new_path}.exe"
33174    elif test -f "${new_path}.cmd"; then
33175      input_to_shortpath="${new_path}.cmd"
33176    else
33177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33178$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33179      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33180$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33181      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33182    fi
33183  else
33184    input_to_shortpath="$new_path"
33185  fi
33186
33187  # Call helper function which possibly converts this using DOS-style short mode.
33188  # If so, the updated path is stored in $new_path.
33189  new_path="$input_to_shortpath"
33190
33191  input_path="$input_to_shortpath"
33192  # Check if we need to convert this using DOS-style short mode. If the path
33193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33194  # take no chances and rewrite it.
33195  # Note: m4 eats our [], so we need to use [ and ] instead.
33196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33197  if test "x$has_forbidden_chars" != x; then
33198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33202      # Going to short mode and back again did indeed matter. Since short mode is
33203      # case insensitive, let's make it lowercase to improve readability.
33204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33205      # Now convert it back to Unix-style (cygpath)
33206      input_path=`$CYGPATH -u "$shortmode_path"`
33207      new_path="$input_path"
33208    fi
33209  fi
33210
33211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33212  if test "x$test_cygdrive_prefix" = x; then
33213    # As a simple fix, exclude /usr/bin since it's not a real path.
33214    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33216      # a path prefixed by /cygdrive for fixpath to work.
33217      new_path="$CYGWIN_ROOT_PATH$input_path"
33218    fi
33219  fi
33220
33221  # remove trailing .exe if any
33222  new_path="${new_path/%.exe/}"
33223
33224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33225
33226  # First separate the path from the arguments. This will split at the first
33227  # space.
33228  complete="$CXX"
33229  path="${complete%% *}"
33230  tmp="$complete EOL"
33231  arguments="${tmp#* }"
33232
33233  # Input might be given as Windows format, start by converting to
33234  # unix format.
33235  new_path="$path"
33236
33237  windows_path="$new_path"
33238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33239    unix_path=`$CYGPATH -u "$windows_path"`
33240    new_path="$unix_path"
33241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33243    new_path="$unix_path"
33244  fi
33245
33246
33247  # Now try to locate executable using which
33248  new_path=`$WHICH "$new_path" 2> /dev/null`
33249
33250  if test "x$new_path" = x; then
33251    # Oops. Which didn't find the executable.
33252    # The splitting of arguments from the executable at a space might have been incorrect,
33253    # since paths with space are more likely in Windows. Give it another try with the whole
33254    # argument.
33255    path="$complete"
33256    arguments="EOL"
33257    new_path="$path"
33258
33259  windows_path="$new_path"
33260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33261    unix_path=`$CYGPATH -u "$windows_path"`
33262    new_path="$unix_path"
33263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33265    new_path="$unix_path"
33266  fi
33267
33268
33269    new_path=`$WHICH "$new_path" 2> /dev/null`
33270    # bat and cmd files are not always considered executable in MSYS causing which
33271    # to not find them
33272    if test "x$new_path" = x \
33273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33275      new_path="$path"
33276
33277  windows_path="$new_path"
33278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33279    unix_path=`$CYGPATH -u "$windows_path"`
33280    new_path="$unix_path"
33281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33283    new_path="$unix_path"
33284  fi
33285
33286    fi
33287
33288    if test "x$new_path" = x; then
33289      # It's still not found. Now this is an unrecoverable error.
33290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33291$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33292      has_space=`$ECHO "$complete" | $GREP " "`
33293      if test "x$has_space" != x; then
33294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33296      fi
33297      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33298    fi
33299  fi
33300
33301  # Now new_path has a complete unix path to the binary
33302  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33303    # Keep paths in /bin as-is, but remove trailing .exe if any
33304    new_path="${new_path/%.exe/}"
33305    # Do not save /bin paths to all_fixpath_prefixes!
33306  else
33307    # Not in mixed or Windows style, start by that.
33308    new_path=`cmd //c echo $new_path`
33309
33310  input_path="$new_path"
33311  # Check if we need to convert this using DOS-style short mode. If the path
33312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33313  # take no chances and rewrite it.
33314  # Note: m4 eats our [], so we need to use [ and ] instead.
33315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33316  if test "x$has_forbidden_chars" != x; then
33317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33319  fi
33320
33321    # Output is in $new_path
33322
33323  windows_path="$new_path"
33324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33325    unix_path=`$CYGPATH -u "$windows_path"`
33326    new_path="$unix_path"
33327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33329    new_path="$unix_path"
33330  fi
33331
33332    # remove trailing .exe if any
33333    new_path="${new_path/%.exe/}"
33334
33335    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33336    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33337  fi
33338
33339    else
33340      # We're on a unix platform. Hooray! :)
33341      # First separate the path from the arguments. This will split at the first
33342      # space.
33343      complete="$CXX"
33344      path="${complete%% *}"
33345      tmp="$complete EOL"
33346      arguments="${tmp#* }"
33347
33348      # Cannot rely on the command "which" here since it doesn't always work.
33349      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33350      if test -z "$is_absolute_path"; then
33351        # Path to executable is not absolute. Find it.
33352        IFS_save="$IFS"
33353        IFS=:
33354        for p in $PATH; do
33355          if test -f "$p/$path" && test -x "$p/$path"; then
33356            new_path="$p/$path"
33357            break
33358          fi
33359        done
33360        IFS="$IFS_save"
33361      else
33362        # This is an absolute path, we can use it without further modifications.
33363        new_path="$path"
33364      fi
33365
33366      if test "x$new_path" = x; then
33367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33368$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33369        has_space=`$ECHO "$complete" | $GREP " "`
33370        if test "x$has_space" != x; then
33371          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33372$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33373        fi
33374        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33375      fi
33376    fi
33377
33378    # Now join together the path and the arguments once again
33379    if test "x$arguments" != xEOL; then
33380      new_complete="$new_path ${arguments% *}"
33381    else
33382      new_complete="$new_path"
33383    fi
33384
33385    if test "x$complete" != "x$new_complete"; then
33386      CXX="$new_complete"
33387      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33388$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33389    fi
33390  fi
33391
33392  TEST_COMPILER="$CXX"
33393  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33394  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33395  if test "x$OPENJDK_BUILD_OS" != xaix; then
33396    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33398$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33399
33400  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33401    # Follow a chain of symbolic links. Use readlink
33402    # where it exists, else fall back to horribly
33403    # complicated shell code.
33404    if test "x$READLINK_TESTED" != yes; then
33405      # On MacOSX there is a readlink tool with a different
33406      # purpose than the GNU readlink tool. Check the found readlink.
33407      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33408      if test "x$ISGNU" = x; then
33409        # A readlink that we do not know how to use.
33410        # Are there other non-GNU readlinks out there?
33411        READLINK_TESTED=yes
33412        READLINK=
33413      fi
33414    fi
33415
33416    if test "x$READLINK" != x; then
33417      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33418    else
33419      # Save the current directory for restoring afterwards
33420      STARTDIR=$PWD
33421      COUNTER=0
33422      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33423      sym_link_file=`$BASENAME $TEST_COMPILER`
33424      cd $sym_link_dir
33425      # Use -P flag to resolve symlinks in directories.
33426      cd `$THEPWDCMD -P`
33427      sym_link_dir=`$THEPWDCMD -P`
33428      # Resolve file symlinks
33429      while test $COUNTER -lt 20; do
33430        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33431        if test "x$ISLINK" == x; then
33432          # This is not a symbolic link! We are done!
33433          break
33434        fi
33435        # Again resolve directory symlinks since the target of the just found
33436        # link could be in a different directory
33437        cd `$DIRNAME $ISLINK`
33438        sym_link_dir=`$THEPWDCMD -P`
33439        sym_link_file=`$BASENAME $ISLINK`
33440        let COUNTER=COUNTER+1
33441      done
33442      cd $STARTDIR
33443      TEST_COMPILER=$sym_link_dir/$sym_link_file
33444    fi
33445  fi
33446
33447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33448$as_echo "$TEST_COMPILER" >&6; }
33449  fi
33450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33451$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33452
33453  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33454  if test "x$COMPILER_BASENAME" = "xccache"; then
33455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33456$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33457    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33458    # We want to control ccache invocation ourselves, so ignore this cc and try
33459    # searching again.
33460
33461    # Remove the path to the fake ccache cc from the PATH
33462    RETRY_COMPILER_SAVED_PATH="$PATH"
33463    COMPILER_DIRNAME=`$DIRNAME $CXX`
33464    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33465
33466    # Try again looking for our compiler
33467    if test -n "$ac_tool_prefix"; then
33468  for ac_prog in $TOOLCHAIN_CXX_BINARY
33469  do
33470    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33471set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33473$as_echo_n "checking for $ac_word... " >&6; }
33474if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33475  $as_echo_n "(cached) " >&6
33476else
33477  if test -n "$PROPER_COMPILER_CXX"; then
33478  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33479else
33480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33481for as_dir in $PATH
33482do
33483  IFS=$as_save_IFS
33484  test -z "$as_dir" && as_dir=.
33485    for ac_exec_ext in '' $ac_executable_extensions; do
33486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33487    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33489    break 2
33490  fi
33491done
33492  done
33493IFS=$as_save_IFS
33494
33495fi
33496fi
33497PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33498if test -n "$PROPER_COMPILER_CXX"; then
33499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33500$as_echo "$PROPER_COMPILER_CXX" >&6; }
33501else
33502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33503$as_echo "no" >&6; }
33504fi
33505
33506
33507    test -n "$PROPER_COMPILER_CXX" && break
33508  done
33509fi
33510if test -z "$PROPER_COMPILER_CXX"; then
33511  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33512  for ac_prog in $TOOLCHAIN_CXX_BINARY
33513do
33514  # Extract the first word of "$ac_prog", so it can be a program name with args.
33515set dummy $ac_prog; ac_word=$2
33516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33517$as_echo_n "checking for $ac_word... " >&6; }
33518if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33519  $as_echo_n "(cached) " >&6
33520else
33521  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33522  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33523else
33524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33525for as_dir in $PATH
33526do
33527  IFS=$as_save_IFS
33528  test -z "$as_dir" && as_dir=.
33529    for ac_exec_ext in '' $ac_executable_extensions; do
33530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33531    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33533    break 2
33534  fi
33535done
33536  done
33537IFS=$as_save_IFS
33538
33539fi
33540fi
33541ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33542if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33544$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33545else
33546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33547$as_echo "no" >&6; }
33548fi
33549
33550
33551  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33552done
33553
33554  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33555    PROPER_COMPILER_CXX=""
33556  else
33557    case $cross_compiling:$ac_tool_warned in
33558yes:)
33559{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33560$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33561ac_tool_warned=yes ;;
33562esac
33563    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33564  fi
33565fi
33566
33567
33568  # Only process if variable expands to non-empty
33569
33570  if test "x$PROPER_COMPILER_CXX" != x; then
33571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33572
33573  # First separate the path from the arguments. This will split at the first
33574  # space.
33575  complete="$PROPER_COMPILER_CXX"
33576  path="${complete%% *}"
33577  tmp="$complete EOL"
33578  arguments="${tmp#* }"
33579
33580  # Input might be given as Windows format, start by converting to
33581  # unix format.
33582  new_path=`$CYGPATH -u "$path"`
33583
33584  # Now try to locate executable using which
33585  new_path=`$WHICH "$new_path" 2> /dev/null`
33586  # bat and cmd files are not always considered executable in cygwin causing which
33587  # to not find them
33588  if test "x$new_path" = x \
33589      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33590      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33591    new_path=`$CYGPATH -u "$path"`
33592  fi
33593  if test "x$new_path" = x; then
33594    # Oops. Which didn't find the executable.
33595    # The splitting of arguments from the executable at a space might have been incorrect,
33596    # since paths with space are more likely in Windows. Give it another try with the whole
33597    # argument.
33598    path="$complete"
33599    arguments="EOL"
33600    new_path=`$CYGPATH -u "$path"`
33601    new_path=`$WHICH "$new_path" 2> /dev/null`
33602    # bat and cmd files are not always considered executable in cygwin causing which
33603    # to not find them
33604    if test "x$new_path" = x \
33605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33607      new_path=`$CYGPATH -u "$path"`
33608    fi
33609    if test "x$new_path" = x; then
33610      # It's still not found. Now this is an unrecoverable error.
33611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33612$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33613      has_space=`$ECHO "$complete" | $GREP " "`
33614      if test "x$has_space" != x; then
33615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33617      fi
33618      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33619    fi
33620  fi
33621
33622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33625  # "foo.exe" is OK but "foo" is an error.
33626  #
33627  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33628  # It is also a way to make sure we got the proper file name for the real test later on.
33629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33630  if test "x$test_shortpath" = x; then
33631    # Short path failed, file does not exist as specified.
33632    # Try adding .exe or .cmd
33633    if test -f "${new_path}.exe"; then
33634      input_to_shortpath="${new_path}.exe"
33635    elif test -f "${new_path}.cmd"; then
33636      input_to_shortpath="${new_path}.cmd"
33637    else
33638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33639$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33642      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33643    fi
33644  else
33645    input_to_shortpath="$new_path"
33646  fi
33647
33648  # Call helper function which possibly converts this using DOS-style short mode.
33649  # If so, the updated path is stored in $new_path.
33650  new_path="$input_to_shortpath"
33651
33652  input_path="$input_to_shortpath"
33653  # Check if we need to convert this using DOS-style short mode. If the path
33654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33655  # take no chances and rewrite it.
33656  # Note: m4 eats our [], so we need to use [ and ] instead.
33657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33658  if test "x$has_forbidden_chars" != x; then
33659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33663      # Going to short mode and back again did indeed matter. Since short mode is
33664      # case insensitive, let's make it lowercase to improve readability.
33665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33666      # Now convert it back to Unix-style (cygpath)
33667      input_path=`$CYGPATH -u "$shortmode_path"`
33668      new_path="$input_path"
33669    fi
33670  fi
33671
33672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33673  if test "x$test_cygdrive_prefix" = x; then
33674    # As a simple fix, exclude /usr/bin since it's not a real path.
33675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33677      # a path prefixed by /cygdrive for fixpath to work.
33678      new_path="$CYGWIN_ROOT_PATH$input_path"
33679    fi
33680  fi
33681
33682  # remove trailing .exe if any
33683  new_path="${new_path/%.exe/}"
33684
33685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33686
33687  # First separate the path from the arguments. This will split at the first
33688  # space.
33689  complete="$PROPER_COMPILER_CXX"
33690  path="${complete%% *}"
33691  tmp="$complete EOL"
33692  arguments="${tmp#* }"
33693
33694  # Input might be given as Windows format, start by converting to
33695  # unix format.
33696  new_path="$path"
33697
33698  windows_path="$new_path"
33699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33700    unix_path=`$CYGPATH -u "$windows_path"`
33701    new_path="$unix_path"
33702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33704    new_path="$unix_path"
33705  fi
33706
33707
33708  # Now try to locate executable using which
33709  new_path=`$WHICH "$new_path" 2> /dev/null`
33710
33711  if test "x$new_path" = x; then
33712    # Oops. Which didn't find the executable.
33713    # The splitting of arguments from the executable at a space might have been incorrect,
33714    # since paths with space are more likely in Windows. Give it another try with the whole
33715    # argument.
33716    path="$complete"
33717    arguments="EOL"
33718    new_path="$path"
33719
33720  windows_path="$new_path"
33721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33722    unix_path=`$CYGPATH -u "$windows_path"`
33723    new_path="$unix_path"
33724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33726    new_path="$unix_path"
33727  fi
33728
33729
33730    new_path=`$WHICH "$new_path" 2> /dev/null`
33731    # bat and cmd files are not always considered executable in MSYS causing which
33732    # to not find them
33733    if test "x$new_path" = x \
33734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33736      new_path="$path"
33737
33738  windows_path="$new_path"
33739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33740    unix_path=`$CYGPATH -u "$windows_path"`
33741    new_path="$unix_path"
33742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33744    new_path="$unix_path"
33745  fi
33746
33747    fi
33748
33749    if test "x$new_path" = x; then
33750      # It's still not found. Now this is an unrecoverable error.
33751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33752$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33753      has_space=`$ECHO "$complete" | $GREP " "`
33754      if test "x$has_space" != x; then
33755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33757      fi
33758      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33759    fi
33760  fi
33761
33762  # Now new_path has a complete unix path to the binary
33763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33764    # Keep paths in /bin as-is, but remove trailing .exe if any
33765    new_path="${new_path/%.exe/}"
33766    # Do not save /bin paths to all_fixpath_prefixes!
33767  else
33768    # Not in mixed or Windows style, start by that.
33769    new_path=`cmd //c echo $new_path`
33770
33771  input_path="$new_path"
33772  # Check if we need to convert this using DOS-style short mode. If the path
33773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33774  # take no chances and rewrite it.
33775  # Note: m4 eats our [], so we need to use [ and ] instead.
33776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33777  if test "x$has_forbidden_chars" != x; then
33778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33780  fi
33781
33782    # Output is in $new_path
33783
33784  windows_path="$new_path"
33785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33786    unix_path=`$CYGPATH -u "$windows_path"`
33787    new_path="$unix_path"
33788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33790    new_path="$unix_path"
33791  fi
33792
33793    # remove trailing .exe if any
33794    new_path="${new_path/%.exe/}"
33795
33796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33798  fi
33799
33800    else
33801      # We're on a unix platform. Hooray! :)
33802      # First separate the path from the arguments. This will split at the first
33803      # space.
33804      complete="$PROPER_COMPILER_CXX"
33805      path="${complete%% *}"
33806      tmp="$complete EOL"
33807      arguments="${tmp#* }"
33808
33809      # Cannot rely on the command "which" here since it doesn't always work.
33810      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33811      if test -z "$is_absolute_path"; then
33812        # Path to executable is not absolute. Find it.
33813        IFS_save="$IFS"
33814        IFS=:
33815        for p in $PATH; do
33816          if test -f "$p/$path" && test -x "$p/$path"; then
33817            new_path="$p/$path"
33818            break
33819          fi
33820        done
33821        IFS="$IFS_save"
33822      else
33823        # This is an absolute path, we can use it without further modifications.
33824        new_path="$path"
33825      fi
33826
33827      if test "x$new_path" = x; then
33828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33829$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33830        has_space=`$ECHO "$complete" | $GREP " "`
33831        if test "x$has_space" != x; then
33832          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33834        fi
33835        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33836      fi
33837    fi
33838
33839    # Now join together the path and the arguments once again
33840    if test "x$arguments" != xEOL; then
33841      new_complete="$new_path ${arguments% *}"
33842    else
33843      new_complete="$new_path"
33844    fi
33845
33846    if test "x$complete" != "x$new_complete"; then
33847      PROPER_COMPILER_CXX="$new_complete"
33848      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33849$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33850    fi
33851  fi
33852
33853    PATH="$RETRY_COMPILER_SAVED_PATH"
33854
33855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33856$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33857
33858  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33859    # Follow a chain of symbolic links. Use readlink
33860    # where it exists, else fall back to horribly
33861    # complicated shell code.
33862    if test "x$READLINK_TESTED" != yes; then
33863      # On MacOSX there is a readlink tool with a different
33864      # purpose than the GNU readlink tool. Check the found readlink.
33865      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33866      if test "x$ISGNU" = x; then
33867        # A readlink that we do not know how to use.
33868        # Are there other non-GNU readlinks out there?
33869        READLINK_TESTED=yes
33870        READLINK=
33871      fi
33872    fi
33873
33874    if test "x$READLINK" != x; then
33875      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33876    else
33877      # Save the current directory for restoring afterwards
33878      STARTDIR=$PWD
33879      COUNTER=0
33880      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33881      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33882      cd $sym_link_dir
33883      # Use -P flag to resolve symlinks in directories.
33884      cd `$THEPWDCMD -P`
33885      sym_link_dir=`$THEPWDCMD -P`
33886      # Resolve file symlinks
33887      while test $COUNTER -lt 20; do
33888        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33889        if test "x$ISLINK" == x; then
33890          # This is not a symbolic link! We are done!
33891          break
33892        fi
33893        # Again resolve directory symlinks since the target of the just found
33894        # link could be in a different directory
33895        cd `$DIRNAME $ISLINK`
33896        sym_link_dir=`$THEPWDCMD -P`
33897        sym_link_file=`$BASENAME $ISLINK`
33898        let COUNTER=COUNTER+1
33899      done
33900      cd $STARTDIR
33901      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33902    fi
33903  fi
33904
33905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33906$as_echo "$PROPER_COMPILER_CXX" >&6; }
33907    CXX="$PROPER_COMPILER_CXX"
33908  else
33909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33910$as_echo "no, keeping CXX" >&6; }
33911  fi
33912
33913
33914  COMPILER=$CXX
33915  COMPILER_NAME=$COMPILER_NAME
33916
33917  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33918    # cc -V output typically looks like
33919    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33920    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33921    # Check that this is likely to be the Solaris Studio cc.
33922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33923    if test $? -ne 0; then
33924      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33925      { $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
33926$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33927      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33928$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33929      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33930$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33931      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33932    fi
33933    # Remove usage instructions (if present), and
33934    # collapse compiler output into a single line
33935    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33936        $SED -e 's/ *[Uu]sage:.*//'`
33937    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33938        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33939  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33940    # xlc -qversion output typically looks like
33941    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33942    #     Version: 11.01.0000.0015
33943    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33944    # Check that this is likely to be the IBM XL C compiler.
33945    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33946    if test $? -ne 0; then
33947      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33948      { $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
33949$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33950      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33951$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33953$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33955    fi
33956    # Collapse compiler output into a single line
33957    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33958    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33959        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33960  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33961    # There is no specific version flag, but all output starts with a version string.
33962    # First line typically looks something like:
33963    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33964    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33965    # Check that this is likely to be Microsoft CL.EXE.
33966    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33967    if test $? -ne 0; then
33968      { $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
33969$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33971$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33972      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33973    fi
33974    # Collapse compiler output into a single line
33975    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33977        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33978  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33979    # gcc --version output typically looks like
33980    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33981    #     Copyright (C) 2013 Free Software Foundation, Inc.
33982    #     This is free software; see the source for copying conditions.  There is NO
33983    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33984    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33985    # Check that this is likely to be GCC.
33986    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33987    if test $? -ne 0; then
33988      { $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
33989$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33990      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33991$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33992      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33993    fi
33994    # Remove Copyright and legalese from version string, and
33995    # collapse into a single line
33996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33997        $SED -e 's/ *Copyright .*//'`
33998    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33999        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34000  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34001    # clang --version output typically looks like
34002    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34003    #    clang version 3.3 (tags/RELEASE_33/final)
34004    # or
34005    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34006    #    Target: x86_64-pc-linux-gnu
34007    #    Thread model: posix
34008    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34009    # Check that this is likely to be clang
34010    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34011    if test $? -ne 0; then
34012      { $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
34013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34015$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34016      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34017    fi
34018    # Collapse compiler output into a single line
34019    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34020    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34021        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34022  else
34023      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34024  fi
34025  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34026  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34027  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34028  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34029
34030  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34031$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34032
34033
34034  # Now that we have resolved CXX ourself, let autoconf have its go at it
34035  ac_ext=cpp
34036ac_cpp='$CXXCPP $CPPFLAGS'
34037ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34038ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34039ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34040if test -z "$CXX"; then
34041  if test -n "$CCC"; then
34042    CXX=$CCC
34043  else
34044    if test -n "$ac_tool_prefix"; then
34045  for ac_prog in $CXX
34046  do
34047    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34050$as_echo_n "checking for $ac_word... " >&6; }
34051if ${ac_cv_prog_CXX+:} false; then :
34052  $as_echo_n "(cached) " >&6
34053else
34054  if test -n "$CXX"; then
34055  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34056else
34057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34058for as_dir in $PATH
34059do
34060  IFS=$as_save_IFS
34061  test -z "$as_dir" && as_dir=.
34062    for ac_exec_ext in '' $ac_executable_extensions; do
34063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34064    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34066    break 2
34067  fi
34068done
34069  done
34070IFS=$as_save_IFS
34071
34072fi
34073fi
34074CXX=$ac_cv_prog_CXX
34075if test -n "$CXX"; then
34076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34077$as_echo "$CXX" >&6; }
34078else
34079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34080$as_echo "no" >&6; }
34081fi
34082
34083
34084    test -n "$CXX" && break
34085  done
34086fi
34087if test -z "$CXX"; then
34088  ac_ct_CXX=$CXX
34089  for ac_prog in $CXX
34090do
34091  # Extract the first word of "$ac_prog", so it can be a program name with args.
34092set dummy $ac_prog; ac_word=$2
34093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34094$as_echo_n "checking for $ac_word... " >&6; }
34095if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34096  $as_echo_n "(cached) " >&6
34097else
34098  if test -n "$ac_ct_CXX"; then
34099  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34100else
34101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34102for as_dir in $PATH
34103do
34104  IFS=$as_save_IFS
34105  test -z "$as_dir" && as_dir=.
34106    for ac_exec_ext in '' $ac_executable_extensions; do
34107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34108    ac_cv_prog_ac_ct_CXX="$ac_prog"
34109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34110    break 2
34111  fi
34112done
34113  done
34114IFS=$as_save_IFS
34115
34116fi
34117fi
34118ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34119if test -n "$ac_ct_CXX"; then
34120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34121$as_echo "$ac_ct_CXX" >&6; }
34122else
34123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34124$as_echo "no" >&6; }
34125fi
34126
34127
34128  test -n "$ac_ct_CXX" && break
34129done
34130
34131  if test "x$ac_ct_CXX" = x; then
34132    CXX="g++"
34133  else
34134    case $cross_compiling:$ac_tool_warned in
34135yes:)
34136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34138ac_tool_warned=yes ;;
34139esac
34140    CXX=$ac_ct_CXX
34141  fi
34142fi
34143
34144  fi
34145fi
34146# Provide some information about the compiler.
34147$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34148set X $ac_compile
34149ac_compiler=$2
34150for ac_option in --version -v -V -qversion; do
34151  { { ac_try="$ac_compiler $ac_option >&5"
34152case "(($ac_try" in
34153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34154  *) ac_try_echo=$ac_try;;
34155esac
34156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34157$as_echo "$ac_try_echo"; } >&5
34158  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34159  ac_status=$?
34160  if test -s conftest.err; then
34161    sed '10a\
34162... rest of stderr output deleted ...
34163         10q' conftest.err >conftest.er1
34164    cat conftest.er1 >&5
34165  fi
34166  rm -f conftest.er1 conftest.err
34167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34168  test $ac_status = 0; }
34169done
34170
34171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34172$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34173if ${ac_cv_cxx_compiler_gnu+:} false; then :
34174  $as_echo_n "(cached) " >&6
34175else
34176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34177/* end confdefs.h.  */
34178
34179int
34180main ()
34181{
34182#ifndef __GNUC__
34183       choke me
34184#endif
34185
34186  ;
34187  return 0;
34188}
34189_ACEOF
34190if ac_fn_cxx_try_compile "$LINENO"; then :
34191  ac_compiler_gnu=yes
34192else
34193  ac_compiler_gnu=no
34194fi
34195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34196ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34197
34198fi
34199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34200$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34201if test $ac_compiler_gnu = yes; then
34202  GXX=yes
34203else
34204  GXX=
34205fi
34206ac_test_CXXFLAGS=${CXXFLAGS+set}
34207ac_save_CXXFLAGS=$CXXFLAGS
34208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34209$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34210if ${ac_cv_prog_cxx_g+:} false; then :
34211  $as_echo_n "(cached) " >&6
34212else
34213  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34214   ac_cxx_werror_flag=yes
34215   ac_cv_prog_cxx_g=no
34216   CXXFLAGS="-g"
34217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34218/* end confdefs.h.  */
34219
34220int
34221main ()
34222{
34223
34224  ;
34225  return 0;
34226}
34227_ACEOF
34228if ac_fn_cxx_try_compile "$LINENO"; then :
34229  ac_cv_prog_cxx_g=yes
34230else
34231  CXXFLAGS=""
34232      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34233/* end confdefs.h.  */
34234
34235int
34236main ()
34237{
34238
34239  ;
34240  return 0;
34241}
34242_ACEOF
34243if ac_fn_cxx_try_compile "$LINENO"; then :
34244
34245else
34246  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34247	 CXXFLAGS="-g"
34248	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34249/* end confdefs.h.  */
34250
34251int
34252main ()
34253{
34254
34255  ;
34256  return 0;
34257}
34258_ACEOF
34259if ac_fn_cxx_try_compile "$LINENO"; then :
34260  ac_cv_prog_cxx_g=yes
34261fi
34262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34263fi
34264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34265fi
34266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34267   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34268fi
34269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34270$as_echo "$ac_cv_prog_cxx_g" >&6; }
34271if test "$ac_test_CXXFLAGS" = set; then
34272  CXXFLAGS=$ac_save_CXXFLAGS
34273elif test $ac_cv_prog_cxx_g = yes; then
34274  if test "$GXX" = yes; then
34275    CXXFLAGS="-g -O2"
34276  else
34277    CXXFLAGS="-g"
34278  fi
34279else
34280  if test "$GXX" = yes; then
34281    CXXFLAGS="-O2"
34282  else
34283    CXXFLAGS=
34284  fi
34285fi
34286ac_ext=cpp
34287ac_cpp='$CXXCPP $CPPFLAGS'
34288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34291
34292
34293  #
34294  # Setup the preprocessor (CPP and CXXCPP)
34295  #
34296  ac_ext=c
34297ac_cpp='$CPP $CPPFLAGS'
34298ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34299ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34300ac_compiler_gnu=$ac_cv_c_compiler_gnu
34301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34302$as_echo_n "checking how to run the C preprocessor... " >&6; }
34303# On Suns, sometimes $CPP names a directory.
34304if test -n "$CPP" && test -d "$CPP"; then
34305  CPP=
34306fi
34307if test -z "$CPP"; then
34308  if ${ac_cv_prog_CPP+:} false; then :
34309  $as_echo_n "(cached) " >&6
34310else
34311      # Double quotes because CPP needs to be expanded
34312    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34313    do
34314      ac_preproc_ok=false
34315for ac_c_preproc_warn_flag in '' yes
34316do
34317  # Use a header file that comes with gcc, so configuring glibc
34318  # with a fresh cross-compiler works.
34319  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34320  # <limits.h> exists even on freestanding compilers.
34321  # On the NeXT, cc -E runs the code through the compiler's parser,
34322  # not just through cpp. "Syntax error" is here to catch this case.
34323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34324/* end confdefs.h.  */
34325#ifdef __STDC__
34326# include <limits.h>
34327#else
34328# include <assert.h>
34329#endif
34330		     Syntax error
34331_ACEOF
34332if ac_fn_c_try_cpp "$LINENO"; then :
34333
34334else
34335  # Broken: fails on valid input.
34336continue
34337fi
34338rm -f conftest.err conftest.i conftest.$ac_ext
34339
34340  # OK, works on sane cases.  Now check whether nonexistent headers
34341  # can be detected and how.
34342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34343/* end confdefs.h.  */
34344#include <ac_nonexistent.h>
34345_ACEOF
34346if ac_fn_c_try_cpp "$LINENO"; then :
34347  # Broken: success on invalid input.
34348continue
34349else
34350  # Passes both tests.
34351ac_preproc_ok=:
34352break
34353fi
34354rm -f conftest.err conftest.i conftest.$ac_ext
34355
34356done
34357# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34358rm -f conftest.i conftest.err conftest.$ac_ext
34359if $ac_preproc_ok; then :
34360  break
34361fi
34362
34363    done
34364    ac_cv_prog_CPP=$CPP
34365
34366fi
34367  CPP=$ac_cv_prog_CPP
34368else
34369  ac_cv_prog_CPP=$CPP
34370fi
34371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34372$as_echo "$CPP" >&6; }
34373ac_preproc_ok=false
34374for ac_c_preproc_warn_flag in '' yes
34375do
34376  # Use a header file that comes with gcc, so configuring glibc
34377  # with a fresh cross-compiler works.
34378  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34379  # <limits.h> exists even on freestanding compilers.
34380  # On the NeXT, cc -E runs the code through the compiler's parser,
34381  # not just through cpp. "Syntax error" is here to catch this case.
34382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34383/* end confdefs.h.  */
34384#ifdef __STDC__
34385# include <limits.h>
34386#else
34387# include <assert.h>
34388#endif
34389		     Syntax error
34390_ACEOF
34391if ac_fn_c_try_cpp "$LINENO"; then :
34392
34393else
34394  # Broken: fails on valid input.
34395continue
34396fi
34397rm -f conftest.err conftest.i conftest.$ac_ext
34398
34399  # OK, works on sane cases.  Now check whether nonexistent headers
34400  # can be detected and how.
34401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34402/* end confdefs.h.  */
34403#include <ac_nonexistent.h>
34404_ACEOF
34405if ac_fn_c_try_cpp "$LINENO"; then :
34406  # Broken: success on invalid input.
34407continue
34408else
34409  # Passes both tests.
34410ac_preproc_ok=:
34411break
34412fi
34413rm -f conftest.err conftest.i conftest.$ac_ext
34414
34415done
34416# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34417rm -f conftest.i conftest.err conftest.$ac_ext
34418if $ac_preproc_ok; then :
34419
34420else
34421  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34423as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34424See \`config.log' for more details" "$LINENO" 5; }
34425fi
34426
34427ac_ext=cpp
34428ac_cpp='$CXXCPP $CPPFLAGS'
34429ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34430ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34431ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34432
34433
34434  # Only process if variable expands to non-empty
34435
34436  if test "x$CPP" != x; then
34437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34438
34439  # First separate the path from the arguments. This will split at the first
34440  # space.
34441  complete="$CPP"
34442  path="${complete%% *}"
34443  tmp="$complete EOL"
34444  arguments="${tmp#* }"
34445
34446  # Input might be given as Windows format, start by converting to
34447  # unix format.
34448  new_path=`$CYGPATH -u "$path"`
34449
34450  # Now try to locate executable using which
34451  new_path=`$WHICH "$new_path" 2> /dev/null`
34452  # bat and cmd files are not always considered executable in cygwin causing which
34453  # to not find them
34454  if test "x$new_path" = x \
34455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34457    new_path=`$CYGPATH -u "$path"`
34458  fi
34459  if test "x$new_path" = x; then
34460    # Oops. Which didn't find the executable.
34461    # The splitting of arguments from the executable at a space might have been incorrect,
34462    # since paths with space are more likely in Windows. Give it another try with the whole
34463    # argument.
34464    path="$complete"
34465    arguments="EOL"
34466    new_path=`$CYGPATH -u "$path"`
34467    new_path=`$WHICH "$new_path" 2> /dev/null`
34468    # bat and cmd files are not always considered executable in cygwin causing which
34469    # to not find them
34470    if test "x$new_path" = x \
34471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34473      new_path=`$CYGPATH -u "$path"`
34474    fi
34475    if test "x$new_path" = x; then
34476      # It's still not found. Now this is an unrecoverable error.
34477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34478$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34479      has_space=`$ECHO "$complete" | $GREP " "`
34480      if test "x$has_space" != x; then
34481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34483      fi
34484      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34485    fi
34486  fi
34487
34488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34491  # "foo.exe" is OK but "foo" is an error.
34492  #
34493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34494  # It is also a way to make sure we got the proper file name for the real test later on.
34495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34496  if test "x$test_shortpath" = x; then
34497    # Short path failed, file does not exist as specified.
34498    # Try adding .exe or .cmd
34499    if test -f "${new_path}.exe"; then
34500      input_to_shortpath="${new_path}.exe"
34501    elif test -f "${new_path}.cmd"; then
34502      input_to_shortpath="${new_path}.cmd"
34503    else
34504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34505$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34508      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34509    fi
34510  else
34511    input_to_shortpath="$new_path"
34512  fi
34513
34514  # Call helper function which possibly converts this using DOS-style short mode.
34515  # If so, the updated path is stored in $new_path.
34516  new_path="$input_to_shortpath"
34517
34518  input_path="$input_to_shortpath"
34519  # Check if we need to convert this using DOS-style short mode. If the path
34520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34521  # take no chances and rewrite it.
34522  # Note: m4 eats our [], so we need to use [ and ] instead.
34523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34524  if test "x$has_forbidden_chars" != x; then
34525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34529      # Going to short mode and back again did indeed matter. Since short mode is
34530      # case insensitive, let's make it lowercase to improve readability.
34531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34532      # Now convert it back to Unix-style (cygpath)
34533      input_path=`$CYGPATH -u "$shortmode_path"`
34534      new_path="$input_path"
34535    fi
34536  fi
34537
34538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34539  if test "x$test_cygdrive_prefix" = x; then
34540    # As a simple fix, exclude /usr/bin since it's not a real path.
34541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34543      # a path prefixed by /cygdrive for fixpath to work.
34544      new_path="$CYGWIN_ROOT_PATH$input_path"
34545    fi
34546  fi
34547
34548  # remove trailing .exe if any
34549  new_path="${new_path/%.exe/}"
34550
34551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34552
34553  # First separate the path from the arguments. This will split at the first
34554  # space.
34555  complete="$CPP"
34556  path="${complete%% *}"
34557  tmp="$complete EOL"
34558  arguments="${tmp#* }"
34559
34560  # Input might be given as Windows format, start by converting to
34561  # unix format.
34562  new_path="$path"
34563
34564  windows_path="$new_path"
34565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34566    unix_path=`$CYGPATH -u "$windows_path"`
34567    new_path="$unix_path"
34568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34570    new_path="$unix_path"
34571  fi
34572
34573
34574  # Now try to locate executable using which
34575  new_path=`$WHICH "$new_path" 2> /dev/null`
34576
34577  if test "x$new_path" = x; then
34578    # Oops. Which didn't find the executable.
34579    # The splitting of arguments from the executable at a space might have been incorrect,
34580    # since paths with space are more likely in Windows. Give it another try with the whole
34581    # argument.
34582    path="$complete"
34583    arguments="EOL"
34584    new_path="$path"
34585
34586  windows_path="$new_path"
34587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34588    unix_path=`$CYGPATH -u "$windows_path"`
34589    new_path="$unix_path"
34590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34592    new_path="$unix_path"
34593  fi
34594
34595
34596    new_path=`$WHICH "$new_path" 2> /dev/null`
34597    # bat and cmd files are not always considered executable in MSYS causing which
34598    # to not find them
34599    if test "x$new_path" = x \
34600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34602      new_path="$path"
34603
34604  windows_path="$new_path"
34605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34606    unix_path=`$CYGPATH -u "$windows_path"`
34607    new_path="$unix_path"
34608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34610    new_path="$unix_path"
34611  fi
34612
34613    fi
34614
34615    if test "x$new_path" = x; then
34616      # It's still not found. Now this is an unrecoverable error.
34617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34618$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34619      has_space=`$ECHO "$complete" | $GREP " "`
34620      if test "x$has_space" != x; then
34621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34623      fi
34624      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34625    fi
34626  fi
34627
34628  # Now new_path has a complete unix path to the binary
34629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34630    # Keep paths in /bin as-is, but remove trailing .exe if any
34631    new_path="${new_path/%.exe/}"
34632    # Do not save /bin paths to all_fixpath_prefixes!
34633  else
34634    # Not in mixed or Windows style, start by that.
34635    new_path=`cmd //c echo $new_path`
34636
34637  input_path="$new_path"
34638  # Check if we need to convert this using DOS-style short mode. If the path
34639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34640  # take no chances and rewrite it.
34641  # Note: m4 eats our [], so we need to use [ and ] instead.
34642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34643  if test "x$has_forbidden_chars" != x; then
34644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34646  fi
34647
34648    # Output is in $new_path
34649
34650  windows_path="$new_path"
34651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34652    unix_path=`$CYGPATH -u "$windows_path"`
34653    new_path="$unix_path"
34654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34656    new_path="$unix_path"
34657  fi
34658
34659    # remove trailing .exe if any
34660    new_path="${new_path/%.exe/}"
34661
34662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34664  fi
34665
34666    else
34667      # We're on a unix platform. Hooray! :)
34668      # First separate the path from the arguments. This will split at the first
34669      # space.
34670      complete="$CPP"
34671      path="${complete%% *}"
34672      tmp="$complete EOL"
34673      arguments="${tmp#* }"
34674
34675      # Cannot rely on the command "which" here since it doesn't always work.
34676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34677      if test -z "$is_absolute_path"; then
34678        # Path to executable is not absolute. Find it.
34679        IFS_save="$IFS"
34680        IFS=:
34681        for p in $PATH; do
34682          if test -f "$p/$path" && test -x "$p/$path"; then
34683            new_path="$p/$path"
34684            break
34685          fi
34686        done
34687        IFS="$IFS_save"
34688      else
34689        # This is an absolute path, we can use it without further modifications.
34690        new_path="$path"
34691      fi
34692
34693      if test "x$new_path" = x; then
34694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34695$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34696        has_space=`$ECHO "$complete" | $GREP " "`
34697        if test "x$has_space" != x; then
34698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34700        fi
34701        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34702      fi
34703    fi
34704
34705    # Now join together the path and the arguments once again
34706    if test "x$arguments" != xEOL; then
34707      new_complete="$new_path ${arguments% *}"
34708    else
34709      new_complete="$new_path"
34710    fi
34711
34712    if test "x$complete" != "x$new_complete"; then
34713      CPP="$new_complete"
34714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34715$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34716    fi
34717  fi
34718
34719  ac_ext=cpp
34720ac_cpp='$CXXCPP $CPPFLAGS'
34721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34725$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34726if test -z "$CXXCPP"; then
34727  if ${ac_cv_prog_CXXCPP+:} false; then :
34728  $as_echo_n "(cached) " >&6
34729else
34730      # Double quotes because CXXCPP needs to be expanded
34731    for CXXCPP in "$CXX -E" "/lib/cpp"
34732    do
34733      ac_preproc_ok=false
34734for ac_cxx_preproc_warn_flag in '' yes
34735do
34736  # Use a header file that comes with gcc, so configuring glibc
34737  # with a fresh cross-compiler works.
34738  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34739  # <limits.h> exists even on freestanding compilers.
34740  # On the NeXT, cc -E runs the code through the compiler's parser,
34741  # not just through cpp. "Syntax error" is here to catch this case.
34742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34743/* end confdefs.h.  */
34744#ifdef __STDC__
34745# include <limits.h>
34746#else
34747# include <assert.h>
34748#endif
34749		     Syntax error
34750_ACEOF
34751if ac_fn_cxx_try_cpp "$LINENO"; then :
34752
34753else
34754  # Broken: fails on valid input.
34755continue
34756fi
34757rm -f conftest.err conftest.i conftest.$ac_ext
34758
34759  # OK, works on sane cases.  Now check whether nonexistent headers
34760  # can be detected and how.
34761  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34762/* end confdefs.h.  */
34763#include <ac_nonexistent.h>
34764_ACEOF
34765if ac_fn_cxx_try_cpp "$LINENO"; then :
34766  # Broken: success on invalid input.
34767continue
34768else
34769  # Passes both tests.
34770ac_preproc_ok=:
34771break
34772fi
34773rm -f conftest.err conftest.i conftest.$ac_ext
34774
34775done
34776# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34777rm -f conftest.i conftest.err conftest.$ac_ext
34778if $ac_preproc_ok; then :
34779  break
34780fi
34781
34782    done
34783    ac_cv_prog_CXXCPP=$CXXCPP
34784
34785fi
34786  CXXCPP=$ac_cv_prog_CXXCPP
34787else
34788  ac_cv_prog_CXXCPP=$CXXCPP
34789fi
34790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34791$as_echo "$CXXCPP" >&6; }
34792ac_preproc_ok=false
34793for ac_cxx_preproc_warn_flag in '' yes
34794do
34795  # Use a header file that comes with gcc, so configuring glibc
34796  # with a fresh cross-compiler works.
34797  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34798  # <limits.h> exists even on freestanding compilers.
34799  # On the NeXT, cc -E runs the code through the compiler's parser,
34800  # not just through cpp. "Syntax error" is here to catch this case.
34801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34802/* end confdefs.h.  */
34803#ifdef __STDC__
34804# include <limits.h>
34805#else
34806# include <assert.h>
34807#endif
34808		     Syntax error
34809_ACEOF
34810if ac_fn_cxx_try_cpp "$LINENO"; then :
34811
34812else
34813  # Broken: fails on valid input.
34814continue
34815fi
34816rm -f conftest.err conftest.i conftest.$ac_ext
34817
34818  # OK, works on sane cases.  Now check whether nonexistent headers
34819  # can be detected and how.
34820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34821/* end confdefs.h.  */
34822#include <ac_nonexistent.h>
34823_ACEOF
34824if ac_fn_cxx_try_cpp "$LINENO"; then :
34825  # Broken: success on invalid input.
34826continue
34827else
34828  # Passes both tests.
34829ac_preproc_ok=:
34830break
34831fi
34832rm -f conftest.err conftest.i conftest.$ac_ext
34833
34834done
34835# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34836rm -f conftest.i conftest.err conftest.$ac_ext
34837if $ac_preproc_ok; then :
34838
34839else
34840  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34842as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34843See \`config.log' for more details" "$LINENO" 5; }
34844fi
34845
34846ac_ext=cpp
34847ac_cpp='$CXXCPP $CPPFLAGS'
34848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34851
34852
34853  # Only process if variable expands to non-empty
34854
34855  if test "x$CXXCPP" != x; then
34856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34857
34858  # First separate the path from the arguments. This will split at the first
34859  # space.
34860  complete="$CXXCPP"
34861  path="${complete%% *}"
34862  tmp="$complete EOL"
34863  arguments="${tmp#* }"
34864
34865  # Input might be given as Windows format, start by converting to
34866  # unix format.
34867  new_path=`$CYGPATH -u "$path"`
34868
34869  # Now try to locate executable using which
34870  new_path=`$WHICH "$new_path" 2> /dev/null`
34871  # bat and cmd files are not always considered executable in cygwin causing which
34872  # to not find them
34873  if test "x$new_path" = x \
34874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34876    new_path=`$CYGPATH -u "$path"`
34877  fi
34878  if test "x$new_path" = x; then
34879    # Oops. Which didn't find the executable.
34880    # The splitting of arguments from the executable at a space might have been incorrect,
34881    # since paths with space are more likely in Windows. Give it another try with the whole
34882    # argument.
34883    path="$complete"
34884    arguments="EOL"
34885    new_path=`$CYGPATH -u "$path"`
34886    new_path=`$WHICH "$new_path" 2> /dev/null`
34887    # bat and cmd files are not always considered executable in cygwin causing which
34888    # to not find them
34889    if test "x$new_path" = x \
34890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34892      new_path=`$CYGPATH -u "$path"`
34893    fi
34894    if test "x$new_path" = x; then
34895      # It's still not found. Now this is an unrecoverable error.
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34897$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34898      has_space=`$ECHO "$complete" | $GREP " "`
34899      if test "x$has_space" != x; then
34900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34902      fi
34903      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34904    fi
34905  fi
34906
34907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34910  # "foo.exe" is OK but "foo" is an error.
34911  #
34912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34913  # It is also a way to make sure we got the proper file name for the real test later on.
34914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34915  if test "x$test_shortpath" = x; then
34916    # Short path failed, file does not exist as specified.
34917    # Try adding .exe or .cmd
34918    if test -f "${new_path}.exe"; then
34919      input_to_shortpath="${new_path}.exe"
34920    elif test -f "${new_path}.cmd"; then
34921      input_to_shortpath="${new_path}.cmd"
34922    else
34923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34924$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34927      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34928    fi
34929  else
34930    input_to_shortpath="$new_path"
34931  fi
34932
34933  # Call helper function which possibly converts this using DOS-style short mode.
34934  # If so, the updated path is stored in $new_path.
34935  new_path="$input_to_shortpath"
34936
34937  input_path="$input_to_shortpath"
34938  # Check if we need to convert this using DOS-style short mode. If the path
34939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34940  # take no chances and rewrite it.
34941  # Note: m4 eats our [], so we need to use [ and ] instead.
34942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34943  if test "x$has_forbidden_chars" != x; then
34944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34948      # Going to short mode and back again did indeed matter. Since short mode is
34949      # case insensitive, let's make it lowercase to improve readability.
34950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34951      # Now convert it back to Unix-style (cygpath)
34952      input_path=`$CYGPATH -u "$shortmode_path"`
34953      new_path="$input_path"
34954    fi
34955  fi
34956
34957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34958  if test "x$test_cygdrive_prefix" = x; then
34959    # As a simple fix, exclude /usr/bin since it's not a real path.
34960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34962      # a path prefixed by /cygdrive for fixpath to work.
34963      new_path="$CYGWIN_ROOT_PATH$input_path"
34964    fi
34965  fi
34966
34967  # remove trailing .exe if any
34968  new_path="${new_path/%.exe/}"
34969
34970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34971
34972  # First separate the path from the arguments. This will split at the first
34973  # space.
34974  complete="$CXXCPP"
34975  path="${complete%% *}"
34976  tmp="$complete EOL"
34977  arguments="${tmp#* }"
34978
34979  # Input might be given as Windows format, start by converting to
34980  # unix format.
34981  new_path="$path"
34982
34983  windows_path="$new_path"
34984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34985    unix_path=`$CYGPATH -u "$windows_path"`
34986    new_path="$unix_path"
34987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34989    new_path="$unix_path"
34990  fi
34991
34992
34993  # Now try to locate executable using which
34994  new_path=`$WHICH "$new_path" 2> /dev/null`
34995
34996  if test "x$new_path" = x; then
34997    # Oops. Which didn't find the executable.
34998    # The splitting of arguments from the executable at a space might have been incorrect,
34999    # since paths with space are more likely in Windows. Give it another try with the whole
35000    # argument.
35001    path="$complete"
35002    arguments="EOL"
35003    new_path="$path"
35004
35005  windows_path="$new_path"
35006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35007    unix_path=`$CYGPATH -u "$windows_path"`
35008    new_path="$unix_path"
35009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35011    new_path="$unix_path"
35012  fi
35013
35014
35015    new_path=`$WHICH "$new_path" 2> /dev/null`
35016    # bat and cmd files are not always considered executable in MSYS causing which
35017    # to not find them
35018    if test "x$new_path" = x \
35019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35021      new_path="$path"
35022
35023  windows_path="$new_path"
35024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35025    unix_path=`$CYGPATH -u "$windows_path"`
35026    new_path="$unix_path"
35027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35029    new_path="$unix_path"
35030  fi
35031
35032    fi
35033
35034    if test "x$new_path" = x; then
35035      # It's still not found. Now this is an unrecoverable error.
35036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35037$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35038      has_space=`$ECHO "$complete" | $GREP " "`
35039      if test "x$has_space" != x; then
35040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35042      fi
35043      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35044    fi
35045  fi
35046
35047  # Now new_path has a complete unix path to the binary
35048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35049    # Keep paths in /bin as-is, but remove trailing .exe if any
35050    new_path="${new_path/%.exe/}"
35051    # Do not save /bin paths to all_fixpath_prefixes!
35052  else
35053    # Not in mixed or Windows style, start by that.
35054    new_path=`cmd //c echo $new_path`
35055
35056  input_path="$new_path"
35057  # Check if we need to convert this using DOS-style short mode. If the path
35058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35059  # take no chances and rewrite it.
35060  # Note: m4 eats our [], so we need to use [ and ] instead.
35061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35062  if test "x$has_forbidden_chars" != x; then
35063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35065  fi
35066
35067    # Output is in $new_path
35068
35069  windows_path="$new_path"
35070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35071    unix_path=`$CYGPATH -u "$windows_path"`
35072    new_path="$unix_path"
35073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35075    new_path="$unix_path"
35076  fi
35077
35078    # remove trailing .exe if any
35079    new_path="${new_path/%.exe/}"
35080
35081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35083  fi
35084
35085    else
35086      # We're on a unix platform. Hooray! :)
35087      # First separate the path from the arguments. This will split at the first
35088      # space.
35089      complete="$CXXCPP"
35090      path="${complete%% *}"
35091      tmp="$complete EOL"
35092      arguments="${tmp#* }"
35093
35094      # Cannot rely on the command "which" here since it doesn't always work.
35095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35096      if test -z "$is_absolute_path"; then
35097        # Path to executable is not absolute. Find it.
35098        IFS_save="$IFS"
35099        IFS=:
35100        for p in $PATH; do
35101          if test -f "$p/$path" && test -x "$p/$path"; then
35102            new_path="$p/$path"
35103            break
35104          fi
35105        done
35106        IFS="$IFS_save"
35107      else
35108        # This is an absolute path, we can use it without further modifications.
35109        new_path="$path"
35110      fi
35111
35112      if test "x$new_path" = x; then
35113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35114$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35115        has_space=`$ECHO "$complete" | $GREP " "`
35116        if test "x$has_space" != x; then
35117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35119        fi
35120        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35121      fi
35122    fi
35123
35124    # Now join together the path and the arguments once again
35125    if test "x$arguments" != xEOL; then
35126      new_complete="$new_path ${arguments% *}"
35127    else
35128      new_complete="$new_path"
35129    fi
35130
35131    if test "x$complete" != "x$new_complete"; then
35132      CXXCPP="$new_complete"
35133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35134$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35135    fi
35136  fi
35137
35138
35139  #
35140  # Setup the linker (LD)
35141  #
35142  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35143    # In the Microsoft toolchain we have a separate LD command "link".
35144    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35145    # a cygwin program for something completely different.
35146    # Extract the first word of "link", so it can be a program name with args.
35147set dummy link; ac_word=$2
35148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35149$as_echo_n "checking for $ac_word... " >&6; }
35150if ${ac_cv_prog_LD+:} false; then :
35151  $as_echo_n "(cached) " >&6
35152else
35153  if test -n "$LD"; then
35154  ac_cv_prog_LD="$LD" # Let the user override the test.
35155else
35156  ac_prog_rejected=no
35157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35158for as_dir in $PATH
35159do
35160  IFS=$as_save_IFS
35161  test -z "$as_dir" && as_dir=.
35162    for ac_exec_ext in '' $ac_executable_extensions; do
35163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35164    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35165       ac_prog_rejected=yes
35166       continue
35167     fi
35168    ac_cv_prog_LD="link"
35169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35170    break 2
35171  fi
35172done
35173  done
35174IFS=$as_save_IFS
35175
35176if test $ac_prog_rejected = yes; then
35177  # We found a bogon in the path, so make sure we never use it.
35178  set dummy $ac_cv_prog_LD
35179  shift
35180  if test $# != 0; then
35181    # We chose a different compiler from the bogus one.
35182    # However, it has the same basename, so the bogon will be chosen
35183    # first if we set LD to just the basename; use the full file name.
35184    shift
35185    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35186  fi
35187fi
35188fi
35189fi
35190LD=$ac_cv_prog_LD
35191if test -n "$LD"; then
35192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35193$as_echo "$LD" >&6; }
35194else
35195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35196$as_echo "no" >&6; }
35197fi
35198
35199
35200
35201  # Only process if variable expands to non-empty
35202
35203  if test "x$LD" != x; then
35204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35205
35206  # First separate the path from the arguments. This will split at the first
35207  # space.
35208  complete="$LD"
35209  path="${complete%% *}"
35210  tmp="$complete EOL"
35211  arguments="${tmp#* }"
35212
35213  # Input might be given as Windows format, start by converting to
35214  # unix format.
35215  new_path=`$CYGPATH -u "$path"`
35216
35217  # Now try to locate executable using which
35218  new_path=`$WHICH "$new_path" 2> /dev/null`
35219  # bat and cmd files are not always considered executable in cygwin causing which
35220  # to not find them
35221  if test "x$new_path" = x \
35222      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35223      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35224    new_path=`$CYGPATH -u "$path"`
35225  fi
35226  if test "x$new_path" = x; then
35227    # Oops. Which didn't find the executable.
35228    # The splitting of arguments from the executable at a space might have been incorrect,
35229    # since paths with space are more likely in Windows. Give it another try with the whole
35230    # argument.
35231    path="$complete"
35232    arguments="EOL"
35233    new_path=`$CYGPATH -u "$path"`
35234    new_path=`$WHICH "$new_path" 2> /dev/null`
35235    # bat and cmd files are not always considered executable in cygwin causing which
35236    # to not find them
35237    if test "x$new_path" = x \
35238        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35239        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35240      new_path=`$CYGPATH -u "$path"`
35241    fi
35242    if test "x$new_path" = x; then
35243      # It's still not found. Now this is an unrecoverable error.
35244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35245$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35246      has_space=`$ECHO "$complete" | $GREP " "`
35247      if test "x$has_space" != x; then
35248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35250      fi
35251      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35252    fi
35253  fi
35254
35255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35258  # "foo.exe" is OK but "foo" is an error.
35259  #
35260  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35261  # It is also a way to make sure we got the proper file name for the real test later on.
35262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35263  if test "x$test_shortpath" = x; then
35264    # Short path failed, file does not exist as specified.
35265    # Try adding .exe or .cmd
35266    if test -f "${new_path}.exe"; then
35267      input_to_shortpath="${new_path}.exe"
35268    elif test -f "${new_path}.cmd"; then
35269      input_to_shortpath="${new_path}.cmd"
35270    else
35271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35272$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35275      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35276    fi
35277  else
35278    input_to_shortpath="$new_path"
35279  fi
35280
35281  # Call helper function which possibly converts this using DOS-style short mode.
35282  # If so, the updated path is stored in $new_path.
35283  new_path="$input_to_shortpath"
35284
35285  input_path="$input_to_shortpath"
35286  # Check if we need to convert this using DOS-style short mode. If the path
35287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35288  # take no chances and rewrite it.
35289  # Note: m4 eats our [], so we need to use [ and ] instead.
35290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35291  if test "x$has_forbidden_chars" != x; then
35292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35296      # Going to short mode and back again did indeed matter. Since short mode is
35297      # case insensitive, let's make it lowercase to improve readability.
35298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35299      # Now convert it back to Unix-style (cygpath)
35300      input_path=`$CYGPATH -u "$shortmode_path"`
35301      new_path="$input_path"
35302    fi
35303  fi
35304
35305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35306  if test "x$test_cygdrive_prefix" = x; then
35307    # As a simple fix, exclude /usr/bin since it's not a real path.
35308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35310      # a path prefixed by /cygdrive for fixpath to work.
35311      new_path="$CYGWIN_ROOT_PATH$input_path"
35312    fi
35313  fi
35314
35315  # remove trailing .exe if any
35316  new_path="${new_path/%.exe/}"
35317
35318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35319
35320  # First separate the path from the arguments. This will split at the first
35321  # space.
35322  complete="$LD"
35323  path="${complete%% *}"
35324  tmp="$complete EOL"
35325  arguments="${tmp#* }"
35326
35327  # Input might be given as Windows format, start by converting to
35328  # unix format.
35329  new_path="$path"
35330
35331  windows_path="$new_path"
35332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35333    unix_path=`$CYGPATH -u "$windows_path"`
35334    new_path="$unix_path"
35335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35337    new_path="$unix_path"
35338  fi
35339
35340
35341  # Now try to locate executable using which
35342  new_path=`$WHICH "$new_path" 2> /dev/null`
35343
35344  if test "x$new_path" = x; then
35345    # Oops. Which didn't find the executable.
35346    # The splitting of arguments from the executable at a space might have been incorrect,
35347    # since paths with space are more likely in Windows. Give it another try with the whole
35348    # argument.
35349    path="$complete"
35350    arguments="EOL"
35351    new_path="$path"
35352
35353  windows_path="$new_path"
35354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35355    unix_path=`$CYGPATH -u "$windows_path"`
35356    new_path="$unix_path"
35357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35359    new_path="$unix_path"
35360  fi
35361
35362
35363    new_path=`$WHICH "$new_path" 2> /dev/null`
35364    # bat and cmd files are not always considered executable in MSYS causing which
35365    # to not find them
35366    if test "x$new_path" = x \
35367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35369      new_path="$path"
35370
35371  windows_path="$new_path"
35372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35373    unix_path=`$CYGPATH -u "$windows_path"`
35374    new_path="$unix_path"
35375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35377    new_path="$unix_path"
35378  fi
35379
35380    fi
35381
35382    if test "x$new_path" = x; then
35383      # It's still not found. Now this is an unrecoverable error.
35384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35385$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35386      has_space=`$ECHO "$complete" | $GREP " "`
35387      if test "x$has_space" != x; then
35388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35390      fi
35391      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35392    fi
35393  fi
35394
35395  # Now new_path has a complete unix path to the binary
35396  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35397    # Keep paths in /bin as-is, but remove trailing .exe if any
35398    new_path="${new_path/%.exe/}"
35399    # Do not save /bin paths to all_fixpath_prefixes!
35400  else
35401    # Not in mixed or Windows style, start by that.
35402    new_path=`cmd //c echo $new_path`
35403
35404  input_path="$new_path"
35405  # Check if we need to convert this using DOS-style short mode. If the path
35406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35407  # take no chances and rewrite it.
35408  # Note: m4 eats our [], so we need to use [ and ] instead.
35409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35410  if test "x$has_forbidden_chars" != x; then
35411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35413  fi
35414
35415    # Output is in $new_path
35416
35417  windows_path="$new_path"
35418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35419    unix_path=`$CYGPATH -u "$windows_path"`
35420    new_path="$unix_path"
35421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35423    new_path="$unix_path"
35424  fi
35425
35426    # remove trailing .exe if any
35427    new_path="${new_path/%.exe/}"
35428
35429    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35430    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35431  fi
35432
35433    else
35434      # We're on a unix platform. Hooray! :)
35435      # First separate the path from the arguments. This will split at the first
35436      # space.
35437      complete="$LD"
35438      path="${complete%% *}"
35439      tmp="$complete EOL"
35440      arguments="${tmp#* }"
35441
35442      # Cannot rely on the command "which" here since it doesn't always work.
35443      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35444      if test -z "$is_absolute_path"; then
35445        # Path to executable is not absolute. Find it.
35446        IFS_save="$IFS"
35447        IFS=:
35448        for p in $PATH; do
35449          if test -f "$p/$path" && test -x "$p/$path"; then
35450            new_path="$p/$path"
35451            break
35452          fi
35453        done
35454        IFS="$IFS_save"
35455      else
35456        # This is an absolute path, we can use it without further modifications.
35457        new_path="$path"
35458      fi
35459
35460      if test "x$new_path" = x; then
35461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35462$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35463        has_space=`$ECHO "$complete" | $GREP " "`
35464        if test "x$has_space" != x; then
35465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35467        fi
35468        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35469      fi
35470    fi
35471
35472    # Now join together the path and the arguments once again
35473    if test "x$arguments" != xEOL; then
35474      new_complete="$new_path ${arguments% *}"
35475    else
35476      new_complete="$new_path"
35477    fi
35478
35479    if test "x$complete" != "x$new_complete"; then
35480      LD="$new_complete"
35481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35482$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35483    fi
35484  fi
35485
35486    # Verify that we indeed succeeded with this trick.
35487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35488$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35489    "$LD" --version > /dev/null
35490    if test $? -eq 0 ; then
35491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35492$as_echo "no" >&6; }
35493      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35494    else
35495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35496$as_echo "yes" >&6; }
35497    fi
35498    LDCXX="$LD"
35499  else
35500    # All other toolchains use the compiler to link.
35501    LD="$CC"
35502    LDCXX="$CXX"
35503  fi
35504
35505  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35506
35507
35508  #
35509  # Setup the assembler (AS)
35510  #
35511  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35512    # FIXME: should this really be solaris, or solstudio?
35513
35514
35515  # Publish this variable in the help.
35516
35517
35518  if [ -z "${AS+x}" ]; then
35519    # The variable is not set by user, try to locate tool using the code snippet
35520    for ac_prog in as
35521do
35522  # Extract the first word of "$ac_prog", so it can be a program name with args.
35523set dummy $ac_prog; ac_word=$2
35524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35525$as_echo_n "checking for $ac_word... " >&6; }
35526if ${ac_cv_path_AS+:} false; then :
35527  $as_echo_n "(cached) " >&6
35528else
35529  case $AS in
35530  [\\/]* | ?:[\\/]*)
35531  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35532  ;;
35533  *)
35534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35535for as_dir in $PATH
35536do
35537  IFS=$as_save_IFS
35538  test -z "$as_dir" && as_dir=.
35539    for ac_exec_ext in '' $ac_executable_extensions; do
35540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35541    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35543    break 2
35544  fi
35545done
35546  done
35547IFS=$as_save_IFS
35548
35549  ;;
35550esac
35551fi
35552AS=$ac_cv_path_AS
35553if test -n "$AS"; then
35554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35555$as_echo "$AS" >&6; }
35556else
35557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35558$as_echo "no" >&6; }
35559fi
35560
35561
35562  test -n "$AS" && break
35563done
35564
35565  else
35566    # The variable is set, but is it from the command line or the environment?
35567
35568    # Try to remove the string !AS! from our list.
35569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35571      # If it failed, the variable was not from the command line. Ignore it,
35572      # but warn the user (except for BASH, which is always set by the calling BASH).
35573      if test "xAS" != xBASH; then
35574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35575$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35576      fi
35577      # Try to locate tool using the code snippet
35578      for ac_prog in as
35579do
35580  # Extract the first word of "$ac_prog", so it can be a program name with args.
35581set dummy $ac_prog; ac_word=$2
35582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35583$as_echo_n "checking for $ac_word... " >&6; }
35584if ${ac_cv_path_AS+:} false; then :
35585  $as_echo_n "(cached) " >&6
35586else
35587  case $AS in
35588  [\\/]* | ?:[\\/]*)
35589  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35590  ;;
35591  *)
35592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35593for as_dir in $PATH
35594do
35595  IFS=$as_save_IFS
35596  test -z "$as_dir" && as_dir=.
35597    for ac_exec_ext in '' $ac_executable_extensions; do
35598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35599    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35601    break 2
35602  fi
35603done
35604  done
35605IFS=$as_save_IFS
35606
35607  ;;
35608esac
35609fi
35610AS=$ac_cv_path_AS
35611if test -n "$AS"; then
35612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35613$as_echo "$AS" >&6; }
35614else
35615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35616$as_echo "no" >&6; }
35617fi
35618
35619
35620  test -n "$AS" && break
35621done
35622
35623    else
35624      # If it succeeded, then it was overridden by the user. We will use it
35625      # for the tool.
35626
35627      # First remove it from the list of overridden variables, so we can test
35628      # for unknown variables in the end.
35629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35630
35631      # Check if we try to supply an empty value
35632      if test "x$AS" = x; then
35633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35634$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35636$as_echo_n "checking for AS... " >&6; }
35637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35638$as_echo "disabled" >&6; }
35639      else
35640        # Check if the provided tool contains a complete path.
35641        tool_specified="$AS"
35642        tool_basename="${tool_specified##*/}"
35643        if test "x$tool_basename" = "x$tool_specified"; then
35644          # A command without a complete path is provided, search $PATH.
35645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35646$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35647          # Extract the first word of "$tool_basename", so it can be a program name with args.
35648set dummy $tool_basename; ac_word=$2
35649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35650$as_echo_n "checking for $ac_word... " >&6; }
35651if ${ac_cv_path_AS+:} false; then :
35652  $as_echo_n "(cached) " >&6
35653else
35654  case $AS in
35655  [\\/]* | ?:[\\/]*)
35656  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35657  ;;
35658  *)
35659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35660for as_dir in $PATH
35661do
35662  IFS=$as_save_IFS
35663  test -z "$as_dir" && as_dir=.
35664    for ac_exec_ext in '' $ac_executable_extensions; do
35665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35666    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35668    break 2
35669  fi
35670done
35671  done
35672IFS=$as_save_IFS
35673
35674  ;;
35675esac
35676fi
35677AS=$ac_cv_path_AS
35678if test -n "$AS"; then
35679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35680$as_echo "$AS" >&6; }
35681else
35682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35683$as_echo "no" >&6; }
35684fi
35685
35686
35687          if test "x$AS" = x; then
35688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35689          fi
35690        else
35691          # Otherwise we believe it is a complete path. Use it as it is.
35692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35693$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35695$as_echo_n "checking for AS... " >&6; }
35696          if test ! -x "$tool_specified"; then
35697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35698$as_echo "not found" >&6; }
35699            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35700          fi
35701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35702$as_echo "$tool_specified" >&6; }
35703        fi
35704      fi
35705    fi
35706
35707  fi
35708
35709
35710
35711  # Only process if variable expands to non-empty
35712
35713  if test "x$AS" != x; then
35714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35715
35716  # First separate the path from the arguments. This will split at the first
35717  # space.
35718  complete="$AS"
35719  path="${complete%% *}"
35720  tmp="$complete EOL"
35721  arguments="${tmp#* }"
35722
35723  # Input might be given as Windows format, start by converting to
35724  # unix format.
35725  new_path=`$CYGPATH -u "$path"`
35726
35727  # Now try to locate executable using which
35728  new_path=`$WHICH "$new_path" 2> /dev/null`
35729  # bat and cmd files are not always considered executable in cygwin causing which
35730  # to not find them
35731  if test "x$new_path" = x \
35732      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35733      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35734    new_path=`$CYGPATH -u "$path"`
35735  fi
35736  if test "x$new_path" = x; then
35737    # Oops. Which didn't find the executable.
35738    # The splitting of arguments from the executable at a space might have been incorrect,
35739    # since paths with space are more likely in Windows. Give it another try with the whole
35740    # argument.
35741    path="$complete"
35742    arguments="EOL"
35743    new_path=`$CYGPATH -u "$path"`
35744    new_path=`$WHICH "$new_path" 2> /dev/null`
35745    # bat and cmd files are not always considered executable in cygwin causing which
35746    # to not find them
35747    if test "x$new_path" = x \
35748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35750      new_path=`$CYGPATH -u "$path"`
35751    fi
35752    if test "x$new_path" = x; then
35753      # It's still not found. Now this is an unrecoverable error.
35754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35755$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35756      has_space=`$ECHO "$complete" | $GREP " "`
35757      if test "x$has_space" != x; then
35758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35760      fi
35761      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35762    fi
35763  fi
35764
35765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35768  # "foo.exe" is OK but "foo" is an error.
35769  #
35770  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35771  # It is also a way to make sure we got the proper file name for the real test later on.
35772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35773  if test "x$test_shortpath" = x; then
35774    # Short path failed, file does not exist as specified.
35775    # Try adding .exe or .cmd
35776    if test -f "${new_path}.exe"; then
35777      input_to_shortpath="${new_path}.exe"
35778    elif test -f "${new_path}.cmd"; then
35779      input_to_shortpath="${new_path}.cmd"
35780    else
35781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35782$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35783      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35784$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35785      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35786    fi
35787  else
35788    input_to_shortpath="$new_path"
35789  fi
35790
35791  # Call helper function which possibly converts this using DOS-style short mode.
35792  # If so, the updated path is stored in $new_path.
35793  new_path="$input_to_shortpath"
35794
35795  input_path="$input_to_shortpath"
35796  # Check if we need to convert this using DOS-style short mode. If the path
35797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35798  # take no chances and rewrite it.
35799  # Note: m4 eats our [], so we need to use [ and ] instead.
35800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35801  if test "x$has_forbidden_chars" != x; then
35802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35806      # Going to short mode and back again did indeed matter. Since short mode is
35807      # case insensitive, let's make it lowercase to improve readability.
35808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35809      # Now convert it back to Unix-style (cygpath)
35810      input_path=`$CYGPATH -u "$shortmode_path"`
35811      new_path="$input_path"
35812    fi
35813  fi
35814
35815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35816  if test "x$test_cygdrive_prefix" = x; then
35817    # As a simple fix, exclude /usr/bin since it's not a real path.
35818    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35820      # a path prefixed by /cygdrive for fixpath to work.
35821      new_path="$CYGWIN_ROOT_PATH$input_path"
35822    fi
35823  fi
35824
35825  # remove trailing .exe if any
35826  new_path="${new_path/%.exe/}"
35827
35828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35829
35830  # First separate the path from the arguments. This will split at the first
35831  # space.
35832  complete="$AS"
35833  path="${complete%% *}"
35834  tmp="$complete EOL"
35835  arguments="${tmp#* }"
35836
35837  # Input might be given as Windows format, start by converting to
35838  # unix format.
35839  new_path="$path"
35840
35841  windows_path="$new_path"
35842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35843    unix_path=`$CYGPATH -u "$windows_path"`
35844    new_path="$unix_path"
35845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35847    new_path="$unix_path"
35848  fi
35849
35850
35851  # Now try to locate executable using which
35852  new_path=`$WHICH "$new_path" 2> /dev/null`
35853
35854  if test "x$new_path" = x; then
35855    # Oops. Which didn't find the executable.
35856    # The splitting of arguments from the executable at a space might have been incorrect,
35857    # since paths with space are more likely in Windows. Give it another try with the whole
35858    # argument.
35859    path="$complete"
35860    arguments="EOL"
35861    new_path="$path"
35862
35863  windows_path="$new_path"
35864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35865    unix_path=`$CYGPATH -u "$windows_path"`
35866    new_path="$unix_path"
35867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35869    new_path="$unix_path"
35870  fi
35871
35872
35873    new_path=`$WHICH "$new_path" 2> /dev/null`
35874    # bat and cmd files are not always considered executable in MSYS causing which
35875    # to not find them
35876    if test "x$new_path" = x \
35877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35879      new_path="$path"
35880
35881  windows_path="$new_path"
35882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35883    unix_path=`$CYGPATH -u "$windows_path"`
35884    new_path="$unix_path"
35885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35887    new_path="$unix_path"
35888  fi
35889
35890    fi
35891
35892    if test "x$new_path" = x; then
35893      # It's still not found. Now this is an unrecoverable error.
35894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35895$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35896      has_space=`$ECHO "$complete" | $GREP " "`
35897      if test "x$has_space" != x; then
35898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35900      fi
35901      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35902    fi
35903  fi
35904
35905  # Now new_path has a complete unix path to the binary
35906  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35907    # Keep paths in /bin as-is, but remove trailing .exe if any
35908    new_path="${new_path/%.exe/}"
35909    # Do not save /bin paths to all_fixpath_prefixes!
35910  else
35911    # Not in mixed or Windows style, start by that.
35912    new_path=`cmd //c echo $new_path`
35913
35914  input_path="$new_path"
35915  # Check if we need to convert this using DOS-style short mode. If the path
35916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35917  # take no chances and rewrite it.
35918  # Note: m4 eats our [], so we need to use [ and ] instead.
35919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35920  if test "x$has_forbidden_chars" != x; then
35921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35923  fi
35924
35925    # Output is in $new_path
35926
35927  windows_path="$new_path"
35928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35929    unix_path=`$CYGPATH -u "$windows_path"`
35930    new_path="$unix_path"
35931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35933    new_path="$unix_path"
35934  fi
35935
35936    # remove trailing .exe if any
35937    new_path="${new_path/%.exe/}"
35938
35939    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35940    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35941  fi
35942
35943    else
35944      # We're on a unix platform. Hooray! :)
35945      # First separate the path from the arguments. This will split at the first
35946      # space.
35947      complete="$AS"
35948      path="${complete%% *}"
35949      tmp="$complete EOL"
35950      arguments="${tmp#* }"
35951
35952      # Cannot rely on the command "which" here since it doesn't always work.
35953      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35954      if test -z "$is_absolute_path"; then
35955        # Path to executable is not absolute. Find it.
35956        IFS_save="$IFS"
35957        IFS=:
35958        for p in $PATH; do
35959          if test -f "$p/$path" && test -x "$p/$path"; then
35960            new_path="$p/$path"
35961            break
35962          fi
35963        done
35964        IFS="$IFS_save"
35965      else
35966        # This is an absolute path, we can use it without further modifications.
35967        new_path="$path"
35968      fi
35969
35970      if test "x$new_path" = x; then
35971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35972$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35973        has_space=`$ECHO "$complete" | $GREP " "`
35974        if test "x$has_space" != x; then
35975          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35976$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35977        fi
35978        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35979      fi
35980    fi
35981
35982    # Now join together the path and the arguments once again
35983    if test "x$arguments" != xEOL; then
35984      new_complete="$new_path ${arguments% *}"
35985    else
35986      new_complete="$new_path"
35987    fi
35988
35989    if test "x$complete" != "x$new_complete"; then
35990      AS="$new_complete"
35991      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35992$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35993    fi
35994  fi
35995
35996  else
35997    # FIXME: is this correct for microsoft?
35998    AS="$CC -c"
35999  fi
36000
36001
36002  #
36003  # Setup the archiver (AR)
36004  #
36005  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36006    # The corresponding ar tool is lib.exe (used to create static libraries)
36007    # Extract the first word of "lib", so it can be a program name with args.
36008set dummy lib; ac_word=$2
36009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36010$as_echo_n "checking for $ac_word... " >&6; }
36011if ${ac_cv_prog_AR+:} false; then :
36012  $as_echo_n "(cached) " >&6
36013else
36014  if test -n "$AR"; then
36015  ac_cv_prog_AR="$AR" # Let the user override the test.
36016else
36017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36018for as_dir in $PATH
36019do
36020  IFS=$as_save_IFS
36021  test -z "$as_dir" && as_dir=.
36022    for ac_exec_ext in '' $ac_executable_extensions; do
36023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36024    ac_cv_prog_AR="lib"
36025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36026    break 2
36027  fi
36028done
36029  done
36030IFS=$as_save_IFS
36031
36032fi
36033fi
36034AR=$ac_cv_prog_AR
36035if test -n "$AR"; then
36036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36037$as_echo "$AR" >&6; }
36038else
36039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36040$as_echo "no" >&6; }
36041fi
36042
36043
36044  else
36045
36046
36047  # Publish this variable in the help.
36048
36049
36050  if [ -z "${AR+x}" ]; then
36051    # The variable is not set by user, try to locate tool using the code snippet
36052    if test -n "$ac_tool_prefix"; then
36053  for ac_prog in ar
36054  do
36055    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36056set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36058$as_echo_n "checking for $ac_word... " >&6; }
36059if ${ac_cv_prog_AR+:} false; then :
36060  $as_echo_n "(cached) " >&6
36061else
36062  if test -n "$AR"; then
36063  ac_cv_prog_AR="$AR" # Let the user override the test.
36064else
36065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36066for as_dir in $PATH
36067do
36068  IFS=$as_save_IFS
36069  test -z "$as_dir" && as_dir=.
36070    for ac_exec_ext in '' $ac_executable_extensions; do
36071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36072    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36074    break 2
36075  fi
36076done
36077  done
36078IFS=$as_save_IFS
36079
36080fi
36081fi
36082AR=$ac_cv_prog_AR
36083if test -n "$AR"; then
36084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36085$as_echo "$AR" >&6; }
36086else
36087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36088$as_echo "no" >&6; }
36089fi
36090
36091
36092    test -n "$AR" && break
36093  done
36094fi
36095if test -z "$AR"; then
36096  ac_ct_AR=$AR
36097  for ac_prog in ar
36098do
36099  # Extract the first word of "$ac_prog", so it can be a program name with args.
36100set dummy $ac_prog; ac_word=$2
36101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36102$as_echo_n "checking for $ac_word... " >&6; }
36103if ${ac_cv_prog_ac_ct_AR+:} false; then :
36104  $as_echo_n "(cached) " >&6
36105else
36106  if test -n "$ac_ct_AR"; then
36107  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36108else
36109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36110for as_dir in $PATH
36111do
36112  IFS=$as_save_IFS
36113  test -z "$as_dir" && as_dir=.
36114    for ac_exec_ext in '' $ac_executable_extensions; do
36115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36116    ac_cv_prog_ac_ct_AR="$ac_prog"
36117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36118    break 2
36119  fi
36120done
36121  done
36122IFS=$as_save_IFS
36123
36124fi
36125fi
36126ac_ct_AR=$ac_cv_prog_ac_ct_AR
36127if test -n "$ac_ct_AR"; then
36128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36129$as_echo "$ac_ct_AR" >&6; }
36130else
36131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36132$as_echo "no" >&6; }
36133fi
36134
36135
36136  test -n "$ac_ct_AR" && break
36137done
36138
36139  if test "x$ac_ct_AR" = x; then
36140    AR=""
36141  else
36142    case $cross_compiling:$ac_tool_warned in
36143yes:)
36144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36146ac_tool_warned=yes ;;
36147esac
36148    AR=$ac_ct_AR
36149  fi
36150fi
36151
36152  else
36153    # The variable is set, but is it from the command line or the environment?
36154
36155    # Try to remove the string !AR! from our list.
36156    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36157    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36158      # If it failed, the variable was not from the command line. Ignore it,
36159      # but warn the user (except for BASH, which is always set by the calling BASH).
36160      if test "xAR" != xBASH; then
36161        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36162$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36163      fi
36164      # Try to locate tool using the code snippet
36165      if test -n "$ac_tool_prefix"; then
36166  for ac_prog in ar
36167  do
36168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36171$as_echo_n "checking for $ac_word... " >&6; }
36172if ${ac_cv_prog_AR+:} false; then :
36173  $as_echo_n "(cached) " >&6
36174else
36175  if test -n "$AR"; then
36176  ac_cv_prog_AR="$AR" # Let the user override the test.
36177else
36178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36179for as_dir in $PATH
36180do
36181  IFS=$as_save_IFS
36182  test -z "$as_dir" && as_dir=.
36183    for ac_exec_ext in '' $ac_executable_extensions; do
36184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36185    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36187    break 2
36188  fi
36189done
36190  done
36191IFS=$as_save_IFS
36192
36193fi
36194fi
36195AR=$ac_cv_prog_AR
36196if test -n "$AR"; then
36197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36198$as_echo "$AR" >&6; }
36199else
36200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36201$as_echo "no" >&6; }
36202fi
36203
36204
36205    test -n "$AR" && break
36206  done
36207fi
36208if test -z "$AR"; then
36209  ac_ct_AR=$AR
36210  for ac_prog in ar
36211do
36212  # Extract the first word of "$ac_prog", so it can be a program name with args.
36213set dummy $ac_prog; ac_word=$2
36214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36215$as_echo_n "checking for $ac_word... " >&6; }
36216if ${ac_cv_prog_ac_ct_AR+:} false; then :
36217  $as_echo_n "(cached) " >&6
36218else
36219  if test -n "$ac_ct_AR"; then
36220  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36221else
36222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36223for as_dir in $PATH
36224do
36225  IFS=$as_save_IFS
36226  test -z "$as_dir" && as_dir=.
36227    for ac_exec_ext in '' $ac_executable_extensions; do
36228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36229    ac_cv_prog_ac_ct_AR="$ac_prog"
36230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36231    break 2
36232  fi
36233done
36234  done
36235IFS=$as_save_IFS
36236
36237fi
36238fi
36239ac_ct_AR=$ac_cv_prog_ac_ct_AR
36240if test -n "$ac_ct_AR"; then
36241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36242$as_echo "$ac_ct_AR" >&6; }
36243else
36244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36245$as_echo "no" >&6; }
36246fi
36247
36248
36249  test -n "$ac_ct_AR" && break
36250done
36251
36252  if test "x$ac_ct_AR" = x; then
36253    AR=""
36254  else
36255    case $cross_compiling:$ac_tool_warned in
36256yes:)
36257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36259ac_tool_warned=yes ;;
36260esac
36261    AR=$ac_ct_AR
36262  fi
36263fi
36264
36265    else
36266      # If it succeeded, then it was overridden by the user. We will use it
36267      # for the tool.
36268
36269      # First remove it from the list of overridden variables, so we can test
36270      # for unknown variables in the end.
36271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36272
36273      # Check if we try to supply an empty value
36274      if test "x$AR" = x; then
36275        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36276$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36278$as_echo_n "checking for AR... " >&6; }
36279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36280$as_echo "disabled" >&6; }
36281      else
36282        # Check if the provided tool contains a complete path.
36283        tool_specified="$AR"
36284        tool_basename="${tool_specified##*/}"
36285        if test "x$tool_basename" = "x$tool_specified"; then
36286          # A command without a complete path is provided, search $PATH.
36287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36288$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36289          # Extract the first word of "$tool_basename", so it can be a program name with args.
36290set dummy $tool_basename; ac_word=$2
36291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36292$as_echo_n "checking for $ac_word... " >&6; }
36293if ${ac_cv_path_AR+:} false; then :
36294  $as_echo_n "(cached) " >&6
36295else
36296  case $AR in
36297  [\\/]* | ?:[\\/]*)
36298  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36299  ;;
36300  *)
36301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36302for as_dir in $PATH
36303do
36304  IFS=$as_save_IFS
36305  test -z "$as_dir" && as_dir=.
36306    for ac_exec_ext in '' $ac_executable_extensions; do
36307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36308    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36310    break 2
36311  fi
36312done
36313  done
36314IFS=$as_save_IFS
36315
36316  ;;
36317esac
36318fi
36319AR=$ac_cv_path_AR
36320if test -n "$AR"; then
36321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36322$as_echo "$AR" >&6; }
36323else
36324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36325$as_echo "no" >&6; }
36326fi
36327
36328
36329          if test "x$AR" = x; then
36330            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36331          fi
36332        else
36333          # Otherwise we believe it is a complete path. Use it as it is.
36334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36335$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36337$as_echo_n "checking for AR... " >&6; }
36338          if test ! -x "$tool_specified"; then
36339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36340$as_echo "not found" >&6; }
36341            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36342          fi
36343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36344$as_echo "$tool_specified" >&6; }
36345        fi
36346      fi
36347    fi
36348
36349  fi
36350
36351
36352  fi
36353
36354  # Only process if variable expands to non-empty
36355
36356  if test "x$AR" != x; then
36357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36358
36359  # First separate the path from the arguments. This will split at the first
36360  # space.
36361  complete="$AR"
36362  path="${complete%% *}"
36363  tmp="$complete EOL"
36364  arguments="${tmp#* }"
36365
36366  # Input might be given as Windows format, start by converting to
36367  # unix format.
36368  new_path=`$CYGPATH -u "$path"`
36369
36370  # Now try to locate executable using which
36371  new_path=`$WHICH "$new_path" 2> /dev/null`
36372  # bat and cmd files are not always considered executable in cygwin causing which
36373  # to not find them
36374  if test "x$new_path" = x \
36375      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36376      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36377    new_path=`$CYGPATH -u "$path"`
36378  fi
36379  if test "x$new_path" = x; then
36380    # Oops. Which didn't find the executable.
36381    # The splitting of arguments from the executable at a space might have been incorrect,
36382    # since paths with space are more likely in Windows. Give it another try with the whole
36383    # argument.
36384    path="$complete"
36385    arguments="EOL"
36386    new_path=`$CYGPATH -u "$path"`
36387    new_path=`$WHICH "$new_path" 2> /dev/null`
36388    # bat and cmd files are not always considered executable in cygwin causing which
36389    # to not find them
36390    if test "x$new_path" = x \
36391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36393      new_path=`$CYGPATH -u "$path"`
36394    fi
36395    if test "x$new_path" = x; then
36396      # It's still not found. Now this is an unrecoverable error.
36397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36398$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36399      has_space=`$ECHO "$complete" | $GREP " "`
36400      if test "x$has_space" != x; then
36401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36403      fi
36404      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36405    fi
36406  fi
36407
36408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36411  # "foo.exe" is OK but "foo" is an error.
36412  #
36413  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36414  # It is also a way to make sure we got the proper file name for the real test later on.
36415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36416  if test "x$test_shortpath" = x; then
36417    # Short path failed, file does not exist as specified.
36418    # Try adding .exe or .cmd
36419    if test -f "${new_path}.exe"; then
36420      input_to_shortpath="${new_path}.exe"
36421    elif test -f "${new_path}.cmd"; then
36422      input_to_shortpath="${new_path}.cmd"
36423    else
36424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36425$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36426      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36427$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36428      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36429    fi
36430  else
36431    input_to_shortpath="$new_path"
36432  fi
36433
36434  # Call helper function which possibly converts this using DOS-style short mode.
36435  # If so, the updated path is stored in $new_path.
36436  new_path="$input_to_shortpath"
36437
36438  input_path="$input_to_shortpath"
36439  # Check if we need to convert this using DOS-style short mode. If the path
36440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36441  # take no chances and rewrite it.
36442  # Note: m4 eats our [], so we need to use [ and ] instead.
36443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36444  if test "x$has_forbidden_chars" != x; then
36445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36449      # Going to short mode and back again did indeed matter. Since short mode is
36450      # case insensitive, let's make it lowercase to improve readability.
36451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36452      # Now convert it back to Unix-style (cygpath)
36453      input_path=`$CYGPATH -u "$shortmode_path"`
36454      new_path="$input_path"
36455    fi
36456  fi
36457
36458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36459  if test "x$test_cygdrive_prefix" = x; then
36460    # As a simple fix, exclude /usr/bin since it's not a real path.
36461    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36463      # a path prefixed by /cygdrive for fixpath to work.
36464      new_path="$CYGWIN_ROOT_PATH$input_path"
36465    fi
36466  fi
36467
36468  # remove trailing .exe if any
36469  new_path="${new_path/%.exe/}"
36470
36471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36472
36473  # First separate the path from the arguments. This will split at the first
36474  # space.
36475  complete="$AR"
36476  path="${complete%% *}"
36477  tmp="$complete EOL"
36478  arguments="${tmp#* }"
36479
36480  # Input might be given as Windows format, start by converting to
36481  # unix format.
36482  new_path="$path"
36483
36484  windows_path="$new_path"
36485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36486    unix_path=`$CYGPATH -u "$windows_path"`
36487    new_path="$unix_path"
36488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36490    new_path="$unix_path"
36491  fi
36492
36493
36494  # Now try to locate executable using which
36495  new_path=`$WHICH "$new_path" 2> /dev/null`
36496
36497  if test "x$new_path" = x; then
36498    # Oops. Which didn't find the executable.
36499    # The splitting of arguments from the executable at a space might have been incorrect,
36500    # since paths with space are more likely in Windows. Give it another try with the whole
36501    # argument.
36502    path="$complete"
36503    arguments="EOL"
36504    new_path="$path"
36505
36506  windows_path="$new_path"
36507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36508    unix_path=`$CYGPATH -u "$windows_path"`
36509    new_path="$unix_path"
36510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36512    new_path="$unix_path"
36513  fi
36514
36515
36516    new_path=`$WHICH "$new_path" 2> /dev/null`
36517    # bat and cmd files are not always considered executable in MSYS causing which
36518    # to not find them
36519    if test "x$new_path" = x \
36520        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36521        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36522      new_path="$path"
36523
36524  windows_path="$new_path"
36525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36526    unix_path=`$CYGPATH -u "$windows_path"`
36527    new_path="$unix_path"
36528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36530    new_path="$unix_path"
36531  fi
36532
36533    fi
36534
36535    if test "x$new_path" = x; then
36536      # It's still not found. Now this is an unrecoverable error.
36537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36538$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36539      has_space=`$ECHO "$complete" | $GREP " "`
36540      if test "x$has_space" != x; then
36541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36543      fi
36544      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36545    fi
36546  fi
36547
36548  # Now new_path has a complete unix path to the binary
36549  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36550    # Keep paths in /bin as-is, but remove trailing .exe if any
36551    new_path="${new_path/%.exe/}"
36552    # Do not save /bin paths to all_fixpath_prefixes!
36553  else
36554    # Not in mixed or Windows style, start by that.
36555    new_path=`cmd //c echo $new_path`
36556
36557  input_path="$new_path"
36558  # Check if we need to convert this using DOS-style short mode. If the path
36559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36560  # take no chances and rewrite it.
36561  # Note: m4 eats our [], so we need to use [ and ] instead.
36562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36563  if test "x$has_forbidden_chars" != x; then
36564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36566  fi
36567
36568    # Output is in $new_path
36569
36570  windows_path="$new_path"
36571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36572    unix_path=`$CYGPATH -u "$windows_path"`
36573    new_path="$unix_path"
36574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36576    new_path="$unix_path"
36577  fi
36578
36579    # remove trailing .exe if any
36580    new_path="${new_path/%.exe/}"
36581
36582    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36583    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36584  fi
36585
36586    else
36587      # We're on a unix platform. Hooray! :)
36588      # First separate the path from the arguments. This will split at the first
36589      # space.
36590      complete="$AR"
36591      path="${complete%% *}"
36592      tmp="$complete EOL"
36593      arguments="${tmp#* }"
36594
36595      # Cannot rely on the command "which" here since it doesn't always work.
36596      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36597      if test -z "$is_absolute_path"; then
36598        # Path to executable is not absolute. Find it.
36599        IFS_save="$IFS"
36600        IFS=:
36601        for p in $PATH; do
36602          if test -f "$p/$path" && test -x "$p/$path"; then
36603            new_path="$p/$path"
36604            break
36605          fi
36606        done
36607        IFS="$IFS_save"
36608      else
36609        # This is an absolute path, we can use it without further modifications.
36610        new_path="$path"
36611      fi
36612
36613      if test "x$new_path" = x; then
36614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36615$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36616        has_space=`$ECHO "$complete" | $GREP " "`
36617        if test "x$has_space" != x; then
36618          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36619$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36620        fi
36621        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36622      fi
36623    fi
36624
36625    # Now join together the path and the arguments once again
36626    if test "x$arguments" != xEOL; then
36627      new_complete="$new_path ${arguments% *}"
36628    else
36629      new_complete="$new_path"
36630    fi
36631
36632    if test "x$complete" != "x$new_complete"; then
36633      AR="$new_complete"
36634      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36635$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36636    fi
36637  fi
36638
36639
36640
36641  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36642
36643
36644  # Publish this variable in the help.
36645
36646
36647  if [ -z "${LIPO+x}" ]; then
36648    # The variable is not set by user, try to locate tool using the code snippet
36649    for ac_prog in lipo
36650do
36651  # Extract the first word of "$ac_prog", so it can be a program name with args.
36652set dummy $ac_prog; ac_word=$2
36653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36654$as_echo_n "checking for $ac_word... " >&6; }
36655if ${ac_cv_path_LIPO+:} false; then :
36656  $as_echo_n "(cached) " >&6
36657else
36658  case $LIPO in
36659  [\\/]* | ?:[\\/]*)
36660  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36661  ;;
36662  *)
36663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36664for as_dir in $PATH
36665do
36666  IFS=$as_save_IFS
36667  test -z "$as_dir" && as_dir=.
36668    for ac_exec_ext in '' $ac_executable_extensions; do
36669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36670    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36672    break 2
36673  fi
36674done
36675  done
36676IFS=$as_save_IFS
36677
36678  ;;
36679esac
36680fi
36681LIPO=$ac_cv_path_LIPO
36682if test -n "$LIPO"; then
36683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36684$as_echo "$LIPO" >&6; }
36685else
36686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36687$as_echo "no" >&6; }
36688fi
36689
36690
36691  test -n "$LIPO" && break
36692done
36693
36694  else
36695    # The variable is set, but is it from the command line or the environment?
36696
36697    # Try to remove the string !LIPO! from our list.
36698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36700      # If it failed, the variable was not from the command line. Ignore it,
36701      # but warn the user (except for BASH, which is always set by the calling BASH).
36702      if test "xLIPO" != xBASH; then
36703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36704$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36705      fi
36706      # Try to locate tool using the code snippet
36707      for ac_prog in lipo
36708do
36709  # Extract the first word of "$ac_prog", so it can be a program name with args.
36710set dummy $ac_prog; ac_word=$2
36711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36712$as_echo_n "checking for $ac_word... " >&6; }
36713if ${ac_cv_path_LIPO+:} false; then :
36714  $as_echo_n "(cached) " >&6
36715else
36716  case $LIPO in
36717  [\\/]* | ?:[\\/]*)
36718  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36719  ;;
36720  *)
36721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36722for as_dir in $PATH
36723do
36724  IFS=$as_save_IFS
36725  test -z "$as_dir" && as_dir=.
36726    for ac_exec_ext in '' $ac_executable_extensions; do
36727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36728    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36730    break 2
36731  fi
36732done
36733  done
36734IFS=$as_save_IFS
36735
36736  ;;
36737esac
36738fi
36739LIPO=$ac_cv_path_LIPO
36740if test -n "$LIPO"; then
36741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36742$as_echo "$LIPO" >&6; }
36743else
36744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36745$as_echo "no" >&6; }
36746fi
36747
36748
36749  test -n "$LIPO" && break
36750done
36751
36752    else
36753      # If it succeeded, then it was overridden by the user. We will use it
36754      # for the tool.
36755
36756      # First remove it from the list of overridden variables, so we can test
36757      # for unknown variables in the end.
36758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36759
36760      # Check if we try to supply an empty value
36761      if test "x$LIPO" = x; then
36762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36763$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36765$as_echo_n "checking for LIPO... " >&6; }
36766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36767$as_echo "disabled" >&6; }
36768      else
36769        # Check if the provided tool contains a complete path.
36770        tool_specified="$LIPO"
36771        tool_basename="${tool_specified##*/}"
36772        if test "x$tool_basename" = "x$tool_specified"; then
36773          # A command without a complete path is provided, search $PATH.
36774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36775$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36776          # Extract the first word of "$tool_basename", so it can be a program name with args.
36777set dummy $tool_basename; ac_word=$2
36778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36779$as_echo_n "checking for $ac_word... " >&6; }
36780if ${ac_cv_path_LIPO+:} false; then :
36781  $as_echo_n "(cached) " >&6
36782else
36783  case $LIPO in
36784  [\\/]* | ?:[\\/]*)
36785  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36786  ;;
36787  *)
36788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36789for as_dir in $PATH
36790do
36791  IFS=$as_save_IFS
36792  test -z "$as_dir" && as_dir=.
36793    for ac_exec_ext in '' $ac_executable_extensions; do
36794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36795    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36797    break 2
36798  fi
36799done
36800  done
36801IFS=$as_save_IFS
36802
36803  ;;
36804esac
36805fi
36806LIPO=$ac_cv_path_LIPO
36807if test -n "$LIPO"; then
36808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36809$as_echo "$LIPO" >&6; }
36810else
36811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36812$as_echo "no" >&6; }
36813fi
36814
36815
36816          if test "x$LIPO" = x; then
36817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36818          fi
36819        else
36820          # Otherwise we believe it is a complete path. Use it as it is.
36821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36822$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36824$as_echo_n "checking for LIPO... " >&6; }
36825          if test ! -x "$tool_specified"; then
36826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36827$as_echo "not found" >&6; }
36828            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36829          fi
36830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36831$as_echo "$tool_specified" >&6; }
36832        fi
36833      fi
36834    fi
36835
36836  fi
36837
36838
36839
36840  # Only process if variable expands to non-empty
36841
36842  if test "x$LIPO" != x; then
36843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36844
36845  # First separate the path from the arguments. This will split at the first
36846  # space.
36847  complete="$LIPO"
36848  path="${complete%% *}"
36849  tmp="$complete EOL"
36850  arguments="${tmp#* }"
36851
36852  # Input might be given as Windows format, start by converting to
36853  # unix format.
36854  new_path=`$CYGPATH -u "$path"`
36855
36856  # Now try to locate executable using which
36857  new_path=`$WHICH "$new_path" 2> /dev/null`
36858  # bat and cmd files are not always considered executable in cygwin causing which
36859  # to not find them
36860  if test "x$new_path" = x \
36861      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36862      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36863    new_path=`$CYGPATH -u "$path"`
36864  fi
36865  if test "x$new_path" = x; then
36866    # Oops. Which didn't find the executable.
36867    # The splitting of arguments from the executable at a space might have been incorrect,
36868    # since paths with space are more likely in Windows. Give it another try with the whole
36869    # argument.
36870    path="$complete"
36871    arguments="EOL"
36872    new_path=`$CYGPATH -u "$path"`
36873    new_path=`$WHICH "$new_path" 2> /dev/null`
36874    # bat and cmd files are not always considered executable in cygwin causing which
36875    # to not find them
36876    if test "x$new_path" = x \
36877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36879      new_path=`$CYGPATH -u "$path"`
36880    fi
36881    if test "x$new_path" = x; then
36882      # It's still not found. Now this is an unrecoverable error.
36883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36884$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36885      has_space=`$ECHO "$complete" | $GREP " "`
36886      if test "x$has_space" != x; then
36887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36889      fi
36890      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36891    fi
36892  fi
36893
36894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36897  # "foo.exe" is OK but "foo" is an error.
36898  #
36899  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36900  # It is also a way to make sure we got the proper file name for the real test later on.
36901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36902  if test "x$test_shortpath" = x; then
36903    # Short path failed, file does not exist as specified.
36904    # Try adding .exe or .cmd
36905    if test -f "${new_path}.exe"; then
36906      input_to_shortpath="${new_path}.exe"
36907    elif test -f "${new_path}.cmd"; then
36908      input_to_shortpath="${new_path}.cmd"
36909    else
36910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36911$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36912      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36913$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36914      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36915    fi
36916  else
36917    input_to_shortpath="$new_path"
36918  fi
36919
36920  # Call helper function which possibly converts this using DOS-style short mode.
36921  # If so, the updated path is stored in $new_path.
36922  new_path="$input_to_shortpath"
36923
36924  input_path="$input_to_shortpath"
36925  # Check if we need to convert this using DOS-style short mode. If the path
36926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36927  # take no chances and rewrite it.
36928  # Note: m4 eats our [], so we need to use [ and ] instead.
36929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36930  if test "x$has_forbidden_chars" != x; then
36931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36935      # Going to short mode and back again did indeed matter. Since short mode is
36936      # case insensitive, let's make it lowercase to improve readability.
36937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36938      # Now convert it back to Unix-style (cygpath)
36939      input_path=`$CYGPATH -u "$shortmode_path"`
36940      new_path="$input_path"
36941    fi
36942  fi
36943
36944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36945  if test "x$test_cygdrive_prefix" = x; then
36946    # As a simple fix, exclude /usr/bin since it's not a real path.
36947    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36949      # a path prefixed by /cygdrive for fixpath to work.
36950      new_path="$CYGWIN_ROOT_PATH$input_path"
36951    fi
36952  fi
36953
36954  # remove trailing .exe if any
36955  new_path="${new_path/%.exe/}"
36956
36957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36958
36959  # First separate the path from the arguments. This will split at the first
36960  # space.
36961  complete="$LIPO"
36962  path="${complete%% *}"
36963  tmp="$complete EOL"
36964  arguments="${tmp#* }"
36965
36966  # Input might be given as Windows format, start by converting to
36967  # unix format.
36968  new_path="$path"
36969
36970  windows_path="$new_path"
36971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36972    unix_path=`$CYGPATH -u "$windows_path"`
36973    new_path="$unix_path"
36974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36976    new_path="$unix_path"
36977  fi
36978
36979
36980  # Now try to locate executable using which
36981  new_path=`$WHICH "$new_path" 2> /dev/null`
36982
36983  if test "x$new_path" = x; then
36984    # Oops. Which didn't find the executable.
36985    # The splitting of arguments from the executable at a space might have been incorrect,
36986    # since paths with space are more likely in Windows. Give it another try with the whole
36987    # argument.
36988    path="$complete"
36989    arguments="EOL"
36990    new_path="$path"
36991
36992  windows_path="$new_path"
36993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994    unix_path=`$CYGPATH -u "$windows_path"`
36995    new_path="$unix_path"
36996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998    new_path="$unix_path"
36999  fi
37000
37001
37002    new_path=`$WHICH "$new_path" 2> /dev/null`
37003    # bat and cmd files are not always considered executable in MSYS causing which
37004    # to not find them
37005    if test "x$new_path" = x \
37006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37008      new_path="$path"
37009
37010  windows_path="$new_path"
37011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37012    unix_path=`$CYGPATH -u "$windows_path"`
37013    new_path="$unix_path"
37014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37016    new_path="$unix_path"
37017  fi
37018
37019    fi
37020
37021    if test "x$new_path" = x; then
37022      # It's still not found. Now this is an unrecoverable error.
37023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37024$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37025      has_space=`$ECHO "$complete" | $GREP " "`
37026      if test "x$has_space" != x; then
37027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37029      fi
37030      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37031    fi
37032  fi
37033
37034  # Now new_path has a complete unix path to the binary
37035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37036    # Keep paths in /bin as-is, but remove trailing .exe if any
37037    new_path="${new_path/%.exe/}"
37038    # Do not save /bin paths to all_fixpath_prefixes!
37039  else
37040    # Not in mixed or Windows style, start by that.
37041    new_path=`cmd //c echo $new_path`
37042
37043  input_path="$new_path"
37044  # Check if we need to convert this using DOS-style short mode. If the path
37045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37046  # take no chances and rewrite it.
37047  # Note: m4 eats our [], so we need to use [ and ] instead.
37048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37049  if test "x$has_forbidden_chars" != x; then
37050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37052  fi
37053
37054    # Output is in $new_path
37055
37056  windows_path="$new_path"
37057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37058    unix_path=`$CYGPATH -u "$windows_path"`
37059    new_path="$unix_path"
37060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37062    new_path="$unix_path"
37063  fi
37064
37065    # remove trailing .exe if any
37066    new_path="${new_path/%.exe/}"
37067
37068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37070  fi
37071
37072    else
37073      # We're on a unix platform. Hooray! :)
37074      # First separate the path from the arguments. This will split at the first
37075      # space.
37076      complete="$LIPO"
37077      path="${complete%% *}"
37078      tmp="$complete EOL"
37079      arguments="${tmp#* }"
37080
37081      # Cannot rely on the command "which" here since it doesn't always work.
37082      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37083      if test -z "$is_absolute_path"; then
37084        # Path to executable is not absolute. Find it.
37085        IFS_save="$IFS"
37086        IFS=:
37087        for p in $PATH; do
37088          if test -f "$p/$path" && test -x "$p/$path"; then
37089            new_path="$p/$path"
37090            break
37091          fi
37092        done
37093        IFS="$IFS_save"
37094      else
37095        # This is an absolute path, we can use it without further modifications.
37096        new_path="$path"
37097      fi
37098
37099      if test "x$new_path" = x; then
37100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37101$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37102        has_space=`$ECHO "$complete" | $GREP " "`
37103        if test "x$has_space" != x; then
37104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37106        fi
37107        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37108      fi
37109    fi
37110
37111    # Now join together the path and the arguments once again
37112    if test "x$arguments" != xEOL; then
37113      new_complete="$new_path ${arguments% *}"
37114    else
37115      new_complete="$new_path"
37116    fi
37117
37118    if test "x$complete" != "x$new_complete"; then
37119      LIPO="$new_complete"
37120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37121$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37122    fi
37123  fi
37124
37125  fi
37126
37127  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37128    # Extract the first word of "mt", so it can be a program name with args.
37129set dummy mt; ac_word=$2
37130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37131$as_echo_n "checking for $ac_word... " >&6; }
37132if ${ac_cv_prog_MT+:} false; then :
37133  $as_echo_n "(cached) " >&6
37134else
37135  if test -n "$MT"; then
37136  ac_cv_prog_MT="$MT" # Let the user override the test.
37137else
37138  ac_prog_rejected=no
37139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37140for as_dir in $PATH
37141do
37142  IFS=$as_save_IFS
37143  test -z "$as_dir" && as_dir=.
37144    for ac_exec_ext in '' $ac_executable_extensions; do
37145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37146    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37147       ac_prog_rejected=yes
37148       continue
37149     fi
37150    ac_cv_prog_MT="mt"
37151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37152    break 2
37153  fi
37154done
37155  done
37156IFS=$as_save_IFS
37157
37158if test $ac_prog_rejected = yes; then
37159  # We found a bogon in the path, so make sure we never use it.
37160  set dummy $ac_cv_prog_MT
37161  shift
37162  if test $# != 0; then
37163    # We chose a different compiler from the bogus one.
37164    # However, it has the same basename, so the bogon will be chosen
37165    # first if we set MT to just the basename; use the full file name.
37166    shift
37167    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37168  fi
37169fi
37170fi
37171fi
37172MT=$ac_cv_prog_MT
37173if test -n "$MT"; then
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37175$as_echo "$MT" >&6; }
37176else
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37178$as_echo "no" >&6; }
37179fi
37180
37181
37182
37183  # Only process if variable expands to non-empty
37184
37185  if test "x$MT" != x; then
37186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37187
37188  # First separate the path from the arguments. This will split at the first
37189  # space.
37190  complete="$MT"
37191  path="${complete%% *}"
37192  tmp="$complete EOL"
37193  arguments="${tmp#* }"
37194
37195  # Input might be given as Windows format, start by converting to
37196  # unix format.
37197  new_path=`$CYGPATH -u "$path"`
37198
37199  # Now try to locate executable using which
37200  new_path=`$WHICH "$new_path" 2> /dev/null`
37201  # bat and cmd files are not always considered executable in cygwin causing which
37202  # to not find them
37203  if test "x$new_path" = x \
37204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37206    new_path=`$CYGPATH -u "$path"`
37207  fi
37208  if test "x$new_path" = x; then
37209    # Oops. Which didn't find the executable.
37210    # The splitting of arguments from the executable at a space might have been incorrect,
37211    # since paths with space are more likely in Windows. Give it another try with the whole
37212    # argument.
37213    path="$complete"
37214    arguments="EOL"
37215    new_path=`$CYGPATH -u "$path"`
37216    new_path=`$WHICH "$new_path" 2> /dev/null`
37217    # bat and cmd files are not always considered executable in cygwin causing which
37218    # to not find them
37219    if test "x$new_path" = x \
37220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37222      new_path=`$CYGPATH -u "$path"`
37223    fi
37224    if test "x$new_path" = x; then
37225      # It's still not found. Now this is an unrecoverable error.
37226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37227$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37228      has_space=`$ECHO "$complete" | $GREP " "`
37229      if test "x$has_space" != x; then
37230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37232      fi
37233      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37234    fi
37235  fi
37236
37237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37240  # "foo.exe" is OK but "foo" is an error.
37241  #
37242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37243  # It is also a way to make sure we got the proper file name for the real test later on.
37244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37245  if test "x$test_shortpath" = x; then
37246    # Short path failed, file does not exist as specified.
37247    # Try adding .exe or .cmd
37248    if test -f "${new_path}.exe"; then
37249      input_to_shortpath="${new_path}.exe"
37250    elif test -f "${new_path}.cmd"; then
37251      input_to_shortpath="${new_path}.cmd"
37252    else
37253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37254$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37257      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37258    fi
37259  else
37260    input_to_shortpath="$new_path"
37261  fi
37262
37263  # Call helper function which possibly converts this using DOS-style short mode.
37264  # If so, the updated path is stored in $new_path.
37265  new_path="$input_to_shortpath"
37266
37267  input_path="$input_to_shortpath"
37268  # Check if we need to convert this using DOS-style short mode. If the path
37269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37270  # take no chances and rewrite it.
37271  # Note: m4 eats our [], so we need to use [ and ] instead.
37272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37273  if test "x$has_forbidden_chars" != x; then
37274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37278      # Going to short mode and back again did indeed matter. Since short mode is
37279      # case insensitive, let's make it lowercase to improve readability.
37280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37281      # Now convert it back to Unix-style (cygpath)
37282      input_path=`$CYGPATH -u "$shortmode_path"`
37283      new_path="$input_path"
37284    fi
37285  fi
37286
37287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37288  if test "x$test_cygdrive_prefix" = x; then
37289    # As a simple fix, exclude /usr/bin since it's not a real path.
37290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37292      # a path prefixed by /cygdrive for fixpath to work.
37293      new_path="$CYGWIN_ROOT_PATH$input_path"
37294    fi
37295  fi
37296
37297  # remove trailing .exe if any
37298  new_path="${new_path/%.exe/}"
37299
37300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37301
37302  # First separate the path from the arguments. This will split at the first
37303  # space.
37304  complete="$MT"
37305  path="${complete%% *}"
37306  tmp="$complete EOL"
37307  arguments="${tmp#* }"
37308
37309  # Input might be given as Windows format, start by converting to
37310  # unix format.
37311  new_path="$path"
37312
37313  windows_path="$new_path"
37314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37315    unix_path=`$CYGPATH -u "$windows_path"`
37316    new_path="$unix_path"
37317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37319    new_path="$unix_path"
37320  fi
37321
37322
37323  # Now try to locate executable using which
37324  new_path=`$WHICH "$new_path" 2> /dev/null`
37325
37326  if test "x$new_path" = x; then
37327    # Oops. Which didn't find the executable.
37328    # The splitting of arguments from the executable at a space might have been incorrect,
37329    # since paths with space are more likely in Windows. Give it another try with the whole
37330    # argument.
37331    path="$complete"
37332    arguments="EOL"
37333    new_path="$path"
37334
37335  windows_path="$new_path"
37336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37337    unix_path=`$CYGPATH -u "$windows_path"`
37338    new_path="$unix_path"
37339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37341    new_path="$unix_path"
37342  fi
37343
37344
37345    new_path=`$WHICH "$new_path" 2> /dev/null`
37346    # bat and cmd files are not always considered executable in MSYS causing which
37347    # to not find them
37348    if test "x$new_path" = x \
37349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37351      new_path="$path"
37352
37353  windows_path="$new_path"
37354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37355    unix_path=`$CYGPATH -u "$windows_path"`
37356    new_path="$unix_path"
37357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37359    new_path="$unix_path"
37360  fi
37361
37362    fi
37363
37364    if test "x$new_path" = x; then
37365      # It's still not found. Now this is an unrecoverable error.
37366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37367$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37368      has_space=`$ECHO "$complete" | $GREP " "`
37369      if test "x$has_space" != x; then
37370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37372      fi
37373      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37374    fi
37375  fi
37376
37377  # Now new_path has a complete unix path to the binary
37378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37379    # Keep paths in /bin as-is, but remove trailing .exe if any
37380    new_path="${new_path/%.exe/}"
37381    # Do not save /bin paths to all_fixpath_prefixes!
37382  else
37383    # Not in mixed or Windows style, start by that.
37384    new_path=`cmd //c echo $new_path`
37385
37386  input_path="$new_path"
37387  # Check if we need to convert this using DOS-style short mode. If the path
37388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37389  # take no chances and rewrite it.
37390  # Note: m4 eats our [], so we need to use [ and ] instead.
37391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37392  if test "x$has_forbidden_chars" != x; then
37393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37395  fi
37396
37397    # Output is in $new_path
37398
37399  windows_path="$new_path"
37400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37401    unix_path=`$CYGPATH -u "$windows_path"`
37402    new_path="$unix_path"
37403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37405    new_path="$unix_path"
37406  fi
37407
37408    # remove trailing .exe if any
37409    new_path="${new_path/%.exe/}"
37410
37411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37413  fi
37414
37415    else
37416      # We're on a unix platform. Hooray! :)
37417      # First separate the path from the arguments. This will split at the first
37418      # space.
37419      complete="$MT"
37420      path="${complete%% *}"
37421      tmp="$complete EOL"
37422      arguments="${tmp#* }"
37423
37424      # Cannot rely on the command "which" here since it doesn't always work.
37425      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37426      if test -z "$is_absolute_path"; then
37427        # Path to executable is not absolute. Find it.
37428        IFS_save="$IFS"
37429        IFS=:
37430        for p in $PATH; do
37431          if test -f "$p/$path" && test -x "$p/$path"; then
37432            new_path="$p/$path"
37433            break
37434          fi
37435        done
37436        IFS="$IFS_save"
37437      else
37438        # This is an absolute path, we can use it without further modifications.
37439        new_path="$path"
37440      fi
37441
37442      if test "x$new_path" = x; then
37443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37444$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37445        has_space=`$ECHO "$complete" | $GREP " "`
37446        if test "x$has_space" != x; then
37447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37449        fi
37450        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37451      fi
37452    fi
37453
37454    # Now join together the path and the arguments once again
37455    if test "x$arguments" != xEOL; then
37456      new_complete="$new_path ${arguments% *}"
37457    else
37458      new_complete="$new_path"
37459    fi
37460
37461    if test "x$complete" != "x$new_complete"; then
37462      MT="$new_complete"
37463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37464$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37465    fi
37466  fi
37467
37468    # Setup the resource compiler (RC)
37469    # Extract the first word of "rc", so it can be a program name with args.
37470set dummy rc; ac_word=$2
37471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37472$as_echo_n "checking for $ac_word... " >&6; }
37473if ${ac_cv_prog_RC+:} false; then :
37474  $as_echo_n "(cached) " >&6
37475else
37476  if test -n "$RC"; then
37477  ac_cv_prog_RC="$RC" # Let the user override the test.
37478else
37479  ac_prog_rejected=no
37480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37481for as_dir in $PATH
37482do
37483  IFS=$as_save_IFS
37484  test -z "$as_dir" && as_dir=.
37485    for ac_exec_ext in '' $ac_executable_extensions; do
37486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37487    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37488       ac_prog_rejected=yes
37489       continue
37490     fi
37491    ac_cv_prog_RC="rc"
37492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37493    break 2
37494  fi
37495done
37496  done
37497IFS=$as_save_IFS
37498
37499if test $ac_prog_rejected = yes; then
37500  # We found a bogon in the path, so make sure we never use it.
37501  set dummy $ac_cv_prog_RC
37502  shift
37503  if test $# != 0; then
37504    # We chose a different compiler from the bogus one.
37505    # However, it has the same basename, so the bogon will be chosen
37506    # first if we set RC to just the basename; use the full file name.
37507    shift
37508    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37509  fi
37510fi
37511fi
37512fi
37513RC=$ac_cv_prog_RC
37514if test -n "$RC"; then
37515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37516$as_echo "$RC" >&6; }
37517else
37518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37519$as_echo "no" >&6; }
37520fi
37521
37522
37523
37524  # Only process if variable expands to non-empty
37525
37526  if test "x$RC" != x; then
37527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37528
37529  # First separate the path from the arguments. This will split at the first
37530  # space.
37531  complete="$RC"
37532  path="${complete%% *}"
37533  tmp="$complete EOL"
37534  arguments="${tmp#* }"
37535
37536  # Input might be given as Windows format, start by converting to
37537  # unix format.
37538  new_path=`$CYGPATH -u "$path"`
37539
37540  # Now try to locate executable using which
37541  new_path=`$WHICH "$new_path" 2> /dev/null`
37542  # bat and cmd files are not always considered executable in cygwin causing which
37543  # to not find them
37544  if test "x$new_path" = x \
37545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37547    new_path=`$CYGPATH -u "$path"`
37548  fi
37549  if test "x$new_path" = x; then
37550    # Oops. Which didn't find the executable.
37551    # The splitting of arguments from the executable at a space might have been incorrect,
37552    # since paths with space are more likely in Windows. Give it another try with the whole
37553    # argument.
37554    path="$complete"
37555    arguments="EOL"
37556    new_path=`$CYGPATH -u "$path"`
37557    new_path=`$WHICH "$new_path" 2> /dev/null`
37558    # bat and cmd files are not always considered executable in cygwin causing which
37559    # to not find them
37560    if test "x$new_path" = x \
37561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37563      new_path=`$CYGPATH -u "$path"`
37564    fi
37565    if test "x$new_path" = x; then
37566      # It's still not found. Now this is an unrecoverable error.
37567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37568$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37569      has_space=`$ECHO "$complete" | $GREP " "`
37570      if test "x$has_space" != x; then
37571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37573      fi
37574      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37575    fi
37576  fi
37577
37578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37581  # "foo.exe" is OK but "foo" is an error.
37582  #
37583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37584  # It is also a way to make sure we got the proper file name for the real test later on.
37585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37586  if test "x$test_shortpath" = x; then
37587    # Short path failed, file does not exist as specified.
37588    # Try adding .exe or .cmd
37589    if test -f "${new_path}.exe"; then
37590      input_to_shortpath="${new_path}.exe"
37591    elif test -f "${new_path}.cmd"; then
37592      input_to_shortpath="${new_path}.cmd"
37593    else
37594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37595$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37598      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37599    fi
37600  else
37601    input_to_shortpath="$new_path"
37602  fi
37603
37604  # Call helper function which possibly converts this using DOS-style short mode.
37605  # If so, the updated path is stored in $new_path.
37606  new_path="$input_to_shortpath"
37607
37608  input_path="$input_to_shortpath"
37609  # Check if we need to convert this using DOS-style short mode. If the path
37610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37611  # take no chances and rewrite it.
37612  # Note: m4 eats our [], so we need to use [ and ] instead.
37613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37614  if test "x$has_forbidden_chars" != x; then
37615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37619      # Going to short mode and back again did indeed matter. Since short mode is
37620      # case insensitive, let's make it lowercase to improve readability.
37621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37622      # Now convert it back to Unix-style (cygpath)
37623      input_path=`$CYGPATH -u "$shortmode_path"`
37624      new_path="$input_path"
37625    fi
37626  fi
37627
37628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37629  if test "x$test_cygdrive_prefix" = x; then
37630    # As a simple fix, exclude /usr/bin since it's not a real path.
37631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37633      # a path prefixed by /cygdrive for fixpath to work.
37634      new_path="$CYGWIN_ROOT_PATH$input_path"
37635    fi
37636  fi
37637
37638  # remove trailing .exe if any
37639  new_path="${new_path/%.exe/}"
37640
37641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37642
37643  # First separate the path from the arguments. This will split at the first
37644  # space.
37645  complete="$RC"
37646  path="${complete%% *}"
37647  tmp="$complete EOL"
37648  arguments="${tmp#* }"
37649
37650  # Input might be given as Windows format, start by converting to
37651  # unix format.
37652  new_path="$path"
37653
37654  windows_path="$new_path"
37655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37656    unix_path=`$CYGPATH -u "$windows_path"`
37657    new_path="$unix_path"
37658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37660    new_path="$unix_path"
37661  fi
37662
37663
37664  # Now try to locate executable using which
37665  new_path=`$WHICH "$new_path" 2> /dev/null`
37666
37667  if test "x$new_path" = x; then
37668    # Oops. Which didn't find the executable.
37669    # The splitting of arguments from the executable at a space might have been incorrect,
37670    # since paths with space are more likely in Windows. Give it another try with the whole
37671    # argument.
37672    path="$complete"
37673    arguments="EOL"
37674    new_path="$path"
37675
37676  windows_path="$new_path"
37677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37678    unix_path=`$CYGPATH -u "$windows_path"`
37679    new_path="$unix_path"
37680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37682    new_path="$unix_path"
37683  fi
37684
37685
37686    new_path=`$WHICH "$new_path" 2> /dev/null`
37687    # bat and cmd files are not always considered executable in MSYS causing which
37688    # to not find them
37689    if test "x$new_path" = x \
37690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37692      new_path="$path"
37693
37694  windows_path="$new_path"
37695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37696    unix_path=`$CYGPATH -u "$windows_path"`
37697    new_path="$unix_path"
37698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37700    new_path="$unix_path"
37701  fi
37702
37703    fi
37704
37705    if test "x$new_path" = x; then
37706      # It's still not found. Now this is an unrecoverable error.
37707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37708$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37709      has_space=`$ECHO "$complete" | $GREP " "`
37710      if test "x$has_space" != x; then
37711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37713      fi
37714      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37715    fi
37716  fi
37717
37718  # Now new_path has a complete unix path to the binary
37719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37720    # Keep paths in /bin as-is, but remove trailing .exe if any
37721    new_path="${new_path/%.exe/}"
37722    # Do not save /bin paths to all_fixpath_prefixes!
37723  else
37724    # Not in mixed or Windows style, start by that.
37725    new_path=`cmd //c echo $new_path`
37726
37727  input_path="$new_path"
37728  # Check if we need to convert this using DOS-style short mode. If the path
37729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37730  # take no chances and rewrite it.
37731  # Note: m4 eats our [], so we need to use [ and ] instead.
37732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37733  if test "x$has_forbidden_chars" != x; then
37734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37736  fi
37737
37738    # Output is in $new_path
37739
37740  windows_path="$new_path"
37741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37742    unix_path=`$CYGPATH -u "$windows_path"`
37743    new_path="$unix_path"
37744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37746    new_path="$unix_path"
37747  fi
37748
37749    # remove trailing .exe if any
37750    new_path="${new_path/%.exe/}"
37751
37752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37754  fi
37755
37756    else
37757      # We're on a unix platform. Hooray! :)
37758      # First separate the path from the arguments. This will split at the first
37759      # space.
37760      complete="$RC"
37761      path="${complete%% *}"
37762      tmp="$complete EOL"
37763      arguments="${tmp#* }"
37764
37765      # Cannot rely on the command "which" here since it doesn't always work.
37766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37767      if test -z "$is_absolute_path"; then
37768        # Path to executable is not absolute. Find it.
37769        IFS_save="$IFS"
37770        IFS=:
37771        for p in $PATH; do
37772          if test -f "$p/$path" && test -x "$p/$path"; then
37773            new_path="$p/$path"
37774            break
37775          fi
37776        done
37777        IFS="$IFS_save"
37778      else
37779        # This is an absolute path, we can use it without further modifications.
37780        new_path="$path"
37781      fi
37782
37783      if test "x$new_path" = x; then
37784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37785$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37786        has_space=`$ECHO "$complete" | $GREP " "`
37787        if test "x$has_space" != x; then
37788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37790        fi
37791        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37792      fi
37793    fi
37794
37795    # Now join together the path and the arguments once again
37796    if test "x$arguments" != xEOL; then
37797      new_complete="$new_path ${arguments% *}"
37798    else
37799      new_complete="$new_path"
37800    fi
37801
37802    if test "x$complete" != "x$new_complete"; then
37803      RC="$new_complete"
37804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37805$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37806    fi
37807  fi
37808
37809    # Extract the first word of "dumpbin", so it can be a program name with args.
37810set dummy dumpbin; ac_word=$2
37811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37812$as_echo_n "checking for $ac_word... " >&6; }
37813if ${ac_cv_prog_DUMPBIN+:} false; then :
37814  $as_echo_n "(cached) " >&6
37815else
37816  if test -n "$DUMPBIN"; then
37817  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37818else
37819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37820for as_dir in $PATH
37821do
37822  IFS=$as_save_IFS
37823  test -z "$as_dir" && as_dir=.
37824    for ac_exec_ext in '' $ac_executable_extensions; do
37825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37826    ac_cv_prog_DUMPBIN="dumpbin"
37827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37828    break 2
37829  fi
37830done
37831  done
37832IFS=$as_save_IFS
37833
37834fi
37835fi
37836DUMPBIN=$ac_cv_prog_DUMPBIN
37837if test -n "$DUMPBIN"; then
37838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37839$as_echo "$DUMPBIN" >&6; }
37840else
37841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37842$as_echo "no" >&6; }
37843fi
37844
37845
37846
37847  # Only process if variable expands to non-empty
37848
37849  if test "x$DUMPBIN" != x; then
37850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37851
37852  # First separate the path from the arguments. This will split at the first
37853  # space.
37854  complete="$DUMPBIN"
37855  path="${complete%% *}"
37856  tmp="$complete EOL"
37857  arguments="${tmp#* }"
37858
37859  # Input might be given as Windows format, start by converting to
37860  # unix format.
37861  new_path=`$CYGPATH -u "$path"`
37862
37863  # Now try to locate executable using which
37864  new_path=`$WHICH "$new_path" 2> /dev/null`
37865  # bat and cmd files are not always considered executable in cygwin causing which
37866  # to not find them
37867  if test "x$new_path" = x \
37868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37870    new_path=`$CYGPATH -u "$path"`
37871  fi
37872  if test "x$new_path" = x; then
37873    # Oops. Which didn't find the executable.
37874    # The splitting of arguments from the executable at a space might have been incorrect,
37875    # since paths with space are more likely in Windows. Give it another try with the whole
37876    # argument.
37877    path="$complete"
37878    arguments="EOL"
37879    new_path=`$CYGPATH -u "$path"`
37880    new_path=`$WHICH "$new_path" 2> /dev/null`
37881    # bat and cmd files are not always considered executable in cygwin causing which
37882    # to not find them
37883    if test "x$new_path" = x \
37884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37886      new_path=`$CYGPATH -u "$path"`
37887    fi
37888    if test "x$new_path" = x; then
37889      # It's still not found. Now this is an unrecoverable error.
37890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37891$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37892      has_space=`$ECHO "$complete" | $GREP " "`
37893      if test "x$has_space" != x; then
37894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37896      fi
37897      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37898    fi
37899  fi
37900
37901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37904  # "foo.exe" is OK but "foo" is an error.
37905  #
37906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37907  # It is also a way to make sure we got the proper file name for the real test later on.
37908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37909  if test "x$test_shortpath" = x; then
37910    # Short path failed, file does not exist as specified.
37911    # Try adding .exe or .cmd
37912    if test -f "${new_path}.exe"; then
37913      input_to_shortpath="${new_path}.exe"
37914    elif test -f "${new_path}.cmd"; then
37915      input_to_shortpath="${new_path}.cmd"
37916    else
37917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37918$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37921      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37922    fi
37923  else
37924    input_to_shortpath="$new_path"
37925  fi
37926
37927  # Call helper function which possibly converts this using DOS-style short mode.
37928  # If so, the updated path is stored in $new_path.
37929  new_path="$input_to_shortpath"
37930
37931  input_path="$input_to_shortpath"
37932  # Check if we need to convert this using DOS-style short mode. If the path
37933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37934  # take no chances and rewrite it.
37935  # Note: m4 eats our [], so we need to use [ and ] instead.
37936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37937  if test "x$has_forbidden_chars" != x; then
37938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37942      # Going to short mode and back again did indeed matter. Since short mode is
37943      # case insensitive, let's make it lowercase to improve readability.
37944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37945      # Now convert it back to Unix-style (cygpath)
37946      input_path=`$CYGPATH -u "$shortmode_path"`
37947      new_path="$input_path"
37948    fi
37949  fi
37950
37951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37952  if test "x$test_cygdrive_prefix" = x; then
37953    # As a simple fix, exclude /usr/bin since it's not a real path.
37954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37956      # a path prefixed by /cygdrive for fixpath to work.
37957      new_path="$CYGWIN_ROOT_PATH$input_path"
37958    fi
37959  fi
37960
37961  # remove trailing .exe if any
37962  new_path="${new_path/%.exe/}"
37963
37964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37965
37966  # First separate the path from the arguments. This will split at the first
37967  # space.
37968  complete="$DUMPBIN"
37969  path="${complete%% *}"
37970  tmp="$complete EOL"
37971  arguments="${tmp#* }"
37972
37973  # Input might be given as Windows format, start by converting to
37974  # unix format.
37975  new_path="$path"
37976
37977  windows_path="$new_path"
37978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37979    unix_path=`$CYGPATH -u "$windows_path"`
37980    new_path="$unix_path"
37981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37983    new_path="$unix_path"
37984  fi
37985
37986
37987  # Now try to locate executable using which
37988  new_path=`$WHICH "$new_path" 2> /dev/null`
37989
37990  if test "x$new_path" = x; then
37991    # Oops. Which didn't find the executable.
37992    # The splitting of arguments from the executable at a space might have been incorrect,
37993    # since paths with space are more likely in Windows. Give it another try with the whole
37994    # argument.
37995    path="$complete"
37996    arguments="EOL"
37997    new_path="$path"
37998
37999  windows_path="$new_path"
38000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38001    unix_path=`$CYGPATH -u "$windows_path"`
38002    new_path="$unix_path"
38003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38005    new_path="$unix_path"
38006  fi
38007
38008
38009    new_path=`$WHICH "$new_path" 2> /dev/null`
38010    # bat and cmd files are not always considered executable in MSYS causing which
38011    # to not find them
38012    if test "x$new_path" = x \
38013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38015      new_path="$path"
38016
38017  windows_path="$new_path"
38018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38019    unix_path=`$CYGPATH -u "$windows_path"`
38020    new_path="$unix_path"
38021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38023    new_path="$unix_path"
38024  fi
38025
38026    fi
38027
38028    if test "x$new_path" = x; then
38029      # It's still not found. Now this is an unrecoverable error.
38030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38031$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38032      has_space=`$ECHO "$complete" | $GREP " "`
38033      if test "x$has_space" != x; then
38034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38036      fi
38037      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38038    fi
38039  fi
38040
38041  # Now new_path has a complete unix path to the binary
38042  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38043    # Keep paths in /bin as-is, but remove trailing .exe if any
38044    new_path="${new_path/%.exe/}"
38045    # Do not save /bin paths to all_fixpath_prefixes!
38046  else
38047    # Not in mixed or Windows style, start by that.
38048    new_path=`cmd //c echo $new_path`
38049
38050  input_path="$new_path"
38051  # Check if we need to convert this using DOS-style short mode. If the path
38052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38053  # take no chances and rewrite it.
38054  # Note: m4 eats our [], so we need to use [ and ] instead.
38055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38056  if test "x$has_forbidden_chars" != x; then
38057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38059  fi
38060
38061    # Output is in $new_path
38062
38063  windows_path="$new_path"
38064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38065    unix_path=`$CYGPATH -u "$windows_path"`
38066    new_path="$unix_path"
38067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38069    new_path="$unix_path"
38070  fi
38071
38072    # remove trailing .exe if any
38073    new_path="${new_path/%.exe/}"
38074
38075    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38076    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38077  fi
38078
38079    else
38080      # We're on a unix platform. Hooray! :)
38081      # First separate the path from the arguments. This will split at the first
38082      # space.
38083      complete="$DUMPBIN"
38084      path="${complete%% *}"
38085      tmp="$complete EOL"
38086      arguments="${tmp#* }"
38087
38088      # Cannot rely on the command "which" here since it doesn't always work.
38089      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38090      if test -z "$is_absolute_path"; then
38091        # Path to executable is not absolute. Find it.
38092        IFS_save="$IFS"
38093        IFS=:
38094        for p in $PATH; do
38095          if test -f "$p/$path" && test -x "$p/$path"; then
38096            new_path="$p/$path"
38097            break
38098          fi
38099        done
38100        IFS="$IFS_save"
38101      else
38102        # This is an absolute path, we can use it without further modifications.
38103        new_path="$path"
38104      fi
38105
38106      if test "x$new_path" = x; then
38107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38108$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38109        has_space=`$ECHO "$complete" | $GREP " "`
38110        if test "x$has_space" != x; then
38111          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38113        fi
38114        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38115      fi
38116    fi
38117
38118    # Now join together the path and the arguments once again
38119    if test "x$arguments" != xEOL; then
38120      new_complete="$new_path ${arguments% *}"
38121    else
38122      new_complete="$new_path"
38123    fi
38124
38125    if test "x$complete" != "x$new_complete"; then
38126      DUMPBIN="$new_complete"
38127      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38128$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38129    fi
38130  fi
38131
38132    # We need to check for 'msbuild.exe' because at the place where we expect to
38133    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38134    # won't find the 'msbuild.exe' executable in that case (and the
38135    # 'ac_executable_extensions' is unusable due to performance reasons).
38136    # Notice that we intentionally don't fix up the path to MSBUILD because we
38137    # will call it in a DOS shell during freetype detection on Windows (see
38138    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38139    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38140set dummy msbuild.exe; ac_word=$2
38141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38142$as_echo_n "checking for $ac_word... " >&6; }
38143if ${ac_cv_prog_MSBUILD+:} false; then :
38144  $as_echo_n "(cached) " >&6
38145else
38146  if test -n "$MSBUILD"; then
38147  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38148else
38149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38150for as_dir in $PATH
38151do
38152  IFS=$as_save_IFS
38153  test -z "$as_dir" && as_dir=.
38154    for ac_exec_ext in '' $ac_executable_extensions; do
38155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38156    ac_cv_prog_MSBUILD="msbuild.exe"
38157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38158    break 2
38159  fi
38160done
38161  done
38162IFS=$as_save_IFS
38163
38164fi
38165fi
38166MSBUILD=$ac_cv_prog_MSBUILD
38167if test -n "$MSBUILD"; then
38168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38169$as_echo "$MSBUILD" >&6; }
38170else
38171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38172$as_echo "no" >&6; }
38173fi
38174
38175
38176  fi
38177
38178  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38179
38180
38181  # Publish this variable in the help.
38182
38183
38184  if [ -z "${STRIP+x}" ]; then
38185    # The variable is not set by user, try to locate tool using the code snippet
38186    for ac_prog in strip
38187do
38188  # Extract the first word of "$ac_prog", so it can be a program name with args.
38189set dummy $ac_prog; ac_word=$2
38190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38191$as_echo_n "checking for $ac_word... " >&6; }
38192if ${ac_cv_path_STRIP+:} false; then :
38193  $as_echo_n "(cached) " >&6
38194else
38195  case $STRIP in
38196  [\\/]* | ?:[\\/]*)
38197  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38198  ;;
38199  *)
38200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38201for as_dir in $PATH
38202do
38203  IFS=$as_save_IFS
38204  test -z "$as_dir" && as_dir=.
38205    for ac_exec_ext in '' $ac_executable_extensions; do
38206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38207    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38209    break 2
38210  fi
38211done
38212  done
38213IFS=$as_save_IFS
38214
38215  ;;
38216esac
38217fi
38218STRIP=$ac_cv_path_STRIP
38219if test -n "$STRIP"; then
38220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38221$as_echo "$STRIP" >&6; }
38222else
38223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38224$as_echo "no" >&6; }
38225fi
38226
38227
38228  test -n "$STRIP" && break
38229done
38230
38231  else
38232    # The variable is set, but is it from the command line or the environment?
38233
38234    # Try to remove the string !STRIP! from our list.
38235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38237      # If it failed, the variable was not from the command line. Ignore it,
38238      # but warn the user (except for BASH, which is always set by the calling BASH).
38239      if test "xSTRIP" != xBASH; then
38240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38241$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38242      fi
38243      # Try to locate tool using the code snippet
38244      for ac_prog in strip
38245do
38246  # Extract the first word of "$ac_prog", so it can be a program name with args.
38247set dummy $ac_prog; ac_word=$2
38248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38249$as_echo_n "checking for $ac_word... " >&6; }
38250if ${ac_cv_path_STRIP+:} false; then :
38251  $as_echo_n "(cached) " >&6
38252else
38253  case $STRIP in
38254  [\\/]* | ?:[\\/]*)
38255  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38256  ;;
38257  *)
38258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38259for as_dir in $PATH
38260do
38261  IFS=$as_save_IFS
38262  test -z "$as_dir" && as_dir=.
38263    for ac_exec_ext in '' $ac_executable_extensions; do
38264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38265    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38267    break 2
38268  fi
38269done
38270  done
38271IFS=$as_save_IFS
38272
38273  ;;
38274esac
38275fi
38276STRIP=$ac_cv_path_STRIP
38277if test -n "$STRIP"; then
38278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38279$as_echo "$STRIP" >&6; }
38280else
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38282$as_echo "no" >&6; }
38283fi
38284
38285
38286  test -n "$STRIP" && break
38287done
38288
38289    else
38290      # If it succeeded, then it was overridden by the user. We will use it
38291      # for the tool.
38292
38293      # First remove it from the list of overridden variables, so we can test
38294      # for unknown variables in the end.
38295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38296
38297      # Check if we try to supply an empty value
38298      if test "x$STRIP" = x; then
38299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38300$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38302$as_echo_n "checking for STRIP... " >&6; }
38303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38304$as_echo "disabled" >&6; }
38305      else
38306        # Check if the provided tool contains a complete path.
38307        tool_specified="$STRIP"
38308        tool_basename="${tool_specified##*/}"
38309        if test "x$tool_basename" = "x$tool_specified"; then
38310          # A command without a complete path is provided, search $PATH.
38311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38312$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38313          # Extract the first word of "$tool_basename", so it can be a program name with args.
38314set dummy $tool_basename; ac_word=$2
38315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38316$as_echo_n "checking for $ac_word... " >&6; }
38317if ${ac_cv_path_STRIP+:} false; then :
38318  $as_echo_n "(cached) " >&6
38319else
38320  case $STRIP in
38321  [\\/]* | ?:[\\/]*)
38322  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38323  ;;
38324  *)
38325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38326for as_dir in $PATH
38327do
38328  IFS=$as_save_IFS
38329  test -z "$as_dir" && as_dir=.
38330    for ac_exec_ext in '' $ac_executable_extensions; do
38331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38332    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38334    break 2
38335  fi
38336done
38337  done
38338IFS=$as_save_IFS
38339
38340  ;;
38341esac
38342fi
38343STRIP=$ac_cv_path_STRIP
38344if test -n "$STRIP"; then
38345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38346$as_echo "$STRIP" >&6; }
38347else
38348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38349$as_echo "no" >&6; }
38350fi
38351
38352
38353          if test "x$STRIP" = x; then
38354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38355          fi
38356        else
38357          # Otherwise we believe it is a complete path. Use it as it is.
38358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38359$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38361$as_echo_n "checking for STRIP... " >&6; }
38362          if test ! -x "$tool_specified"; then
38363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38364$as_echo "not found" >&6; }
38365            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38366          fi
38367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38368$as_echo "$tool_specified" >&6; }
38369        fi
38370      fi
38371    fi
38372
38373  fi
38374
38375
38376
38377  # Only process if variable expands to non-empty
38378
38379  if test "x$STRIP" != x; then
38380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38381
38382  # First separate the path from the arguments. This will split at the first
38383  # space.
38384  complete="$STRIP"
38385  path="${complete%% *}"
38386  tmp="$complete EOL"
38387  arguments="${tmp#* }"
38388
38389  # Input might be given as Windows format, start by converting to
38390  # unix format.
38391  new_path=`$CYGPATH -u "$path"`
38392
38393  # Now try to locate executable using which
38394  new_path=`$WHICH "$new_path" 2> /dev/null`
38395  # bat and cmd files are not always considered executable in cygwin causing which
38396  # to not find them
38397  if test "x$new_path" = x \
38398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38400    new_path=`$CYGPATH -u "$path"`
38401  fi
38402  if test "x$new_path" = x; then
38403    # Oops. Which didn't find the executable.
38404    # The splitting of arguments from the executable at a space might have been incorrect,
38405    # since paths with space are more likely in Windows. Give it another try with the whole
38406    # argument.
38407    path="$complete"
38408    arguments="EOL"
38409    new_path=`$CYGPATH -u "$path"`
38410    new_path=`$WHICH "$new_path" 2> /dev/null`
38411    # bat and cmd files are not always considered executable in cygwin causing which
38412    # to not find them
38413    if test "x$new_path" = x \
38414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38416      new_path=`$CYGPATH -u "$path"`
38417    fi
38418    if test "x$new_path" = x; then
38419      # It's still not found. Now this is an unrecoverable error.
38420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38421$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38422      has_space=`$ECHO "$complete" | $GREP " "`
38423      if test "x$has_space" != x; then
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38426      fi
38427      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38428    fi
38429  fi
38430
38431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38434  # "foo.exe" is OK but "foo" is an error.
38435  #
38436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38437  # It is also a way to make sure we got the proper file name for the real test later on.
38438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38439  if test "x$test_shortpath" = x; then
38440    # Short path failed, file does not exist as specified.
38441    # Try adding .exe or .cmd
38442    if test -f "${new_path}.exe"; then
38443      input_to_shortpath="${new_path}.exe"
38444    elif test -f "${new_path}.cmd"; then
38445      input_to_shortpath="${new_path}.cmd"
38446    else
38447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38448$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38451      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38452    fi
38453  else
38454    input_to_shortpath="$new_path"
38455  fi
38456
38457  # Call helper function which possibly converts this using DOS-style short mode.
38458  # If so, the updated path is stored in $new_path.
38459  new_path="$input_to_shortpath"
38460
38461  input_path="$input_to_shortpath"
38462  # Check if we need to convert this using DOS-style short mode. If the path
38463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38464  # take no chances and rewrite it.
38465  # Note: m4 eats our [], so we need to use [ and ] instead.
38466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38467  if test "x$has_forbidden_chars" != x; then
38468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38472      # Going to short mode and back again did indeed matter. Since short mode is
38473      # case insensitive, let's make it lowercase to improve readability.
38474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38475      # Now convert it back to Unix-style (cygpath)
38476      input_path=`$CYGPATH -u "$shortmode_path"`
38477      new_path="$input_path"
38478    fi
38479  fi
38480
38481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38482  if test "x$test_cygdrive_prefix" = x; then
38483    # As a simple fix, exclude /usr/bin since it's not a real path.
38484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38486      # a path prefixed by /cygdrive for fixpath to work.
38487      new_path="$CYGWIN_ROOT_PATH$input_path"
38488    fi
38489  fi
38490
38491  # remove trailing .exe if any
38492  new_path="${new_path/%.exe/}"
38493
38494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38495
38496  # First separate the path from the arguments. This will split at the first
38497  # space.
38498  complete="$STRIP"
38499  path="${complete%% *}"
38500  tmp="$complete EOL"
38501  arguments="${tmp#* }"
38502
38503  # Input might be given as Windows format, start by converting to
38504  # unix format.
38505  new_path="$path"
38506
38507  windows_path="$new_path"
38508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38509    unix_path=`$CYGPATH -u "$windows_path"`
38510    new_path="$unix_path"
38511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38513    new_path="$unix_path"
38514  fi
38515
38516
38517  # Now try to locate executable using which
38518  new_path=`$WHICH "$new_path" 2> /dev/null`
38519
38520  if test "x$new_path" = x; then
38521    # Oops. Which didn't find the executable.
38522    # The splitting of arguments from the executable at a space might have been incorrect,
38523    # since paths with space are more likely in Windows. Give it another try with the whole
38524    # argument.
38525    path="$complete"
38526    arguments="EOL"
38527    new_path="$path"
38528
38529  windows_path="$new_path"
38530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38531    unix_path=`$CYGPATH -u "$windows_path"`
38532    new_path="$unix_path"
38533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38535    new_path="$unix_path"
38536  fi
38537
38538
38539    new_path=`$WHICH "$new_path" 2> /dev/null`
38540    # bat and cmd files are not always considered executable in MSYS causing which
38541    # to not find them
38542    if test "x$new_path" = x \
38543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38545      new_path="$path"
38546
38547  windows_path="$new_path"
38548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38549    unix_path=`$CYGPATH -u "$windows_path"`
38550    new_path="$unix_path"
38551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38553    new_path="$unix_path"
38554  fi
38555
38556    fi
38557
38558    if test "x$new_path" = x; then
38559      # It's still not found. Now this is an unrecoverable error.
38560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38561$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38562      has_space=`$ECHO "$complete" | $GREP " "`
38563      if test "x$has_space" != x; then
38564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38566      fi
38567      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38568    fi
38569  fi
38570
38571  # Now new_path has a complete unix path to the binary
38572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38573    # Keep paths in /bin as-is, but remove trailing .exe if any
38574    new_path="${new_path/%.exe/}"
38575    # Do not save /bin paths to all_fixpath_prefixes!
38576  else
38577    # Not in mixed or Windows style, start by that.
38578    new_path=`cmd //c echo $new_path`
38579
38580  input_path="$new_path"
38581  # Check if we need to convert this using DOS-style short mode. If the path
38582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38583  # take no chances and rewrite it.
38584  # Note: m4 eats our [], so we need to use [ and ] instead.
38585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38586  if test "x$has_forbidden_chars" != x; then
38587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38589  fi
38590
38591    # Output is in $new_path
38592
38593  windows_path="$new_path"
38594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38595    unix_path=`$CYGPATH -u "$windows_path"`
38596    new_path="$unix_path"
38597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38599    new_path="$unix_path"
38600  fi
38601
38602    # remove trailing .exe if any
38603    new_path="${new_path/%.exe/}"
38604
38605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38607  fi
38608
38609    else
38610      # We're on a unix platform. Hooray! :)
38611      # First separate the path from the arguments. This will split at the first
38612      # space.
38613      complete="$STRIP"
38614      path="${complete%% *}"
38615      tmp="$complete EOL"
38616      arguments="${tmp#* }"
38617
38618      # Cannot rely on the command "which" here since it doesn't always work.
38619      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38620      if test -z "$is_absolute_path"; then
38621        # Path to executable is not absolute. Find it.
38622        IFS_save="$IFS"
38623        IFS=:
38624        for p in $PATH; do
38625          if test -f "$p/$path" && test -x "$p/$path"; then
38626            new_path="$p/$path"
38627            break
38628          fi
38629        done
38630        IFS="$IFS_save"
38631      else
38632        # This is an absolute path, we can use it without further modifications.
38633        new_path="$path"
38634      fi
38635
38636      if test "x$new_path" = x; then
38637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38638$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38639        has_space=`$ECHO "$complete" | $GREP " "`
38640        if test "x$has_space" != x; then
38641          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38643        fi
38644        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38645      fi
38646    fi
38647
38648    # Now join together the path and the arguments once again
38649    if test "x$arguments" != xEOL; then
38650      new_complete="$new_path ${arguments% *}"
38651    else
38652      new_complete="$new_path"
38653    fi
38654
38655    if test "x$complete" != "x$new_complete"; then
38656      STRIP="$new_complete"
38657      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38658$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38659    fi
38660  fi
38661
38662
38663
38664  # Publish this variable in the help.
38665
38666
38667  if [ -z "${NM+x}" ]; then
38668    # The variable is not set by user, try to locate tool using the code snippet
38669    for ac_prog in nm
38670do
38671  # Extract the first word of "$ac_prog", so it can be a program name with args.
38672set dummy $ac_prog; ac_word=$2
38673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38674$as_echo_n "checking for $ac_word... " >&6; }
38675if ${ac_cv_path_NM+:} false; then :
38676  $as_echo_n "(cached) " >&6
38677else
38678  case $NM in
38679  [\\/]* | ?:[\\/]*)
38680  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38681  ;;
38682  *)
38683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38684for as_dir in $PATH
38685do
38686  IFS=$as_save_IFS
38687  test -z "$as_dir" && as_dir=.
38688    for ac_exec_ext in '' $ac_executable_extensions; do
38689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38690    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38692    break 2
38693  fi
38694done
38695  done
38696IFS=$as_save_IFS
38697
38698  ;;
38699esac
38700fi
38701NM=$ac_cv_path_NM
38702if test -n "$NM"; then
38703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38704$as_echo "$NM" >&6; }
38705else
38706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38707$as_echo "no" >&6; }
38708fi
38709
38710
38711  test -n "$NM" && break
38712done
38713
38714  else
38715    # The variable is set, but is it from the command line or the environment?
38716
38717    # Try to remove the string !NM! from our list.
38718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38720      # If it failed, the variable was not from the command line. Ignore it,
38721      # but warn the user (except for BASH, which is always set by the calling BASH).
38722      if test "xNM" != xBASH; then
38723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38724$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38725      fi
38726      # Try to locate tool using the code snippet
38727      for ac_prog in nm
38728do
38729  # Extract the first word of "$ac_prog", so it can be a program name with args.
38730set dummy $ac_prog; ac_word=$2
38731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38732$as_echo_n "checking for $ac_word... " >&6; }
38733if ${ac_cv_path_NM+:} false; then :
38734  $as_echo_n "(cached) " >&6
38735else
38736  case $NM in
38737  [\\/]* | ?:[\\/]*)
38738  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38739  ;;
38740  *)
38741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38742for as_dir in $PATH
38743do
38744  IFS=$as_save_IFS
38745  test -z "$as_dir" && as_dir=.
38746    for ac_exec_ext in '' $ac_executable_extensions; do
38747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38748    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38750    break 2
38751  fi
38752done
38753  done
38754IFS=$as_save_IFS
38755
38756  ;;
38757esac
38758fi
38759NM=$ac_cv_path_NM
38760if test -n "$NM"; then
38761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38762$as_echo "$NM" >&6; }
38763else
38764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38765$as_echo "no" >&6; }
38766fi
38767
38768
38769  test -n "$NM" && break
38770done
38771
38772    else
38773      # If it succeeded, then it was overridden by the user. We will use it
38774      # for the tool.
38775
38776      # First remove it from the list of overridden variables, so we can test
38777      # for unknown variables in the end.
38778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38779
38780      # Check if we try to supply an empty value
38781      if test "x$NM" = x; then
38782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38783$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38785$as_echo_n "checking for NM... " >&6; }
38786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38787$as_echo "disabled" >&6; }
38788      else
38789        # Check if the provided tool contains a complete path.
38790        tool_specified="$NM"
38791        tool_basename="${tool_specified##*/}"
38792        if test "x$tool_basename" = "x$tool_specified"; then
38793          # A command without a complete path is provided, search $PATH.
38794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38795$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38796          # Extract the first word of "$tool_basename", so it can be a program name with args.
38797set dummy $tool_basename; ac_word=$2
38798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38799$as_echo_n "checking for $ac_word... " >&6; }
38800if ${ac_cv_path_NM+:} false; then :
38801  $as_echo_n "(cached) " >&6
38802else
38803  case $NM in
38804  [\\/]* | ?:[\\/]*)
38805  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38806  ;;
38807  *)
38808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38809for as_dir in $PATH
38810do
38811  IFS=$as_save_IFS
38812  test -z "$as_dir" && as_dir=.
38813    for ac_exec_ext in '' $ac_executable_extensions; do
38814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38815    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38817    break 2
38818  fi
38819done
38820  done
38821IFS=$as_save_IFS
38822
38823  ;;
38824esac
38825fi
38826NM=$ac_cv_path_NM
38827if test -n "$NM"; then
38828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38829$as_echo "$NM" >&6; }
38830else
38831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38832$as_echo "no" >&6; }
38833fi
38834
38835
38836          if test "x$NM" = x; then
38837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38838          fi
38839        else
38840          # Otherwise we believe it is a complete path. Use it as it is.
38841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38842$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38844$as_echo_n "checking for NM... " >&6; }
38845          if test ! -x "$tool_specified"; then
38846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38847$as_echo "not found" >&6; }
38848            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38849          fi
38850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38851$as_echo "$tool_specified" >&6; }
38852        fi
38853      fi
38854    fi
38855
38856  fi
38857
38858
38859
38860  # Only process if variable expands to non-empty
38861
38862  if test "x$NM" != x; then
38863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38864
38865  # First separate the path from the arguments. This will split at the first
38866  # space.
38867  complete="$NM"
38868  path="${complete%% *}"
38869  tmp="$complete EOL"
38870  arguments="${tmp#* }"
38871
38872  # Input might be given as Windows format, start by converting to
38873  # unix format.
38874  new_path=`$CYGPATH -u "$path"`
38875
38876  # Now try to locate executable using which
38877  new_path=`$WHICH "$new_path" 2> /dev/null`
38878  # bat and cmd files are not always considered executable in cygwin causing which
38879  # to not find them
38880  if test "x$new_path" = x \
38881      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38882      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38883    new_path=`$CYGPATH -u "$path"`
38884  fi
38885  if test "x$new_path" = x; then
38886    # Oops. Which didn't find the executable.
38887    # The splitting of arguments from the executable at a space might have been incorrect,
38888    # since paths with space are more likely in Windows. Give it another try with the whole
38889    # argument.
38890    path="$complete"
38891    arguments="EOL"
38892    new_path=`$CYGPATH -u "$path"`
38893    new_path=`$WHICH "$new_path" 2> /dev/null`
38894    # bat and cmd files are not always considered executable in cygwin causing which
38895    # to not find them
38896    if test "x$new_path" = x \
38897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38899      new_path=`$CYGPATH -u "$path"`
38900    fi
38901    if test "x$new_path" = x; then
38902      # It's still not found. Now this is an unrecoverable error.
38903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38904$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38905      has_space=`$ECHO "$complete" | $GREP " "`
38906      if test "x$has_space" != x; then
38907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38909      fi
38910      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38911    fi
38912  fi
38913
38914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38917  # "foo.exe" is OK but "foo" is an error.
38918  #
38919  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38920  # It is also a way to make sure we got the proper file name for the real test later on.
38921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38922  if test "x$test_shortpath" = x; then
38923    # Short path failed, file does not exist as specified.
38924    # Try adding .exe or .cmd
38925    if test -f "${new_path}.exe"; then
38926      input_to_shortpath="${new_path}.exe"
38927    elif test -f "${new_path}.cmd"; then
38928      input_to_shortpath="${new_path}.cmd"
38929    else
38930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38931$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38932      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38933$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38934      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38935    fi
38936  else
38937    input_to_shortpath="$new_path"
38938  fi
38939
38940  # Call helper function which possibly converts this using DOS-style short mode.
38941  # If so, the updated path is stored in $new_path.
38942  new_path="$input_to_shortpath"
38943
38944  input_path="$input_to_shortpath"
38945  # Check if we need to convert this using DOS-style short mode. If the path
38946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38947  # take no chances and rewrite it.
38948  # Note: m4 eats our [], so we need to use [ and ] instead.
38949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38950  if test "x$has_forbidden_chars" != x; then
38951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38955      # Going to short mode and back again did indeed matter. Since short mode is
38956      # case insensitive, let's make it lowercase to improve readability.
38957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38958      # Now convert it back to Unix-style (cygpath)
38959      input_path=`$CYGPATH -u "$shortmode_path"`
38960      new_path="$input_path"
38961    fi
38962  fi
38963
38964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38965  if test "x$test_cygdrive_prefix" = x; then
38966    # As a simple fix, exclude /usr/bin since it's not a real path.
38967    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38969      # a path prefixed by /cygdrive for fixpath to work.
38970      new_path="$CYGWIN_ROOT_PATH$input_path"
38971    fi
38972  fi
38973
38974  # remove trailing .exe if any
38975  new_path="${new_path/%.exe/}"
38976
38977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38978
38979  # First separate the path from the arguments. This will split at the first
38980  # space.
38981  complete="$NM"
38982  path="${complete%% *}"
38983  tmp="$complete EOL"
38984  arguments="${tmp#* }"
38985
38986  # Input might be given as Windows format, start by converting to
38987  # unix format.
38988  new_path="$path"
38989
38990  windows_path="$new_path"
38991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38992    unix_path=`$CYGPATH -u "$windows_path"`
38993    new_path="$unix_path"
38994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38996    new_path="$unix_path"
38997  fi
38998
38999
39000  # Now try to locate executable using which
39001  new_path=`$WHICH "$new_path" 2> /dev/null`
39002
39003  if test "x$new_path" = x; then
39004    # Oops. Which didn't find the executable.
39005    # The splitting of arguments from the executable at a space might have been incorrect,
39006    # since paths with space are more likely in Windows. Give it another try with the whole
39007    # argument.
39008    path="$complete"
39009    arguments="EOL"
39010    new_path="$path"
39011
39012  windows_path="$new_path"
39013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39014    unix_path=`$CYGPATH -u "$windows_path"`
39015    new_path="$unix_path"
39016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39018    new_path="$unix_path"
39019  fi
39020
39021
39022    new_path=`$WHICH "$new_path" 2> /dev/null`
39023    # bat and cmd files are not always considered executable in MSYS causing which
39024    # to not find them
39025    if test "x$new_path" = x \
39026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39028      new_path="$path"
39029
39030  windows_path="$new_path"
39031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39032    unix_path=`$CYGPATH -u "$windows_path"`
39033    new_path="$unix_path"
39034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39036    new_path="$unix_path"
39037  fi
39038
39039    fi
39040
39041    if test "x$new_path" = x; then
39042      # It's still not found. Now this is an unrecoverable error.
39043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39045      has_space=`$ECHO "$complete" | $GREP " "`
39046      if test "x$has_space" != x; then
39047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39049      fi
39050      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39051    fi
39052  fi
39053
39054  # Now new_path has a complete unix path to the binary
39055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39056    # Keep paths in /bin as-is, but remove trailing .exe if any
39057    new_path="${new_path/%.exe/}"
39058    # Do not save /bin paths to all_fixpath_prefixes!
39059  else
39060    # Not in mixed or Windows style, start by that.
39061    new_path=`cmd //c echo $new_path`
39062
39063  input_path="$new_path"
39064  # Check if we need to convert this using DOS-style short mode. If the path
39065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39066  # take no chances and rewrite it.
39067  # Note: m4 eats our [], so we need to use [ and ] instead.
39068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39069  if test "x$has_forbidden_chars" != x; then
39070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39072  fi
39073
39074    # Output is in $new_path
39075
39076  windows_path="$new_path"
39077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39078    unix_path=`$CYGPATH -u "$windows_path"`
39079    new_path="$unix_path"
39080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39082    new_path="$unix_path"
39083  fi
39084
39085    # remove trailing .exe if any
39086    new_path="${new_path/%.exe/}"
39087
39088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39090  fi
39091
39092    else
39093      # We're on a unix platform. Hooray! :)
39094      # First separate the path from the arguments. This will split at the first
39095      # space.
39096      complete="$NM"
39097      path="${complete%% *}"
39098      tmp="$complete EOL"
39099      arguments="${tmp#* }"
39100
39101      # Cannot rely on the command "which" here since it doesn't always work.
39102      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39103      if test -z "$is_absolute_path"; then
39104        # Path to executable is not absolute. Find it.
39105        IFS_save="$IFS"
39106        IFS=:
39107        for p in $PATH; do
39108          if test -f "$p/$path" && test -x "$p/$path"; then
39109            new_path="$p/$path"
39110            break
39111          fi
39112        done
39113        IFS="$IFS_save"
39114      else
39115        # This is an absolute path, we can use it without further modifications.
39116        new_path="$path"
39117      fi
39118
39119      if test "x$new_path" = x; then
39120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39121$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39122        has_space=`$ECHO "$complete" | $GREP " "`
39123        if test "x$has_space" != x; then
39124          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39126        fi
39127        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39128      fi
39129    fi
39130
39131    # Now join together the path and the arguments once again
39132    if test "x$arguments" != xEOL; then
39133      new_complete="$new_path ${arguments% *}"
39134    else
39135      new_complete="$new_path"
39136    fi
39137
39138    if test "x$complete" != "x$new_complete"; then
39139      NM="$new_complete"
39140      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39141$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39142    fi
39143  fi
39144
39145
39146
39147  # Publish this variable in the help.
39148
39149
39150  if [ -z "${GNM+x}" ]; then
39151    # The variable is not set by user, try to locate tool using the code snippet
39152    for ac_prog in gnm
39153do
39154  # Extract the first word of "$ac_prog", so it can be a program name with args.
39155set dummy $ac_prog; ac_word=$2
39156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39157$as_echo_n "checking for $ac_word... " >&6; }
39158if ${ac_cv_path_GNM+:} false; then :
39159  $as_echo_n "(cached) " >&6
39160else
39161  case $GNM in
39162  [\\/]* | ?:[\\/]*)
39163  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39164  ;;
39165  *)
39166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39167for as_dir in $PATH
39168do
39169  IFS=$as_save_IFS
39170  test -z "$as_dir" && as_dir=.
39171    for ac_exec_ext in '' $ac_executable_extensions; do
39172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39173    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39175    break 2
39176  fi
39177done
39178  done
39179IFS=$as_save_IFS
39180
39181  ;;
39182esac
39183fi
39184GNM=$ac_cv_path_GNM
39185if test -n "$GNM"; then
39186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39187$as_echo "$GNM" >&6; }
39188else
39189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39190$as_echo "no" >&6; }
39191fi
39192
39193
39194  test -n "$GNM" && break
39195done
39196
39197  else
39198    # The variable is set, but is it from the command line or the environment?
39199
39200    # Try to remove the string !GNM! from our list.
39201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39203      # If it failed, the variable was not from the command line. Ignore it,
39204      # but warn the user (except for BASH, which is always set by the calling BASH).
39205      if test "xGNM" != xBASH; then
39206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39207$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39208      fi
39209      # Try to locate tool using the code snippet
39210      for ac_prog in gnm
39211do
39212  # Extract the first word of "$ac_prog", so it can be a program name with args.
39213set dummy $ac_prog; ac_word=$2
39214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39215$as_echo_n "checking for $ac_word... " >&6; }
39216if ${ac_cv_path_GNM+:} false; then :
39217  $as_echo_n "(cached) " >&6
39218else
39219  case $GNM in
39220  [\\/]* | ?:[\\/]*)
39221  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39222  ;;
39223  *)
39224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39225for as_dir in $PATH
39226do
39227  IFS=$as_save_IFS
39228  test -z "$as_dir" && as_dir=.
39229    for ac_exec_ext in '' $ac_executable_extensions; do
39230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39231    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39233    break 2
39234  fi
39235done
39236  done
39237IFS=$as_save_IFS
39238
39239  ;;
39240esac
39241fi
39242GNM=$ac_cv_path_GNM
39243if test -n "$GNM"; then
39244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39245$as_echo "$GNM" >&6; }
39246else
39247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39248$as_echo "no" >&6; }
39249fi
39250
39251
39252  test -n "$GNM" && break
39253done
39254
39255    else
39256      # If it succeeded, then it was overridden by the user. We will use it
39257      # for the tool.
39258
39259      # First remove it from the list of overridden variables, so we can test
39260      # for unknown variables in the end.
39261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39262
39263      # Check if we try to supply an empty value
39264      if test "x$GNM" = x; then
39265        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39266$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39268$as_echo_n "checking for GNM... " >&6; }
39269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39270$as_echo "disabled" >&6; }
39271      else
39272        # Check if the provided tool contains a complete path.
39273        tool_specified="$GNM"
39274        tool_basename="${tool_specified##*/}"
39275        if test "x$tool_basename" = "x$tool_specified"; then
39276          # A command without a complete path is provided, search $PATH.
39277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39278$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39279          # Extract the first word of "$tool_basename", so it can be a program name with args.
39280set dummy $tool_basename; ac_word=$2
39281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39282$as_echo_n "checking for $ac_word... " >&6; }
39283if ${ac_cv_path_GNM+:} false; then :
39284  $as_echo_n "(cached) " >&6
39285else
39286  case $GNM in
39287  [\\/]* | ?:[\\/]*)
39288  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39289  ;;
39290  *)
39291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39292for as_dir in $PATH
39293do
39294  IFS=$as_save_IFS
39295  test -z "$as_dir" && as_dir=.
39296    for ac_exec_ext in '' $ac_executable_extensions; do
39297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39298    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39300    break 2
39301  fi
39302done
39303  done
39304IFS=$as_save_IFS
39305
39306  ;;
39307esac
39308fi
39309GNM=$ac_cv_path_GNM
39310if test -n "$GNM"; then
39311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39312$as_echo "$GNM" >&6; }
39313else
39314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39315$as_echo "no" >&6; }
39316fi
39317
39318
39319          if test "x$GNM" = x; then
39320            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39321          fi
39322        else
39323          # Otherwise we believe it is a complete path. Use it as it is.
39324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39325$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39326          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39327$as_echo_n "checking for GNM... " >&6; }
39328          if test ! -x "$tool_specified"; then
39329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39330$as_echo "not found" >&6; }
39331            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39332          fi
39333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39334$as_echo "$tool_specified" >&6; }
39335        fi
39336      fi
39337    fi
39338
39339  fi
39340
39341
39342
39343  # Only process if variable expands to non-empty
39344
39345  if test "x$GNM" != x; then
39346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39347
39348  # First separate the path from the arguments. This will split at the first
39349  # space.
39350  complete="$GNM"
39351  path="${complete%% *}"
39352  tmp="$complete EOL"
39353  arguments="${tmp#* }"
39354
39355  # Input might be given as Windows format, start by converting to
39356  # unix format.
39357  new_path=`$CYGPATH -u "$path"`
39358
39359  # Now try to locate executable using which
39360  new_path=`$WHICH "$new_path" 2> /dev/null`
39361  # bat and cmd files are not always considered executable in cygwin causing which
39362  # to not find them
39363  if test "x$new_path" = x \
39364      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39365      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39366    new_path=`$CYGPATH -u "$path"`
39367  fi
39368  if test "x$new_path" = x; then
39369    # Oops. Which didn't find the executable.
39370    # The splitting of arguments from the executable at a space might have been incorrect,
39371    # since paths with space are more likely in Windows. Give it another try with the whole
39372    # argument.
39373    path="$complete"
39374    arguments="EOL"
39375    new_path=`$CYGPATH -u "$path"`
39376    new_path=`$WHICH "$new_path" 2> /dev/null`
39377    # bat and cmd files are not always considered executable in cygwin causing which
39378    # to not find them
39379    if test "x$new_path" = x \
39380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39382      new_path=`$CYGPATH -u "$path"`
39383    fi
39384    if test "x$new_path" = x; then
39385      # It's still not found. Now this is an unrecoverable error.
39386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39387$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39388      has_space=`$ECHO "$complete" | $GREP " "`
39389      if test "x$has_space" != x; then
39390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39392      fi
39393      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39394    fi
39395  fi
39396
39397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39400  # "foo.exe" is OK but "foo" is an error.
39401  #
39402  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39403  # It is also a way to make sure we got the proper file name for the real test later on.
39404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39405  if test "x$test_shortpath" = x; then
39406    # Short path failed, file does not exist as specified.
39407    # Try adding .exe or .cmd
39408    if test -f "${new_path}.exe"; then
39409      input_to_shortpath="${new_path}.exe"
39410    elif test -f "${new_path}.cmd"; then
39411      input_to_shortpath="${new_path}.cmd"
39412    else
39413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39414$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39415      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39416$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39417      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39418    fi
39419  else
39420    input_to_shortpath="$new_path"
39421  fi
39422
39423  # Call helper function which possibly converts this using DOS-style short mode.
39424  # If so, the updated path is stored in $new_path.
39425  new_path="$input_to_shortpath"
39426
39427  input_path="$input_to_shortpath"
39428  # Check if we need to convert this using DOS-style short mode. If the path
39429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39430  # take no chances and rewrite it.
39431  # Note: m4 eats our [], so we need to use [ and ] instead.
39432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39433  if test "x$has_forbidden_chars" != x; then
39434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39438      # Going to short mode and back again did indeed matter. Since short mode is
39439      # case insensitive, let's make it lowercase to improve readability.
39440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39441      # Now convert it back to Unix-style (cygpath)
39442      input_path=`$CYGPATH -u "$shortmode_path"`
39443      new_path="$input_path"
39444    fi
39445  fi
39446
39447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39448  if test "x$test_cygdrive_prefix" = x; then
39449    # As a simple fix, exclude /usr/bin since it's not a real path.
39450    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39452      # a path prefixed by /cygdrive for fixpath to work.
39453      new_path="$CYGWIN_ROOT_PATH$input_path"
39454    fi
39455  fi
39456
39457  # remove trailing .exe if any
39458  new_path="${new_path/%.exe/}"
39459
39460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39461
39462  # First separate the path from the arguments. This will split at the first
39463  # space.
39464  complete="$GNM"
39465  path="${complete%% *}"
39466  tmp="$complete EOL"
39467  arguments="${tmp#* }"
39468
39469  # Input might be given as Windows format, start by converting to
39470  # unix format.
39471  new_path="$path"
39472
39473  windows_path="$new_path"
39474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39475    unix_path=`$CYGPATH -u "$windows_path"`
39476    new_path="$unix_path"
39477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39479    new_path="$unix_path"
39480  fi
39481
39482
39483  # Now try to locate executable using which
39484  new_path=`$WHICH "$new_path" 2> /dev/null`
39485
39486  if test "x$new_path" = x; then
39487    # Oops. Which didn't find the executable.
39488    # The splitting of arguments from the executable at a space might have been incorrect,
39489    # since paths with space are more likely in Windows. Give it another try with the whole
39490    # argument.
39491    path="$complete"
39492    arguments="EOL"
39493    new_path="$path"
39494
39495  windows_path="$new_path"
39496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39497    unix_path=`$CYGPATH -u "$windows_path"`
39498    new_path="$unix_path"
39499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39501    new_path="$unix_path"
39502  fi
39503
39504
39505    new_path=`$WHICH "$new_path" 2> /dev/null`
39506    # bat and cmd files are not always considered executable in MSYS causing which
39507    # to not find them
39508    if test "x$new_path" = x \
39509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39511      new_path="$path"
39512
39513  windows_path="$new_path"
39514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39515    unix_path=`$CYGPATH -u "$windows_path"`
39516    new_path="$unix_path"
39517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39519    new_path="$unix_path"
39520  fi
39521
39522    fi
39523
39524    if test "x$new_path" = x; then
39525      # It's still not found. Now this is an unrecoverable error.
39526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39527$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39528      has_space=`$ECHO "$complete" | $GREP " "`
39529      if test "x$has_space" != x; then
39530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39532      fi
39533      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39534    fi
39535  fi
39536
39537  # Now new_path has a complete unix path to the binary
39538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39539    # Keep paths in /bin as-is, but remove trailing .exe if any
39540    new_path="${new_path/%.exe/}"
39541    # Do not save /bin paths to all_fixpath_prefixes!
39542  else
39543    # Not in mixed or Windows style, start by that.
39544    new_path=`cmd //c echo $new_path`
39545
39546  input_path="$new_path"
39547  # Check if we need to convert this using DOS-style short mode. If the path
39548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39549  # take no chances and rewrite it.
39550  # Note: m4 eats our [], so we need to use [ and ] instead.
39551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39552  if test "x$has_forbidden_chars" != x; then
39553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39555  fi
39556
39557    # Output is in $new_path
39558
39559  windows_path="$new_path"
39560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39561    unix_path=`$CYGPATH -u "$windows_path"`
39562    new_path="$unix_path"
39563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39565    new_path="$unix_path"
39566  fi
39567
39568    # remove trailing .exe if any
39569    new_path="${new_path/%.exe/}"
39570
39571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39573  fi
39574
39575    else
39576      # We're on a unix platform. Hooray! :)
39577      # First separate the path from the arguments. This will split at the first
39578      # space.
39579      complete="$GNM"
39580      path="${complete%% *}"
39581      tmp="$complete EOL"
39582      arguments="${tmp#* }"
39583
39584      # Cannot rely on the command "which" here since it doesn't always work.
39585      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39586      if test -z "$is_absolute_path"; then
39587        # Path to executable is not absolute. Find it.
39588        IFS_save="$IFS"
39589        IFS=:
39590        for p in $PATH; do
39591          if test -f "$p/$path" && test -x "$p/$path"; then
39592            new_path="$p/$path"
39593            break
39594          fi
39595        done
39596        IFS="$IFS_save"
39597      else
39598        # This is an absolute path, we can use it without further modifications.
39599        new_path="$path"
39600      fi
39601
39602      if test "x$new_path" = x; then
39603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39604$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39605        has_space=`$ECHO "$complete" | $GREP " "`
39606        if test "x$has_space" != x; then
39607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39609        fi
39610        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39611      fi
39612    fi
39613
39614    # Now join together the path and the arguments once again
39615    if test "x$arguments" != xEOL; then
39616      new_complete="$new_path ${arguments% *}"
39617    else
39618      new_complete="$new_path"
39619    fi
39620
39621    if test "x$complete" != "x$new_complete"; then
39622      GNM="$new_complete"
39623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39624$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39625    fi
39626  fi
39627
39628  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39629    # FIXME: we should unify this with the solaris case above.
39630
39631
39632  # Publish this variable in the help.
39633
39634
39635  if [ -z "${STRIP+x}" ]; then
39636    # The variable is not set by user, try to locate tool using the code snippet
39637    if test -n "$ac_tool_prefix"; then
39638  for ac_prog in strip
39639  do
39640    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39641set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39643$as_echo_n "checking for $ac_word... " >&6; }
39644if ${ac_cv_prog_STRIP+:} false; then :
39645  $as_echo_n "(cached) " >&6
39646else
39647  if test -n "$STRIP"; then
39648  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39649else
39650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39651for as_dir in $PATH
39652do
39653  IFS=$as_save_IFS
39654  test -z "$as_dir" && as_dir=.
39655    for ac_exec_ext in '' $ac_executable_extensions; do
39656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39657    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39659    break 2
39660  fi
39661done
39662  done
39663IFS=$as_save_IFS
39664
39665fi
39666fi
39667STRIP=$ac_cv_prog_STRIP
39668if test -n "$STRIP"; then
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39670$as_echo "$STRIP" >&6; }
39671else
39672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39673$as_echo "no" >&6; }
39674fi
39675
39676
39677    test -n "$STRIP" && break
39678  done
39679fi
39680if test -z "$STRIP"; then
39681  ac_ct_STRIP=$STRIP
39682  for ac_prog in strip
39683do
39684  # Extract the first word of "$ac_prog", so it can be a program name with args.
39685set dummy $ac_prog; ac_word=$2
39686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39687$as_echo_n "checking for $ac_word... " >&6; }
39688if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39689  $as_echo_n "(cached) " >&6
39690else
39691  if test -n "$ac_ct_STRIP"; then
39692  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39693else
39694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39695for as_dir in $PATH
39696do
39697  IFS=$as_save_IFS
39698  test -z "$as_dir" && as_dir=.
39699    for ac_exec_ext in '' $ac_executable_extensions; do
39700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39701    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39703    break 2
39704  fi
39705done
39706  done
39707IFS=$as_save_IFS
39708
39709fi
39710fi
39711ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39712if test -n "$ac_ct_STRIP"; then
39713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39714$as_echo "$ac_ct_STRIP" >&6; }
39715else
39716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39717$as_echo "no" >&6; }
39718fi
39719
39720
39721  test -n "$ac_ct_STRIP" && break
39722done
39723
39724  if test "x$ac_ct_STRIP" = x; then
39725    STRIP=""
39726  else
39727    case $cross_compiling:$ac_tool_warned in
39728yes:)
39729{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39730$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39731ac_tool_warned=yes ;;
39732esac
39733    STRIP=$ac_ct_STRIP
39734  fi
39735fi
39736
39737  else
39738    # The variable is set, but is it from the command line or the environment?
39739
39740    # Try to remove the string !STRIP! from our list.
39741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39743      # If it failed, the variable was not from the command line. Ignore it,
39744      # but warn the user (except for BASH, which is always set by the calling BASH).
39745      if test "xSTRIP" != xBASH; then
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39747$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39748      fi
39749      # Try to locate tool using the code snippet
39750      if test -n "$ac_tool_prefix"; then
39751  for ac_prog in strip
39752  do
39753    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39754set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39756$as_echo_n "checking for $ac_word... " >&6; }
39757if ${ac_cv_prog_STRIP+:} false; then :
39758  $as_echo_n "(cached) " >&6
39759else
39760  if test -n "$STRIP"; then
39761  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39762else
39763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39764for as_dir in $PATH
39765do
39766  IFS=$as_save_IFS
39767  test -z "$as_dir" && as_dir=.
39768    for ac_exec_ext in '' $ac_executable_extensions; do
39769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39770    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39772    break 2
39773  fi
39774done
39775  done
39776IFS=$as_save_IFS
39777
39778fi
39779fi
39780STRIP=$ac_cv_prog_STRIP
39781if test -n "$STRIP"; then
39782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39783$as_echo "$STRIP" >&6; }
39784else
39785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39786$as_echo "no" >&6; }
39787fi
39788
39789
39790    test -n "$STRIP" && break
39791  done
39792fi
39793if test -z "$STRIP"; then
39794  ac_ct_STRIP=$STRIP
39795  for ac_prog in strip
39796do
39797  # Extract the first word of "$ac_prog", so it can be a program name with args.
39798set dummy $ac_prog; ac_word=$2
39799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39800$as_echo_n "checking for $ac_word... " >&6; }
39801if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39802  $as_echo_n "(cached) " >&6
39803else
39804  if test -n "$ac_ct_STRIP"; then
39805  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39806else
39807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39808for as_dir in $PATH
39809do
39810  IFS=$as_save_IFS
39811  test -z "$as_dir" && as_dir=.
39812    for ac_exec_ext in '' $ac_executable_extensions; do
39813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39814    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39816    break 2
39817  fi
39818done
39819  done
39820IFS=$as_save_IFS
39821
39822fi
39823fi
39824ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39825if test -n "$ac_ct_STRIP"; then
39826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39827$as_echo "$ac_ct_STRIP" >&6; }
39828else
39829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39830$as_echo "no" >&6; }
39831fi
39832
39833
39834  test -n "$ac_ct_STRIP" && break
39835done
39836
39837  if test "x$ac_ct_STRIP" = x; then
39838    STRIP=""
39839  else
39840    case $cross_compiling:$ac_tool_warned in
39841yes:)
39842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39844ac_tool_warned=yes ;;
39845esac
39846    STRIP=$ac_ct_STRIP
39847  fi
39848fi
39849
39850    else
39851      # If it succeeded, then it was overridden by the user. We will use it
39852      # for the tool.
39853
39854      # First remove it from the list of overridden variables, so we can test
39855      # for unknown variables in the end.
39856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39857
39858      # Check if we try to supply an empty value
39859      if test "x$STRIP" = x; then
39860        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39861$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39862        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39863$as_echo_n "checking for STRIP... " >&6; }
39864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39865$as_echo "disabled" >&6; }
39866      else
39867        # Check if the provided tool contains a complete path.
39868        tool_specified="$STRIP"
39869        tool_basename="${tool_specified##*/}"
39870        if test "x$tool_basename" = "x$tool_specified"; then
39871          # A command without a complete path is provided, search $PATH.
39872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39873$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39874          # Extract the first word of "$tool_basename", so it can be a program name with args.
39875set dummy $tool_basename; ac_word=$2
39876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39877$as_echo_n "checking for $ac_word... " >&6; }
39878if ${ac_cv_path_STRIP+:} false; then :
39879  $as_echo_n "(cached) " >&6
39880else
39881  case $STRIP in
39882  [\\/]* | ?:[\\/]*)
39883  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39884  ;;
39885  *)
39886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39887for as_dir in $PATH
39888do
39889  IFS=$as_save_IFS
39890  test -z "$as_dir" && as_dir=.
39891    for ac_exec_ext in '' $ac_executable_extensions; do
39892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39893    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39895    break 2
39896  fi
39897done
39898  done
39899IFS=$as_save_IFS
39900
39901  ;;
39902esac
39903fi
39904STRIP=$ac_cv_path_STRIP
39905if test -n "$STRIP"; then
39906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39907$as_echo "$STRIP" >&6; }
39908else
39909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39910$as_echo "no" >&6; }
39911fi
39912
39913
39914          if test "x$STRIP" = x; then
39915            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39916          fi
39917        else
39918          # Otherwise we believe it is a complete path. Use it as it is.
39919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39920$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39921          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39922$as_echo_n "checking for STRIP... " >&6; }
39923          if test ! -x "$tool_specified"; then
39924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39925$as_echo "not found" >&6; }
39926            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39927          fi
39928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39929$as_echo "$tool_specified" >&6; }
39930        fi
39931      fi
39932    fi
39933
39934  fi
39935
39936
39937
39938  # Only process if variable expands to non-empty
39939
39940  if test "x$STRIP" != x; then
39941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39942
39943  # First separate the path from the arguments. This will split at the first
39944  # space.
39945  complete="$STRIP"
39946  path="${complete%% *}"
39947  tmp="$complete EOL"
39948  arguments="${tmp#* }"
39949
39950  # Input might be given as Windows format, start by converting to
39951  # unix format.
39952  new_path=`$CYGPATH -u "$path"`
39953
39954  # Now try to locate executable using which
39955  new_path=`$WHICH "$new_path" 2> /dev/null`
39956  # bat and cmd files are not always considered executable in cygwin causing which
39957  # to not find them
39958  if test "x$new_path" = x \
39959      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39960      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39961    new_path=`$CYGPATH -u "$path"`
39962  fi
39963  if test "x$new_path" = x; then
39964    # Oops. Which didn't find the executable.
39965    # The splitting of arguments from the executable at a space might have been incorrect,
39966    # since paths with space are more likely in Windows. Give it another try with the whole
39967    # argument.
39968    path="$complete"
39969    arguments="EOL"
39970    new_path=`$CYGPATH -u "$path"`
39971    new_path=`$WHICH "$new_path" 2> /dev/null`
39972    # bat and cmd files are not always considered executable in cygwin causing which
39973    # to not find them
39974    if test "x$new_path" = x \
39975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39977      new_path=`$CYGPATH -u "$path"`
39978    fi
39979    if test "x$new_path" = x; then
39980      # It's still not found. Now this is an unrecoverable error.
39981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39982$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39983      has_space=`$ECHO "$complete" | $GREP " "`
39984      if test "x$has_space" != x; then
39985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39987      fi
39988      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39989    fi
39990  fi
39991
39992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39995  # "foo.exe" is OK but "foo" is an error.
39996  #
39997  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39998  # It is also a way to make sure we got the proper file name for the real test later on.
39999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40000  if test "x$test_shortpath" = x; then
40001    # Short path failed, file does not exist as specified.
40002    # Try adding .exe or .cmd
40003    if test -f "${new_path}.exe"; then
40004      input_to_shortpath="${new_path}.exe"
40005    elif test -f "${new_path}.cmd"; then
40006      input_to_shortpath="${new_path}.cmd"
40007    else
40008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40009$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40012      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40013    fi
40014  else
40015    input_to_shortpath="$new_path"
40016  fi
40017
40018  # Call helper function which possibly converts this using DOS-style short mode.
40019  # If so, the updated path is stored in $new_path.
40020  new_path="$input_to_shortpath"
40021
40022  input_path="$input_to_shortpath"
40023  # Check if we need to convert this using DOS-style short mode. If the path
40024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40025  # take no chances and rewrite it.
40026  # Note: m4 eats our [], so we need to use [ and ] instead.
40027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40028  if test "x$has_forbidden_chars" != x; then
40029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40033      # Going to short mode and back again did indeed matter. Since short mode is
40034      # case insensitive, let's make it lowercase to improve readability.
40035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40036      # Now convert it back to Unix-style (cygpath)
40037      input_path=`$CYGPATH -u "$shortmode_path"`
40038      new_path="$input_path"
40039    fi
40040  fi
40041
40042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40043  if test "x$test_cygdrive_prefix" = x; then
40044    # As a simple fix, exclude /usr/bin since it's not a real path.
40045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40047      # a path prefixed by /cygdrive for fixpath to work.
40048      new_path="$CYGWIN_ROOT_PATH$input_path"
40049    fi
40050  fi
40051
40052  # remove trailing .exe if any
40053  new_path="${new_path/%.exe/}"
40054
40055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40056
40057  # First separate the path from the arguments. This will split at the first
40058  # space.
40059  complete="$STRIP"
40060  path="${complete%% *}"
40061  tmp="$complete EOL"
40062  arguments="${tmp#* }"
40063
40064  # Input might be given as Windows format, start by converting to
40065  # unix format.
40066  new_path="$path"
40067
40068  windows_path="$new_path"
40069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40070    unix_path=`$CYGPATH -u "$windows_path"`
40071    new_path="$unix_path"
40072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40074    new_path="$unix_path"
40075  fi
40076
40077
40078  # Now try to locate executable using which
40079  new_path=`$WHICH "$new_path" 2> /dev/null`
40080
40081  if test "x$new_path" = x; then
40082    # Oops. Which didn't find the executable.
40083    # The splitting of arguments from the executable at a space might have been incorrect,
40084    # since paths with space are more likely in Windows. Give it another try with the whole
40085    # argument.
40086    path="$complete"
40087    arguments="EOL"
40088    new_path="$path"
40089
40090  windows_path="$new_path"
40091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40092    unix_path=`$CYGPATH -u "$windows_path"`
40093    new_path="$unix_path"
40094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40096    new_path="$unix_path"
40097  fi
40098
40099
40100    new_path=`$WHICH "$new_path" 2> /dev/null`
40101    # bat and cmd files are not always considered executable in MSYS causing which
40102    # to not find them
40103    if test "x$new_path" = x \
40104        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40105        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40106      new_path="$path"
40107
40108  windows_path="$new_path"
40109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40110    unix_path=`$CYGPATH -u "$windows_path"`
40111    new_path="$unix_path"
40112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40114    new_path="$unix_path"
40115  fi
40116
40117    fi
40118
40119    if test "x$new_path" = x; then
40120      # It's still not found. Now this is an unrecoverable error.
40121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40122$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40123      has_space=`$ECHO "$complete" | $GREP " "`
40124      if test "x$has_space" != x; then
40125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40127      fi
40128      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40129    fi
40130  fi
40131
40132  # Now new_path has a complete unix path to the binary
40133  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40134    # Keep paths in /bin as-is, but remove trailing .exe if any
40135    new_path="${new_path/%.exe/}"
40136    # Do not save /bin paths to all_fixpath_prefixes!
40137  else
40138    # Not in mixed or Windows style, start by that.
40139    new_path=`cmd //c echo $new_path`
40140
40141  input_path="$new_path"
40142  # Check if we need to convert this using DOS-style short mode. If the path
40143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40144  # take no chances and rewrite it.
40145  # Note: m4 eats our [], so we need to use [ and ] instead.
40146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40147  if test "x$has_forbidden_chars" != x; then
40148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40150  fi
40151
40152    # Output is in $new_path
40153
40154  windows_path="$new_path"
40155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40156    unix_path=`$CYGPATH -u "$windows_path"`
40157    new_path="$unix_path"
40158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40160    new_path="$unix_path"
40161  fi
40162
40163    # remove trailing .exe if any
40164    new_path="${new_path/%.exe/}"
40165
40166    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40167    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40168  fi
40169
40170    else
40171      # We're on a unix platform. Hooray! :)
40172      # First separate the path from the arguments. This will split at the first
40173      # space.
40174      complete="$STRIP"
40175      path="${complete%% *}"
40176      tmp="$complete EOL"
40177      arguments="${tmp#* }"
40178
40179      # Cannot rely on the command "which" here since it doesn't always work.
40180      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40181      if test -z "$is_absolute_path"; then
40182        # Path to executable is not absolute. Find it.
40183        IFS_save="$IFS"
40184        IFS=:
40185        for p in $PATH; do
40186          if test -f "$p/$path" && test -x "$p/$path"; then
40187            new_path="$p/$path"
40188            break
40189          fi
40190        done
40191        IFS="$IFS_save"
40192      else
40193        # This is an absolute path, we can use it without further modifications.
40194        new_path="$path"
40195      fi
40196
40197      if test "x$new_path" = x; then
40198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40199$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40200        has_space=`$ECHO "$complete" | $GREP " "`
40201        if test "x$has_space" != x; then
40202          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40203$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40204        fi
40205        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40206      fi
40207    fi
40208
40209    # Now join together the path and the arguments once again
40210    if test "x$arguments" != xEOL; then
40211      new_complete="$new_path ${arguments% *}"
40212    else
40213      new_complete="$new_path"
40214    fi
40215
40216    if test "x$complete" != "x$new_complete"; then
40217      STRIP="$new_complete"
40218      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40219$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40220    fi
40221  fi
40222
40223
40224
40225  # Publish this variable in the help.
40226
40227
40228  if [ -z "${NM+x}" ]; then
40229    # The variable is not set by user, try to locate tool using the code snippet
40230    if test -n "$ac_tool_prefix"; then
40231  for ac_prog in nm
40232  do
40233    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40234set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40236$as_echo_n "checking for $ac_word... " >&6; }
40237if ${ac_cv_prog_NM+:} false; then :
40238  $as_echo_n "(cached) " >&6
40239else
40240  if test -n "$NM"; then
40241  ac_cv_prog_NM="$NM" # Let the user override the test.
40242else
40243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40244for as_dir in $PATH
40245do
40246  IFS=$as_save_IFS
40247  test -z "$as_dir" && as_dir=.
40248    for ac_exec_ext in '' $ac_executable_extensions; do
40249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40250    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40252    break 2
40253  fi
40254done
40255  done
40256IFS=$as_save_IFS
40257
40258fi
40259fi
40260NM=$ac_cv_prog_NM
40261if test -n "$NM"; then
40262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40263$as_echo "$NM" >&6; }
40264else
40265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40266$as_echo "no" >&6; }
40267fi
40268
40269
40270    test -n "$NM" && break
40271  done
40272fi
40273if test -z "$NM"; then
40274  ac_ct_NM=$NM
40275  for ac_prog in nm
40276do
40277  # Extract the first word of "$ac_prog", so it can be a program name with args.
40278set dummy $ac_prog; ac_word=$2
40279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40280$as_echo_n "checking for $ac_word... " >&6; }
40281if ${ac_cv_prog_ac_ct_NM+:} false; then :
40282  $as_echo_n "(cached) " >&6
40283else
40284  if test -n "$ac_ct_NM"; then
40285  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40286else
40287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40288for as_dir in $PATH
40289do
40290  IFS=$as_save_IFS
40291  test -z "$as_dir" && as_dir=.
40292    for ac_exec_ext in '' $ac_executable_extensions; do
40293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40294    ac_cv_prog_ac_ct_NM="$ac_prog"
40295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40296    break 2
40297  fi
40298done
40299  done
40300IFS=$as_save_IFS
40301
40302fi
40303fi
40304ac_ct_NM=$ac_cv_prog_ac_ct_NM
40305if test -n "$ac_ct_NM"; then
40306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40307$as_echo "$ac_ct_NM" >&6; }
40308else
40309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40310$as_echo "no" >&6; }
40311fi
40312
40313
40314  test -n "$ac_ct_NM" && break
40315done
40316
40317  if test "x$ac_ct_NM" = x; then
40318    NM=""
40319  else
40320    case $cross_compiling:$ac_tool_warned in
40321yes:)
40322{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40323$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40324ac_tool_warned=yes ;;
40325esac
40326    NM=$ac_ct_NM
40327  fi
40328fi
40329
40330  else
40331    # The variable is set, but is it from the command line or the environment?
40332
40333    # Try to remove the string !NM! from our list.
40334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40336      # If it failed, the variable was not from the command line. Ignore it,
40337      # but warn the user (except for BASH, which is always set by the calling BASH).
40338      if test "xNM" != xBASH; then
40339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40340$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40341      fi
40342      # Try to locate tool using the code snippet
40343      if test -n "$ac_tool_prefix"; then
40344  for ac_prog in nm
40345  do
40346    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40347set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40349$as_echo_n "checking for $ac_word... " >&6; }
40350if ${ac_cv_prog_NM+:} false; then :
40351  $as_echo_n "(cached) " >&6
40352else
40353  if test -n "$NM"; then
40354  ac_cv_prog_NM="$NM" # Let the user override the test.
40355else
40356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40357for as_dir in $PATH
40358do
40359  IFS=$as_save_IFS
40360  test -z "$as_dir" && as_dir=.
40361    for ac_exec_ext in '' $ac_executable_extensions; do
40362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40363    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40365    break 2
40366  fi
40367done
40368  done
40369IFS=$as_save_IFS
40370
40371fi
40372fi
40373NM=$ac_cv_prog_NM
40374if test -n "$NM"; then
40375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40376$as_echo "$NM" >&6; }
40377else
40378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40379$as_echo "no" >&6; }
40380fi
40381
40382
40383    test -n "$NM" && break
40384  done
40385fi
40386if test -z "$NM"; then
40387  ac_ct_NM=$NM
40388  for ac_prog in nm
40389do
40390  # Extract the first word of "$ac_prog", so it can be a program name with args.
40391set dummy $ac_prog; ac_word=$2
40392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40393$as_echo_n "checking for $ac_word... " >&6; }
40394if ${ac_cv_prog_ac_ct_NM+:} false; then :
40395  $as_echo_n "(cached) " >&6
40396else
40397  if test -n "$ac_ct_NM"; then
40398  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40399else
40400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40401for as_dir in $PATH
40402do
40403  IFS=$as_save_IFS
40404  test -z "$as_dir" && as_dir=.
40405    for ac_exec_ext in '' $ac_executable_extensions; do
40406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40407    ac_cv_prog_ac_ct_NM="$ac_prog"
40408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40409    break 2
40410  fi
40411done
40412  done
40413IFS=$as_save_IFS
40414
40415fi
40416fi
40417ac_ct_NM=$ac_cv_prog_ac_ct_NM
40418if test -n "$ac_ct_NM"; then
40419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40420$as_echo "$ac_ct_NM" >&6; }
40421else
40422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40423$as_echo "no" >&6; }
40424fi
40425
40426
40427  test -n "$ac_ct_NM" && break
40428done
40429
40430  if test "x$ac_ct_NM" = x; then
40431    NM=""
40432  else
40433    case $cross_compiling:$ac_tool_warned in
40434yes:)
40435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40437ac_tool_warned=yes ;;
40438esac
40439    NM=$ac_ct_NM
40440  fi
40441fi
40442
40443    else
40444      # If it succeeded, then it was overridden by the user. We will use it
40445      # for the tool.
40446
40447      # First remove it from the list of overridden variables, so we can test
40448      # for unknown variables in the end.
40449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40450
40451      # Check if we try to supply an empty value
40452      if test "x$NM" = x; then
40453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40454$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40456$as_echo_n "checking for NM... " >&6; }
40457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40458$as_echo "disabled" >&6; }
40459      else
40460        # Check if the provided tool contains a complete path.
40461        tool_specified="$NM"
40462        tool_basename="${tool_specified##*/}"
40463        if test "x$tool_basename" = "x$tool_specified"; then
40464          # A command without a complete path is provided, search $PATH.
40465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40466$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40467          # Extract the first word of "$tool_basename", so it can be a program name with args.
40468set dummy $tool_basename; ac_word=$2
40469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40470$as_echo_n "checking for $ac_word... " >&6; }
40471if ${ac_cv_path_NM+:} false; then :
40472  $as_echo_n "(cached) " >&6
40473else
40474  case $NM in
40475  [\\/]* | ?:[\\/]*)
40476  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40477  ;;
40478  *)
40479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40480for as_dir in $PATH
40481do
40482  IFS=$as_save_IFS
40483  test -z "$as_dir" && as_dir=.
40484    for ac_exec_ext in '' $ac_executable_extensions; do
40485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40486    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40488    break 2
40489  fi
40490done
40491  done
40492IFS=$as_save_IFS
40493
40494  ;;
40495esac
40496fi
40497NM=$ac_cv_path_NM
40498if test -n "$NM"; then
40499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40500$as_echo "$NM" >&6; }
40501else
40502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40503$as_echo "no" >&6; }
40504fi
40505
40506
40507          if test "x$NM" = x; then
40508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40509          fi
40510        else
40511          # Otherwise we believe it is a complete path. Use it as it is.
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40513$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40515$as_echo_n "checking for NM... " >&6; }
40516          if test ! -x "$tool_specified"; then
40517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40518$as_echo "not found" >&6; }
40519            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40520          fi
40521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40522$as_echo "$tool_specified" >&6; }
40523        fi
40524      fi
40525    fi
40526
40527  fi
40528
40529
40530
40531  # Only process if variable expands to non-empty
40532
40533  if test "x$NM" != x; then
40534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40535
40536  # First separate the path from the arguments. This will split at the first
40537  # space.
40538  complete="$NM"
40539  path="${complete%% *}"
40540  tmp="$complete EOL"
40541  arguments="${tmp#* }"
40542
40543  # Input might be given as Windows format, start by converting to
40544  # unix format.
40545  new_path=`$CYGPATH -u "$path"`
40546
40547  # Now try to locate executable using which
40548  new_path=`$WHICH "$new_path" 2> /dev/null`
40549  # bat and cmd files are not always considered executable in cygwin causing which
40550  # to not find them
40551  if test "x$new_path" = x \
40552      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40553      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40554    new_path=`$CYGPATH -u "$path"`
40555  fi
40556  if test "x$new_path" = x; then
40557    # Oops. Which didn't find the executable.
40558    # The splitting of arguments from the executable at a space might have been incorrect,
40559    # since paths with space are more likely in Windows. Give it another try with the whole
40560    # argument.
40561    path="$complete"
40562    arguments="EOL"
40563    new_path=`$CYGPATH -u "$path"`
40564    new_path=`$WHICH "$new_path" 2> /dev/null`
40565    # bat and cmd files are not always considered executable in cygwin causing which
40566    # to not find them
40567    if test "x$new_path" = x \
40568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40570      new_path=`$CYGPATH -u "$path"`
40571    fi
40572    if test "x$new_path" = x; then
40573      # It's still not found. Now this is an unrecoverable error.
40574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40575$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40576      has_space=`$ECHO "$complete" | $GREP " "`
40577      if test "x$has_space" != x; then
40578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40580      fi
40581      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40582    fi
40583  fi
40584
40585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40588  # "foo.exe" is OK but "foo" is an error.
40589  #
40590  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40591  # It is also a way to make sure we got the proper file name for the real test later on.
40592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40593  if test "x$test_shortpath" = x; then
40594    # Short path failed, file does not exist as specified.
40595    # Try adding .exe or .cmd
40596    if test -f "${new_path}.exe"; then
40597      input_to_shortpath="${new_path}.exe"
40598    elif test -f "${new_path}.cmd"; then
40599      input_to_shortpath="${new_path}.cmd"
40600    else
40601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40602$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40605      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40606    fi
40607  else
40608    input_to_shortpath="$new_path"
40609  fi
40610
40611  # Call helper function which possibly converts this using DOS-style short mode.
40612  # If so, the updated path is stored in $new_path.
40613  new_path="$input_to_shortpath"
40614
40615  input_path="$input_to_shortpath"
40616  # Check if we need to convert this using DOS-style short mode. If the path
40617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40618  # take no chances and rewrite it.
40619  # Note: m4 eats our [], so we need to use [ and ] instead.
40620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40621  if test "x$has_forbidden_chars" != x; then
40622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40626      # Going to short mode and back again did indeed matter. Since short mode is
40627      # case insensitive, let's make it lowercase to improve readability.
40628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40629      # Now convert it back to Unix-style (cygpath)
40630      input_path=`$CYGPATH -u "$shortmode_path"`
40631      new_path="$input_path"
40632    fi
40633  fi
40634
40635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40636  if test "x$test_cygdrive_prefix" = x; then
40637    # As a simple fix, exclude /usr/bin since it's not a real path.
40638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40640      # a path prefixed by /cygdrive for fixpath to work.
40641      new_path="$CYGWIN_ROOT_PATH$input_path"
40642    fi
40643  fi
40644
40645  # remove trailing .exe if any
40646  new_path="${new_path/%.exe/}"
40647
40648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40649
40650  # First separate the path from the arguments. This will split at the first
40651  # space.
40652  complete="$NM"
40653  path="${complete%% *}"
40654  tmp="$complete EOL"
40655  arguments="${tmp#* }"
40656
40657  # Input might be given as Windows format, start by converting to
40658  # unix format.
40659  new_path="$path"
40660
40661  windows_path="$new_path"
40662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40663    unix_path=`$CYGPATH -u "$windows_path"`
40664    new_path="$unix_path"
40665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40667    new_path="$unix_path"
40668  fi
40669
40670
40671  # Now try to locate executable using which
40672  new_path=`$WHICH "$new_path" 2> /dev/null`
40673
40674  if test "x$new_path" = x; then
40675    # Oops. Which didn't find the executable.
40676    # The splitting of arguments from the executable at a space might have been incorrect,
40677    # since paths with space are more likely in Windows. Give it another try with the whole
40678    # argument.
40679    path="$complete"
40680    arguments="EOL"
40681    new_path="$path"
40682
40683  windows_path="$new_path"
40684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40685    unix_path=`$CYGPATH -u "$windows_path"`
40686    new_path="$unix_path"
40687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40689    new_path="$unix_path"
40690  fi
40691
40692
40693    new_path=`$WHICH "$new_path" 2> /dev/null`
40694    # bat and cmd files are not always considered executable in MSYS causing which
40695    # to not find them
40696    if test "x$new_path" = x \
40697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40699      new_path="$path"
40700
40701  windows_path="$new_path"
40702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40703    unix_path=`$CYGPATH -u "$windows_path"`
40704    new_path="$unix_path"
40705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40707    new_path="$unix_path"
40708  fi
40709
40710    fi
40711
40712    if test "x$new_path" = x; then
40713      # It's still not found. Now this is an unrecoverable error.
40714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40715$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40716      has_space=`$ECHO "$complete" | $GREP " "`
40717      if test "x$has_space" != x; then
40718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40720      fi
40721      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40722    fi
40723  fi
40724
40725  # Now new_path has a complete unix path to the binary
40726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40727    # Keep paths in /bin as-is, but remove trailing .exe if any
40728    new_path="${new_path/%.exe/}"
40729    # Do not save /bin paths to all_fixpath_prefixes!
40730  else
40731    # Not in mixed or Windows style, start by that.
40732    new_path=`cmd //c echo $new_path`
40733
40734  input_path="$new_path"
40735  # Check if we need to convert this using DOS-style short mode. If the path
40736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40737  # take no chances and rewrite it.
40738  # Note: m4 eats our [], so we need to use [ and ] instead.
40739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40740  if test "x$has_forbidden_chars" != x; then
40741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40743  fi
40744
40745    # Output is in $new_path
40746
40747  windows_path="$new_path"
40748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40749    unix_path=`$CYGPATH -u "$windows_path"`
40750    new_path="$unix_path"
40751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40753    new_path="$unix_path"
40754  fi
40755
40756    # remove trailing .exe if any
40757    new_path="${new_path/%.exe/}"
40758
40759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40761  fi
40762
40763    else
40764      # We're on a unix platform. Hooray! :)
40765      # First separate the path from the arguments. This will split at the first
40766      # space.
40767      complete="$NM"
40768      path="${complete%% *}"
40769      tmp="$complete EOL"
40770      arguments="${tmp#* }"
40771
40772      # Cannot rely on the command "which" here since it doesn't always work.
40773      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40774      if test -z "$is_absolute_path"; then
40775        # Path to executable is not absolute. Find it.
40776        IFS_save="$IFS"
40777        IFS=:
40778        for p in $PATH; do
40779          if test -f "$p/$path" && test -x "$p/$path"; then
40780            new_path="$p/$path"
40781            break
40782          fi
40783        done
40784        IFS="$IFS_save"
40785      else
40786        # This is an absolute path, we can use it without further modifications.
40787        new_path="$path"
40788      fi
40789
40790      if test "x$new_path" = x; then
40791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40792$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40793        has_space=`$ECHO "$complete" | $GREP " "`
40794        if test "x$has_space" != x; then
40795          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40797        fi
40798        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40799      fi
40800    fi
40801
40802    # Now join together the path and the arguments once again
40803    if test "x$arguments" != xEOL; then
40804      new_complete="$new_path ${arguments% *}"
40805    else
40806      new_complete="$new_path"
40807    fi
40808
40809    if test "x$complete" != "x$new_complete"; then
40810      NM="$new_complete"
40811      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40812$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40813    fi
40814  fi
40815
40816    GNM="$NM"
40817
40818  fi
40819
40820  # objcopy is used for moving debug symbols to separate files when
40821  # full debug symbols are enabled.
40822  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40823
40824
40825  # Publish this variable in the help.
40826
40827
40828  if [ -z "${OBJCOPY+x}" ]; then
40829    # The variable is not set by user, try to locate tool using the code snippet
40830    if test -n "$ac_tool_prefix"; then
40831  for ac_prog in gobjcopy objcopy
40832  do
40833    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40834set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40836$as_echo_n "checking for $ac_word... " >&6; }
40837if ${ac_cv_prog_OBJCOPY+:} false; then :
40838  $as_echo_n "(cached) " >&6
40839else
40840  if test -n "$OBJCOPY"; then
40841  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40842else
40843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40844for as_dir in $PATH
40845do
40846  IFS=$as_save_IFS
40847  test -z "$as_dir" && as_dir=.
40848    for ac_exec_ext in '' $ac_executable_extensions; do
40849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40850    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40852    break 2
40853  fi
40854done
40855  done
40856IFS=$as_save_IFS
40857
40858fi
40859fi
40860OBJCOPY=$ac_cv_prog_OBJCOPY
40861if test -n "$OBJCOPY"; then
40862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40863$as_echo "$OBJCOPY" >&6; }
40864else
40865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40866$as_echo "no" >&6; }
40867fi
40868
40869
40870    test -n "$OBJCOPY" && break
40871  done
40872fi
40873if test -z "$OBJCOPY"; then
40874  ac_ct_OBJCOPY=$OBJCOPY
40875  for ac_prog in gobjcopy objcopy
40876do
40877  # Extract the first word of "$ac_prog", so it can be a program name with args.
40878set dummy $ac_prog; ac_word=$2
40879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40880$as_echo_n "checking for $ac_word... " >&6; }
40881if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40882  $as_echo_n "(cached) " >&6
40883else
40884  if test -n "$ac_ct_OBJCOPY"; then
40885  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40886else
40887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40888for as_dir in $PATH
40889do
40890  IFS=$as_save_IFS
40891  test -z "$as_dir" && as_dir=.
40892    for ac_exec_ext in '' $ac_executable_extensions; do
40893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40894    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40896    break 2
40897  fi
40898done
40899  done
40900IFS=$as_save_IFS
40901
40902fi
40903fi
40904ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40905if test -n "$ac_ct_OBJCOPY"; then
40906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40907$as_echo "$ac_ct_OBJCOPY" >&6; }
40908else
40909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40910$as_echo "no" >&6; }
40911fi
40912
40913
40914  test -n "$ac_ct_OBJCOPY" && break
40915done
40916
40917  if test "x$ac_ct_OBJCOPY" = x; then
40918    OBJCOPY=""
40919  else
40920    case $cross_compiling:$ac_tool_warned in
40921yes:)
40922{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40923$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40924ac_tool_warned=yes ;;
40925esac
40926    OBJCOPY=$ac_ct_OBJCOPY
40927  fi
40928fi
40929
40930  else
40931    # The variable is set, but is it from the command line or the environment?
40932
40933    # Try to remove the string !OBJCOPY! from our list.
40934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40936      # If it failed, the variable was not from the command line. Ignore it,
40937      # but warn the user (except for BASH, which is always set by the calling BASH).
40938      if test "xOBJCOPY" != xBASH; then
40939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40940$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40941      fi
40942      # Try to locate tool using the code snippet
40943      if test -n "$ac_tool_prefix"; then
40944  for ac_prog in gobjcopy objcopy
40945  do
40946    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40947set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40949$as_echo_n "checking for $ac_word... " >&6; }
40950if ${ac_cv_prog_OBJCOPY+:} false; then :
40951  $as_echo_n "(cached) " >&6
40952else
40953  if test -n "$OBJCOPY"; then
40954  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40955else
40956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40957for as_dir in $PATH
40958do
40959  IFS=$as_save_IFS
40960  test -z "$as_dir" && as_dir=.
40961    for ac_exec_ext in '' $ac_executable_extensions; do
40962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40963    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40965    break 2
40966  fi
40967done
40968  done
40969IFS=$as_save_IFS
40970
40971fi
40972fi
40973OBJCOPY=$ac_cv_prog_OBJCOPY
40974if test -n "$OBJCOPY"; then
40975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40976$as_echo "$OBJCOPY" >&6; }
40977else
40978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40979$as_echo "no" >&6; }
40980fi
40981
40982
40983    test -n "$OBJCOPY" && break
40984  done
40985fi
40986if test -z "$OBJCOPY"; then
40987  ac_ct_OBJCOPY=$OBJCOPY
40988  for ac_prog in gobjcopy objcopy
40989do
40990  # Extract the first word of "$ac_prog", so it can be a program name with args.
40991set dummy $ac_prog; ac_word=$2
40992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40993$as_echo_n "checking for $ac_word... " >&6; }
40994if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40995  $as_echo_n "(cached) " >&6
40996else
40997  if test -n "$ac_ct_OBJCOPY"; then
40998  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40999else
41000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41001for as_dir in $PATH
41002do
41003  IFS=$as_save_IFS
41004  test -z "$as_dir" && as_dir=.
41005    for ac_exec_ext in '' $ac_executable_extensions; do
41006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41007    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41009    break 2
41010  fi
41011done
41012  done
41013IFS=$as_save_IFS
41014
41015fi
41016fi
41017ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41018if test -n "$ac_ct_OBJCOPY"; then
41019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41020$as_echo "$ac_ct_OBJCOPY" >&6; }
41021else
41022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41023$as_echo "no" >&6; }
41024fi
41025
41026
41027  test -n "$ac_ct_OBJCOPY" && break
41028done
41029
41030  if test "x$ac_ct_OBJCOPY" = x; then
41031    OBJCOPY=""
41032  else
41033    case $cross_compiling:$ac_tool_warned in
41034yes:)
41035{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41036$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41037ac_tool_warned=yes ;;
41038esac
41039    OBJCOPY=$ac_ct_OBJCOPY
41040  fi
41041fi
41042
41043    else
41044      # If it succeeded, then it was overridden by the user. We will use it
41045      # for the tool.
41046
41047      # First remove it from the list of overridden variables, so we can test
41048      # for unknown variables in the end.
41049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41050
41051      # Check if we try to supply an empty value
41052      if test "x$OBJCOPY" = x; then
41053        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41054$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41056$as_echo_n "checking for OBJCOPY... " >&6; }
41057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41058$as_echo "disabled" >&6; }
41059      else
41060        # Check if the provided tool contains a complete path.
41061        tool_specified="$OBJCOPY"
41062        tool_basename="${tool_specified##*/}"
41063        if test "x$tool_basename" = "x$tool_specified"; then
41064          # A command without a complete path is provided, search $PATH.
41065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41066$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41067          # Extract the first word of "$tool_basename", so it can be a program name with args.
41068set dummy $tool_basename; ac_word=$2
41069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41070$as_echo_n "checking for $ac_word... " >&6; }
41071if ${ac_cv_path_OBJCOPY+:} false; then :
41072  $as_echo_n "(cached) " >&6
41073else
41074  case $OBJCOPY in
41075  [\\/]* | ?:[\\/]*)
41076  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41077  ;;
41078  *)
41079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094  ;;
41095esac
41096fi
41097OBJCOPY=$ac_cv_path_OBJCOPY
41098if test -n "$OBJCOPY"; then
41099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41100$as_echo "$OBJCOPY" >&6; }
41101else
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41103$as_echo "no" >&6; }
41104fi
41105
41106
41107          if test "x$OBJCOPY" = x; then
41108            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41109          fi
41110        else
41111          # Otherwise we believe it is a complete path. Use it as it is.
41112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41113$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41114          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41115$as_echo_n "checking for OBJCOPY... " >&6; }
41116          if test ! -x "$tool_specified"; then
41117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41118$as_echo "not found" >&6; }
41119            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41120          fi
41121          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41122$as_echo "$tool_specified" >&6; }
41123        fi
41124      fi
41125    fi
41126
41127  fi
41128
41129
41130    # Only call fixup if objcopy was found.
41131    if test -n "$OBJCOPY"; then
41132
41133  # Only process if variable expands to non-empty
41134
41135  if test "x$OBJCOPY" != x; then
41136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41137
41138  # First separate the path from the arguments. This will split at the first
41139  # space.
41140  complete="$OBJCOPY"
41141  path="${complete%% *}"
41142  tmp="$complete EOL"
41143  arguments="${tmp#* }"
41144
41145  # Input might be given as Windows format, start by converting to
41146  # unix format.
41147  new_path=`$CYGPATH -u "$path"`
41148
41149  # Now try to locate executable using which
41150  new_path=`$WHICH "$new_path" 2> /dev/null`
41151  # bat and cmd files are not always considered executable in cygwin causing which
41152  # to not find them
41153  if test "x$new_path" = x \
41154      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41155      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41156    new_path=`$CYGPATH -u "$path"`
41157  fi
41158  if test "x$new_path" = x; then
41159    # Oops. Which didn't find the executable.
41160    # The splitting of arguments from the executable at a space might have been incorrect,
41161    # since paths with space are more likely in Windows. Give it another try with the whole
41162    # argument.
41163    path="$complete"
41164    arguments="EOL"
41165    new_path=`$CYGPATH -u "$path"`
41166    new_path=`$WHICH "$new_path" 2> /dev/null`
41167    # bat and cmd files are not always considered executable in cygwin causing which
41168    # to not find them
41169    if test "x$new_path" = x \
41170        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41171        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41172      new_path=`$CYGPATH -u "$path"`
41173    fi
41174    if test "x$new_path" = x; then
41175      # It's still not found. Now this is an unrecoverable error.
41176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41177$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41178      has_space=`$ECHO "$complete" | $GREP " "`
41179      if test "x$has_space" != x; then
41180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41182      fi
41183      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41184    fi
41185  fi
41186
41187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41190  # "foo.exe" is OK but "foo" is an error.
41191  #
41192  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41193  # It is also a way to make sure we got the proper file name for the real test later on.
41194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41195  if test "x$test_shortpath" = x; then
41196    # Short path failed, file does not exist as specified.
41197    # Try adding .exe or .cmd
41198    if test -f "${new_path}.exe"; then
41199      input_to_shortpath="${new_path}.exe"
41200    elif test -f "${new_path}.cmd"; then
41201      input_to_shortpath="${new_path}.cmd"
41202    else
41203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41204$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41205      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41206$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41207      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41208    fi
41209  else
41210    input_to_shortpath="$new_path"
41211  fi
41212
41213  # Call helper function which possibly converts this using DOS-style short mode.
41214  # If so, the updated path is stored in $new_path.
41215  new_path="$input_to_shortpath"
41216
41217  input_path="$input_to_shortpath"
41218  # Check if we need to convert this using DOS-style short mode. If the path
41219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41220  # take no chances and rewrite it.
41221  # Note: m4 eats our [], so we need to use [ and ] instead.
41222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41223  if test "x$has_forbidden_chars" != x; then
41224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41228      # Going to short mode and back again did indeed matter. Since short mode is
41229      # case insensitive, let's make it lowercase to improve readability.
41230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41231      # Now convert it back to Unix-style (cygpath)
41232      input_path=`$CYGPATH -u "$shortmode_path"`
41233      new_path="$input_path"
41234    fi
41235  fi
41236
41237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41238  if test "x$test_cygdrive_prefix" = x; then
41239    # As a simple fix, exclude /usr/bin since it's not a real path.
41240    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41242      # a path prefixed by /cygdrive for fixpath to work.
41243      new_path="$CYGWIN_ROOT_PATH$input_path"
41244    fi
41245  fi
41246
41247  # remove trailing .exe if any
41248  new_path="${new_path/%.exe/}"
41249
41250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41251
41252  # First separate the path from the arguments. This will split at the first
41253  # space.
41254  complete="$OBJCOPY"
41255  path="${complete%% *}"
41256  tmp="$complete EOL"
41257  arguments="${tmp#* }"
41258
41259  # Input might be given as Windows format, start by converting to
41260  # unix format.
41261  new_path="$path"
41262
41263  windows_path="$new_path"
41264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41265    unix_path=`$CYGPATH -u "$windows_path"`
41266    new_path="$unix_path"
41267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41269    new_path="$unix_path"
41270  fi
41271
41272
41273  # Now try to locate executable using which
41274  new_path=`$WHICH "$new_path" 2> /dev/null`
41275
41276  if test "x$new_path" = x; then
41277    # Oops. Which didn't find the executable.
41278    # The splitting of arguments from the executable at a space might have been incorrect,
41279    # since paths with space are more likely in Windows. Give it another try with the whole
41280    # argument.
41281    path="$complete"
41282    arguments="EOL"
41283    new_path="$path"
41284
41285  windows_path="$new_path"
41286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41287    unix_path=`$CYGPATH -u "$windows_path"`
41288    new_path="$unix_path"
41289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41291    new_path="$unix_path"
41292  fi
41293
41294
41295    new_path=`$WHICH "$new_path" 2> /dev/null`
41296    # bat and cmd files are not always considered executable in MSYS causing which
41297    # to not find them
41298    if test "x$new_path" = x \
41299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41301      new_path="$path"
41302
41303  windows_path="$new_path"
41304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41305    unix_path=`$CYGPATH -u "$windows_path"`
41306    new_path="$unix_path"
41307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41309    new_path="$unix_path"
41310  fi
41311
41312    fi
41313
41314    if test "x$new_path" = x; then
41315      # It's still not found. Now this is an unrecoverable error.
41316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41317$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41318      has_space=`$ECHO "$complete" | $GREP " "`
41319      if test "x$has_space" != x; then
41320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41322      fi
41323      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41324    fi
41325  fi
41326
41327  # Now new_path has a complete unix path to the binary
41328  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41329    # Keep paths in /bin as-is, but remove trailing .exe if any
41330    new_path="${new_path/%.exe/}"
41331    # Do not save /bin paths to all_fixpath_prefixes!
41332  else
41333    # Not in mixed or Windows style, start by that.
41334    new_path=`cmd //c echo $new_path`
41335
41336  input_path="$new_path"
41337  # Check if we need to convert this using DOS-style short mode. If the path
41338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41339  # take no chances and rewrite it.
41340  # Note: m4 eats our [], so we need to use [ and ] instead.
41341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41342  if test "x$has_forbidden_chars" != x; then
41343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41345  fi
41346
41347    # Output is in $new_path
41348
41349  windows_path="$new_path"
41350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41351    unix_path=`$CYGPATH -u "$windows_path"`
41352    new_path="$unix_path"
41353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41355    new_path="$unix_path"
41356  fi
41357
41358    # remove trailing .exe if any
41359    new_path="${new_path/%.exe/}"
41360
41361    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41362    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41363  fi
41364
41365    else
41366      # We're on a unix platform. Hooray! :)
41367      # First separate the path from the arguments. This will split at the first
41368      # space.
41369      complete="$OBJCOPY"
41370      path="${complete%% *}"
41371      tmp="$complete EOL"
41372      arguments="${tmp#* }"
41373
41374      # Cannot rely on the command "which" here since it doesn't always work.
41375      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41376      if test -z "$is_absolute_path"; then
41377        # Path to executable is not absolute. Find it.
41378        IFS_save="$IFS"
41379        IFS=:
41380        for p in $PATH; do
41381          if test -f "$p/$path" && test -x "$p/$path"; then
41382            new_path="$p/$path"
41383            break
41384          fi
41385        done
41386        IFS="$IFS_save"
41387      else
41388        # This is an absolute path, we can use it without further modifications.
41389        new_path="$path"
41390      fi
41391
41392      if test "x$new_path" = x; then
41393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41394$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41395        has_space=`$ECHO "$complete" | $GREP " "`
41396        if test "x$has_space" != x; then
41397          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41398$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41399        fi
41400        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41401      fi
41402    fi
41403
41404    # Now join together the path and the arguments once again
41405    if test "x$arguments" != xEOL; then
41406      new_complete="$new_path ${arguments% *}"
41407    else
41408      new_complete="$new_path"
41409    fi
41410
41411    if test "x$complete" != "x$new_complete"; then
41412      OBJCOPY="$new_complete"
41413      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41414$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41415    fi
41416  fi
41417
41418      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41419        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41420        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41421        # - version number is last blank separate word on first line
41422        # - version number formats that have been seen:
41423        #   - <major>.<minor>
41424        #   - <major>.<minor>.<micro>
41425        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41426        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41427         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41428              -e 's/.* //' \
41429              -e '/^[01]\./b bad' \
41430              -e '/^2\./{' \
41431              -e '  s/^2\.//' \
41432              -e '  /^[0-9]$/b bad' \
41433              -e '  /^[0-9]\./b bad' \
41434              -e '  /^1[0-9]$/b bad' \
41435              -e '  /^1[0-9]\./b bad' \
41436              -e '  /^20\./b bad' \
41437              -e '  /^21\.0$/b bad' \
41438              -e '  /^21\.0\./b bad' \
41439              -e '}' \
41440              -e ':good' \
41441              -e 's/.*/VALID_VERSION/p' \
41442              -e 'q' \
41443              -e ':bad' \
41444              -e 's/.*/BAD_VERSION/p' \
41445              -e 'q'`
41446        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41447          OBJCOPY=
41448          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
41449$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41450          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41451$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41452          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41453$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41454          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41455$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41456          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41457$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41458        fi
41459      fi
41460    fi
41461  fi
41462
41463
41464
41465  # Publish this variable in the help.
41466
41467
41468  if [ -z "${OBJDUMP+x}" ]; then
41469    # The variable is not set by user, try to locate tool using the code snippet
41470    if test -n "$ac_tool_prefix"; then
41471  for ac_prog in gobjdump objdump
41472  do
41473    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41474set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41476$as_echo_n "checking for $ac_word... " >&6; }
41477if ${ac_cv_prog_OBJDUMP+:} false; then :
41478  $as_echo_n "(cached) " >&6
41479else
41480  if test -n "$OBJDUMP"; then
41481  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41482else
41483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41484for as_dir in $PATH
41485do
41486  IFS=$as_save_IFS
41487  test -z "$as_dir" && as_dir=.
41488    for ac_exec_ext in '' $ac_executable_extensions; do
41489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41490    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41492    break 2
41493  fi
41494done
41495  done
41496IFS=$as_save_IFS
41497
41498fi
41499fi
41500OBJDUMP=$ac_cv_prog_OBJDUMP
41501if test -n "$OBJDUMP"; then
41502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41503$as_echo "$OBJDUMP" >&6; }
41504else
41505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41506$as_echo "no" >&6; }
41507fi
41508
41509
41510    test -n "$OBJDUMP" && break
41511  done
41512fi
41513if test -z "$OBJDUMP"; then
41514  ac_ct_OBJDUMP=$OBJDUMP
41515  for ac_prog in gobjdump objdump
41516do
41517  # Extract the first word of "$ac_prog", so it can be a program name with args.
41518set dummy $ac_prog; ac_word=$2
41519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41520$as_echo_n "checking for $ac_word... " >&6; }
41521if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41522  $as_echo_n "(cached) " >&6
41523else
41524  if test -n "$ac_ct_OBJDUMP"; then
41525  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41526else
41527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41528for as_dir in $PATH
41529do
41530  IFS=$as_save_IFS
41531  test -z "$as_dir" && as_dir=.
41532    for ac_exec_ext in '' $ac_executable_extensions; do
41533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41534    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41536    break 2
41537  fi
41538done
41539  done
41540IFS=$as_save_IFS
41541
41542fi
41543fi
41544ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41545if test -n "$ac_ct_OBJDUMP"; then
41546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41547$as_echo "$ac_ct_OBJDUMP" >&6; }
41548else
41549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41550$as_echo "no" >&6; }
41551fi
41552
41553
41554  test -n "$ac_ct_OBJDUMP" && break
41555done
41556
41557  if test "x$ac_ct_OBJDUMP" = x; then
41558    OBJDUMP=""
41559  else
41560    case $cross_compiling:$ac_tool_warned in
41561yes:)
41562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41564ac_tool_warned=yes ;;
41565esac
41566    OBJDUMP=$ac_ct_OBJDUMP
41567  fi
41568fi
41569
41570  else
41571    # The variable is set, but is it from the command line or the environment?
41572
41573    # Try to remove the string !OBJDUMP! from our list.
41574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41576      # If it failed, the variable was not from the command line. Ignore it,
41577      # but warn the user (except for BASH, which is always set by the calling BASH).
41578      if test "xOBJDUMP" != xBASH; then
41579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41580$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41581      fi
41582      # Try to locate tool using the code snippet
41583      if test -n "$ac_tool_prefix"; then
41584  for ac_prog in gobjdump objdump
41585  do
41586    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41589$as_echo_n "checking for $ac_word... " >&6; }
41590if ${ac_cv_prog_OBJDUMP+:} false; then :
41591  $as_echo_n "(cached) " >&6
41592else
41593  if test -n "$OBJDUMP"; then
41594  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41595else
41596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41597for as_dir in $PATH
41598do
41599  IFS=$as_save_IFS
41600  test -z "$as_dir" && as_dir=.
41601    for ac_exec_ext in '' $ac_executable_extensions; do
41602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41603    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41605    break 2
41606  fi
41607done
41608  done
41609IFS=$as_save_IFS
41610
41611fi
41612fi
41613OBJDUMP=$ac_cv_prog_OBJDUMP
41614if test -n "$OBJDUMP"; then
41615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41616$as_echo "$OBJDUMP" >&6; }
41617else
41618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41619$as_echo "no" >&6; }
41620fi
41621
41622
41623    test -n "$OBJDUMP" && break
41624  done
41625fi
41626if test -z "$OBJDUMP"; then
41627  ac_ct_OBJDUMP=$OBJDUMP
41628  for ac_prog in gobjdump objdump
41629do
41630  # Extract the first word of "$ac_prog", so it can be a program name with args.
41631set dummy $ac_prog; ac_word=$2
41632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41633$as_echo_n "checking for $ac_word... " >&6; }
41634if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41635  $as_echo_n "(cached) " >&6
41636else
41637  if test -n "$ac_ct_OBJDUMP"; then
41638  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41639else
41640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41641for as_dir in $PATH
41642do
41643  IFS=$as_save_IFS
41644  test -z "$as_dir" && as_dir=.
41645    for ac_exec_ext in '' $ac_executable_extensions; do
41646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41647    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41649    break 2
41650  fi
41651done
41652  done
41653IFS=$as_save_IFS
41654
41655fi
41656fi
41657ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41658if test -n "$ac_ct_OBJDUMP"; then
41659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41660$as_echo "$ac_ct_OBJDUMP" >&6; }
41661else
41662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41663$as_echo "no" >&6; }
41664fi
41665
41666
41667  test -n "$ac_ct_OBJDUMP" && break
41668done
41669
41670  if test "x$ac_ct_OBJDUMP" = x; then
41671    OBJDUMP=""
41672  else
41673    case $cross_compiling:$ac_tool_warned in
41674yes:)
41675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41677ac_tool_warned=yes ;;
41678esac
41679    OBJDUMP=$ac_ct_OBJDUMP
41680  fi
41681fi
41682
41683    else
41684      # If it succeeded, then it was overridden by the user. We will use it
41685      # for the tool.
41686
41687      # First remove it from the list of overridden variables, so we can test
41688      # for unknown variables in the end.
41689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41690
41691      # Check if we try to supply an empty value
41692      if test "x$OBJDUMP" = x; then
41693        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41694$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41696$as_echo_n "checking for OBJDUMP... " >&6; }
41697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41698$as_echo "disabled" >&6; }
41699      else
41700        # Check if the provided tool contains a complete path.
41701        tool_specified="$OBJDUMP"
41702        tool_basename="${tool_specified##*/}"
41703        if test "x$tool_basename" = "x$tool_specified"; then
41704          # A command without a complete path is provided, search $PATH.
41705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41706$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41707          # Extract the first word of "$tool_basename", so it can be a program name with args.
41708set dummy $tool_basename; ac_word=$2
41709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41710$as_echo_n "checking for $ac_word... " >&6; }
41711if ${ac_cv_path_OBJDUMP+:} false; then :
41712  $as_echo_n "(cached) " >&6
41713else
41714  case $OBJDUMP in
41715  [\\/]* | ?:[\\/]*)
41716  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41717  ;;
41718  *)
41719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41720for as_dir in $PATH
41721do
41722  IFS=$as_save_IFS
41723  test -z "$as_dir" && as_dir=.
41724    for ac_exec_ext in '' $ac_executable_extensions; do
41725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41726    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41728    break 2
41729  fi
41730done
41731  done
41732IFS=$as_save_IFS
41733
41734  ;;
41735esac
41736fi
41737OBJDUMP=$ac_cv_path_OBJDUMP
41738if test -n "$OBJDUMP"; then
41739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41740$as_echo "$OBJDUMP" >&6; }
41741else
41742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41743$as_echo "no" >&6; }
41744fi
41745
41746
41747          if test "x$OBJDUMP" = x; then
41748            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41749          fi
41750        else
41751          # Otherwise we believe it is a complete path. Use it as it is.
41752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41753$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41754          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41755$as_echo_n "checking for OBJDUMP... " >&6; }
41756          if test ! -x "$tool_specified"; then
41757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41758$as_echo "not found" >&6; }
41759            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41760          fi
41761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41762$as_echo "$tool_specified" >&6; }
41763        fi
41764      fi
41765    fi
41766
41767  fi
41768
41769
41770  if test "x$OBJDUMP" != x; then
41771    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41772    # bails if argument is missing.
41773
41774  # Only process if variable expands to non-empty
41775
41776  if test "x$OBJDUMP" != x; then
41777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41778
41779  # First separate the path from the arguments. This will split at the first
41780  # space.
41781  complete="$OBJDUMP"
41782  path="${complete%% *}"
41783  tmp="$complete EOL"
41784  arguments="${tmp#* }"
41785
41786  # Input might be given as Windows format, start by converting to
41787  # unix format.
41788  new_path=`$CYGPATH -u "$path"`
41789
41790  # Now try to locate executable using which
41791  new_path=`$WHICH "$new_path" 2> /dev/null`
41792  # bat and cmd files are not always considered executable in cygwin causing which
41793  # to not find them
41794  if test "x$new_path" = x \
41795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41797    new_path=`$CYGPATH -u "$path"`
41798  fi
41799  if test "x$new_path" = x; then
41800    # Oops. Which didn't find the executable.
41801    # The splitting of arguments from the executable at a space might have been incorrect,
41802    # since paths with space are more likely in Windows. Give it another try with the whole
41803    # argument.
41804    path="$complete"
41805    arguments="EOL"
41806    new_path=`$CYGPATH -u "$path"`
41807    new_path=`$WHICH "$new_path" 2> /dev/null`
41808    # bat and cmd files are not always considered executable in cygwin causing which
41809    # to not find them
41810    if test "x$new_path" = x \
41811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41813      new_path=`$CYGPATH -u "$path"`
41814    fi
41815    if test "x$new_path" = x; then
41816      # It's still not found. Now this is an unrecoverable error.
41817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41818$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41819      has_space=`$ECHO "$complete" | $GREP " "`
41820      if test "x$has_space" != x; then
41821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41823      fi
41824      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41825    fi
41826  fi
41827
41828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41831  # "foo.exe" is OK but "foo" is an error.
41832  #
41833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41834  # It is also a way to make sure we got the proper file name for the real test later on.
41835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41836  if test "x$test_shortpath" = x; then
41837    # Short path failed, file does not exist as specified.
41838    # Try adding .exe or .cmd
41839    if test -f "${new_path}.exe"; then
41840      input_to_shortpath="${new_path}.exe"
41841    elif test -f "${new_path}.cmd"; then
41842      input_to_shortpath="${new_path}.cmd"
41843    else
41844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41845$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41848      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41849    fi
41850  else
41851    input_to_shortpath="$new_path"
41852  fi
41853
41854  # Call helper function which possibly converts this using DOS-style short mode.
41855  # If so, the updated path is stored in $new_path.
41856  new_path="$input_to_shortpath"
41857
41858  input_path="$input_to_shortpath"
41859  # Check if we need to convert this using DOS-style short mode. If the path
41860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41861  # take no chances and rewrite it.
41862  # Note: m4 eats our [], so we need to use [ and ] instead.
41863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41864  if test "x$has_forbidden_chars" != x; then
41865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41869      # Going to short mode and back again did indeed matter. Since short mode is
41870      # case insensitive, let's make it lowercase to improve readability.
41871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41872      # Now convert it back to Unix-style (cygpath)
41873      input_path=`$CYGPATH -u "$shortmode_path"`
41874      new_path="$input_path"
41875    fi
41876  fi
41877
41878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41879  if test "x$test_cygdrive_prefix" = x; then
41880    # As a simple fix, exclude /usr/bin since it's not a real path.
41881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41883      # a path prefixed by /cygdrive for fixpath to work.
41884      new_path="$CYGWIN_ROOT_PATH$input_path"
41885    fi
41886  fi
41887
41888  # remove trailing .exe if any
41889  new_path="${new_path/%.exe/}"
41890
41891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41892
41893  # First separate the path from the arguments. This will split at the first
41894  # space.
41895  complete="$OBJDUMP"
41896  path="${complete%% *}"
41897  tmp="$complete EOL"
41898  arguments="${tmp#* }"
41899
41900  # Input might be given as Windows format, start by converting to
41901  # unix format.
41902  new_path="$path"
41903
41904  windows_path="$new_path"
41905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41906    unix_path=`$CYGPATH -u "$windows_path"`
41907    new_path="$unix_path"
41908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41910    new_path="$unix_path"
41911  fi
41912
41913
41914  # Now try to locate executable using which
41915  new_path=`$WHICH "$new_path" 2> /dev/null`
41916
41917  if test "x$new_path" = x; then
41918    # Oops. Which didn't find the executable.
41919    # The splitting of arguments from the executable at a space might have been incorrect,
41920    # since paths with space are more likely in Windows. Give it another try with the whole
41921    # argument.
41922    path="$complete"
41923    arguments="EOL"
41924    new_path="$path"
41925
41926  windows_path="$new_path"
41927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41928    unix_path=`$CYGPATH -u "$windows_path"`
41929    new_path="$unix_path"
41930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41932    new_path="$unix_path"
41933  fi
41934
41935
41936    new_path=`$WHICH "$new_path" 2> /dev/null`
41937    # bat and cmd files are not always considered executable in MSYS causing which
41938    # to not find them
41939    if test "x$new_path" = x \
41940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41942      new_path="$path"
41943
41944  windows_path="$new_path"
41945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41946    unix_path=`$CYGPATH -u "$windows_path"`
41947    new_path="$unix_path"
41948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41950    new_path="$unix_path"
41951  fi
41952
41953    fi
41954
41955    if test "x$new_path" = x; then
41956      # It's still not found. Now this is an unrecoverable error.
41957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41958$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41959      has_space=`$ECHO "$complete" | $GREP " "`
41960      if test "x$has_space" != x; then
41961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41963      fi
41964      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41965    fi
41966  fi
41967
41968  # Now new_path has a complete unix path to the binary
41969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41970    # Keep paths in /bin as-is, but remove trailing .exe if any
41971    new_path="${new_path/%.exe/}"
41972    # Do not save /bin paths to all_fixpath_prefixes!
41973  else
41974    # Not in mixed or Windows style, start by that.
41975    new_path=`cmd //c echo $new_path`
41976
41977  input_path="$new_path"
41978  # Check if we need to convert this using DOS-style short mode. If the path
41979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41980  # take no chances and rewrite it.
41981  # Note: m4 eats our [], so we need to use [ and ] instead.
41982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41983  if test "x$has_forbidden_chars" != x; then
41984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41986  fi
41987
41988    # Output is in $new_path
41989
41990  windows_path="$new_path"
41991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41992    unix_path=`$CYGPATH -u "$windows_path"`
41993    new_path="$unix_path"
41994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41996    new_path="$unix_path"
41997  fi
41998
41999    # remove trailing .exe if any
42000    new_path="${new_path/%.exe/}"
42001
42002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42004  fi
42005
42006    else
42007      # We're on a unix platform. Hooray! :)
42008      # First separate the path from the arguments. This will split at the first
42009      # space.
42010      complete="$OBJDUMP"
42011      path="${complete%% *}"
42012      tmp="$complete EOL"
42013      arguments="${tmp#* }"
42014
42015      # Cannot rely on the command "which" here since it doesn't always work.
42016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42017      if test -z "$is_absolute_path"; then
42018        # Path to executable is not absolute. Find it.
42019        IFS_save="$IFS"
42020        IFS=:
42021        for p in $PATH; do
42022          if test -f "$p/$path" && test -x "$p/$path"; then
42023            new_path="$p/$path"
42024            break
42025          fi
42026        done
42027        IFS="$IFS_save"
42028      else
42029        # This is an absolute path, we can use it without further modifications.
42030        new_path="$path"
42031      fi
42032
42033      if test "x$new_path" = x; then
42034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42035$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42036        has_space=`$ECHO "$complete" | $GREP " "`
42037        if test "x$has_space" != x; then
42038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42040        fi
42041        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42042      fi
42043    fi
42044
42045    # Now join together the path and the arguments once again
42046    if test "x$arguments" != xEOL; then
42047      new_complete="$new_path ${arguments% *}"
42048    else
42049      new_complete="$new_path"
42050    fi
42051
42052    if test "x$complete" != "x$new_complete"; then
42053      OBJDUMP="$new_complete"
42054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42055$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42056    fi
42057  fi
42058
42059  fi
42060
42061
42062  # Restore old path.
42063  PATH="$OLD_PATH"
42064
42065  # Restore the flags to the user specified values.
42066  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42067  CFLAGS="$ORG_CFLAGS"
42068  CXXFLAGS="$ORG_CXXFLAGS"
42069
42070
42071# Finally do some processing after the detection phase
42072
42073  if test "x$COMPILE_TYPE" = "xcross"; then
42074    # Now we need to find a C/C++ compiler that can build executables for the
42075    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42076    # used once. Also, we need to do this without adding a tools dir to the
42077    # path, otherwise we might pick up cross-compilers which don't use standard
42078    # naming.
42079
42080    OLDPATH="$PATH"
42081
42082
42083# Check whether --with-build-devkit was given.
42084if test "${with_build_devkit+set}" = set; then :
42085  withval=$with_build_devkit;
42086fi
42087
42088    if test "x$with_build_devkit" = "xyes"; then
42089      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42090    elif test -n "$with_build_devkit"; then
42091      if test ! -d "$with_build_devkit"; then
42092        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42093      else
42094
42095  # Only process if variable expands to non-empty
42096
42097  if test "x$with_build_devkit" != x; then
42098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42099
42100  # Input might be given as Windows format, start by converting to
42101  # unix format.
42102  path="$with_build_devkit"
42103  new_path=`$CYGPATH -u "$path"`
42104
42105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42108  # "foo.exe" is OK but "foo" is an error.
42109  #
42110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42111  # It is also a way to make sure we got the proper file name for the real test later on.
42112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42113  if test "x$test_shortpath" = x; then
42114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42115$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42116    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42117  fi
42118
42119  # Call helper function which possibly converts this using DOS-style short mode.
42120  # If so, the updated path is stored in $new_path.
42121
42122  input_path="$new_path"
42123  # Check if we need to convert this using DOS-style short mode. If the path
42124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42125  # take no chances and rewrite it.
42126  # Note: m4 eats our [], so we need to use [ and ] instead.
42127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42128  if test "x$has_forbidden_chars" != x; then
42129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42133      # Going to short mode and back again did indeed matter. Since short mode is
42134      # case insensitive, let's make it lowercase to improve readability.
42135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42136      # Now convert it back to Unix-style (cygpath)
42137      input_path=`$CYGPATH -u "$shortmode_path"`
42138      new_path="$input_path"
42139    fi
42140  fi
42141
42142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42143  if test "x$test_cygdrive_prefix" = x; then
42144    # As a simple fix, exclude /usr/bin since it's not a real path.
42145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42147      # a path prefixed by /cygdrive for fixpath to work.
42148      new_path="$CYGWIN_ROOT_PATH$input_path"
42149    fi
42150  fi
42151
42152
42153  if test "x$path" != "x$new_path"; then
42154    with_build_devkit="$new_path"
42155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42156$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42157  fi
42158
42159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42160
42161  path="$with_build_devkit"
42162  has_colon=`$ECHO $path | $GREP ^.:`
42163  new_path="$path"
42164  if test "x$has_colon" = x; then
42165    # Not in mixed or Windows style, start by that.
42166    new_path=`cmd //c echo $path`
42167  fi
42168
42169
42170  input_path="$new_path"
42171  # Check if we need to convert this using DOS-style short mode. If the path
42172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42173  # take no chances and rewrite it.
42174  # Note: m4 eats our [], so we need to use [ and ] instead.
42175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42176  if test "x$has_forbidden_chars" != x; then
42177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42179  fi
42180
42181
42182  windows_path="$new_path"
42183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42184    unix_path=`$CYGPATH -u "$windows_path"`
42185    new_path="$unix_path"
42186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42188    new_path="$unix_path"
42189  fi
42190
42191  if test "x$path" != "x$new_path"; then
42192    with_build_devkit="$new_path"
42193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42194$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42195  fi
42196
42197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42199
42200    else
42201      # We're on a unix platform. Hooray! :)
42202      path="$with_build_devkit"
42203      has_space=`$ECHO "$path" | $GREP " "`
42204      if test "x$has_space" != x; then
42205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42206$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42208      fi
42209
42210      # Use eval to expand a potential ~
42211      eval path="$path"
42212      if test ! -f "$path" && test ! -d "$path"; then
42213        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42214      fi
42215
42216      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42217    fi
42218  fi
42219
42220        BUILD_DEVKIT_ROOT="$with_build_devkit"
42221        # Check for a meta data info file in the root of the devkit
42222        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42223          # Process devkit.info so that existing devkit variables are not
42224          # modified by this
42225          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42226              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42227              -e "s/\$host/\$build/g" \
42228              $BUILD_DEVKIT_ROOT/devkit.info \
42229              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42230          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42231          # This potentially sets the following:
42232          # A descriptive name of the devkit
42233
42234  if test "x$BUILD_DEVKIT_NAME" = x; then
42235    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42236  fi
42237
42238          # Corresponds to --with-extra-path
42239
42240  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42241    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42242  fi
42243
42244          # Corresponds to --with-toolchain-path
42245
42246  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42247    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42248  fi
42249
42250          # Corresponds to --with-sysroot
42251
42252  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42253    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42254  fi
42255
42256          # Skip the Window specific parts
42257        fi
42258
42259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42260$as_echo_n "checking for build platform devkit... " >&6; }
42261        if test "x$BUILD_DEVKIT_NAME" != x; then
42262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42263$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42264        else
42265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42266$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42267        fi
42268
42269        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42270
42271  if test "x$BUILD_SYSROOT" != "x"; then
42272    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42273      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42274        # Solaris Studio does not have a concept of sysroot. Instead we must
42275        # make sure the default include and lib dirs are appended to each
42276        # compile and link command line.
42277        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42278        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42279            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42280            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42281      fi
42282    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42283      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42284      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42285    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42286      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42287      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42288    fi
42289    # Propagate the sysroot args to hotspot
42290    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42291    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42292    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42293    # The global CFLAGS and LDFLAGS variables need these for configure to function
42294    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42295    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42296    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42297    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42298  fi
42299
42300  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42301    # We also need -iframework<path>/System/Library/Frameworks
42302    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42303    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42304    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42305    # set this here so it doesn't have to be peppered throughout the forest
42306    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42307    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42308  fi
42309
42310
42311
42312
42313
42314         # Fallback default of just /bin if DEVKIT_PATH is not defined
42315        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42316          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42317        fi
42318        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42319      fi
42320    fi
42321
42322    # FIXME: we should list the discovered compilers as an exclude pattern!
42323    # If we do that, we can do this detection before POST_DETECTION, and still
42324    # find the build compilers in the tools dir, if needed.
42325
42326
42327
42328  # Publish this variable in the help.
42329
42330
42331  if [ -z "${BUILD_CC+x}" ]; then
42332    # The variable is not set by user, try to locate tool using the code snippet
42333    for ac_prog in cl cc gcc
42334do
42335  # Extract the first word of "$ac_prog", so it can be a program name with args.
42336set dummy $ac_prog; ac_word=$2
42337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42338$as_echo_n "checking for $ac_word... " >&6; }
42339if ${ac_cv_path_BUILD_CC+:} false; then :
42340  $as_echo_n "(cached) " >&6
42341else
42342  case $BUILD_CC in
42343  [\\/]* | ?:[\\/]*)
42344  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42345  ;;
42346  *)
42347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42348for as_dir in $PATH
42349do
42350  IFS=$as_save_IFS
42351  test -z "$as_dir" && as_dir=.
42352    for ac_exec_ext in '' $ac_executable_extensions; do
42353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42354    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42356    break 2
42357  fi
42358done
42359  done
42360IFS=$as_save_IFS
42361
42362  ;;
42363esac
42364fi
42365BUILD_CC=$ac_cv_path_BUILD_CC
42366if test -n "$BUILD_CC"; then
42367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42368$as_echo "$BUILD_CC" >&6; }
42369else
42370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42371$as_echo "no" >&6; }
42372fi
42373
42374
42375  test -n "$BUILD_CC" && break
42376done
42377
42378  else
42379    # The variable is set, but is it from the command line or the environment?
42380
42381    # Try to remove the string !BUILD_CC! from our list.
42382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42384      # If it failed, the variable was not from the command line. Ignore it,
42385      # but warn the user (except for BASH, which is always set by the calling BASH).
42386      if test "xBUILD_CC" != xBASH; then
42387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42388$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42389      fi
42390      # Try to locate tool using the code snippet
42391      for ac_prog in cl cc gcc
42392do
42393  # Extract the first word of "$ac_prog", so it can be a program name with args.
42394set dummy $ac_prog; ac_word=$2
42395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42396$as_echo_n "checking for $ac_word... " >&6; }
42397if ${ac_cv_path_BUILD_CC+:} false; then :
42398  $as_echo_n "(cached) " >&6
42399else
42400  case $BUILD_CC in
42401  [\\/]* | ?:[\\/]*)
42402  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42403  ;;
42404  *)
42405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42406for as_dir in $PATH
42407do
42408  IFS=$as_save_IFS
42409  test -z "$as_dir" && as_dir=.
42410    for ac_exec_ext in '' $ac_executable_extensions; do
42411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42412    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42414    break 2
42415  fi
42416done
42417  done
42418IFS=$as_save_IFS
42419
42420  ;;
42421esac
42422fi
42423BUILD_CC=$ac_cv_path_BUILD_CC
42424if test -n "$BUILD_CC"; then
42425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42426$as_echo "$BUILD_CC" >&6; }
42427else
42428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42429$as_echo "no" >&6; }
42430fi
42431
42432
42433  test -n "$BUILD_CC" && break
42434done
42435
42436    else
42437      # If it succeeded, then it was overridden by the user. We will use it
42438      # for the tool.
42439
42440      # First remove it from the list of overridden variables, so we can test
42441      # for unknown variables in the end.
42442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42443
42444      # Check if we try to supply an empty value
42445      if test "x$BUILD_CC" = x; then
42446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42447$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42449$as_echo_n "checking for BUILD_CC... " >&6; }
42450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42451$as_echo "disabled" >&6; }
42452      else
42453        # Check if the provided tool contains a complete path.
42454        tool_specified="$BUILD_CC"
42455        tool_basename="${tool_specified##*/}"
42456        if test "x$tool_basename" = "x$tool_specified"; then
42457          # A command without a complete path is provided, search $PATH.
42458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42459$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42460          # Extract the first word of "$tool_basename", so it can be a program name with args.
42461set dummy $tool_basename; ac_word=$2
42462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42463$as_echo_n "checking for $ac_word... " >&6; }
42464if ${ac_cv_path_BUILD_CC+:} false; then :
42465  $as_echo_n "(cached) " >&6
42466else
42467  case $BUILD_CC in
42468  [\\/]* | ?:[\\/]*)
42469  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42470  ;;
42471  *)
42472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42473for as_dir in $PATH
42474do
42475  IFS=$as_save_IFS
42476  test -z "$as_dir" && as_dir=.
42477    for ac_exec_ext in '' $ac_executable_extensions; do
42478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42479    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42481    break 2
42482  fi
42483done
42484  done
42485IFS=$as_save_IFS
42486
42487  ;;
42488esac
42489fi
42490BUILD_CC=$ac_cv_path_BUILD_CC
42491if test -n "$BUILD_CC"; then
42492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42493$as_echo "$BUILD_CC" >&6; }
42494else
42495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42496$as_echo "no" >&6; }
42497fi
42498
42499
42500          if test "x$BUILD_CC" = x; then
42501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42502          fi
42503        else
42504          # Otherwise we believe it is a complete path. Use it as it is.
42505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42506$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42508$as_echo_n "checking for BUILD_CC... " >&6; }
42509          if test ! -x "$tool_specified"; then
42510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42511$as_echo "not found" >&6; }
42512            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42513          fi
42514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42515$as_echo "$tool_specified" >&6; }
42516        fi
42517      fi
42518    fi
42519
42520  fi
42521
42522
42523
42524  if test "x$BUILD_CC" = x; then
42525    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42526  fi
42527
42528
42529
42530  # Only process if variable expands to non-empty
42531
42532  if test "x$BUILD_CC" != x; then
42533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42534
42535  # First separate the path from the arguments. This will split at the first
42536  # space.
42537  complete="$BUILD_CC"
42538  path="${complete%% *}"
42539  tmp="$complete EOL"
42540  arguments="${tmp#* }"
42541
42542  # Input might be given as Windows format, start by converting to
42543  # unix format.
42544  new_path=`$CYGPATH -u "$path"`
42545
42546  # Now try to locate executable using which
42547  new_path=`$WHICH "$new_path" 2> /dev/null`
42548  # bat and cmd files are not always considered executable in cygwin causing which
42549  # to not find them
42550  if test "x$new_path" = x \
42551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42553    new_path=`$CYGPATH -u "$path"`
42554  fi
42555  if test "x$new_path" = x; then
42556    # Oops. Which didn't find the executable.
42557    # The splitting of arguments from the executable at a space might have been incorrect,
42558    # since paths with space are more likely in Windows. Give it another try with the whole
42559    # argument.
42560    path="$complete"
42561    arguments="EOL"
42562    new_path=`$CYGPATH -u "$path"`
42563    new_path=`$WHICH "$new_path" 2> /dev/null`
42564    # bat and cmd files are not always considered executable in cygwin causing which
42565    # to not find them
42566    if test "x$new_path" = x \
42567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42569      new_path=`$CYGPATH -u "$path"`
42570    fi
42571    if test "x$new_path" = x; then
42572      # It's still not found. Now this is an unrecoverable error.
42573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42574$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42575      has_space=`$ECHO "$complete" | $GREP " "`
42576      if test "x$has_space" != x; then
42577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42579      fi
42580      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42581    fi
42582  fi
42583
42584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42587  # "foo.exe" is OK but "foo" is an error.
42588  #
42589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42590  # It is also a way to make sure we got the proper file name for the real test later on.
42591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42592  if test "x$test_shortpath" = x; then
42593    # Short path failed, file does not exist as specified.
42594    # Try adding .exe or .cmd
42595    if test -f "${new_path}.exe"; then
42596      input_to_shortpath="${new_path}.exe"
42597    elif test -f "${new_path}.cmd"; then
42598      input_to_shortpath="${new_path}.cmd"
42599    else
42600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42601$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42604      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42605    fi
42606  else
42607    input_to_shortpath="$new_path"
42608  fi
42609
42610  # Call helper function which possibly converts this using DOS-style short mode.
42611  # If so, the updated path is stored in $new_path.
42612  new_path="$input_to_shortpath"
42613
42614  input_path="$input_to_shortpath"
42615  # Check if we need to convert this using DOS-style short mode. If the path
42616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42617  # take no chances and rewrite it.
42618  # Note: m4 eats our [], so we need to use [ and ] instead.
42619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42620  if test "x$has_forbidden_chars" != x; then
42621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42625      # Going to short mode and back again did indeed matter. Since short mode is
42626      # case insensitive, let's make it lowercase to improve readability.
42627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42628      # Now convert it back to Unix-style (cygpath)
42629      input_path=`$CYGPATH -u "$shortmode_path"`
42630      new_path="$input_path"
42631    fi
42632  fi
42633
42634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42635  if test "x$test_cygdrive_prefix" = x; then
42636    # As a simple fix, exclude /usr/bin since it's not a real path.
42637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42639      # a path prefixed by /cygdrive for fixpath to work.
42640      new_path="$CYGWIN_ROOT_PATH$input_path"
42641    fi
42642  fi
42643
42644  # remove trailing .exe if any
42645  new_path="${new_path/%.exe/}"
42646
42647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42648
42649  # First separate the path from the arguments. This will split at the first
42650  # space.
42651  complete="$BUILD_CC"
42652  path="${complete%% *}"
42653  tmp="$complete EOL"
42654  arguments="${tmp#* }"
42655
42656  # Input might be given as Windows format, start by converting to
42657  # unix format.
42658  new_path="$path"
42659
42660  windows_path="$new_path"
42661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42662    unix_path=`$CYGPATH -u "$windows_path"`
42663    new_path="$unix_path"
42664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42666    new_path="$unix_path"
42667  fi
42668
42669
42670  # Now try to locate executable using which
42671  new_path=`$WHICH "$new_path" 2> /dev/null`
42672
42673  if test "x$new_path" = x; then
42674    # Oops. Which didn't find the executable.
42675    # The splitting of arguments from the executable at a space might have been incorrect,
42676    # since paths with space are more likely in Windows. Give it another try with the whole
42677    # argument.
42678    path="$complete"
42679    arguments="EOL"
42680    new_path="$path"
42681
42682  windows_path="$new_path"
42683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42684    unix_path=`$CYGPATH -u "$windows_path"`
42685    new_path="$unix_path"
42686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42688    new_path="$unix_path"
42689  fi
42690
42691
42692    new_path=`$WHICH "$new_path" 2> /dev/null`
42693    # bat and cmd files are not always considered executable in MSYS causing which
42694    # to not find them
42695    if test "x$new_path" = x \
42696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42698      new_path="$path"
42699
42700  windows_path="$new_path"
42701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42702    unix_path=`$CYGPATH -u "$windows_path"`
42703    new_path="$unix_path"
42704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42706    new_path="$unix_path"
42707  fi
42708
42709    fi
42710
42711    if test "x$new_path" = x; then
42712      # It's still not found. Now this is an unrecoverable error.
42713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42714$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42715      has_space=`$ECHO "$complete" | $GREP " "`
42716      if test "x$has_space" != x; then
42717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42719      fi
42720      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42721    fi
42722  fi
42723
42724  # Now new_path has a complete unix path to the binary
42725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42726    # Keep paths in /bin as-is, but remove trailing .exe if any
42727    new_path="${new_path/%.exe/}"
42728    # Do not save /bin paths to all_fixpath_prefixes!
42729  else
42730    # Not in mixed or Windows style, start by that.
42731    new_path=`cmd //c echo $new_path`
42732
42733  input_path="$new_path"
42734  # Check if we need to convert this using DOS-style short mode. If the path
42735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42736  # take no chances and rewrite it.
42737  # Note: m4 eats our [], so we need to use [ and ] instead.
42738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42739  if test "x$has_forbidden_chars" != x; then
42740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42742  fi
42743
42744    # Output is in $new_path
42745
42746  windows_path="$new_path"
42747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42748    unix_path=`$CYGPATH -u "$windows_path"`
42749    new_path="$unix_path"
42750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42752    new_path="$unix_path"
42753  fi
42754
42755    # remove trailing .exe if any
42756    new_path="${new_path/%.exe/}"
42757
42758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42760  fi
42761
42762    else
42763      # We're on a unix platform. Hooray! :)
42764      # First separate the path from the arguments. This will split at the first
42765      # space.
42766      complete="$BUILD_CC"
42767      path="${complete%% *}"
42768      tmp="$complete EOL"
42769      arguments="${tmp#* }"
42770
42771      # Cannot rely on the command "which" here since it doesn't always work.
42772      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42773      if test -z "$is_absolute_path"; then
42774        # Path to executable is not absolute. Find it.
42775        IFS_save="$IFS"
42776        IFS=:
42777        for p in $PATH; do
42778          if test -f "$p/$path" && test -x "$p/$path"; then
42779            new_path="$p/$path"
42780            break
42781          fi
42782        done
42783        IFS="$IFS_save"
42784      else
42785        # This is an absolute path, we can use it without further modifications.
42786        new_path="$path"
42787      fi
42788
42789      if test "x$new_path" = x; then
42790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42791$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42792        has_space=`$ECHO "$complete" | $GREP " "`
42793        if test "x$has_space" != x; then
42794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42796        fi
42797        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42798      fi
42799    fi
42800
42801    # Now join together the path and the arguments once again
42802    if test "x$arguments" != xEOL; then
42803      new_complete="$new_path ${arguments% *}"
42804    else
42805      new_complete="$new_path"
42806    fi
42807
42808    if test "x$complete" != "x$new_complete"; then
42809      BUILD_CC="$new_complete"
42810      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42811$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42812    fi
42813  fi
42814
42815
42816
42817
42818  # Publish this variable in the help.
42819
42820
42821  if [ -z "${BUILD_CXX+x}" ]; then
42822    # The variable is not set by user, try to locate tool using the code snippet
42823    for ac_prog in cl CC g++
42824do
42825  # Extract the first word of "$ac_prog", so it can be a program name with args.
42826set dummy $ac_prog; ac_word=$2
42827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42828$as_echo_n "checking for $ac_word... " >&6; }
42829if ${ac_cv_path_BUILD_CXX+:} false; then :
42830  $as_echo_n "(cached) " >&6
42831else
42832  case $BUILD_CXX in
42833  [\\/]* | ?:[\\/]*)
42834  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42835  ;;
42836  *)
42837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42838for as_dir in $PATH
42839do
42840  IFS=$as_save_IFS
42841  test -z "$as_dir" && as_dir=.
42842    for ac_exec_ext in '' $ac_executable_extensions; do
42843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42844    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42846    break 2
42847  fi
42848done
42849  done
42850IFS=$as_save_IFS
42851
42852  ;;
42853esac
42854fi
42855BUILD_CXX=$ac_cv_path_BUILD_CXX
42856if test -n "$BUILD_CXX"; then
42857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42858$as_echo "$BUILD_CXX" >&6; }
42859else
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42861$as_echo "no" >&6; }
42862fi
42863
42864
42865  test -n "$BUILD_CXX" && break
42866done
42867
42868  else
42869    # The variable is set, but is it from the command line or the environment?
42870
42871    # Try to remove the string !BUILD_CXX! from our list.
42872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42874      # If it failed, the variable was not from the command line. Ignore it,
42875      # but warn the user (except for BASH, which is always set by the calling BASH).
42876      if test "xBUILD_CXX" != xBASH; then
42877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42878$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42879      fi
42880      # Try to locate tool using the code snippet
42881      for ac_prog in cl CC g++
42882do
42883  # Extract the first word of "$ac_prog", so it can be a program name with args.
42884set dummy $ac_prog; ac_word=$2
42885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42886$as_echo_n "checking for $ac_word... " >&6; }
42887if ${ac_cv_path_BUILD_CXX+:} false; then :
42888  $as_echo_n "(cached) " >&6
42889else
42890  case $BUILD_CXX in
42891  [\\/]* | ?:[\\/]*)
42892  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42893  ;;
42894  *)
42895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42896for as_dir in $PATH
42897do
42898  IFS=$as_save_IFS
42899  test -z "$as_dir" && as_dir=.
42900    for ac_exec_ext in '' $ac_executable_extensions; do
42901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42902    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42904    break 2
42905  fi
42906done
42907  done
42908IFS=$as_save_IFS
42909
42910  ;;
42911esac
42912fi
42913BUILD_CXX=$ac_cv_path_BUILD_CXX
42914if test -n "$BUILD_CXX"; then
42915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42916$as_echo "$BUILD_CXX" >&6; }
42917else
42918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42919$as_echo "no" >&6; }
42920fi
42921
42922
42923  test -n "$BUILD_CXX" && break
42924done
42925
42926    else
42927      # If it succeeded, then it was overridden by the user. We will use it
42928      # for the tool.
42929
42930      # First remove it from the list of overridden variables, so we can test
42931      # for unknown variables in the end.
42932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42933
42934      # Check if we try to supply an empty value
42935      if test "x$BUILD_CXX" = x; then
42936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42937$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42939$as_echo_n "checking for BUILD_CXX... " >&6; }
42940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42941$as_echo "disabled" >&6; }
42942      else
42943        # Check if the provided tool contains a complete path.
42944        tool_specified="$BUILD_CXX"
42945        tool_basename="${tool_specified##*/}"
42946        if test "x$tool_basename" = "x$tool_specified"; then
42947          # A command without a complete path is provided, search $PATH.
42948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42949$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42950          # Extract the first word of "$tool_basename", so it can be a program name with args.
42951set dummy $tool_basename; ac_word=$2
42952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42953$as_echo_n "checking for $ac_word... " >&6; }
42954if ${ac_cv_path_BUILD_CXX+:} false; then :
42955  $as_echo_n "(cached) " >&6
42956else
42957  case $BUILD_CXX in
42958  [\\/]* | ?:[\\/]*)
42959  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42960  ;;
42961  *)
42962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42963for as_dir in $PATH
42964do
42965  IFS=$as_save_IFS
42966  test -z "$as_dir" && as_dir=.
42967    for ac_exec_ext in '' $ac_executable_extensions; do
42968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42969    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42971    break 2
42972  fi
42973done
42974  done
42975IFS=$as_save_IFS
42976
42977  ;;
42978esac
42979fi
42980BUILD_CXX=$ac_cv_path_BUILD_CXX
42981if test -n "$BUILD_CXX"; then
42982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42983$as_echo "$BUILD_CXX" >&6; }
42984else
42985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42986$as_echo "no" >&6; }
42987fi
42988
42989
42990          if test "x$BUILD_CXX" = x; then
42991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42992          fi
42993        else
42994          # Otherwise we believe it is a complete path. Use it as it is.
42995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42996$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42998$as_echo_n "checking for BUILD_CXX... " >&6; }
42999          if test ! -x "$tool_specified"; then
43000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43001$as_echo "not found" >&6; }
43002            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43003          fi
43004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43005$as_echo "$tool_specified" >&6; }
43006        fi
43007      fi
43008    fi
43009
43010  fi
43011
43012
43013
43014  if test "x$BUILD_CXX" = x; then
43015    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43016  fi
43017
43018
43019
43020  # Only process if variable expands to non-empty
43021
43022  if test "x$BUILD_CXX" != x; then
43023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43024
43025  # First separate the path from the arguments. This will split at the first
43026  # space.
43027  complete="$BUILD_CXX"
43028  path="${complete%% *}"
43029  tmp="$complete EOL"
43030  arguments="${tmp#* }"
43031
43032  # Input might be given as Windows format, start by converting to
43033  # unix format.
43034  new_path=`$CYGPATH -u "$path"`
43035
43036  # Now try to locate executable using which
43037  new_path=`$WHICH "$new_path" 2> /dev/null`
43038  # bat and cmd files are not always considered executable in cygwin causing which
43039  # to not find them
43040  if test "x$new_path" = x \
43041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43043    new_path=`$CYGPATH -u "$path"`
43044  fi
43045  if test "x$new_path" = x; then
43046    # Oops. Which didn't find the executable.
43047    # The splitting of arguments from the executable at a space might have been incorrect,
43048    # since paths with space are more likely in Windows. Give it another try with the whole
43049    # argument.
43050    path="$complete"
43051    arguments="EOL"
43052    new_path=`$CYGPATH -u "$path"`
43053    new_path=`$WHICH "$new_path" 2> /dev/null`
43054    # bat and cmd files are not always considered executable in cygwin causing which
43055    # to not find them
43056    if test "x$new_path" = x \
43057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43059      new_path=`$CYGPATH -u "$path"`
43060    fi
43061    if test "x$new_path" = x; then
43062      # It's still not found. Now this is an unrecoverable error.
43063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43064$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43065      has_space=`$ECHO "$complete" | $GREP " "`
43066      if test "x$has_space" != x; then
43067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43069      fi
43070      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43071    fi
43072  fi
43073
43074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43077  # "foo.exe" is OK but "foo" is an error.
43078  #
43079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43080  # It is also a way to make sure we got the proper file name for the real test later on.
43081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43082  if test "x$test_shortpath" = x; then
43083    # Short path failed, file does not exist as specified.
43084    # Try adding .exe or .cmd
43085    if test -f "${new_path}.exe"; then
43086      input_to_shortpath="${new_path}.exe"
43087    elif test -f "${new_path}.cmd"; then
43088      input_to_shortpath="${new_path}.cmd"
43089    else
43090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43091$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43094      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43095    fi
43096  else
43097    input_to_shortpath="$new_path"
43098  fi
43099
43100  # Call helper function which possibly converts this using DOS-style short mode.
43101  # If so, the updated path is stored in $new_path.
43102  new_path="$input_to_shortpath"
43103
43104  input_path="$input_to_shortpath"
43105  # Check if we need to convert this using DOS-style short mode. If the path
43106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43107  # take no chances and rewrite it.
43108  # Note: m4 eats our [], so we need to use [ and ] instead.
43109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43110  if test "x$has_forbidden_chars" != x; then
43111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43115      # Going to short mode and back again did indeed matter. Since short mode is
43116      # case insensitive, let's make it lowercase to improve readability.
43117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43118      # Now convert it back to Unix-style (cygpath)
43119      input_path=`$CYGPATH -u "$shortmode_path"`
43120      new_path="$input_path"
43121    fi
43122  fi
43123
43124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43125  if test "x$test_cygdrive_prefix" = x; then
43126    # As a simple fix, exclude /usr/bin since it's not a real path.
43127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43129      # a path prefixed by /cygdrive for fixpath to work.
43130      new_path="$CYGWIN_ROOT_PATH$input_path"
43131    fi
43132  fi
43133
43134  # remove trailing .exe if any
43135  new_path="${new_path/%.exe/}"
43136
43137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43138
43139  # First separate the path from the arguments. This will split at the first
43140  # space.
43141  complete="$BUILD_CXX"
43142  path="${complete%% *}"
43143  tmp="$complete EOL"
43144  arguments="${tmp#* }"
43145
43146  # Input might be given as Windows format, start by converting to
43147  # unix format.
43148  new_path="$path"
43149
43150  windows_path="$new_path"
43151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43152    unix_path=`$CYGPATH -u "$windows_path"`
43153    new_path="$unix_path"
43154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43156    new_path="$unix_path"
43157  fi
43158
43159
43160  # Now try to locate executable using which
43161  new_path=`$WHICH "$new_path" 2> /dev/null`
43162
43163  if test "x$new_path" = x; then
43164    # Oops. Which didn't find the executable.
43165    # The splitting of arguments from the executable at a space might have been incorrect,
43166    # since paths with space are more likely in Windows. Give it another try with the whole
43167    # argument.
43168    path="$complete"
43169    arguments="EOL"
43170    new_path="$path"
43171
43172  windows_path="$new_path"
43173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43174    unix_path=`$CYGPATH -u "$windows_path"`
43175    new_path="$unix_path"
43176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43178    new_path="$unix_path"
43179  fi
43180
43181
43182    new_path=`$WHICH "$new_path" 2> /dev/null`
43183    # bat and cmd files are not always considered executable in MSYS causing which
43184    # to not find them
43185    if test "x$new_path" = x \
43186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43188      new_path="$path"
43189
43190  windows_path="$new_path"
43191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43192    unix_path=`$CYGPATH -u "$windows_path"`
43193    new_path="$unix_path"
43194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43196    new_path="$unix_path"
43197  fi
43198
43199    fi
43200
43201    if test "x$new_path" = x; then
43202      # It's still not found. Now this is an unrecoverable error.
43203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43204$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43205      has_space=`$ECHO "$complete" | $GREP " "`
43206      if test "x$has_space" != x; then
43207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43209      fi
43210      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43211    fi
43212  fi
43213
43214  # Now new_path has a complete unix path to the binary
43215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43216    # Keep paths in /bin as-is, but remove trailing .exe if any
43217    new_path="${new_path/%.exe/}"
43218    # Do not save /bin paths to all_fixpath_prefixes!
43219  else
43220    # Not in mixed or Windows style, start by that.
43221    new_path=`cmd //c echo $new_path`
43222
43223  input_path="$new_path"
43224  # Check if we need to convert this using DOS-style short mode. If the path
43225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43226  # take no chances and rewrite it.
43227  # Note: m4 eats our [], so we need to use [ and ] instead.
43228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43229  if test "x$has_forbidden_chars" != x; then
43230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43232  fi
43233
43234    # Output is in $new_path
43235
43236  windows_path="$new_path"
43237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43238    unix_path=`$CYGPATH -u "$windows_path"`
43239    new_path="$unix_path"
43240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43242    new_path="$unix_path"
43243  fi
43244
43245    # remove trailing .exe if any
43246    new_path="${new_path/%.exe/}"
43247
43248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43250  fi
43251
43252    else
43253      # We're on a unix platform. Hooray! :)
43254      # First separate the path from the arguments. This will split at the first
43255      # space.
43256      complete="$BUILD_CXX"
43257      path="${complete%% *}"
43258      tmp="$complete EOL"
43259      arguments="${tmp#* }"
43260
43261      # Cannot rely on the command "which" here since it doesn't always work.
43262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43263      if test -z "$is_absolute_path"; then
43264        # Path to executable is not absolute. Find it.
43265        IFS_save="$IFS"
43266        IFS=:
43267        for p in $PATH; do
43268          if test -f "$p/$path" && test -x "$p/$path"; then
43269            new_path="$p/$path"
43270            break
43271          fi
43272        done
43273        IFS="$IFS_save"
43274      else
43275        # This is an absolute path, we can use it without further modifications.
43276        new_path="$path"
43277      fi
43278
43279      if test "x$new_path" = x; then
43280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43281$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43282        has_space=`$ECHO "$complete" | $GREP " "`
43283        if test "x$has_space" != x; then
43284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43286        fi
43287        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43288      fi
43289    fi
43290
43291    # Now join together the path and the arguments once again
43292    if test "x$arguments" != xEOL; then
43293      new_complete="$new_path ${arguments% *}"
43294    else
43295      new_complete="$new_path"
43296    fi
43297
43298    if test "x$complete" != "x$new_complete"; then
43299      BUILD_CXX="$new_complete"
43300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43301$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43302    fi
43303  fi
43304
43305    BUILD_LD="$BUILD_CC"
43306
43307    PATH="$OLDPATH"
43308  else
43309    # If we are not cross compiling, use the normal target compilers for
43310    # building the build platform executables.
43311    BUILD_CC="$CC"
43312    BUILD_CXX="$CXX"
43313    BUILD_LD="$LD"
43314    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
43315    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
43316  fi
43317
43318
43319
43320
43321
43322
43323
43324
43325  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43326    # For hotspot, we need these in Windows mixed path,
43327    # so rewrite them all. Need added .exe suffix.
43328    HOTSPOT_CXX="$CXX.exe"
43329    HOTSPOT_LD="$LD.exe"
43330    HOTSPOT_MT="$MT.exe"
43331    HOTSPOT_RC="$RC.exe"
43332
43333  unix_path="$HOTSPOT_CXX"
43334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43335    windows_path=`$CYGPATH -m "$unix_path"`
43336    HOTSPOT_CXX="$windows_path"
43337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43338    windows_path=`cmd //c echo $unix_path`
43339    HOTSPOT_CXX="$windows_path"
43340  fi
43341
43342
43343  unix_path="$HOTSPOT_LD"
43344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43345    windows_path=`$CYGPATH -m "$unix_path"`
43346    HOTSPOT_LD="$windows_path"
43347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43348    windows_path=`cmd //c echo $unix_path`
43349    HOTSPOT_LD="$windows_path"
43350  fi
43351
43352
43353  unix_path="$HOTSPOT_MT"
43354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43355    windows_path=`$CYGPATH -m "$unix_path"`
43356    HOTSPOT_MT="$windows_path"
43357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43358    windows_path=`cmd //c echo $unix_path`
43359    HOTSPOT_MT="$windows_path"
43360  fi
43361
43362
43363  unix_path="$HOTSPOT_RC"
43364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43365    windows_path=`$CYGPATH -m "$unix_path"`
43366    HOTSPOT_RC="$windows_path"
43367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43368    windows_path=`cmd //c echo $unix_path`
43369    HOTSPOT_RC="$windows_path"
43370  fi
43371
43372
43373
43374  else
43375    HOTSPOT_CXX="$CXX"
43376    HOTSPOT_LD="$LD"
43377  fi
43378
43379
43380
43381  if test  "x$TOOLCHAIN_TYPE" = xclang; then
43382    USE_CLANG=true
43383  fi
43384
43385
43386
43387
43388
43389  # The package path is used only on macosx?
43390  # FIXME: clean this up, and/or move it elsewhere.
43391  PACKAGE_PATH=/opt/local
43392
43393
43394  # Check for extra potential brokenness.
43395  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43396    # On Windows, double-check that we got the right compiler.
43397    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43398    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43399    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43400      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43401        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
43402      fi
43403    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43404      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43405        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43406      fi
43407    fi
43408  fi
43409
43410  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43411    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43412    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43413    # This is later checked when setting flags.
43414
43415    # "-Og" suppported for GCC 4.8 and later
43416    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43417
43418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43419$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43420  supports=yes
43421
43422  saved_cflags="$CFLAGS"
43423  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43424  ac_ext=c
43425ac_cpp='$CPP $CPPFLAGS'
43426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43428ac_compiler_gnu=$ac_cv_c_compiler_gnu
43429
43430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43431/* end confdefs.h.  */
43432int i;
43433_ACEOF
43434if ac_fn_c_try_compile "$LINENO"; then :
43435
43436else
43437  supports=no
43438fi
43439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43440  ac_ext=cpp
43441ac_cpp='$CXXCPP $CPPFLAGS'
43442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43445
43446  CFLAGS="$saved_cflags"
43447
43448  saved_cxxflags="$CXXFLAGS"
43449  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43450  ac_ext=cpp
43451ac_cpp='$CXXCPP $CPPFLAGS'
43452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43455
43456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43457/* end confdefs.h.  */
43458int i;
43459_ACEOF
43460if ac_fn_cxx_try_compile "$LINENO"; then :
43461
43462else
43463  supports=no
43464fi
43465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43466  ac_ext=cpp
43467ac_cpp='$CXXCPP $CPPFLAGS'
43468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43471
43472  CXXFLAGS="$saved_cxxflags"
43473
43474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43475$as_echo "$supports" >&6; }
43476  if test "x$supports" = "xyes" ; then
43477    HAS_CFLAG_OPTIMIZE_DEBUG=true
43478  else
43479    HAS_CFLAG_OPTIMIZE_DEBUG=false
43480  fi
43481
43482
43483    # "-z relro" supported in GNU binutils 2.17 and later
43484    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43485
43486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43487$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43488  supports=yes
43489
43490  saved_ldflags="$LDFLAGS"
43491  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43492  ac_ext=c
43493ac_cpp='$CPP $CPPFLAGS'
43494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43496ac_compiler_gnu=$ac_cv_c_compiler_gnu
43497
43498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43499/* end confdefs.h.  */
43500
43501int
43502main ()
43503{
43504
43505  ;
43506  return 0;
43507}
43508_ACEOF
43509if ac_fn_c_try_link "$LINENO"; then :
43510
43511else
43512  supports=no
43513fi
43514rm -f core conftest.err conftest.$ac_objext \
43515    conftest$ac_exeext conftest.$ac_ext
43516  ac_ext=cpp
43517ac_cpp='$CXXCPP $CPPFLAGS'
43518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43521
43522  LDFLAGS="$saved_ldflags"
43523
43524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43525$as_echo "$supports" >&6; }
43526  if test "x$supports" = "xyes" ; then
43527    HAS_LINKER_RELRO=true
43528  else
43529    HAS_LINKER_RELRO=false
43530  fi
43531
43532
43533    # "-z now" supported in GNU binutils 2.11 and later
43534    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43535
43536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43537$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43538  supports=yes
43539
43540  saved_ldflags="$LDFLAGS"
43541  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43542  ac_ext=c
43543ac_cpp='$CPP $CPPFLAGS'
43544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43546ac_compiler_gnu=$ac_cv_c_compiler_gnu
43547
43548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43549/* end confdefs.h.  */
43550
43551int
43552main ()
43553{
43554
43555  ;
43556  return 0;
43557}
43558_ACEOF
43559if ac_fn_c_try_link "$LINENO"; then :
43560
43561else
43562  supports=no
43563fi
43564rm -f core conftest.err conftest.$ac_objext \
43565    conftest$ac_exeext conftest.$ac_ext
43566  ac_ext=cpp
43567ac_cpp='$CXXCPP $CPPFLAGS'
43568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43571
43572  LDFLAGS="$saved_ldflags"
43573
43574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43575$as_echo "$supports" >&6; }
43576  if test "x$supports" = "xyes" ; then
43577    HAS_LINKER_NOW=true
43578  else
43579    HAS_LINKER_NOW=false
43580  fi
43581
43582  fi
43583
43584  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43585  # in executable.'
43586  USING_BROKEN_SUSE_LD=no
43587  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43589$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43590    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43591    $ECHO "int main() { }" > main.c
43592    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43594$as_echo "no" >&6; }
43595      USING_BROKEN_SUSE_LD=no
43596    else
43597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43598$as_echo "yes" >&6; }
43599      USING_BROKEN_SUSE_LD=yes
43600    fi
43601    rm -rf version-script.map main.c a.out
43602  fi
43603
43604
43605
43606# Setup the JTReg Regression Test Harness.
43607
43608
43609# Check whether --with-jtreg was given.
43610if test "${with_jtreg+set}" = set; then :
43611  withval=$with_jtreg;
43612else
43613  with_jtreg=no
43614fi
43615
43616
43617  if test "x$with_jtreg" = xno; then
43618    # jtreg disabled
43619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43620$as_echo_n "checking for jtreg... " >&6; }
43621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43622$as_echo "no" >&6; }
43623  else
43624    if test "x$with_jtreg" != xyes; then
43625      # with path specified.
43626      JT_HOME="$with_jtreg"
43627    fi
43628
43629    if test "x$JT_HOME" != x; then
43630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43631$as_echo_n "checking for jtreg... " >&6; }
43632
43633      # use JT_HOME enviroment var.
43634
43635  # Only process if variable expands to non-empty
43636
43637  if test "x$JT_HOME" != x; then
43638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43639
43640  # Input might be given as Windows format, start by converting to
43641  # unix format.
43642  path="$JT_HOME"
43643  new_path=`$CYGPATH -u "$path"`
43644
43645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43648  # "foo.exe" is OK but "foo" is an error.
43649  #
43650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43651  # It is also a way to make sure we got the proper file name for the real test later on.
43652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43653  if test "x$test_shortpath" = x; then
43654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43655$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43656    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43657  fi
43658
43659  # Call helper function which possibly converts this using DOS-style short mode.
43660  # If so, the updated path is stored in $new_path.
43661
43662  input_path="$new_path"
43663  # Check if we need to convert this using DOS-style short mode. If the path
43664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43665  # take no chances and rewrite it.
43666  # Note: m4 eats our [], so we need to use [ and ] instead.
43667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43668  if test "x$has_forbidden_chars" != x; then
43669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43673      # Going to short mode and back again did indeed matter. Since short mode is
43674      # case insensitive, let's make it lowercase to improve readability.
43675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43676      # Now convert it back to Unix-style (cygpath)
43677      input_path=`$CYGPATH -u "$shortmode_path"`
43678      new_path="$input_path"
43679    fi
43680  fi
43681
43682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43683  if test "x$test_cygdrive_prefix" = x; then
43684    # As a simple fix, exclude /usr/bin since it's not a real path.
43685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43687      # a path prefixed by /cygdrive for fixpath to work.
43688      new_path="$CYGWIN_ROOT_PATH$input_path"
43689    fi
43690  fi
43691
43692
43693  if test "x$path" != "x$new_path"; then
43694    JT_HOME="$new_path"
43695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43696$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43697  fi
43698
43699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43700
43701  path="$JT_HOME"
43702  has_colon=`$ECHO $path | $GREP ^.:`
43703  new_path="$path"
43704  if test "x$has_colon" = x; then
43705    # Not in mixed or Windows style, start by that.
43706    new_path=`cmd //c echo $path`
43707  fi
43708
43709
43710  input_path="$new_path"
43711  # Check if we need to convert this using DOS-style short mode. If the path
43712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43713  # take no chances and rewrite it.
43714  # Note: m4 eats our [], so we need to use [ and ] instead.
43715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43716  if test "x$has_forbidden_chars" != x; then
43717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43719  fi
43720
43721
43722  windows_path="$new_path"
43723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43724    unix_path=`$CYGPATH -u "$windows_path"`
43725    new_path="$unix_path"
43726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43728    new_path="$unix_path"
43729  fi
43730
43731  if test "x$path" != "x$new_path"; then
43732    JT_HOME="$new_path"
43733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43734$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43735  fi
43736
43737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43739
43740    else
43741      # We're on a unix platform. Hooray! :)
43742      path="$JT_HOME"
43743      has_space=`$ECHO "$path" | $GREP " "`
43744      if test "x$has_space" != x; then
43745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43746$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43748      fi
43749
43750      # Use eval to expand a potential ~
43751      eval path="$path"
43752      if test ! -f "$path" && test ! -d "$path"; then
43753        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43754      fi
43755
43756      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43757    fi
43758  fi
43759
43760
43761      # jtreg win32 script works for everybody
43762      JTREGEXE="$JT_HOME/bin/jtreg"
43763
43764      if test ! -f "$JTREGEXE"; then
43765        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43766      fi
43767
43768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43769$as_echo "$JTREGEXE" >&6; }
43770    else
43771      # try to find jtreg on path
43772
43773
43774
43775  # Publish this variable in the help.
43776
43777
43778  if [ -z "${JTREGEXE+x}" ]; then
43779    # The variable is not set by user, try to locate tool using the code snippet
43780    for ac_prog in jtreg
43781do
43782  # Extract the first word of "$ac_prog", so it can be a program name with args.
43783set dummy $ac_prog; ac_word=$2
43784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43785$as_echo_n "checking for $ac_word... " >&6; }
43786if ${ac_cv_path_JTREGEXE+:} false; then :
43787  $as_echo_n "(cached) " >&6
43788else
43789  case $JTREGEXE in
43790  [\\/]* | ?:[\\/]*)
43791  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43792  ;;
43793  *)
43794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43795for as_dir in $PATH
43796do
43797  IFS=$as_save_IFS
43798  test -z "$as_dir" && as_dir=.
43799    for ac_exec_ext in '' $ac_executable_extensions; do
43800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43801    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43803    break 2
43804  fi
43805done
43806  done
43807IFS=$as_save_IFS
43808
43809  ;;
43810esac
43811fi
43812JTREGEXE=$ac_cv_path_JTREGEXE
43813if test -n "$JTREGEXE"; then
43814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43815$as_echo "$JTREGEXE" >&6; }
43816else
43817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43818$as_echo "no" >&6; }
43819fi
43820
43821
43822  test -n "$JTREGEXE" && break
43823done
43824
43825  else
43826    # The variable is set, but is it from the command line or the environment?
43827
43828    # Try to remove the string !JTREGEXE! from our list.
43829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43831      # If it failed, the variable was not from the command line. Ignore it,
43832      # but warn the user (except for BASH, which is always set by the calling BASH).
43833      if test "xJTREGEXE" != xBASH; then
43834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43835$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43836      fi
43837      # Try to locate tool using the code snippet
43838      for ac_prog in jtreg
43839do
43840  # Extract the first word of "$ac_prog", so it can be a program name with args.
43841set dummy $ac_prog; ac_word=$2
43842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43843$as_echo_n "checking for $ac_word... " >&6; }
43844if ${ac_cv_path_JTREGEXE+:} false; then :
43845  $as_echo_n "(cached) " >&6
43846else
43847  case $JTREGEXE in
43848  [\\/]* | ?:[\\/]*)
43849  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43850  ;;
43851  *)
43852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43853for as_dir in $PATH
43854do
43855  IFS=$as_save_IFS
43856  test -z "$as_dir" && as_dir=.
43857    for ac_exec_ext in '' $ac_executable_extensions; do
43858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43859    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43861    break 2
43862  fi
43863done
43864  done
43865IFS=$as_save_IFS
43866
43867  ;;
43868esac
43869fi
43870JTREGEXE=$ac_cv_path_JTREGEXE
43871if test -n "$JTREGEXE"; then
43872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43873$as_echo "$JTREGEXE" >&6; }
43874else
43875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43876$as_echo "no" >&6; }
43877fi
43878
43879
43880  test -n "$JTREGEXE" && break
43881done
43882
43883    else
43884      # If it succeeded, then it was overridden by the user. We will use it
43885      # for the tool.
43886
43887      # First remove it from the list of overridden variables, so we can test
43888      # for unknown variables in the end.
43889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43890
43891      # Check if we try to supply an empty value
43892      if test "x$JTREGEXE" = x; then
43893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43894$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43896$as_echo_n "checking for JTREGEXE... " >&6; }
43897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43898$as_echo "disabled" >&6; }
43899      else
43900        # Check if the provided tool contains a complete path.
43901        tool_specified="$JTREGEXE"
43902        tool_basename="${tool_specified##*/}"
43903        if test "x$tool_basename" = "x$tool_specified"; then
43904          # A command without a complete path is provided, search $PATH.
43905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43906$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43907          # Extract the first word of "$tool_basename", so it can be a program name with args.
43908set dummy $tool_basename; ac_word=$2
43909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43910$as_echo_n "checking for $ac_word... " >&6; }
43911if ${ac_cv_path_JTREGEXE+:} false; then :
43912  $as_echo_n "(cached) " >&6
43913else
43914  case $JTREGEXE in
43915  [\\/]* | ?:[\\/]*)
43916  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43917  ;;
43918  *)
43919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43920for as_dir in $PATH
43921do
43922  IFS=$as_save_IFS
43923  test -z "$as_dir" && as_dir=.
43924    for ac_exec_ext in '' $ac_executable_extensions; do
43925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43926    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43928    break 2
43929  fi
43930done
43931  done
43932IFS=$as_save_IFS
43933
43934  ;;
43935esac
43936fi
43937JTREGEXE=$ac_cv_path_JTREGEXE
43938if test -n "$JTREGEXE"; then
43939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43940$as_echo "$JTREGEXE" >&6; }
43941else
43942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43943$as_echo "no" >&6; }
43944fi
43945
43946
43947          if test "x$JTREGEXE" = x; then
43948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43949          fi
43950        else
43951          # Otherwise we believe it is a complete path. Use it as it is.
43952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43953$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43955$as_echo_n "checking for JTREGEXE... " >&6; }
43956          if test ! -x "$tool_specified"; then
43957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43958$as_echo "not found" >&6; }
43959            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43960          fi
43961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43962$as_echo "$tool_specified" >&6; }
43963        fi
43964      fi
43965    fi
43966
43967  fi
43968
43969
43970
43971  if test "x$JTREGEXE" = x; then
43972    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43973  fi
43974
43975
43976      JT_HOME="`$DIRNAME $JTREGEXE`"
43977    fi
43978  fi
43979
43980
43981
43982
43983
43984
43985  # Option used to tell the compiler whether to create 32- or 64-bit executables
43986  if test "x$TOOLCHAIN_TYPE" = xxlc; then
43987    COMPILER_TARGET_BITS_FLAG="-q"
43988  else
43989    COMPILER_TARGET_BITS_FLAG="-m"
43990  fi
43991
43992
43993  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43994  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43995    ARFLAGS="-r"
43996  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43997    ARFLAGS="-X64"
43998  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43999    # lib.exe is used as AR to create static libraries.
44000    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
44001  else
44002    ARFLAGS=""
44003  fi
44004
44005
44006  ## Setup strip.
44007  # FIXME: should this really be per platform, or should it be per toolchain type?
44008  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
44009  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
44010  if test "x$OPENJDK_TARGET_OS" = xlinux; then
44011    STRIPFLAGS="-g"
44012  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
44013    STRIPFLAGS="-x"
44014  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
44015    STRIPFLAGS="-S"
44016  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44017    STRIPFLAGS="-X32_64"
44018  fi
44019
44020
44021
44022  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44023    CC_OUT_OPTION=-Fo
44024    EXE_OUT_OPTION=-out:
44025    LD_OUT_OPTION=-out:
44026    AR_OUT_OPTION=-out:
44027  else
44028    # The option used to specify the target .o,.a or .so file.
44029    # When compiling, how to specify the to be created object file.
44030    CC_OUT_OPTION='-o$(SPACE)'
44031    # When linking, how to specify the to be created executable.
44032    EXE_OUT_OPTION='-o$(SPACE)'
44033    # When linking, how to specify the to be created dynamically linkable library.
44034    LD_OUT_OPTION='-o$(SPACE)'
44035    # When archiving, how to specify the to be create static archive for object files.
44036    AR_OUT_OPTION='rcs$(SPACE)'
44037  fi
44038
44039
44040
44041
44042
44043  # On Windows, we need to set RC flags.
44044  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44045    RC_FLAGS="-nologo -l0x409"
44046    if test "x$VARIANT" = xOPT; then
44047      RC_FLAGS="$RC_FLAGS -DNDEBUG"
44048    fi
44049
44050    # The version variables used to create RC_FLAGS may be overridden
44051    # in a custom configure script, or possibly the command line.
44052    # Let those variables be expanded at make time in spec.gmk.
44053    # The \$ are escaped to the shell, and the $(...) variables
44054    # are evaluated by make.
44055    RC_FLAGS="$RC_FLAGS \
44056        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
44057        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
44058        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
44059        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
44060        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
44061        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
44062        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
44063  fi
44064
44065
44066  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44067    # silence copyright notice and other headers.
44068    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
44069  fi
44070
44071
44072# FIXME: Currently we must test this after toolchain but before flags. Fix!
44073
44074# Now we can test some aspects on the target using configure macros.
44075
44076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
44077$as_echo_n "checking for ANSI C header files... " >&6; }
44078if ${ac_cv_header_stdc+:} false; then :
44079  $as_echo_n "(cached) " >&6
44080else
44081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44082/* end confdefs.h.  */
44083#include <stdlib.h>
44084#include <stdarg.h>
44085#include <string.h>
44086#include <float.h>
44087
44088int
44089main ()
44090{
44091
44092  ;
44093  return 0;
44094}
44095_ACEOF
44096if ac_fn_cxx_try_compile "$LINENO"; then :
44097  ac_cv_header_stdc=yes
44098else
44099  ac_cv_header_stdc=no
44100fi
44101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44102
44103if test $ac_cv_header_stdc = yes; then
44104  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
44105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44106/* end confdefs.h.  */
44107#include <string.h>
44108
44109_ACEOF
44110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44111  $EGREP "memchr" >/dev/null 2>&1; then :
44112
44113else
44114  ac_cv_header_stdc=no
44115fi
44116rm -f conftest*
44117
44118fi
44119
44120if test $ac_cv_header_stdc = yes; then
44121  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
44122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44123/* end confdefs.h.  */
44124#include <stdlib.h>
44125
44126_ACEOF
44127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44128  $EGREP "free" >/dev/null 2>&1; then :
44129
44130else
44131  ac_cv_header_stdc=no
44132fi
44133rm -f conftest*
44134
44135fi
44136
44137if test $ac_cv_header_stdc = yes; then
44138  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
44139  if test "$cross_compiling" = yes; then :
44140  :
44141else
44142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44143/* end confdefs.h.  */
44144#include <ctype.h>
44145#include <stdlib.h>
44146#if ((' ' & 0x0FF) == 0x020)
44147# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
44148# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
44149#else
44150# define ISLOWER(c) \
44151		   (('a' <= (c) && (c) <= 'i') \
44152		     || ('j' <= (c) && (c) <= 'r') \
44153		     || ('s' <= (c) && (c) <= 'z'))
44154# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
44155#endif
44156
44157#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
44158int
44159main ()
44160{
44161  int i;
44162  for (i = 0; i < 256; i++)
44163    if (XOR (islower (i), ISLOWER (i))
44164	|| toupper (i) != TOUPPER (i))
44165      return 2;
44166  return 0;
44167}
44168_ACEOF
44169if ac_fn_cxx_try_run "$LINENO"; then :
44170
44171else
44172  ac_cv_header_stdc=no
44173fi
44174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44175  conftest.$ac_objext conftest.beam conftest.$ac_ext
44176fi
44177
44178fi
44179fi
44180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
44181$as_echo "$ac_cv_header_stdc" >&6; }
44182if test $ac_cv_header_stdc = yes; then
44183
44184$as_echo "#define STDC_HEADERS 1" >>confdefs.h
44185
44186fi
44187
44188# On IRIX 5.3, sys/types and inttypes.h are conflicting.
44189for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
44190		  inttypes.h stdint.h unistd.h
44191do :
44192  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44193ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
44194"
44195if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44196  cat >>confdefs.h <<_ACEOF
44197#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44198_ACEOF
44199
44200fi
44201
44202done
44203
44204
44205
44206  ###############################################################################
44207  #
44208  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
44209  # (The JVM can use 32 or 64 bit Java pointers but that decision
44210  # is made at runtime.)
44211  #
44212
44213  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
44214    # Always specify -m flag on Solaris
44215    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
44216
44217  # When we add flags to the "official" CFLAGS etc, we need to
44218  # keep track of these additions in ADDED_CFLAGS etc. These
44219  # will later be checked to make sure only controlled additions
44220  # have been made to CFLAGS etc.
44221  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44222  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44223  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44224
44225  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44226  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44227  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44228
44229  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44230  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44231  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44232
44233  elif test "x$COMPILE_TYPE" = xreduced; then
44234    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
44235      # Specify -m if running reduced on unix platforms
44236
44237  # When we add flags to the "official" CFLAGS etc, we need to
44238  # keep track of these additions in ADDED_CFLAGS etc. These
44239  # will later be checked to make sure only controlled additions
44240  # have been made to CFLAGS etc.
44241  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44242  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44243  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44244
44245  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44246  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44247  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44248
44249  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44250  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44251  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44252
44253    fi
44254  fi
44255
44256  # Make compilation sanity check
44257  for ac_header in stdio.h
44258do :
44259  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
44260if test "x$ac_cv_header_stdio_h" = xyes; then :
44261  cat >>confdefs.h <<_ACEOF
44262#define HAVE_STDIO_H 1
44263_ACEOF
44264
44265else
44266
44267    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
44268$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
44269    if test "x$COMPILE_TYPE" = xreduced; then
44270
44271  # Print a helpful message on how to acquire the necessary build dependency.
44272  # reduced is the help tag: freetype, cups, alsa etc
44273  MISSING_DEPENDENCY=reduced
44274
44275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44276    cygwin_help $MISSING_DEPENDENCY
44277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44278    msys_help $MISSING_DEPENDENCY
44279  else
44280    PKGHANDLER_COMMAND=
44281
44282    case $PKGHANDLER in
44283      apt-get)
44284        apt_help     $MISSING_DEPENDENCY ;;
44285      yum)
44286        yum_help     $MISSING_DEPENDENCY ;;
44287      port)
44288        port_help    $MISSING_DEPENDENCY ;;
44289      pkgutil)
44290        pkgutil_help $MISSING_DEPENDENCY ;;
44291      pkgadd)
44292        pkgadd_help  $MISSING_DEPENDENCY ;;
44293    esac
44294
44295    if test "x$PKGHANDLER_COMMAND" != x; then
44296      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44297    fi
44298  fi
44299
44300      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44301$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44302    elif test "x$COMPILE_TYPE" = xcross; then
44303      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44304$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44305    fi
44306    as_fn_error $? "Cannot continue." "$LINENO" 5
44307
44308fi
44309
44310done
44311
44312
44313  # The cast to long int works around a bug in the HP C Compiler
44314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44316# This bug is HP SR number 8606223364.
44317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44318$as_echo_n "checking size of int *... " >&6; }
44319if ${ac_cv_sizeof_int_p+:} false; then :
44320  $as_echo_n "(cached) " >&6
44321else
44322  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44323
44324else
44325  if test "$ac_cv_type_int_p" = yes; then
44326     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44328as_fn_error 77 "cannot compute sizeof (int *)
44329See \`config.log' for more details" "$LINENO" 5; }
44330   else
44331     ac_cv_sizeof_int_p=0
44332   fi
44333fi
44334
44335fi
44336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44337$as_echo "$ac_cv_sizeof_int_p" >&6; }
44338
44339
44340
44341cat >>confdefs.h <<_ACEOF
44342#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44343_ACEOF
44344
44345
44346
44347  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44348  if test "x$ac_cv_sizeof_int_p" = x; then
44349    # The test failed, lets stick to the assumed value.
44350    { $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
44351$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44352  else
44353    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44354
44355    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44356      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44357      # Let's try to implicitely set the compilers target architecture and retry the test
44358      { $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
44359$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;}
44360      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44361$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44362
44363  # When we add flags to the "official" CFLAGS etc, we need to
44364  # keep track of these additions in ADDED_CFLAGS etc. These
44365  # will later be checked to make sure only controlled additions
44366  # have been made to CFLAGS etc.
44367  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44368  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44369  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44370
44371  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44372  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44373  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44374
44375  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44376  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44377  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44378
44379
44380      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44381      unset ac_cv_sizeof_int_p
44382      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44383      cat >>confdefs.h <<_ACEOF
44384#undef SIZEOF_INT_P
44385_ACEOF
44386
44387      # The cast to long int works around a bug in the HP C Compiler
44388# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44389# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44390# This bug is HP SR number 8606223364.
44391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44392$as_echo_n "checking size of int *... " >&6; }
44393if ${ac_cv_sizeof_int_p+:} false; then :
44394  $as_echo_n "(cached) " >&6
44395else
44396  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44397
44398else
44399  if test "$ac_cv_type_int_p" = yes; then
44400     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44401$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44402as_fn_error 77 "cannot compute sizeof (int *)
44403See \`config.log' for more details" "$LINENO" 5; }
44404   else
44405     ac_cv_sizeof_int_p=0
44406   fi
44407fi
44408
44409fi
44410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44411$as_echo "$ac_cv_sizeof_int_p" >&6; }
44412
44413
44414
44415cat >>confdefs.h <<_ACEOF
44416#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44417_ACEOF
44418
44419
44420
44421      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44422
44423      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44424        { $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
44425$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;}
44426        if test "x$COMPILE_TYPE" = xreduced; then
44427
44428  # Print a helpful message on how to acquire the necessary build dependency.
44429  # reduced is the help tag: freetype, cups, alsa etc
44430  MISSING_DEPENDENCY=reduced
44431
44432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44433    cygwin_help $MISSING_DEPENDENCY
44434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44435    msys_help $MISSING_DEPENDENCY
44436  else
44437    PKGHANDLER_COMMAND=
44438
44439    case $PKGHANDLER in
44440      apt-get)
44441        apt_help     $MISSING_DEPENDENCY ;;
44442      yum)
44443        yum_help     $MISSING_DEPENDENCY ;;
44444      port)
44445        port_help    $MISSING_DEPENDENCY ;;
44446      pkgutil)
44447        pkgutil_help $MISSING_DEPENDENCY ;;
44448      pkgadd)
44449        pkgadd_help  $MISSING_DEPENDENCY ;;
44450    esac
44451
44452    if test "x$PKGHANDLER_COMMAND" != x; then
44453      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44454    fi
44455  fi
44456
44457          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44458$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44459        elif test "x$COMPILE_TYPE" = xcross; then
44460          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44461$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44462        fi
44463        as_fn_error $? "Cannot continue." "$LINENO" 5
44464      fi
44465    fi
44466  fi
44467
44468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44469$as_echo_n "checking for target address size... " >&6; }
44470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44471$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44472
44473
44474  ###############################################################################
44475  #
44476  # Is the target little of big endian?
44477  #
44478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44479$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44480if ${ac_cv_c_bigendian+:} false; then :
44481  $as_echo_n "(cached) " >&6
44482else
44483  ac_cv_c_bigendian=unknown
44484    # See if we're dealing with a universal compiler.
44485    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44486/* end confdefs.h.  */
44487#ifndef __APPLE_CC__
44488	       not a universal capable compiler
44489	     #endif
44490	     typedef int dummy;
44491
44492_ACEOF
44493if ac_fn_cxx_try_compile "$LINENO"; then :
44494
44495	# Check for potential -arch flags.  It is not universal unless
44496	# there are at least two -arch flags with different values.
44497	ac_arch=
44498	ac_prev=
44499	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44500	 if test -n "$ac_prev"; then
44501	   case $ac_word in
44502	     i?86 | x86_64 | ppc | ppc64)
44503	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44504		 ac_arch=$ac_word
44505	       else
44506		 ac_cv_c_bigendian=universal
44507		 break
44508	       fi
44509	       ;;
44510	   esac
44511	   ac_prev=
44512	 elif test "x$ac_word" = "x-arch"; then
44513	   ac_prev=arch
44514	 fi
44515       done
44516fi
44517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44518    if test $ac_cv_c_bigendian = unknown; then
44519      # See if sys/param.h defines the BYTE_ORDER macro.
44520      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44521/* end confdefs.h.  */
44522#include <sys/types.h>
44523	     #include <sys/param.h>
44524
44525int
44526main ()
44527{
44528#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44529		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44530		     && LITTLE_ENDIAN)
44531	      bogus endian macros
44532	     #endif
44533
44534  ;
44535  return 0;
44536}
44537_ACEOF
44538if ac_fn_cxx_try_compile "$LINENO"; then :
44539  # It does; now see whether it defined to BIG_ENDIAN or not.
44540	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44541/* end confdefs.h.  */
44542#include <sys/types.h>
44543		#include <sys/param.h>
44544
44545int
44546main ()
44547{
44548#if BYTE_ORDER != BIG_ENDIAN
44549		 not big endian
44550		#endif
44551
44552  ;
44553  return 0;
44554}
44555_ACEOF
44556if ac_fn_cxx_try_compile "$LINENO"; then :
44557  ac_cv_c_bigendian=yes
44558else
44559  ac_cv_c_bigendian=no
44560fi
44561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44562fi
44563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44564    fi
44565    if test $ac_cv_c_bigendian = unknown; then
44566      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44567      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44568/* end confdefs.h.  */
44569#include <limits.h>
44570
44571int
44572main ()
44573{
44574#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44575	      bogus endian macros
44576	     #endif
44577
44578  ;
44579  return 0;
44580}
44581_ACEOF
44582if ac_fn_cxx_try_compile "$LINENO"; then :
44583  # It does; now see whether it defined to _BIG_ENDIAN or not.
44584	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44585/* end confdefs.h.  */
44586#include <limits.h>
44587
44588int
44589main ()
44590{
44591#ifndef _BIG_ENDIAN
44592		 not big endian
44593		#endif
44594
44595  ;
44596  return 0;
44597}
44598_ACEOF
44599if ac_fn_cxx_try_compile "$LINENO"; then :
44600  ac_cv_c_bigendian=yes
44601else
44602  ac_cv_c_bigendian=no
44603fi
44604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44605fi
44606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44607    fi
44608    if test $ac_cv_c_bigendian = unknown; then
44609      # Compile a test program.
44610      if test "$cross_compiling" = yes; then :
44611  # Try to guess by grepping values from an object file.
44612	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44613/* end confdefs.h.  */
44614short int ascii_mm[] =
44615		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44616		short int ascii_ii[] =
44617		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44618		int use_ascii (int i) {
44619		  return ascii_mm[i] + ascii_ii[i];
44620		}
44621		short int ebcdic_ii[] =
44622		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44623		short int ebcdic_mm[] =
44624		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44625		int use_ebcdic (int i) {
44626		  return ebcdic_mm[i] + ebcdic_ii[i];
44627		}
44628		extern int foo;
44629
44630int
44631main ()
44632{
44633return use_ascii (foo) == use_ebcdic (foo);
44634  ;
44635  return 0;
44636}
44637_ACEOF
44638if ac_fn_cxx_try_compile "$LINENO"; then :
44639  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44640	      ac_cv_c_bigendian=yes
44641	    fi
44642	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44643	      if test "$ac_cv_c_bigendian" = unknown; then
44644		ac_cv_c_bigendian=no
44645	      else
44646		# finding both strings is unlikely to happen, but who knows?
44647		ac_cv_c_bigendian=unknown
44648	      fi
44649	    fi
44650fi
44651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44652else
44653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44654/* end confdefs.h.  */
44655$ac_includes_default
44656int
44657main ()
44658{
44659
44660	     /* Are we little or big endian?  From Harbison&Steele.  */
44661	     union
44662	     {
44663	       long int l;
44664	       char c[sizeof (long int)];
44665	     } u;
44666	     u.l = 1;
44667	     return u.c[sizeof (long int) - 1] == 1;
44668
44669  ;
44670  return 0;
44671}
44672_ACEOF
44673if ac_fn_cxx_try_run "$LINENO"; then :
44674  ac_cv_c_bigendian=no
44675else
44676  ac_cv_c_bigendian=yes
44677fi
44678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44679  conftest.$ac_objext conftest.beam conftest.$ac_ext
44680fi
44681
44682    fi
44683fi
44684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44685$as_echo "$ac_cv_c_bigendian" >&6; }
44686 case $ac_cv_c_bigendian in #(
44687   yes)
44688     ENDIAN="big";; #(
44689   no)
44690     ENDIAN="little" ;; #(
44691   universal)
44692     ENDIAN="universal_endianness"
44693     ;; #(
44694   *)
44695     ENDIAN="unknown" ;;
44696 esac
44697
44698
44699  if test "x$ENDIAN" = xuniversal_endianness; then
44700    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44701  fi
44702  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44703    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
44704  fi
44705
44706
44707# Configure flags for the tools
44708
44709  ###############################################################################
44710  #
44711  # How to compile shared libraries.
44712  #
44713
44714  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44715    PICFLAG="-fPIC"
44716    C_FLAG_REORDER=''
44717    CXX_FLAG_REORDER=''
44718
44719    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44720      # Linking is different on MacOSX
44721      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44722      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44723      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44724      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44725      SET_SHARED_LIBRARY_MAPFILE=''
44726    else
44727      # Default works for linux, might work on other platforms as well.
44728      SHARED_LIBRARY_FLAGS='-shared'
44729      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44730      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44731      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44732      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44733    fi
44734  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44735    PICFLAG=''
44736    C_FLAG_REORDER=''
44737    CXX_FLAG_REORDER=''
44738
44739    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44740      # Linking is different on MacOSX
44741      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44742      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44743      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44744      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44745      SET_SHARED_LIBRARY_MAPFILE=''
44746    else
44747      # Default works for linux, might work on other platforms as well.
44748      SHARED_LIBRARY_FLAGS='-shared'
44749      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44750      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44751      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44752      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44753    fi
44754  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44755    PICFLAG="-KPIC"
44756    C_FLAG_REORDER='-xF'
44757    CXX_FLAG_REORDER='-xF'
44758    SHARED_LIBRARY_FLAGS="-G"
44759    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44760    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44761    SET_SHARED_LIBRARY_NAME=''
44762    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44763  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44764    PICFLAG="-qpic=large"
44765    C_FLAG_REORDER=''
44766    CXX_FLAG_REORDER=''
44767    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44768    SET_EXECUTABLE_ORIGIN=""
44769    SET_SHARED_LIBRARY_ORIGIN=''
44770    SET_SHARED_LIBRARY_NAME=''
44771    SET_SHARED_LIBRARY_MAPFILE=''
44772  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44773    PICFLAG=""
44774    C_FLAG_REORDER=''
44775    CXX_FLAG_REORDER=''
44776    SHARED_LIBRARY_FLAGS="-LD"
44777    SET_EXECUTABLE_ORIGIN=''
44778    SET_SHARED_LIBRARY_ORIGIN=''
44779    SET_SHARED_LIBRARY_NAME=''
44780    SET_SHARED_LIBRARY_MAPFILE=''
44781  fi
44782
44783
44784
44785
44786
44787
44788
44789
44790  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44791    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44792    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44793    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44794  fi
44795  # The (cross) compiler is now configured, we can now test capabilities
44796  # of the target platform.
44797
44798
44799
44800  ###############################################################################
44801  #
44802  # Setup the opt flags for different compilers
44803  # and different operating systems.
44804  #
44805
44806  # FIXME: this was indirectly the old default, but just inherited.
44807  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44808  #   C_FLAG_DEPS="-MMD -MF"
44809  # fi
44810
44811  # Generate make dependency files
44812  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44813    C_FLAG_DEPS="-MMD -MF"
44814  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44815    C_FLAG_DEPS="-MMD -MF"
44816  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44817    C_FLAG_DEPS="-xMMD -xMF"
44818  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44819    C_FLAG_DEPS="-qmakedep=gcc -MF"
44820  fi
44821  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44822
44823
44824
44825  # Debug symbols
44826  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44827    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44828      # reduce from default "-g2" option to save space
44829      CFLAGS_DEBUG_SYMBOLS="-g1"
44830      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44831    else
44832      CFLAGS_DEBUG_SYMBOLS="-g"
44833      CXXFLAGS_DEBUG_SYMBOLS="-g"
44834    fi
44835  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44836    CFLAGS_DEBUG_SYMBOLS="-g"
44837    CXXFLAGS_DEBUG_SYMBOLS="-g"
44838  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44839    CFLAGS_DEBUG_SYMBOLS="-g -xs"
44840    # FIXME: likely a bug, this disables debug symbols rather than enables them
44841    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44842  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44843    CFLAGS_DEBUG_SYMBOLS="-g"
44844    CXXFLAGS_DEBUG_SYMBOLS="-g"
44845  fi
44846
44847
44848
44849  # bounds, memory and behavior checking options
44850  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44851    case $DEBUG_LEVEL in
44852    release )
44853      # no adjustment
44854      ;;
44855    fastdebug )
44856      # no adjustment
44857      ;;
44858    slowdebug )
44859      # Add runtime stack smashing and undefined behavior checks.
44860      # Not all versions of gcc support -fstack-protector
44861      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44862
44863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44864$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44865  supports=yes
44866
44867  saved_cflags="$CFLAGS"
44868  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44869  ac_ext=c
44870ac_cpp='$CPP $CPPFLAGS'
44871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44873ac_compiler_gnu=$ac_cv_c_compiler_gnu
44874
44875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44876/* end confdefs.h.  */
44877int i;
44878_ACEOF
44879if ac_fn_c_try_compile "$LINENO"; then :
44880
44881else
44882  supports=no
44883fi
44884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44885  ac_ext=cpp
44886ac_cpp='$CXXCPP $CPPFLAGS'
44887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44890
44891  CFLAGS="$saved_cflags"
44892
44893  saved_cxxflags="$CXXFLAGS"
44894  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44895  ac_ext=cpp
44896ac_cpp='$CXXCPP $CPPFLAGS'
44897ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44898ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44899ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44900
44901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44902/* end confdefs.h.  */
44903int i;
44904_ACEOF
44905if ac_fn_cxx_try_compile "$LINENO"; then :
44906
44907else
44908  supports=no
44909fi
44910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44911  ac_ext=cpp
44912ac_cpp='$CXXCPP $CPPFLAGS'
44913ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44914ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44915ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44916
44917  CXXFLAGS="$saved_cxxflags"
44918
44919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44920$as_echo "$supports" >&6; }
44921  if test "x$supports" = "xyes" ; then
44922    :
44923  else
44924    STACK_PROTECTOR_CFLAG=""
44925  fi
44926
44927
44928      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44929      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44930      ;;
44931    esac
44932  fi
44933
44934  # Optimization levels
44935  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44936    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44937
44938    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44939      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44940      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44941      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44942      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44943      C_O_FLAG_DEBUG="-xregs=no%frameptr"
44944      C_O_FLAG_NONE="-xregs=no%frameptr"
44945      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44946      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44947      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44948      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44949      CXX_O_FLAG_NONE="-xregs=no%frameptr"
44950      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44951        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44952        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44953      fi
44954    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44955      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44956      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44957      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44958      C_O_FLAG_DEBUG=""
44959      C_O_FLAG_NONE=""
44960      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44961      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44962      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44963      C_O_FLAG_DEBUG=""
44964      CXX_O_FLAG_NONE=""
44965    fi
44966  else
44967    # The remaining toolchains share opt flags between CC and CXX;
44968    # setup for C and duplicate afterwards.
44969    if test "x$TOOLCHAIN_TYPE" = xgcc; then
44970      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44971        # On MacOSX we optimize for size, something
44972        # we should do for all platforms?
44973        C_O_FLAG_HIGHEST="-Os"
44974        C_O_FLAG_HI="-Os"
44975        C_O_FLAG_NORM="-Os"
44976      else
44977        C_O_FLAG_HIGHEST="-O3"
44978        C_O_FLAG_HI="-O3"
44979        C_O_FLAG_NORM="-O2"
44980      fi
44981      C_O_FLAG_DEBUG="-O0"
44982      C_O_FLAG_NONE="-O0"
44983    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44984      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44985        # On MacOSX we optimize for size, something
44986        # we should do for all platforms?
44987        C_O_FLAG_HIGHEST="-Os"
44988        C_O_FLAG_HI="-Os"
44989        C_O_FLAG_NORM="-Os"
44990      else
44991        C_O_FLAG_HIGHEST="-O3"
44992        C_O_FLAG_HI="-O3"
44993        C_O_FLAG_NORM="-O2"
44994      fi
44995      C_O_FLAG_DEBUG="-O0"
44996      C_O_FLAG_NONE="-O0"
44997    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44998      C_O_FLAG_HIGHEST="-O3"
44999      C_O_FLAG_HI="-O3 -qstrict"
45000      C_O_FLAG_NORM="-O2"
45001      C_O_FLAG_DEBUG="-qnoopt"
45002      C_O_FLAG_NONE="-qnoop"
45003    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45004      C_O_FLAG_HIGHEST="-O2"
45005      C_O_FLAG_HI="-O1"
45006      C_O_FLAG_NORM="-O1"
45007      C_O_FLAG_DEBUG="-Od"
45008      C_O_FLAG_NONE="-Od"
45009    fi
45010    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
45011    CXX_O_FLAG_HI="$C_O_FLAG_HI"
45012    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
45013    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
45014    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
45015  fi
45016
45017  # Adjust optimization flags according to debug level.
45018  case $DEBUG_LEVEL in
45019    release )
45020      # no adjustment
45021      ;;
45022    fastdebug )
45023      # Not quite so much optimization
45024      C_O_FLAG_HI="$C_O_FLAG_NORM"
45025      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
45026      ;;
45027    slowdebug )
45028      # Disable optimization
45029      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
45030      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
45031      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
45032      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
45033      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
45034      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
45035      ;;
45036  esac
45037
45038
45039
45040
45041
45042
45043
45044
45045
45046
45047
45048
45049
45050  # Special extras...
45051  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45052    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
45053      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
45054      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
45055    fi
45056    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
45057    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
45058  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45059    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
45060    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
45061  fi
45062
45063  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
45064  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
45065  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
45066
45067  ###############################################################################
45068  #
45069  # Now setup the CFLAGS and LDFLAGS for the JDK build.
45070  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
45071  #
45072
45073  # Setup compiler/platform specific flags into
45074  #    CFLAGS_JDK    - C Compiler flags
45075  #    CXXFLAGS_JDK  - C++ Compiler flags
45076  #    COMMON_CCXXFLAGS_JDK - common to C and C++
45077  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45078    if test "x$OPENJDK_TARGET_CPU" = xx86; then
45079      # Force compatibility with i586 on 32 bit intel platforms.
45080      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
45081    fi
45082    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
45083        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
45084    case $OPENJDK_TARGET_CPU_ARCH in
45085      arm )
45086        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
45087        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45088        ;;
45089      ppc )
45090        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
45091        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45092        ;;
45093      * )
45094        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
45095        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45096        ;;
45097    esac
45098  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45099    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
45100    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
45101      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
45102    fi
45103
45104    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
45105    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
45106  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45107    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
45108    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
45109  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45110    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
45111        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
45112        -DWIN32_LEAN_AND_MEAN \
45113        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
45114        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
45115        -DWIN32 -DIAL"
45116    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45117      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
45118    else
45119      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
45120    fi
45121    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
45122    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
45123    # studio.
45124    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
45125      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45126          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
45127    fi
45128  fi
45129
45130  ###############################################################################
45131
45132  # Adjust flags according to debug level.
45133  case $DEBUG_LEVEL in
45134    fastdebug | slowdebug )
45135      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
45136      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
45137      JAVAC_FLAGS="$JAVAC_FLAGS -g"
45138      ;;
45139    release )
45140      ;;
45141    * )
45142      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45143      ;;
45144  esac
45145
45146  # Setup LP64
45147  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
45148
45149  # Set some common defines. These works for all compilers, but assume
45150  # -D is universally accepted.
45151
45152  # Setup endianness
45153  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
45154    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
45155    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
45156    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
45157    #   Note: -Dmacro         is the same as    #define macro 1
45158    #         -Dmacro=        is the same as    #define macro
45159    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45160      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
45161    else
45162      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
45163    fi
45164  else
45165    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
45166    # are defined in the system?
45167    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45168      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
45169    else
45170      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
45171    fi
45172  fi
45173
45174  # Setup target OS define. Use OS target name but in upper case.
45175  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
45176  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
45177
45178  # Setup target CPU
45179  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
45180
45181  # Setup debug/release defines
45182  if test "x$DEBUG_LEVEL" = xrelease; then
45183    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
45184    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45185      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
45186    fi
45187  else
45188    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
45189  fi
45190
45191  # Set some additional per-OS defines.
45192  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45193    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
45194  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45195    # FIXME: PPC64 should not be here.
45196    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
45197  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
45198    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
45199  fi
45200
45201  # Additional macosx handling
45202  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45203    # Setting these parameters makes it an error to link to macosx APIs that are
45204    # newer than the given OS version and makes the linked binaries compatible
45205    # even if built on a newer version of the OS.
45206    # The expected format is X.Y.Z
45207    MACOSX_VERSION_MIN=10.7.0
45208
45209
45210    # The macro takes the version with no dots, ex: 1070
45211    # Let the flags variables get resolved in make for easier override on make
45212    # command line.
45213    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45214    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45215  fi
45216
45217  # Setup some hard coded includes
45218  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45219      -I${JDK_TOPDIR}/src/java.base/share/native/include \
45220      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
45221      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
45222
45223  # The shared libraries are compiled using the picflag.
45224  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45225  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45226
45227  # Executable flags
45228  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45229  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45230
45231
45232
45233
45234
45235
45236  # Flags for compiling test libraries
45237  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45238  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45239
45240  # Flags for compiling test executables
45241  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45242  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45243
45244
45245
45246
45247
45248
45249  # Setup LDFLAGS et al.
45250  #
45251
45252  # Now this is odd. The JDK native libraries have to link against libjvm.so
45253  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
45254  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
45255  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
45256  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
45257  # libraries will link to whatever is in memory. Yuck.
45258  #
45259  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
45260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45261    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
45262    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45263      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
45264    fi
45265    # TODO: make -debug optional "--disable-full-debug-symbols"
45266    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
45267  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45268    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45269    # We have previously set HAS_GNU_HASH if this is the case
45270    if test -n "$HAS_GNU_HASH"; then
45271      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
45272    fi
45273    if test "x$OPENJDK_TARGET_OS" = xlinux; then
45274      # And since we now know that the linker is gnu, then add -z defs, to forbid
45275      # undefined symbols in object files.
45276      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
45277      case $DEBUG_LEVEL in
45278        release )
45279          # tell linker to optimize libraries.
45280          # Should this be supplied to the OSS linker as well?
45281          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
45282          ;;
45283        slowdebug )
45284          if test "x$HAS_LINKER_NOW" = "xtrue"; then
45285            # do relocations at load
45286            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
45287            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
45288          fi
45289          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45290            # mark relocations read only
45291            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45292            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45293          fi
45294          ;;
45295        fastdebug )
45296          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45297            # mark relocations read only
45298            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45299            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45300          fi
45301          ;;
45302        * )
45303          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45304          ;;
45305        esac
45306    fi
45307  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45308    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
45309    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
45310  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45311    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
45312  fi
45313
45314  # Customize LDFLAGS for executables
45315
45316  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
45317
45318  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45319    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
45320      LDFLAGS_STACK_SIZE=1048576
45321    else
45322      LDFLAGS_STACK_SIZE=327680
45323    fi
45324    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
45325  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
45326    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
45327  fi
45328
45329  # Customize LDFLAGS for libs
45330  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
45331
45332  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45333    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
45334    JDKLIB_LIBS=""
45335  else
45336    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45337        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45338
45339    # On some platforms (mac) the linker warns about non existing -L dirs.
45340    # Add server first if available. Linking aginst client does not always produce the same results.
45341    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45342    # Default to server for other variants.
45343    if test "x$JVM_VARIANT_SERVER" = xtrue; then
45344      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45345    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45346      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45347    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45348      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45349    else
45350      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45351    fi
45352
45353    JDKLIB_LIBS="-ljava -ljvm"
45354    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45355      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45356    fi
45357  fi
45358
45359
45360
45361
45362
45363
45364
45365  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45366  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45367
45368
45369
45370
45371
45372  # Some Zero and Shark settings.
45373  # ZERO_ARCHFLAG tells the compiler which mode to build for
45374  case "${OPENJDK_TARGET_CPU}" in
45375    s390)
45376      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45377      ;;
45378    *)
45379      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45380  esac
45381
45382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45383$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45384  supports=yes
45385
45386  saved_cflags="$CFLAGS"
45387  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45388  ac_ext=c
45389ac_cpp='$CPP $CPPFLAGS'
45390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45392ac_compiler_gnu=$ac_cv_c_compiler_gnu
45393
45394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45395/* end confdefs.h.  */
45396int i;
45397_ACEOF
45398if ac_fn_c_try_compile "$LINENO"; then :
45399
45400else
45401  supports=no
45402fi
45403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45404  ac_ext=cpp
45405ac_cpp='$CXXCPP $CPPFLAGS'
45406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45409
45410  CFLAGS="$saved_cflags"
45411
45412  saved_cxxflags="$CXXFLAGS"
45413  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45414  ac_ext=cpp
45415ac_cpp='$CXXCPP $CPPFLAGS'
45416ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45417ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45418ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45419
45420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45421/* end confdefs.h.  */
45422int i;
45423_ACEOF
45424if ac_fn_cxx_try_compile "$LINENO"; then :
45425
45426else
45427  supports=no
45428fi
45429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45430  ac_ext=cpp
45431ac_cpp='$CXXCPP $CPPFLAGS'
45432ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45433ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45434ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45435
45436  CXXFLAGS="$saved_cxxflags"
45437
45438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45439$as_echo "$supports" >&6; }
45440  if test "x$supports" = "xyes" ; then
45441    :
45442  else
45443    ZERO_ARCHFLAG=""
45444  fi
45445
45446
45447
45448  # Check that the compiler supports -mX (or -qX on AIX) flags
45449  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45450
45451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45452$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45453  supports=yes
45454
45455  saved_cflags="$CFLAGS"
45456  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45457  ac_ext=c
45458ac_cpp='$CPP $CPPFLAGS'
45459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45461ac_compiler_gnu=$ac_cv_c_compiler_gnu
45462
45463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45464/* end confdefs.h.  */
45465int i;
45466_ACEOF
45467if ac_fn_c_try_compile "$LINENO"; then :
45468
45469else
45470  supports=no
45471fi
45472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45473  ac_ext=cpp
45474ac_cpp='$CXXCPP $CPPFLAGS'
45475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45478
45479  CFLAGS="$saved_cflags"
45480
45481  saved_cxxflags="$CXXFLAGS"
45482  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45483  ac_ext=cpp
45484ac_cpp='$CXXCPP $CPPFLAGS'
45485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45488
45489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45490/* end confdefs.h.  */
45491int i;
45492_ACEOF
45493if ac_fn_cxx_try_compile "$LINENO"; then :
45494
45495else
45496  supports=no
45497fi
45498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45499  ac_ext=cpp
45500ac_cpp='$CXXCPP $CPPFLAGS'
45501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45504
45505  CXXFLAGS="$saved_cxxflags"
45506
45507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45508$as_echo "$supports" >&6; }
45509  if test "x$supports" = "xyes" ; then
45510    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45511  else
45512    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45513  fi
45514
45515
45516
45517  # Check whether --enable-warnings-as-errors was given.
45518if test "${enable_warnings_as_errors+set}" = set; then :
45519  enableval=$enable_warnings_as_errors;
45520fi
45521
45522
45523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45524$as_echo_n "checking if native warnings are errors... " >&6; }
45525  if test "x$enable_warnings_as_errors" = "xyes"; then
45526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45527$as_echo "yes (explicitely set)" >&6; }
45528    WARNINGS_AS_ERRORS=true
45529  elif test "x$enable_warnings_as_errors" = "xno"; then
45530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45531$as_echo "no" >&6; }
45532    WARNINGS_AS_ERRORS=false
45533  elif test "x$enable_warnings_as_errors" = "x"; then
45534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45535$as_echo "yes (default)" >&6; }
45536    WARNINGS_AS_ERRORS=true
45537  else
45538    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45539  fi
45540
45541  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
45542    # Set legacy hotspot variable
45543    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
45544  else
45545    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
45546  fi
45547
45548
45549
45550
45551  case "${TOOLCHAIN_TYPE}" in
45552    microsoft)
45553      DISABLE_WARNING_PREFIX="-wd"
45554      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45555      ;;
45556    solstudio)
45557      DISABLE_WARNING_PREFIX="-erroff="
45558      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45559      ;;
45560    gcc)
45561      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45562
45563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45564$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45565  supports=yes
45566
45567  saved_cflags="$CFLAGS"
45568  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45569  ac_ext=c
45570ac_cpp='$CPP $CPPFLAGS'
45571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45573ac_compiler_gnu=$ac_cv_c_compiler_gnu
45574
45575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45576/* end confdefs.h.  */
45577int i;
45578_ACEOF
45579if ac_fn_c_try_compile "$LINENO"; then :
45580
45581else
45582  supports=no
45583fi
45584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45585  ac_ext=cpp
45586ac_cpp='$CXXCPP $CPPFLAGS'
45587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45590
45591  CFLAGS="$saved_cflags"
45592
45593  saved_cxxflags="$CXXFLAGS"
45594  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45595  ac_ext=cpp
45596ac_cpp='$CXXCPP $CPPFLAGS'
45597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45600
45601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45602/* end confdefs.h.  */
45603int i;
45604_ACEOF
45605if ac_fn_cxx_try_compile "$LINENO"; then :
45606
45607else
45608  supports=no
45609fi
45610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45611  ac_ext=cpp
45612ac_cpp='$CXXCPP $CPPFLAGS'
45613ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45614ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45615ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45616
45617  CXXFLAGS="$saved_cxxflags"
45618
45619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45620$as_echo "$supports" >&6; }
45621  if test "x$supports" = "xyes" ; then
45622    GCC_CAN_DISABLE_WARNINGS=true
45623  else
45624    GCC_CAN_DISABLE_WARNINGS=false
45625
45626  fi
45627
45628      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45629        DISABLE_WARNING_PREFIX="-Wno-"
45630      else
45631        DISABLE_WARNING_PREFIX=
45632      fi
45633      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45634      ;;
45635    clang)
45636      DISABLE_WARNING_PREFIX="-Wno-"
45637      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45638      ;;
45639  esac
45640
45641
45642
45643
45644# Setup debug symbols (need objcopy from the toolchain for that)
45645
45646  #
45647  # ENABLE_DEBUG_SYMBOLS
45648  # This must be done after the toolchain is setup, since we're looking at objcopy.
45649  #
45650  # Check whether --enable-debug-symbols was given.
45651if test "${enable_debug_symbols+set}" = set; then :
45652  enableval=$enable_debug_symbols;
45653fi
45654
45655
45656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45657$as_echo_n "checking if we should generate debug symbols... " >&6; }
45658
45659  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45660    # explicit enabling of enable-debug-symbols and can't find objcopy
45661    #   this is an error
45662    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45663  fi
45664
45665  if test "x$enable_debug_symbols" = "xyes"; then
45666    ENABLE_DEBUG_SYMBOLS=true
45667  elif test "x$enable_debug_symbols" = "xno"; then
45668    ENABLE_DEBUG_SYMBOLS=false
45669  else
45670    # Default is on if objcopy is found
45671    if test "x$OBJCOPY" != x; then
45672      ENABLE_DEBUG_SYMBOLS=true
45673    # MacOS X and Windows don't use objcopy but default is on for those OSes
45674    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45675      ENABLE_DEBUG_SYMBOLS=true
45676    else
45677      ENABLE_DEBUG_SYMBOLS=false
45678    fi
45679  fi
45680
45681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45682$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45683
45684  #
45685  # ZIP_DEBUGINFO_FILES
45686  #
45687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45688$as_echo_n "checking if we should zip debug-info files... " >&6; }
45689  # Check whether --enable-zip-debug-info was given.
45690if test "${enable_zip_debug_info+set}" = set; then :
45691  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45692else
45693  enable_zip_debug_info="yes"
45694fi
45695
45696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45697$as_echo "${enable_zip_debug_info}" >&6; }
45698
45699  if test "x${enable_zip_debug_info}" = "xno"; then
45700    ZIP_DEBUGINFO_FILES=false
45701  else
45702    ZIP_DEBUGINFO_FILES=true
45703  fi
45704
45705
45706
45707
45708
45709  # Check whether --enable-native-coverage was given.
45710if test "${enable_native_coverage+set}" = set; then :
45711  enableval=$enable_native_coverage;
45712fi
45713
45714  GCOV_ENABLED="false"
45715  if test "x$enable_native_coverage" = "xyes"; then
45716    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45718$as_echo_n "checking if native coverage is enabled... " >&6; }
45719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45720$as_echo "yes" >&6; }
45721      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45722      GCOV_LDFLAGS="-fprofile-arcs"
45723      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45724      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45725      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45726      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45727      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45728      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45729      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45730      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45731      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45732      GCOV_ENABLED="true"
45733    else
45734      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45735    fi
45736  elif test "x$enable_native_coverage" = "xno"; then
45737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45738$as_echo_n "checking if native coverage is enabled... " >&6; }
45739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45740$as_echo "no" >&6; }
45741  elif test "x$enable_native_coverage" != "x"; then
45742    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45743  fi
45744
45745
45746
45747
45748###############################################################################
45749#
45750# Check dependencies for external and internal libraries.
45751#
45752###############################################################################
45753
45754# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45755
45756  # When using cygwin or msys, we need a wrapper binary that renames
45757  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45758  # @files and rewrites these too! This wrapper binary is
45759  # called fixpath.
45760  FIXPATH=
45761  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45763$as_echo_n "checking if fixpath can be created... " >&6; }
45764    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45765    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45766    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45767    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45768      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45769      FIXPATH="$FIXPATH_BIN -c"
45770    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45771      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45772      # @ was chosen as separator to minimize risk of other tools messing around with it
45773      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45774          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45775      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45776      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45777    fi
45778    FIXPATH_SRC_W="$FIXPATH_SRC"
45779    FIXPATH_BIN_W="$FIXPATH_BIN"
45780
45781  unix_path="$FIXPATH_SRC_W"
45782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45783    windows_path=`$CYGPATH -m "$unix_path"`
45784    FIXPATH_SRC_W="$windows_path"
45785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45786    windows_path=`cmd //c echo $unix_path`
45787    FIXPATH_SRC_W="$windows_path"
45788  fi
45789
45790
45791  unix_path="$FIXPATH_BIN_W"
45792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45793    windows_path=`$CYGPATH -m "$unix_path"`
45794    FIXPATH_BIN_W="$windows_path"
45795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45796    windows_path=`cmd //c echo $unix_path`
45797    FIXPATH_BIN_W="$windows_path"
45798  fi
45799
45800    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45801    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45802    cd $FIXPATH_DIR
45803    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45804    cd $CURDIR
45805
45806    if test ! -x $FIXPATH_BIN; then
45807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45808$as_echo "no" >&6; }
45809      cat $FIXPATH_DIR/fixpath1.log
45810      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45811    fi
45812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45813$as_echo "yes" >&6; }
45814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45815$as_echo_n "checking if fixpath.exe works... " >&6; }
45816    cd $FIXPATH_DIR
45817    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45818        > $FIXPATH_DIR/fixpath2.log 2>&1
45819    cd $CURDIR
45820    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45822$as_echo "no" >&6; }
45823      cat $FIXPATH_DIR/fixpath2.log
45824      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45825    fi
45826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45827$as_echo "yes" >&6; }
45828  fi
45829
45830
45831
45832
45833
45834  # Check if X11 is needed
45835  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45836    # No X11 support on windows or macosx
45837    NEEDS_LIB_X11=false
45838  else
45839    if test "x$SUPPORT_HEADFUL" = xno; then
45840      # No X11 support if building headless-only
45841      NEEDS_LIB_X11=false
45842    else
45843      # All other instances need X11
45844      NEEDS_LIB_X11=true
45845    fi
45846  fi
45847
45848  # Check if cups is needed
45849  if test "x$OPENJDK_TARGET_OS" = xwindows; then
45850    # Windows have a separate print system
45851    NEEDS_LIB_CUPS=false
45852  else
45853    NEEDS_LIB_CUPS=true
45854  fi
45855
45856  # Check if freetype is needed
45857  if test "x$OPENJDK" = "xtrue"; then
45858    NEEDS_LIB_FREETYPE=true
45859  else
45860    NEEDS_LIB_FREETYPE=false
45861  fi
45862
45863  # Check if alsa is needed
45864  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45865    NEEDS_LIB_ALSA=true
45866  else
45867    NEEDS_LIB_ALSA=false
45868  fi
45869
45870  # Check if ffi is needed
45871  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45872    NEEDS_LIB_FFI=true
45873  else
45874    NEEDS_LIB_FFI=false
45875  fi
45876
45877
45878  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45879  # dynamic build is configured on command line.
45880
45881# Check whether --with-stdc++lib was given.
45882if test "${with_stdc__lib+set}" = set; then :
45883  withval=$with_stdc__lib;
45884        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45885                && test "x$with_stdc__lib" != xdefault; then
45886          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45887        fi
45888
45889else
45890  with_stdc__lib=default
45891
45892fi
45893
45894
45895  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45896    # Test if -lstdc++ works.
45897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45898$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45899    ac_ext=cpp
45900ac_cpp='$CXXCPP $CPPFLAGS'
45901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45904
45905    OLD_CXXFLAGS="$CXXFLAGS"
45906    CXXFLAGS="$CXXFLAGS -lstdc++"
45907    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45908/* end confdefs.h.  */
45909
45910int
45911main ()
45912{
45913return 0;
45914  ;
45915  return 0;
45916}
45917_ACEOF
45918if ac_fn_cxx_try_link "$LINENO"; then :
45919  has_dynamic_libstdcxx=yes
45920else
45921  has_dynamic_libstdcxx=no
45922fi
45923rm -f core conftest.err conftest.$ac_objext \
45924    conftest$ac_exeext conftest.$ac_ext
45925    CXXFLAGS="$OLD_CXXFLAGS"
45926    ac_ext=cpp
45927ac_cpp='$CXXCPP $CPPFLAGS'
45928ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45929ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45930ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45931
45932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45933$as_echo "$has_dynamic_libstdcxx" >&6; }
45934
45935    # Test if stdc++ can be linked statically.
45936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45937$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45938    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45939    ac_ext=cpp
45940ac_cpp='$CXXCPP $CPPFLAGS'
45941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45944
45945    OLD_LIBS="$LIBS"
45946    OLD_CXX="$CXX"
45947    LIBS="$STATIC_STDCXX_FLAGS"
45948    CXX="$CC"
45949    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45950/* end confdefs.h.  */
45951
45952int
45953main ()
45954{
45955return 0;
45956  ;
45957  return 0;
45958}
45959_ACEOF
45960if ac_fn_cxx_try_link "$LINENO"; then :
45961  has_static_libstdcxx=yes
45962else
45963  has_static_libstdcxx=no
45964fi
45965rm -f core conftest.err conftest.$ac_objext \
45966    conftest$ac_exeext conftest.$ac_ext
45967    LIBS="$OLD_LIBS"
45968    CXX="$OLD_CXX"
45969    ac_ext=cpp
45970ac_cpp='$CXXCPP $CPPFLAGS'
45971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45974
45975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45976$as_echo "$has_static_libstdcxx" >&6; }
45977
45978    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45979      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45980    fi
45981
45982    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45983      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45984    fi
45985
45986    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45987      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45988    fi
45989
45990    # If dynamic was requested, it's available since it would fail above otherwise.
45991    # If dynamic wasn't requested, go with static unless it isn't available.
45992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45993$as_echo_n "checking how to link with libstdc++... " >&6; }
45994    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45995      LIBCXX="$LIBCXX -lstdc++"
45996      LDCXX="$CXX"
45997      STATIC_CXX_SETTING="STATIC_CXX=false"
45998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45999$as_echo "dynamic" >&6; }
46000    else
46001      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
46002      LDCXX="$CC"
46003      STATIC_CXX_SETTING="STATIC_CXX=true"
46004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
46005$as_echo "static" >&6; }
46006    fi
46007  fi
46008
46009
46010  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46011  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
46012    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46013  fi
46014
46015  # TODO better (platform agnostic) test
46016  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
46017    LIBCXX="-lstdc++"
46018  fi
46019
46020
46021  # Setup Windows runtime dlls
46022  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46023
46024
46025# Check whether --with-msvcr-dll was given.
46026if test "${with_msvcr_dll+set}" = set; then :
46027  withval=$with_msvcr_dll;
46028fi
46029
46030
46031  if test "x$with_msvcr_dll" != x; then
46032    # If given explicitely by user, do not probe. If not present, fail directly.
46033
46034  DLL_NAME="$MSVCR_NAME"
46035  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
46036  METHOD="--with-msvcr-dll"
46037  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46038    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46039$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46040
46041    # Need to check if the found msvcr is correct architecture
46042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46043$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46044    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46046      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46047      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46048      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46049        CORRECT_MSVCR_ARCH="PE32 executable"
46050      else
46051        CORRECT_MSVCR_ARCH="PE32+ executable"
46052      fi
46053    else
46054      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46055        CORRECT_MSVCR_ARCH=386
46056      else
46057        CORRECT_MSVCR_ARCH=x86-64
46058      fi
46059    fi
46060    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46062$as_echo "ok" >&6; }
46063      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46064
46065  # Only process if variable expands to non-empty
46066
46067  if test "x$MSVC_DLL" != x; then
46068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46069
46070  # Input might be given as Windows format, start by converting to
46071  # unix format.
46072  path="$MSVC_DLL"
46073  new_path=`$CYGPATH -u "$path"`
46074
46075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46078  # "foo.exe" is OK but "foo" is an error.
46079  #
46080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46081  # It is also a way to make sure we got the proper file name for the real test later on.
46082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46083  if test "x$test_shortpath" = x; then
46084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46085$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46086    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46087  fi
46088
46089  # Call helper function which possibly converts this using DOS-style short mode.
46090  # If so, the updated path is stored in $new_path.
46091
46092  input_path="$new_path"
46093  # Check if we need to convert this using DOS-style short mode. If the path
46094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46095  # take no chances and rewrite it.
46096  # Note: m4 eats our [], so we need to use [ and ] instead.
46097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46098  if test "x$has_forbidden_chars" != x; then
46099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46103      # Going to short mode and back again did indeed matter. Since short mode is
46104      # case insensitive, let's make it lowercase to improve readability.
46105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46106      # Now convert it back to Unix-style (cygpath)
46107      input_path=`$CYGPATH -u "$shortmode_path"`
46108      new_path="$input_path"
46109    fi
46110  fi
46111
46112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46113  if test "x$test_cygdrive_prefix" = x; then
46114    # As a simple fix, exclude /usr/bin since it's not a real path.
46115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46117      # a path prefixed by /cygdrive for fixpath to work.
46118      new_path="$CYGWIN_ROOT_PATH$input_path"
46119    fi
46120  fi
46121
46122
46123  if test "x$path" != "x$new_path"; then
46124    MSVC_DLL="$new_path"
46125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46126$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46127  fi
46128
46129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46130
46131  path="$MSVC_DLL"
46132  has_colon=`$ECHO $path | $GREP ^.:`
46133  new_path="$path"
46134  if test "x$has_colon" = x; then
46135    # Not in mixed or Windows style, start by that.
46136    new_path=`cmd //c echo $path`
46137  fi
46138
46139
46140  input_path="$new_path"
46141  # Check if we need to convert this using DOS-style short mode. If the path
46142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46143  # take no chances and rewrite it.
46144  # Note: m4 eats our [], so we need to use [ and ] instead.
46145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46146  if test "x$has_forbidden_chars" != x; then
46147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46149  fi
46150
46151
46152  windows_path="$new_path"
46153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46154    unix_path=`$CYGPATH -u "$windows_path"`
46155    new_path="$unix_path"
46156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46158    new_path="$unix_path"
46159  fi
46160
46161  if test "x$path" != "x$new_path"; then
46162    MSVC_DLL="$new_path"
46163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46164$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46165  fi
46166
46167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46169
46170    else
46171      # We're on a unix platform. Hooray! :)
46172      path="$MSVC_DLL"
46173      has_space=`$ECHO "$path" | $GREP " "`
46174      if test "x$has_space" != x; then
46175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46176$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46178      fi
46179
46180      # Use eval to expand a potential ~
46181      eval path="$path"
46182      if test ! -f "$path" && test ! -d "$path"; then
46183        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46184      fi
46185
46186      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46187    fi
46188  fi
46189
46190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46191$as_echo_n "checking for $DLL_NAME... " >&6; }
46192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46193$as_echo "$MSVC_DLL" >&6; }
46194    else
46195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46196$as_echo "incorrect, ignoring" >&6; }
46197      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46198$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46199    fi
46200  fi
46201
46202    if test "x$MSVC_DLL" = x; then
46203      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
46204    fi
46205    MSVCR_DLL="$MSVC_DLL"
46206  elif test "x$DEVKIT_MSVCR_DLL" != x; then
46207
46208  DLL_NAME="$MSVCR_NAME"
46209  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
46210  METHOD="devkit"
46211  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46212    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46213$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46214
46215    # Need to check if the found msvcr is correct architecture
46216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46217$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46218    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46220      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46221      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46222      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46223        CORRECT_MSVCR_ARCH="PE32 executable"
46224      else
46225        CORRECT_MSVCR_ARCH="PE32+ executable"
46226      fi
46227    else
46228      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46229        CORRECT_MSVCR_ARCH=386
46230      else
46231        CORRECT_MSVCR_ARCH=x86-64
46232      fi
46233    fi
46234    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46236$as_echo "ok" >&6; }
46237      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46238
46239  # Only process if variable expands to non-empty
46240
46241  if test "x$MSVC_DLL" != x; then
46242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46243
46244  # Input might be given as Windows format, start by converting to
46245  # unix format.
46246  path="$MSVC_DLL"
46247  new_path=`$CYGPATH -u "$path"`
46248
46249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46252  # "foo.exe" is OK but "foo" is an error.
46253  #
46254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46255  # It is also a way to make sure we got the proper file name for the real test later on.
46256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46257  if test "x$test_shortpath" = x; then
46258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46259$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46260    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46261  fi
46262
46263  # Call helper function which possibly converts this using DOS-style short mode.
46264  # If so, the updated path is stored in $new_path.
46265
46266  input_path="$new_path"
46267  # Check if we need to convert this using DOS-style short mode. If the path
46268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46269  # take no chances and rewrite it.
46270  # Note: m4 eats our [], so we need to use [ and ] instead.
46271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46272  if test "x$has_forbidden_chars" != x; then
46273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46277      # Going to short mode and back again did indeed matter. Since short mode is
46278      # case insensitive, let's make it lowercase to improve readability.
46279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46280      # Now convert it back to Unix-style (cygpath)
46281      input_path=`$CYGPATH -u "$shortmode_path"`
46282      new_path="$input_path"
46283    fi
46284  fi
46285
46286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46287  if test "x$test_cygdrive_prefix" = x; then
46288    # As a simple fix, exclude /usr/bin since it's not a real path.
46289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46291      # a path prefixed by /cygdrive for fixpath to work.
46292      new_path="$CYGWIN_ROOT_PATH$input_path"
46293    fi
46294  fi
46295
46296
46297  if test "x$path" != "x$new_path"; then
46298    MSVC_DLL="$new_path"
46299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46300$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46301  fi
46302
46303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304
46305  path="$MSVC_DLL"
46306  has_colon=`$ECHO $path | $GREP ^.:`
46307  new_path="$path"
46308  if test "x$has_colon" = x; then
46309    # Not in mixed or Windows style, start by that.
46310    new_path=`cmd //c echo $path`
46311  fi
46312
46313
46314  input_path="$new_path"
46315  # Check if we need to convert this using DOS-style short mode. If the path
46316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46317  # take no chances and rewrite it.
46318  # Note: m4 eats our [], so we need to use [ and ] instead.
46319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46320  if test "x$has_forbidden_chars" != x; then
46321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46323  fi
46324
46325
46326  windows_path="$new_path"
46327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46328    unix_path=`$CYGPATH -u "$windows_path"`
46329    new_path="$unix_path"
46330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46332    new_path="$unix_path"
46333  fi
46334
46335  if test "x$path" != "x$new_path"; then
46336    MSVC_DLL="$new_path"
46337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46338$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46339  fi
46340
46341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46343
46344    else
46345      # We're on a unix platform. Hooray! :)
46346      path="$MSVC_DLL"
46347      has_space=`$ECHO "$path" | $GREP " "`
46348      if test "x$has_space" != x; then
46349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46350$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46352      fi
46353
46354      # Use eval to expand a potential ~
46355      eval path="$path"
46356      if test ! -f "$path" && test ! -d "$path"; then
46357        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46358      fi
46359
46360      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46361    fi
46362  fi
46363
46364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46365$as_echo_n "checking for $DLL_NAME... " >&6; }
46366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46367$as_echo "$MSVC_DLL" >&6; }
46368    else
46369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46370$as_echo "incorrect, ignoring" >&6; }
46371      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46372$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46373    fi
46374  fi
46375
46376    if test "x$MSVC_DLL" = x; then
46377      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46378    fi
46379    MSVCR_DLL="$MSVC_DLL"
46380  else
46381
46382  DLL_NAME="${MSVCR_NAME}"
46383  MSVC_DLL=
46384
46385  if test "x$MSVC_DLL" = x; then
46386    # Probe: Using well-known location from Visual Studio 10.0
46387    if test "x$VCINSTALLDIR" != x; then
46388      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46389
46390  windows_path="$CYGWIN_VC_INSTALL_DIR"
46391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46392    unix_path=`$CYGPATH -u "$windows_path"`
46393    CYGWIN_VC_INSTALL_DIR="$unix_path"
46394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46396    CYGWIN_VC_INSTALL_DIR="$unix_path"
46397  fi
46398
46399      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46400        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46401      else
46402        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46403      fi
46404      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46405
46406  DLL_NAME="$DLL_NAME"
46407  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46408  METHOD="well-known location in VCINSTALLDIR"
46409  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46410    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46411$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46412
46413    # Need to check if the found msvcr is correct architecture
46414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46415$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46416    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46418      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46419      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46420      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46421        CORRECT_MSVCR_ARCH="PE32 executable"
46422      else
46423        CORRECT_MSVCR_ARCH="PE32+ executable"
46424      fi
46425    else
46426      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46427        CORRECT_MSVCR_ARCH=386
46428      else
46429        CORRECT_MSVCR_ARCH=x86-64
46430      fi
46431    fi
46432    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46434$as_echo "ok" >&6; }
46435      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46436
46437  # Only process if variable expands to non-empty
46438
46439  if test "x$MSVC_DLL" != x; then
46440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46441
46442  # Input might be given as Windows format, start by converting to
46443  # unix format.
46444  path="$MSVC_DLL"
46445  new_path=`$CYGPATH -u "$path"`
46446
46447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46450  # "foo.exe" is OK but "foo" is an error.
46451  #
46452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46453  # It is also a way to make sure we got the proper file name for the real test later on.
46454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46455  if test "x$test_shortpath" = x; then
46456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46457$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46458    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46459  fi
46460
46461  # Call helper function which possibly converts this using DOS-style short mode.
46462  # If so, the updated path is stored in $new_path.
46463
46464  input_path="$new_path"
46465  # Check if we need to convert this using DOS-style short mode. If the path
46466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46467  # take no chances and rewrite it.
46468  # Note: m4 eats our [], so we need to use [ and ] instead.
46469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46470  if test "x$has_forbidden_chars" != x; then
46471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46475      # Going to short mode and back again did indeed matter. Since short mode is
46476      # case insensitive, let's make it lowercase to improve readability.
46477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46478      # Now convert it back to Unix-style (cygpath)
46479      input_path=`$CYGPATH -u "$shortmode_path"`
46480      new_path="$input_path"
46481    fi
46482  fi
46483
46484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46485  if test "x$test_cygdrive_prefix" = x; then
46486    # As a simple fix, exclude /usr/bin since it's not a real path.
46487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46489      # a path prefixed by /cygdrive for fixpath to work.
46490      new_path="$CYGWIN_ROOT_PATH$input_path"
46491    fi
46492  fi
46493
46494
46495  if test "x$path" != "x$new_path"; then
46496    MSVC_DLL="$new_path"
46497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46498$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46499  fi
46500
46501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46502
46503  path="$MSVC_DLL"
46504  has_colon=`$ECHO $path | $GREP ^.:`
46505  new_path="$path"
46506  if test "x$has_colon" = x; then
46507    # Not in mixed or Windows style, start by that.
46508    new_path=`cmd //c echo $path`
46509  fi
46510
46511
46512  input_path="$new_path"
46513  # Check if we need to convert this using DOS-style short mode. If the path
46514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46515  # take no chances and rewrite it.
46516  # Note: m4 eats our [], so we need to use [ and ] instead.
46517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46518  if test "x$has_forbidden_chars" != x; then
46519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46521  fi
46522
46523
46524  windows_path="$new_path"
46525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46526    unix_path=`$CYGPATH -u "$windows_path"`
46527    new_path="$unix_path"
46528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46530    new_path="$unix_path"
46531  fi
46532
46533  if test "x$path" != "x$new_path"; then
46534    MSVC_DLL="$new_path"
46535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46536$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46537  fi
46538
46539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46541
46542    else
46543      # We're on a unix platform. Hooray! :)
46544      path="$MSVC_DLL"
46545      has_space=`$ECHO "$path" | $GREP " "`
46546      if test "x$has_space" != x; then
46547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46548$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46550      fi
46551
46552      # Use eval to expand a potential ~
46553      eval path="$path"
46554      if test ! -f "$path" && test ! -d "$path"; then
46555        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46556      fi
46557
46558      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46559    fi
46560  fi
46561
46562      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46563$as_echo_n "checking for $DLL_NAME... " >&6; }
46564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46565$as_echo "$MSVC_DLL" >&6; }
46566    else
46567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46568$as_echo "incorrect, ignoring" >&6; }
46569      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46570$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46571    fi
46572  fi
46573
46574    fi
46575  fi
46576
46577  if test "x$MSVC_DLL" = x; then
46578    # Probe: Check in the Boot JDK directory.
46579    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46580
46581  DLL_NAME="$DLL_NAME"
46582  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46583  METHOD="well-known location in Boot JDK"
46584  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46585    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46586$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46587
46588    # Need to check if the found msvcr is correct architecture
46589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46590$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46591    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46593      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46594      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46595      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46596        CORRECT_MSVCR_ARCH="PE32 executable"
46597      else
46598        CORRECT_MSVCR_ARCH="PE32+ executable"
46599      fi
46600    else
46601      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46602        CORRECT_MSVCR_ARCH=386
46603      else
46604        CORRECT_MSVCR_ARCH=x86-64
46605      fi
46606    fi
46607    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46609$as_echo "ok" >&6; }
46610      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46611
46612  # Only process if variable expands to non-empty
46613
46614  if test "x$MSVC_DLL" != x; then
46615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46616
46617  # Input might be given as Windows format, start by converting to
46618  # unix format.
46619  path="$MSVC_DLL"
46620  new_path=`$CYGPATH -u "$path"`
46621
46622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46625  # "foo.exe" is OK but "foo" is an error.
46626  #
46627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46628  # It is also a way to make sure we got the proper file name for the real test later on.
46629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46630  if test "x$test_shortpath" = x; then
46631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46632$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46633    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46634  fi
46635
46636  # Call helper function which possibly converts this using DOS-style short mode.
46637  # If so, the updated path is stored in $new_path.
46638
46639  input_path="$new_path"
46640  # Check if we need to convert this using DOS-style short mode. If the path
46641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46642  # take no chances and rewrite it.
46643  # Note: m4 eats our [], so we need to use [ and ] instead.
46644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46645  if test "x$has_forbidden_chars" != x; then
46646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46650      # Going to short mode and back again did indeed matter. Since short mode is
46651      # case insensitive, let's make it lowercase to improve readability.
46652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46653      # Now convert it back to Unix-style (cygpath)
46654      input_path=`$CYGPATH -u "$shortmode_path"`
46655      new_path="$input_path"
46656    fi
46657  fi
46658
46659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46660  if test "x$test_cygdrive_prefix" = x; then
46661    # As a simple fix, exclude /usr/bin since it's not a real path.
46662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46664      # a path prefixed by /cygdrive for fixpath to work.
46665      new_path="$CYGWIN_ROOT_PATH$input_path"
46666    fi
46667  fi
46668
46669
46670  if test "x$path" != "x$new_path"; then
46671    MSVC_DLL="$new_path"
46672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46673$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46674  fi
46675
46676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46677
46678  path="$MSVC_DLL"
46679  has_colon=`$ECHO $path | $GREP ^.:`
46680  new_path="$path"
46681  if test "x$has_colon" = x; then
46682    # Not in mixed or Windows style, start by that.
46683    new_path=`cmd //c echo $path`
46684  fi
46685
46686
46687  input_path="$new_path"
46688  # Check if we need to convert this using DOS-style short mode. If the path
46689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46690  # take no chances and rewrite it.
46691  # Note: m4 eats our [], so we need to use [ and ] instead.
46692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46693  if test "x$has_forbidden_chars" != x; then
46694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46696  fi
46697
46698
46699  windows_path="$new_path"
46700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46701    unix_path=`$CYGPATH -u "$windows_path"`
46702    new_path="$unix_path"
46703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46705    new_path="$unix_path"
46706  fi
46707
46708  if test "x$path" != "x$new_path"; then
46709    MSVC_DLL="$new_path"
46710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46711$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46712  fi
46713
46714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46716
46717    else
46718      # We're on a unix platform. Hooray! :)
46719      path="$MSVC_DLL"
46720      has_space=`$ECHO "$path" | $GREP " "`
46721      if test "x$has_space" != x; then
46722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46723$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46725      fi
46726
46727      # Use eval to expand a potential ~
46728      eval path="$path"
46729      if test ! -f "$path" && test ! -d "$path"; then
46730        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46731      fi
46732
46733      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46734    fi
46735  fi
46736
46737      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46738$as_echo_n "checking for $DLL_NAME... " >&6; }
46739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46740$as_echo "$MSVC_DLL" >&6; }
46741    else
46742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46743$as_echo "incorrect, ignoring" >&6; }
46744      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46745$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46746    fi
46747  fi
46748
46749  fi
46750
46751  if test "x$MSVC_DLL" = x; then
46752    # Probe: Look in the Windows system32 directory
46753    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46754
46755  windows_path="$CYGWIN_SYSTEMROOT"
46756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46757    unix_path=`$CYGPATH -u "$windows_path"`
46758    CYGWIN_SYSTEMROOT="$unix_path"
46759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46761    CYGWIN_SYSTEMROOT="$unix_path"
46762  fi
46763
46764    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46765
46766  DLL_NAME="$DLL_NAME"
46767  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46768  METHOD="well-known location in SYSTEMROOT"
46769  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46770    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46771$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46772
46773    # Need to check if the found msvcr is correct architecture
46774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46775$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46776    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46778      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46779      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46780      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46781        CORRECT_MSVCR_ARCH="PE32 executable"
46782      else
46783        CORRECT_MSVCR_ARCH="PE32+ executable"
46784      fi
46785    else
46786      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46787        CORRECT_MSVCR_ARCH=386
46788      else
46789        CORRECT_MSVCR_ARCH=x86-64
46790      fi
46791    fi
46792    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46794$as_echo "ok" >&6; }
46795      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46796
46797  # Only process if variable expands to non-empty
46798
46799  if test "x$MSVC_DLL" != x; then
46800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46801
46802  # Input might be given as Windows format, start by converting to
46803  # unix format.
46804  path="$MSVC_DLL"
46805  new_path=`$CYGPATH -u "$path"`
46806
46807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46810  # "foo.exe" is OK but "foo" is an error.
46811  #
46812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46813  # It is also a way to make sure we got the proper file name for the real test later on.
46814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46815  if test "x$test_shortpath" = x; then
46816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46817$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46818    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46819  fi
46820
46821  # Call helper function which possibly converts this using DOS-style short mode.
46822  # If so, the updated path is stored in $new_path.
46823
46824  input_path="$new_path"
46825  # Check if we need to convert this using DOS-style short mode. If the path
46826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46827  # take no chances and rewrite it.
46828  # Note: m4 eats our [], so we need to use [ and ] instead.
46829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46830  if test "x$has_forbidden_chars" != x; then
46831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46835      # Going to short mode and back again did indeed matter. Since short mode is
46836      # case insensitive, let's make it lowercase to improve readability.
46837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46838      # Now convert it back to Unix-style (cygpath)
46839      input_path=`$CYGPATH -u "$shortmode_path"`
46840      new_path="$input_path"
46841    fi
46842  fi
46843
46844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46845  if test "x$test_cygdrive_prefix" = x; then
46846    # As a simple fix, exclude /usr/bin since it's not a real path.
46847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46849      # a path prefixed by /cygdrive for fixpath to work.
46850      new_path="$CYGWIN_ROOT_PATH$input_path"
46851    fi
46852  fi
46853
46854
46855  if test "x$path" != "x$new_path"; then
46856    MSVC_DLL="$new_path"
46857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46858$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46859  fi
46860
46861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46862
46863  path="$MSVC_DLL"
46864  has_colon=`$ECHO $path | $GREP ^.:`
46865  new_path="$path"
46866  if test "x$has_colon" = x; then
46867    # Not in mixed or Windows style, start by that.
46868    new_path=`cmd //c echo $path`
46869  fi
46870
46871
46872  input_path="$new_path"
46873  # Check if we need to convert this using DOS-style short mode. If the path
46874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46875  # take no chances and rewrite it.
46876  # Note: m4 eats our [], so we need to use [ and ] instead.
46877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46878  if test "x$has_forbidden_chars" != x; then
46879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46881  fi
46882
46883
46884  windows_path="$new_path"
46885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46886    unix_path=`$CYGPATH -u "$windows_path"`
46887    new_path="$unix_path"
46888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46890    new_path="$unix_path"
46891  fi
46892
46893  if test "x$path" != "x$new_path"; then
46894    MSVC_DLL="$new_path"
46895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46896$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46897  fi
46898
46899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46901
46902    else
46903      # We're on a unix platform. Hooray! :)
46904      path="$MSVC_DLL"
46905      has_space=`$ECHO "$path" | $GREP " "`
46906      if test "x$has_space" != x; then
46907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46908$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46910      fi
46911
46912      # Use eval to expand a potential ~
46913      eval path="$path"
46914      if test ! -f "$path" && test ! -d "$path"; then
46915        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46916      fi
46917
46918      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46919    fi
46920  fi
46921
46922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46923$as_echo_n "checking for $DLL_NAME... " >&6; }
46924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46925$as_echo "$MSVC_DLL" >&6; }
46926    else
46927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46928$as_echo "incorrect, ignoring" >&6; }
46929      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46930$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46931    fi
46932  fi
46933
46934  fi
46935
46936  if test "x$MSVC_DLL" = x; then
46937    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46938    if test "x$VS100COMNTOOLS" != x; then
46939      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46940
46941  windows_path="$CYGWIN_VS_TOOLS_DIR"
46942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46943    unix_path=`$CYGPATH -u "$windows_path"`
46944    CYGWIN_VS_TOOLS_DIR="$unix_path"
46945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46947    CYGWIN_VS_TOOLS_DIR="$unix_path"
46948  fi
46949
46950      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46951        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46952	    | $GREP -i /x64/ | $HEAD --lines 1`
46953      else
46954        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46955	    | $GREP -i /x86/ | $HEAD --lines 1`
46956      fi
46957
46958  DLL_NAME="$DLL_NAME"
46959  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46960  METHOD="search of VS100COMNTOOLS"
46961  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46963$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46964
46965    # Need to check if the found msvcr is correct architecture
46966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46967$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46968    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46970      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46971      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46972      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46973        CORRECT_MSVCR_ARCH="PE32 executable"
46974      else
46975        CORRECT_MSVCR_ARCH="PE32+ executable"
46976      fi
46977    else
46978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46979        CORRECT_MSVCR_ARCH=386
46980      else
46981        CORRECT_MSVCR_ARCH=x86-64
46982      fi
46983    fi
46984    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46986$as_echo "ok" >&6; }
46987      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46988
46989  # Only process if variable expands to non-empty
46990
46991  if test "x$MSVC_DLL" != x; then
46992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46993
46994  # Input might be given as Windows format, start by converting to
46995  # unix format.
46996  path="$MSVC_DLL"
46997  new_path=`$CYGPATH -u "$path"`
46998
46999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47002  # "foo.exe" is OK but "foo" is an error.
47003  #
47004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47005  # It is also a way to make sure we got the proper file name for the real test later on.
47006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47007  if test "x$test_shortpath" = x; then
47008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47009$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47010    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47011  fi
47012
47013  # Call helper function which possibly converts this using DOS-style short mode.
47014  # If so, the updated path is stored in $new_path.
47015
47016  input_path="$new_path"
47017  # Check if we need to convert this using DOS-style short mode. If the path
47018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47019  # take no chances and rewrite it.
47020  # Note: m4 eats our [], so we need to use [ and ] instead.
47021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47022  if test "x$has_forbidden_chars" != x; then
47023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47027      # Going to short mode and back again did indeed matter. Since short mode is
47028      # case insensitive, let's make it lowercase to improve readability.
47029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47030      # Now convert it back to Unix-style (cygpath)
47031      input_path=`$CYGPATH -u "$shortmode_path"`
47032      new_path="$input_path"
47033    fi
47034  fi
47035
47036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47037  if test "x$test_cygdrive_prefix" = x; then
47038    # As a simple fix, exclude /usr/bin since it's not a real path.
47039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47041      # a path prefixed by /cygdrive for fixpath to work.
47042      new_path="$CYGWIN_ROOT_PATH$input_path"
47043    fi
47044  fi
47045
47046
47047  if test "x$path" != "x$new_path"; then
47048    MSVC_DLL="$new_path"
47049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47050$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47051  fi
47052
47053    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47054
47055  path="$MSVC_DLL"
47056  has_colon=`$ECHO $path | $GREP ^.:`
47057  new_path="$path"
47058  if test "x$has_colon" = x; then
47059    # Not in mixed or Windows style, start by that.
47060    new_path=`cmd //c echo $path`
47061  fi
47062
47063
47064  input_path="$new_path"
47065  # Check if we need to convert this using DOS-style short mode. If the path
47066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47067  # take no chances and rewrite it.
47068  # Note: m4 eats our [], so we need to use [ and ] instead.
47069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47070  if test "x$has_forbidden_chars" != x; then
47071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47073  fi
47074
47075
47076  windows_path="$new_path"
47077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47078    unix_path=`$CYGPATH -u "$windows_path"`
47079    new_path="$unix_path"
47080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47082    new_path="$unix_path"
47083  fi
47084
47085  if test "x$path" != "x$new_path"; then
47086    MSVC_DLL="$new_path"
47087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47088$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47089  fi
47090
47091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47093
47094    else
47095      # We're on a unix platform. Hooray! :)
47096      path="$MSVC_DLL"
47097      has_space=`$ECHO "$path" | $GREP " "`
47098      if test "x$has_space" != x; then
47099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47100$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47101        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47102      fi
47103
47104      # Use eval to expand a potential ~
47105      eval path="$path"
47106      if test ! -f "$path" && test ! -d "$path"; then
47107        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47108      fi
47109
47110      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47111    fi
47112  fi
47113
47114      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47115$as_echo_n "checking for $DLL_NAME... " >&6; }
47116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47117$as_echo "$MSVC_DLL" >&6; }
47118    else
47119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47120$as_echo "incorrect, ignoring" >&6; }
47121      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47122$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47123    fi
47124  fi
47125
47126    fi
47127  fi
47128
47129  if test "x$MSVC_DLL" = x; then
47130    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47131    # (This was the original behaviour; kept since it might turn something up)
47132    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47133      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47134        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47135	    | $GREP x64 | $HEAD --lines 1`
47136      else
47137        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47138	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47139        if test "x$POSSIBLE_MSVC_DLL" = x; then
47140          # We're grasping at straws now...
47141          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47142	      | $HEAD --lines 1`
47143        fi
47144      fi
47145
47146
47147  DLL_NAME="$DLL_NAME"
47148  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47149  METHOD="search of VCINSTALLDIR"
47150  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47151    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47152$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47153
47154    # Need to check if the found msvcr is correct architecture
47155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47156$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47157    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47159      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47160      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47161      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47162        CORRECT_MSVCR_ARCH="PE32 executable"
47163      else
47164        CORRECT_MSVCR_ARCH="PE32+ executable"
47165      fi
47166    else
47167      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47168        CORRECT_MSVCR_ARCH=386
47169      else
47170        CORRECT_MSVCR_ARCH=x86-64
47171      fi
47172    fi
47173    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47175$as_echo "ok" >&6; }
47176      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47177
47178  # Only process if variable expands to non-empty
47179
47180  if test "x$MSVC_DLL" != x; then
47181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47182
47183  # Input might be given as Windows format, start by converting to
47184  # unix format.
47185  path="$MSVC_DLL"
47186  new_path=`$CYGPATH -u "$path"`
47187
47188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47191  # "foo.exe" is OK but "foo" is an error.
47192  #
47193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47194  # It is also a way to make sure we got the proper file name for the real test later on.
47195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47196  if test "x$test_shortpath" = x; then
47197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47198$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47199    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47200  fi
47201
47202  # Call helper function which possibly converts this using DOS-style short mode.
47203  # If so, the updated path is stored in $new_path.
47204
47205  input_path="$new_path"
47206  # Check if we need to convert this using DOS-style short mode. If the path
47207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47208  # take no chances and rewrite it.
47209  # Note: m4 eats our [], so we need to use [ and ] instead.
47210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47211  if test "x$has_forbidden_chars" != x; then
47212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47216      # Going to short mode and back again did indeed matter. Since short mode is
47217      # case insensitive, let's make it lowercase to improve readability.
47218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47219      # Now convert it back to Unix-style (cygpath)
47220      input_path=`$CYGPATH -u "$shortmode_path"`
47221      new_path="$input_path"
47222    fi
47223  fi
47224
47225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47226  if test "x$test_cygdrive_prefix" = x; then
47227    # As a simple fix, exclude /usr/bin since it's not a real path.
47228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47230      # a path prefixed by /cygdrive for fixpath to work.
47231      new_path="$CYGWIN_ROOT_PATH$input_path"
47232    fi
47233  fi
47234
47235
47236  if test "x$path" != "x$new_path"; then
47237    MSVC_DLL="$new_path"
47238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47239$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47240  fi
47241
47242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47243
47244  path="$MSVC_DLL"
47245  has_colon=`$ECHO $path | $GREP ^.:`
47246  new_path="$path"
47247  if test "x$has_colon" = x; then
47248    # Not in mixed or Windows style, start by that.
47249    new_path=`cmd //c echo $path`
47250  fi
47251
47252
47253  input_path="$new_path"
47254  # Check if we need to convert this using DOS-style short mode. If the path
47255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47256  # take no chances and rewrite it.
47257  # Note: m4 eats our [], so we need to use [ and ] instead.
47258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47259  if test "x$has_forbidden_chars" != x; then
47260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47262  fi
47263
47264
47265  windows_path="$new_path"
47266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47267    unix_path=`$CYGPATH -u "$windows_path"`
47268    new_path="$unix_path"
47269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47271    new_path="$unix_path"
47272  fi
47273
47274  if test "x$path" != "x$new_path"; then
47275    MSVC_DLL="$new_path"
47276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47277$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47278  fi
47279
47280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47282
47283    else
47284      # We're on a unix platform. Hooray! :)
47285      path="$MSVC_DLL"
47286      has_space=`$ECHO "$path" | $GREP " "`
47287      if test "x$has_space" != x; then
47288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47289$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47291      fi
47292
47293      # Use eval to expand a potential ~
47294      eval path="$path"
47295      if test ! -f "$path" && test ! -d "$path"; then
47296        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47297      fi
47298
47299      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47300    fi
47301  fi
47302
47303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47304$as_echo_n "checking for $DLL_NAME... " >&6; }
47305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47306$as_echo "$MSVC_DLL" >&6; }
47307    else
47308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47309$as_echo "incorrect, ignoring" >&6; }
47310      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47311$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47312    fi
47313  fi
47314
47315    fi
47316  fi
47317
47318  if test "x$MSVC_DLL" = x; then
47319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47320$as_echo_n "checking for $DLL_NAME... " >&6; }
47321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47322$as_echo "no" >&6; }
47323    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
47324  fi
47325
47326    MSVCR_DLL="$MSVC_DLL"
47327  fi
47328
47329
47330
47331# Check whether --with-msvcp-dll was given.
47332if test "${with_msvcp_dll+set}" = set; then :
47333  withval=$with_msvcp_dll;
47334fi
47335
47336
47337  if test "x$MSVCP_NAME" != "x"; then
47338    if test "x$with_msvcp_dll" != x; then
47339      # If given explicitely by user, do not probe. If not present, fail directly.
47340
47341  DLL_NAME="$MSVCP_NAME"
47342  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47343  METHOD="--with-msvcp-dll"
47344  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47346$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47347
47348    # Need to check if the found msvcr is correct architecture
47349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47350$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47351    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47353      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47354      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47356        CORRECT_MSVCR_ARCH="PE32 executable"
47357      else
47358        CORRECT_MSVCR_ARCH="PE32+ executable"
47359      fi
47360    else
47361      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47362        CORRECT_MSVCR_ARCH=386
47363      else
47364        CORRECT_MSVCR_ARCH=x86-64
47365      fi
47366    fi
47367    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47369$as_echo "ok" >&6; }
47370      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47371
47372  # Only process if variable expands to non-empty
47373
47374  if test "x$MSVC_DLL" != x; then
47375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47376
47377  # Input might be given as Windows format, start by converting to
47378  # unix format.
47379  path="$MSVC_DLL"
47380  new_path=`$CYGPATH -u "$path"`
47381
47382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47385  # "foo.exe" is OK but "foo" is an error.
47386  #
47387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47388  # It is also a way to make sure we got the proper file name for the real test later on.
47389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47390  if test "x$test_shortpath" = x; then
47391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47392$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47393    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47394  fi
47395
47396  # Call helper function which possibly converts this using DOS-style short mode.
47397  # If so, the updated path is stored in $new_path.
47398
47399  input_path="$new_path"
47400  # Check if we need to convert this using DOS-style short mode. If the path
47401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47402  # take no chances and rewrite it.
47403  # Note: m4 eats our [], so we need to use [ and ] instead.
47404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47405  if test "x$has_forbidden_chars" != x; then
47406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47410      # Going to short mode and back again did indeed matter. Since short mode is
47411      # case insensitive, let's make it lowercase to improve readability.
47412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47413      # Now convert it back to Unix-style (cygpath)
47414      input_path=`$CYGPATH -u "$shortmode_path"`
47415      new_path="$input_path"
47416    fi
47417  fi
47418
47419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47420  if test "x$test_cygdrive_prefix" = x; then
47421    # As a simple fix, exclude /usr/bin since it's not a real path.
47422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47424      # a path prefixed by /cygdrive for fixpath to work.
47425      new_path="$CYGWIN_ROOT_PATH$input_path"
47426    fi
47427  fi
47428
47429
47430  if test "x$path" != "x$new_path"; then
47431    MSVC_DLL="$new_path"
47432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47433$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47434  fi
47435
47436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47437
47438  path="$MSVC_DLL"
47439  has_colon=`$ECHO $path | $GREP ^.:`
47440  new_path="$path"
47441  if test "x$has_colon" = x; then
47442    # Not in mixed or Windows style, start by that.
47443    new_path=`cmd //c echo $path`
47444  fi
47445
47446
47447  input_path="$new_path"
47448  # Check if we need to convert this using DOS-style short mode. If the path
47449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47450  # take no chances and rewrite it.
47451  # Note: m4 eats our [], so we need to use [ and ] instead.
47452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47453  if test "x$has_forbidden_chars" != x; then
47454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47456  fi
47457
47458
47459  windows_path="$new_path"
47460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47461    unix_path=`$CYGPATH -u "$windows_path"`
47462    new_path="$unix_path"
47463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47465    new_path="$unix_path"
47466  fi
47467
47468  if test "x$path" != "x$new_path"; then
47469    MSVC_DLL="$new_path"
47470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47471$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47472  fi
47473
47474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47476
47477    else
47478      # We're on a unix platform. Hooray! :)
47479      path="$MSVC_DLL"
47480      has_space=`$ECHO "$path" | $GREP " "`
47481      if test "x$has_space" != x; then
47482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47485      fi
47486
47487      # Use eval to expand a potential ~
47488      eval path="$path"
47489      if test ! -f "$path" && test ! -d "$path"; then
47490        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47491      fi
47492
47493      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47494    fi
47495  fi
47496
47497      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47498$as_echo_n "checking for $DLL_NAME... " >&6; }
47499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47500$as_echo "$MSVC_DLL" >&6; }
47501    else
47502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47503$as_echo "incorrect, ignoring" >&6; }
47504      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47505$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47506    fi
47507  fi
47508
47509      if test "x$MSVC_DLL" = x; then
47510        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47511      fi
47512      MSVCP_DLL="$MSVC_DLL"
47513    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47514
47515  DLL_NAME="$MSVCP_NAME"
47516  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47517  METHOD="devkit"
47518  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47520$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47521
47522    # Need to check if the found msvcr is correct architecture
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47524$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47525    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47527      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47528      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47530        CORRECT_MSVCR_ARCH="PE32 executable"
47531      else
47532        CORRECT_MSVCR_ARCH="PE32+ executable"
47533      fi
47534    else
47535      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47536        CORRECT_MSVCR_ARCH=386
47537      else
47538        CORRECT_MSVCR_ARCH=x86-64
47539      fi
47540    fi
47541    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47543$as_echo "ok" >&6; }
47544      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47545
47546  # Only process if variable expands to non-empty
47547
47548  if test "x$MSVC_DLL" != x; then
47549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47550
47551  # Input might be given as Windows format, start by converting to
47552  # unix format.
47553  path="$MSVC_DLL"
47554  new_path=`$CYGPATH -u "$path"`
47555
47556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47559  # "foo.exe" is OK but "foo" is an error.
47560  #
47561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47562  # It is also a way to make sure we got the proper file name for the real test later on.
47563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47564  if test "x$test_shortpath" = x; then
47565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47566$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47567    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47568  fi
47569
47570  # Call helper function which possibly converts this using DOS-style short mode.
47571  # If so, the updated path is stored in $new_path.
47572
47573  input_path="$new_path"
47574  # Check if we need to convert this using DOS-style short mode. If the path
47575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47576  # take no chances and rewrite it.
47577  # Note: m4 eats our [], so we need to use [ and ] instead.
47578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47579  if test "x$has_forbidden_chars" != x; then
47580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47584      # Going to short mode and back again did indeed matter. Since short mode is
47585      # case insensitive, let's make it lowercase to improve readability.
47586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47587      # Now convert it back to Unix-style (cygpath)
47588      input_path=`$CYGPATH -u "$shortmode_path"`
47589      new_path="$input_path"
47590    fi
47591  fi
47592
47593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47594  if test "x$test_cygdrive_prefix" = x; then
47595    # As a simple fix, exclude /usr/bin since it's not a real path.
47596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47598      # a path prefixed by /cygdrive for fixpath to work.
47599      new_path="$CYGWIN_ROOT_PATH$input_path"
47600    fi
47601  fi
47602
47603
47604  if test "x$path" != "x$new_path"; then
47605    MSVC_DLL="$new_path"
47606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47607$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47608  fi
47609
47610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47611
47612  path="$MSVC_DLL"
47613  has_colon=`$ECHO $path | $GREP ^.:`
47614  new_path="$path"
47615  if test "x$has_colon" = x; then
47616    # Not in mixed or Windows style, start by that.
47617    new_path=`cmd //c echo $path`
47618  fi
47619
47620
47621  input_path="$new_path"
47622  # Check if we need to convert this using DOS-style short mode. If the path
47623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47624  # take no chances and rewrite it.
47625  # Note: m4 eats our [], so we need to use [ and ] instead.
47626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47627  if test "x$has_forbidden_chars" != x; then
47628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47630  fi
47631
47632
47633  windows_path="$new_path"
47634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47635    unix_path=`$CYGPATH -u "$windows_path"`
47636    new_path="$unix_path"
47637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47639    new_path="$unix_path"
47640  fi
47641
47642  if test "x$path" != "x$new_path"; then
47643    MSVC_DLL="$new_path"
47644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47645$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47646  fi
47647
47648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47650
47651    else
47652      # We're on a unix platform. Hooray! :)
47653      path="$MSVC_DLL"
47654      has_space=`$ECHO "$path" | $GREP " "`
47655      if test "x$has_space" != x; then
47656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47657$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47659      fi
47660
47661      # Use eval to expand a potential ~
47662      eval path="$path"
47663      if test ! -f "$path" && test ! -d "$path"; then
47664        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47665      fi
47666
47667      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47668    fi
47669  fi
47670
47671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47672$as_echo_n "checking for $DLL_NAME... " >&6; }
47673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47674$as_echo "$MSVC_DLL" >&6; }
47675    else
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47677$as_echo "incorrect, ignoring" >&6; }
47678      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47679$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47680    fi
47681  fi
47682
47683      if test "x$MSVC_DLL" = x; then
47684        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47685      fi
47686      MSVCP_DLL="$MSVC_DLL"
47687    else
47688
47689  DLL_NAME="${MSVCP_NAME}"
47690  MSVC_DLL=
47691
47692  if test "x$MSVC_DLL" = x; then
47693    # Probe: Using well-known location from Visual Studio 10.0
47694    if test "x$VCINSTALLDIR" != x; then
47695      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47696
47697  windows_path="$CYGWIN_VC_INSTALL_DIR"
47698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47699    unix_path=`$CYGPATH -u "$windows_path"`
47700    CYGWIN_VC_INSTALL_DIR="$unix_path"
47701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47703    CYGWIN_VC_INSTALL_DIR="$unix_path"
47704  fi
47705
47706      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47707        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47708      else
47709        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47710      fi
47711      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47712
47713  DLL_NAME="$DLL_NAME"
47714  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47715  METHOD="well-known location in VCINSTALLDIR"
47716  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47718$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47719
47720    # Need to check if the found msvcr is correct architecture
47721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47722$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47723    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47725      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47726      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47727      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47728        CORRECT_MSVCR_ARCH="PE32 executable"
47729      else
47730        CORRECT_MSVCR_ARCH="PE32+ executable"
47731      fi
47732    else
47733      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47734        CORRECT_MSVCR_ARCH=386
47735      else
47736        CORRECT_MSVCR_ARCH=x86-64
47737      fi
47738    fi
47739    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47741$as_echo "ok" >&6; }
47742      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47743
47744  # Only process if variable expands to non-empty
47745
47746  if test "x$MSVC_DLL" != x; then
47747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47748
47749  # Input might be given as Windows format, start by converting to
47750  # unix format.
47751  path="$MSVC_DLL"
47752  new_path=`$CYGPATH -u "$path"`
47753
47754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47757  # "foo.exe" is OK but "foo" is an error.
47758  #
47759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47760  # It is also a way to make sure we got the proper file name for the real test later on.
47761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47762  if test "x$test_shortpath" = x; then
47763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47765    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47766  fi
47767
47768  # Call helper function which possibly converts this using DOS-style short mode.
47769  # If so, the updated path is stored in $new_path.
47770
47771  input_path="$new_path"
47772  # Check if we need to convert this using DOS-style short mode. If the path
47773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47774  # take no chances and rewrite it.
47775  # Note: m4 eats our [], so we need to use [ and ] instead.
47776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47777  if test "x$has_forbidden_chars" != x; then
47778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47782      # Going to short mode and back again did indeed matter. Since short mode is
47783      # case insensitive, let's make it lowercase to improve readability.
47784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47785      # Now convert it back to Unix-style (cygpath)
47786      input_path=`$CYGPATH -u "$shortmode_path"`
47787      new_path="$input_path"
47788    fi
47789  fi
47790
47791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47792  if test "x$test_cygdrive_prefix" = x; then
47793    # As a simple fix, exclude /usr/bin since it's not a real path.
47794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47796      # a path prefixed by /cygdrive for fixpath to work.
47797      new_path="$CYGWIN_ROOT_PATH$input_path"
47798    fi
47799  fi
47800
47801
47802  if test "x$path" != "x$new_path"; then
47803    MSVC_DLL="$new_path"
47804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47805$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47806  fi
47807
47808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47809
47810  path="$MSVC_DLL"
47811  has_colon=`$ECHO $path | $GREP ^.:`
47812  new_path="$path"
47813  if test "x$has_colon" = x; then
47814    # Not in mixed or Windows style, start by that.
47815    new_path=`cmd //c echo $path`
47816  fi
47817
47818
47819  input_path="$new_path"
47820  # Check if we need to convert this using DOS-style short mode. If the path
47821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47822  # take no chances and rewrite it.
47823  # Note: m4 eats our [], so we need to use [ and ] instead.
47824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47825  if test "x$has_forbidden_chars" != x; then
47826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47828  fi
47829
47830
47831  windows_path="$new_path"
47832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47833    unix_path=`$CYGPATH -u "$windows_path"`
47834    new_path="$unix_path"
47835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47837    new_path="$unix_path"
47838  fi
47839
47840  if test "x$path" != "x$new_path"; then
47841    MSVC_DLL="$new_path"
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47843$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47844  fi
47845
47846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47848
47849    else
47850      # We're on a unix platform. Hooray! :)
47851      path="$MSVC_DLL"
47852      has_space=`$ECHO "$path" | $GREP " "`
47853      if test "x$has_space" != x; then
47854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47855$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47857      fi
47858
47859      # Use eval to expand a potential ~
47860      eval path="$path"
47861      if test ! -f "$path" && test ! -d "$path"; then
47862        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47863      fi
47864
47865      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47866    fi
47867  fi
47868
47869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47870$as_echo_n "checking for $DLL_NAME... " >&6; }
47871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47872$as_echo "$MSVC_DLL" >&6; }
47873    else
47874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47875$as_echo "incorrect, ignoring" >&6; }
47876      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47877$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47878    fi
47879  fi
47880
47881    fi
47882  fi
47883
47884  if test "x$MSVC_DLL" = x; then
47885    # Probe: Check in the Boot JDK directory.
47886    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47887
47888  DLL_NAME="$DLL_NAME"
47889  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47890  METHOD="well-known location in Boot JDK"
47891  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47893$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47894
47895    # Need to check if the found msvcr is correct architecture
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47897$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47898    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47900      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47901      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47902      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47903        CORRECT_MSVCR_ARCH="PE32 executable"
47904      else
47905        CORRECT_MSVCR_ARCH="PE32+ executable"
47906      fi
47907    else
47908      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47909        CORRECT_MSVCR_ARCH=386
47910      else
47911        CORRECT_MSVCR_ARCH=x86-64
47912      fi
47913    fi
47914    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47916$as_echo "ok" >&6; }
47917      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47918
47919  # Only process if variable expands to non-empty
47920
47921  if test "x$MSVC_DLL" != x; then
47922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47923
47924  # Input might be given as Windows format, start by converting to
47925  # unix format.
47926  path="$MSVC_DLL"
47927  new_path=`$CYGPATH -u "$path"`
47928
47929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47932  # "foo.exe" is OK but "foo" is an error.
47933  #
47934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47935  # It is also a way to make sure we got the proper file name for the real test later on.
47936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47937  if test "x$test_shortpath" = x; then
47938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47939$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47940    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47941  fi
47942
47943  # Call helper function which possibly converts this using DOS-style short mode.
47944  # If so, the updated path is stored in $new_path.
47945
47946  input_path="$new_path"
47947  # Check if we need to convert this using DOS-style short mode. If the path
47948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47949  # take no chances and rewrite it.
47950  # Note: m4 eats our [], so we need to use [ and ] instead.
47951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47952  if test "x$has_forbidden_chars" != x; then
47953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47957      # Going to short mode and back again did indeed matter. Since short mode is
47958      # case insensitive, let's make it lowercase to improve readability.
47959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47960      # Now convert it back to Unix-style (cygpath)
47961      input_path=`$CYGPATH -u "$shortmode_path"`
47962      new_path="$input_path"
47963    fi
47964  fi
47965
47966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47967  if test "x$test_cygdrive_prefix" = x; then
47968    # As a simple fix, exclude /usr/bin since it's not a real path.
47969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47971      # a path prefixed by /cygdrive for fixpath to work.
47972      new_path="$CYGWIN_ROOT_PATH$input_path"
47973    fi
47974  fi
47975
47976
47977  if test "x$path" != "x$new_path"; then
47978    MSVC_DLL="$new_path"
47979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47980$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47981  fi
47982
47983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47984
47985  path="$MSVC_DLL"
47986  has_colon=`$ECHO $path | $GREP ^.:`
47987  new_path="$path"
47988  if test "x$has_colon" = x; then
47989    # Not in mixed or Windows style, start by that.
47990    new_path=`cmd //c echo $path`
47991  fi
47992
47993
47994  input_path="$new_path"
47995  # Check if we need to convert this using DOS-style short mode. If the path
47996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47997  # take no chances and rewrite it.
47998  # Note: m4 eats our [], so we need to use [ and ] instead.
47999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48000  if test "x$has_forbidden_chars" != x; then
48001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48003  fi
48004
48005
48006  windows_path="$new_path"
48007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48008    unix_path=`$CYGPATH -u "$windows_path"`
48009    new_path="$unix_path"
48010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48012    new_path="$unix_path"
48013  fi
48014
48015  if test "x$path" != "x$new_path"; then
48016    MSVC_DLL="$new_path"
48017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48018$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48019  fi
48020
48021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48023
48024    else
48025      # We're on a unix platform. Hooray! :)
48026      path="$MSVC_DLL"
48027      has_space=`$ECHO "$path" | $GREP " "`
48028      if test "x$has_space" != x; then
48029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48030$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48032      fi
48033
48034      # Use eval to expand a potential ~
48035      eval path="$path"
48036      if test ! -f "$path" && test ! -d "$path"; then
48037        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48038      fi
48039
48040      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48041    fi
48042  fi
48043
48044      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48045$as_echo_n "checking for $DLL_NAME... " >&6; }
48046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48047$as_echo "$MSVC_DLL" >&6; }
48048    else
48049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48050$as_echo "incorrect, ignoring" >&6; }
48051      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48052$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48053    fi
48054  fi
48055
48056  fi
48057
48058  if test "x$MSVC_DLL" = x; then
48059    # Probe: Look in the Windows system32 directory
48060    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48061
48062  windows_path="$CYGWIN_SYSTEMROOT"
48063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48064    unix_path=`$CYGPATH -u "$windows_path"`
48065    CYGWIN_SYSTEMROOT="$unix_path"
48066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48068    CYGWIN_SYSTEMROOT="$unix_path"
48069  fi
48070
48071    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48072
48073  DLL_NAME="$DLL_NAME"
48074  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48075  METHOD="well-known location in SYSTEMROOT"
48076  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48078$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48079
48080    # Need to check if the found msvcr is correct architecture
48081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48082$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48083    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48085      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48086      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48087      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48088        CORRECT_MSVCR_ARCH="PE32 executable"
48089      else
48090        CORRECT_MSVCR_ARCH="PE32+ executable"
48091      fi
48092    else
48093      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48094        CORRECT_MSVCR_ARCH=386
48095      else
48096        CORRECT_MSVCR_ARCH=x86-64
48097      fi
48098    fi
48099    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48101$as_echo "ok" >&6; }
48102      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48103
48104  # Only process if variable expands to non-empty
48105
48106  if test "x$MSVC_DLL" != x; then
48107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48108
48109  # Input might be given as Windows format, start by converting to
48110  # unix format.
48111  path="$MSVC_DLL"
48112  new_path=`$CYGPATH -u "$path"`
48113
48114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48117  # "foo.exe" is OK but "foo" is an error.
48118  #
48119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48120  # It is also a way to make sure we got the proper file name for the real test later on.
48121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48122  if test "x$test_shortpath" = x; then
48123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48124$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48125    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48126  fi
48127
48128  # Call helper function which possibly converts this using DOS-style short mode.
48129  # If so, the updated path is stored in $new_path.
48130
48131  input_path="$new_path"
48132  # Check if we need to convert this using DOS-style short mode. If the path
48133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48134  # take no chances and rewrite it.
48135  # Note: m4 eats our [], so we need to use [ and ] instead.
48136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48137  if test "x$has_forbidden_chars" != x; then
48138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48142      # Going to short mode and back again did indeed matter. Since short mode is
48143      # case insensitive, let's make it lowercase to improve readability.
48144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48145      # Now convert it back to Unix-style (cygpath)
48146      input_path=`$CYGPATH -u "$shortmode_path"`
48147      new_path="$input_path"
48148    fi
48149  fi
48150
48151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48152  if test "x$test_cygdrive_prefix" = x; then
48153    # As a simple fix, exclude /usr/bin since it's not a real path.
48154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48156      # a path prefixed by /cygdrive for fixpath to work.
48157      new_path="$CYGWIN_ROOT_PATH$input_path"
48158    fi
48159  fi
48160
48161
48162  if test "x$path" != "x$new_path"; then
48163    MSVC_DLL="$new_path"
48164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48165$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48166  fi
48167
48168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48169
48170  path="$MSVC_DLL"
48171  has_colon=`$ECHO $path | $GREP ^.:`
48172  new_path="$path"
48173  if test "x$has_colon" = x; then
48174    # Not in mixed or Windows style, start by that.
48175    new_path=`cmd //c echo $path`
48176  fi
48177
48178
48179  input_path="$new_path"
48180  # Check if we need to convert this using DOS-style short mode. If the path
48181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48182  # take no chances and rewrite it.
48183  # Note: m4 eats our [], so we need to use [ and ] instead.
48184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48185  if test "x$has_forbidden_chars" != x; then
48186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48188  fi
48189
48190
48191  windows_path="$new_path"
48192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48193    unix_path=`$CYGPATH -u "$windows_path"`
48194    new_path="$unix_path"
48195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48197    new_path="$unix_path"
48198  fi
48199
48200  if test "x$path" != "x$new_path"; then
48201    MSVC_DLL="$new_path"
48202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48203$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48204  fi
48205
48206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48208
48209    else
48210      # We're on a unix platform. Hooray! :)
48211      path="$MSVC_DLL"
48212      has_space=`$ECHO "$path" | $GREP " "`
48213      if test "x$has_space" != x; then
48214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48215$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48217      fi
48218
48219      # Use eval to expand a potential ~
48220      eval path="$path"
48221      if test ! -f "$path" && test ! -d "$path"; then
48222        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48223      fi
48224
48225      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48226    fi
48227  fi
48228
48229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48230$as_echo_n "checking for $DLL_NAME... " >&6; }
48231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48232$as_echo "$MSVC_DLL" >&6; }
48233    else
48234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48235$as_echo "incorrect, ignoring" >&6; }
48236      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48237$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48238    fi
48239  fi
48240
48241  fi
48242
48243  if test "x$MSVC_DLL" = x; then
48244    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48245    if test "x$VS100COMNTOOLS" != x; then
48246      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48247
48248  windows_path="$CYGWIN_VS_TOOLS_DIR"
48249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48250    unix_path=`$CYGPATH -u "$windows_path"`
48251    CYGWIN_VS_TOOLS_DIR="$unix_path"
48252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48254    CYGWIN_VS_TOOLS_DIR="$unix_path"
48255  fi
48256
48257      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48258        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48259	    | $GREP -i /x64/ | $HEAD --lines 1`
48260      else
48261        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48262	    | $GREP -i /x86/ | $HEAD --lines 1`
48263      fi
48264
48265  DLL_NAME="$DLL_NAME"
48266  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48267  METHOD="search of VS100COMNTOOLS"
48268  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48270$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48271
48272    # Need to check if the found msvcr is correct architecture
48273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48274$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48275    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48277      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48278      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48279      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48280        CORRECT_MSVCR_ARCH="PE32 executable"
48281      else
48282        CORRECT_MSVCR_ARCH="PE32+ executable"
48283      fi
48284    else
48285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48286        CORRECT_MSVCR_ARCH=386
48287      else
48288        CORRECT_MSVCR_ARCH=x86-64
48289      fi
48290    fi
48291    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48293$as_echo "ok" >&6; }
48294      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48295
48296  # Only process if variable expands to non-empty
48297
48298  if test "x$MSVC_DLL" != x; then
48299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48300
48301  # Input might be given as Windows format, start by converting to
48302  # unix format.
48303  path="$MSVC_DLL"
48304  new_path=`$CYGPATH -u "$path"`
48305
48306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48309  # "foo.exe" is OK but "foo" is an error.
48310  #
48311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48312  # It is also a way to make sure we got the proper file name for the real test later on.
48313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48314  if test "x$test_shortpath" = x; then
48315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48316$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48317    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48318  fi
48319
48320  # Call helper function which possibly converts this using DOS-style short mode.
48321  # If so, the updated path is stored in $new_path.
48322
48323  input_path="$new_path"
48324  # Check if we need to convert this using DOS-style short mode. If the path
48325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48326  # take no chances and rewrite it.
48327  # Note: m4 eats our [], so we need to use [ and ] instead.
48328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48329  if test "x$has_forbidden_chars" != x; then
48330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48334      # Going to short mode and back again did indeed matter. Since short mode is
48335      # case insensitive, let's make it lowercase to improve readability.
48336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48337      # Now convert it back to Unix-style (cygpath)
48338      input_path=`$CYGPATH -u "$shortmode_path"`
48339      new_path="$input_path"
48340    fi
48341  fi
48342
48343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48344  if test "x$test_cygdrive_prefix" = x; then
48345    # As a simple fix, exclude /usr/bin since it's not a real path.
48346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48348      # a path prefixed by /cygdrive for fixpath to work.
48349      new_path="$CYGWIN_ROOT_PATH$input_path"
48350    fi
48351  fi
48352
48353
48354  if test "x$path" != "x$new_path"; then
48355    MSVC_DLL="$new_path"
48356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48357$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48358  fi
48359
48360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48361
48362  path="$MSVC_DLL"
48363  has_colon=`$ECHO $path | $GREP ^.:`
48364  new_path="$path"
48365  if test "x$has_colon" = x; then
48366    # Not in mixed or Windows style, start by that.
48367    new_path=`cmd //c echo $path`
48368  fi
48369
48370
48371  input_path="$new_path"
48372  # Check if we need to convert this using DOS-style short mode. If the path
48373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48374  # take no chances and rewrite it.
48375  # Note: m4 eats our [], so we need to use [ and ] instead.
48376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48377  if test "x$has_forbidden_chars" != x; then
48378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48380  fi
48381
48382
48383  windows_path="$new_path"
48384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48385    unix_path=`$CYGPATH -u "$windows_path"`
48386    new_path="$unix_path"
48387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48389    new_path="$unix_path"
48390  fi
48391
48392  if test "x$path" != "x$new_path"; then
48393    MSVC_DLL="$new_path"
48394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48395$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48396  fi
48397
48398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48400
48401    else
48402      # We're on a unix platform. Hooray! :)
48403      path="$MSVC_DLL"
48404      has_space=`$ECHO "$path" | $GREP " "`
48405      if test "x$has_space" != x; then
48406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48407$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48409      fi
48410
48411      # Use eval to expand a potential ~
48412      eval path="$path"
48413      if test ! -f "$path" && test ! -d "$path"; then
48414        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48415      fi
48416
48417      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48418    fi
48419  fi
48420
48421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48422$as_echo_n "checking for $DLL_NAME... " >&6; }
48423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48424$as_echo "$MSVC_DLL" >&6; }
48425    else
48426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48427$as_echo "incorrect, ignoring" >&6; }
48428      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48429$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48430    fi
48431  fi
48432
48433    fi
48434  fi
48435
48436  if test "x$MSVC_DLL" = x; then
48437    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48438    # (This was the original behaviour; kept since it might turn something up)
48439    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48440      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48441        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48442	    | $GREP x64 | $HEAD --lines 1`
48443      else
48444        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48445	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48446        if test "x$POSSIBLE_MSVC_DLL" = x; then
48447          # We're grasping at straws now...
48448          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48449	      | $HEAD --lines 1`
48450        fi
48451      fi
48452
48453
48454  DLL_NAME="$DLL_NAME"
48455  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48456  METHOD="search of VCINSTALLDIR"
48457  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48458    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48459$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48460
48461    # Need to check if the found msvcr is correct architecture
48462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48463$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48464    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48466      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48467      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48468      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48469        CORRECT_MSVCR_ARCH="PE32 executable"
48470      else
48471        CORRECT_MSVCR_ARCH="PE32+ executable"
48472      fi
48473    else
48474      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48475        CORRECT_MSVCR_ARCH=386
48476      else
48477        CORRECT_MSVCR_ARCH=x86-64
48478      fi
48479    fi
48480    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48482$as_echo "ok" >&6; }
48483      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48484
48485  # Only process if variable expands to non-empty
48486
48487  if test "x$MSVC_DLL" != x; then
48488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48489
48490  # Input might be given as Windows format, start by converting to
48491  # unix format.
48492  path="$MSVC_DLL"
48493  new_path=`$CYGPATH -u "$path"`
48494
48495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48498  # "foo.exe" is OK but "foo" is an error.
48499  #
48500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48501  # It is also a way to make sure we got the proper file name for the real test later on.
48502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48503  if test "x$test_shortpath" = x; then
48504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48505$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48506    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48507  fi
48508
48509  # Call helper function which possibly converts this using DOS-style short mode.
48510  # If so, the updated path is stored in $new_path.
48511
48512  input_path="$new_path"
48513  # Check if we need to convert this using DOS-style short mode. If the path
48514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48515  # take no chances and rewrite it.
48516  # Note: m4 eats our [], so we need to use [ and ] instead.
48517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48518  if test "x$has_forbidden_chars" != x; then
48519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48523      # Going to short mode and back again did indeed matter. Since short mode is
48524      # case insensitive, let's make it lowercase to improve readability.
48525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48526      # Now convert it back to Unix-style (cygpath)
48527      input_path=`$CYGPATH -u "$shortmode_path"`
48528      new_path="$input_path"
48529    fi
48530  fi
48531
48532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48533  if test "x$test_cygdrive_prefix" = x; then
48534    # As a simple fix, exclude /usr/bin since it's not a real path.
48535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48537      # a path prefixed by /cygdrive for fixpath to work.
48538      new_path="$CYGWIN_ROOT_PATH$input_path"
48539    fi
48540  fi
48541
48542
48543  if test "x$path" != "x$new_path"; then
48544    MSVC_DLL="$new_path"
48545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48546$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48547  fi
48548
48549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48550
48551  path="$MSVC_DLL"
48552  has_colon=`$ECHO $path | $GREP ^.:`
48553  new_path="$path"
48554  if test "x$has_colon" = x; then
48555    # Not in mixed or Windows style, start by that.
48556    new_path=`cmd //c echo $path`
48557  fi
48558
48559
48560  input_path="$new_path"
48561  # Check if we need to convert this using DOS-style short mode. If the path
48562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48563  # take no chances and rewrite it.
48564  # Note: m4 eats our [], so we need to use [ and ] instead.
48565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48566  if test "x$has_forbidden_chars" != x; then
48567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48569  fi
48570
48571
48572  windows_path="$new_path"
48573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48574    unix_path=`$CYGPATH -u "$windows_path"`
48575    new_path="$unix_path"
48576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48578    new_path="$unix_path"
48579  fi
48580
48581  if test "x$path" != "x$new_path"; then
48582    MSVC_DLL="$new_path"
48583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48584$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48585  fi
48586
48587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48589
48590    else
48591      # We're on a unix platform. Hooray! :)
48592      path="$MSVC_DLL"
48593      has_space=`$ECHO "$path" | $GREP " "`
48594      if test "x$has_space" != x; then
48595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48596$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48597        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48598      fi
48599
48600      # Use eval to expand a potential ~
48601      eval path="$path"
48602      if test ! -f "$path" && test ! -d "$path"; then
48603        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48604      fi
48605
48606      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48607    fi
48608  fi
48609
48610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48611$as_echo_n "checking for $DLL_NAME... " >&6; }
48612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48613$as_echo "$MSVC_DLL" >&6; }
48614    else
48615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48616$as_echo "incorrect, ignoring" >&6; }
48617      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48618$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48619    fi
48620  fi
48621
48622    fi
48623  fi
48624
48625  if test "x$MSVC_DLL" = x; then
48626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48627$as_echo_n "checking for $DLL_NAME... " >&6; }
48628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48629$as_echo "no" >&6; }
48630    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48631  fi
48632
48633      MSVCP_DLL="$MSVC_DLL"
48634    fi
48635
48636  fi
48637
48638  fi
48639
48640
48641  if test "x$NEEDS_LIB_X11" = xfalse; then
48642    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48643      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48644$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48645    fi
48646    X_CFLAGS=
48647    X_LIBS=
48648  else
48649
48650    if test "x${with_x}" = xno; then
48651      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48652    fi
48653
48654    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48655      # The user has specified a X11 base directory. Use it for includes and
48656      # libraries, unless explicitely overridden.
48657      if test "x$x_includes" = xNONE; then
48658        x_includes="${with_x}/include"
48659      fi
48660      if test "x$x_libraries" = xNONE; then
48661        x_libraries="${with_x}/lib"
48662      fi
48663    else
48664      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48665      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48666      # --x-libraries for the sysroot, if that seems to be correct.
48667      if test "x$SYSROOT" != "x"; then
48668        if test "x$x_includes" = xNONE; then
48669          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48670            x_includes="$SYSROOT/usr/X11R6/include"
48671          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48672            x_includes="$SYSROOT/usr/include"
48673          fi
48674        fi
48675        if test "x$x_libraries" = xNONE; then
48676          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48677            x_libraries="$SYSROOT/usr/X11R6/lib"
48678          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48679            x_libraries="$SYSROOT/usr/lib64"
48680          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48681            x_libraries="$SYSROOT/usr/lib"
48682          fi
48683        fi
48684      fi
48685    fi
48686
48687    # Now let autoconf do it's magic
48688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48689$as_echo_n "checking for X... " >&6; }
48690
48691
48692# Check whether --with-x was given.
48693if test "${with_x+set}" = set; then :
48694  withval=$with_x;
48695fi
48696
48697# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48698if test "x$with_x" = xno; then
48699  # The user explicitly disabled X.
48700  have_x=disabled
48701else
48702  case $x_includes,$x_libraries in #(
48703    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48704    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48705  $as_echo_n "(cached) " >&6
48706else
48707  # One or both of the vars are not set, and there is no cached value.
48708ac_x_includes=no ac_x_libraries=no
48709rm -f -r conftest.dir
48710if mkdir conftest.dir; then
48711  cd conftest.dir
48712  cat >Imakefile <<'_ACEOF'
48713incroot:
48714	@echo incroot='${INCROOT}'
48715usrlibdir:
48716	@echo usrlibdir='${USRLIBDIR}'
48717libdir:
48718	@echo libdir='${LIBDIR}'
48719_ACEOF
48720  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48721    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48722    for ac_var in incroot usrlibdir libdir; do
48723      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48724    done
48725    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48726    for ac_extension in a so sl dylib la dll; do
48727      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48728	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48729	ac_im_usrlibdir=$ac_im_libdir; break
48730      fi
48731    done
48732    # Screen out bogus values from the imake configuration.  They are
48733    # bogus both because they are the default anyway, and because
48734    # using them would break gcc on systems where it needs fixed includes.
48735    case $ac_im_incroot in
48736	/usr/include) ac_x_includes= ;;
48737	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48738    esac
48739    case $ac_im_usrlibdir in
48740	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48741	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48742    esac
48743  fi
48744  cd ..
48745  rm -f -r conftest.dir
48746fi
48747
48748# Standard set of common directories for X headers.
48749# Check X11 before X11Rn because it is often a symlink to the current release.
48750ac_x_header_dirs='
48751/usr/X11/include
48752/usr/X11R7/include
48753/usr/X11R6/include
48754/usr/X11R5/include
48755/usr/X11R4/include
48756
48757/usr/include/X11
48758/usr/include/X11R7
48759/usr/include/X11R6
48760/usr/include/X11R5
48761/usr/include/X11R4
48762
48763/usr/local/X11/include
48764/usr/local/X11R7/include
48765/usr/local/X11R6/include
48766/usr/local/X11R5/include
48767/usr/local/X11R4/include
48768
48769/usr/local/include/X11
48770/usr/local/include/X11R7
48771/usr/local/include/X11R6
48772/usr/local/include/X11R5
48773/usr/local/include/X11R4
48774
48775/usr/X386/include
48776/usr/x386/include
48777/usr/XFree86/include/X11
48778
48779/usr/include
48780/usr/local/include
48781/usr/unsupported/include
48782/usr/athena/include
48783/usr/local/x11r5/include
48784/usr/lpp/Xamples/include
48785
48786/usr/openwin/include
48787/usr/openwin/share/include'
48788
48789if test "$ac_x_includes" = no; then
48790  # Guess where to find include files, by looking for Xlib.h.
48791  # First, try using that file with no special directory specified.
48792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48793/* end confdefs.h.  */
48794#include <X11/Xlib.h>
48795_ACEOF
48796if ac_fn_cxx_try_cpp "$LINENO"; then :
48797  # We can compile using X headers with no special include directory.
48798ac_x_includes=
48799else
48800  for ac_dir in $ac_x_header_dirs; do
48801  if test -r "$ac_dir/X11/Xlib.h"; then
48802    ac_x_includes=$ac_dir
48803    break
48804  fi
48805done
48806fi
48807rm -f conftest.err conftest.i conftest.$ac_ext
48808fi # $ac_x_includes = no
48809
48810if test "$ac_x_libraries" = no; then
48811  # Check for the libraries.
48812  # See if we find them without any special options.
48813  # Don't add to $LIBS permanently.
48814  ac_save_LIBS=$LIBS
48815  LIBS="-lX11 $LIBS"
48816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48817/* end confdefs.h.  */
48818#include <X11/Xlib.h>
48819int
48820main ()
48821{
48822XrmInitialize ()
48823  ;
48824  return 0;
48825}
48826_ACEOF
48827if ac_fn_cxx_try_link "$LINENO"; then :
48828  LIBS=$ac_save_LIBS
48829# We can link X programs with no special library path.
48830ac_x_libraries=
48831else
48832  LIBS=$ac_save_LIBS
48833for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48834do
48835  # Don't even attempt the hair of trying to link an X program!
48836  for ac_extension in a so sl dylib la dll; do
48837    if test -r "$ac_dir/libX11.$ac_extension"; then
48838      ac_x_libraries=$ac_dir
48839      break 2
48840    fi
48841  done
48842done
48843fi
48844rm -f core conftest.err conftest.$ac_objext \
48845    conftest$ac_exeext conftest.$ac_ext
48846fi # $ac_x_libraries = no
48847
48848case $ac_x_includes,$ac_x_libraries in #(
48849  no,* | *,no | *\'*)
48850    # Didn't find X, or a directory has "'" in its name.
48851    ac_cv_have_x="have_x=no";; #(
48852  *)
48853    # Record where we found X for the cache.
48854    ac_cv_have_x="have_x=yes\
48855	ac_x_includes='$ac_x_includes'\
48856	ac_x_libraries='$ac_x_libraries'"
48857esac
48858fi
48859;; #(
48860    *) have_x=yes;;
48861  esac
48862  eval "$ac_cv_have_x"
48863fi # $with_x != no
48864
48865if test "$have_x" != yes; then
48866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48867$as_echo "$have_x" >&6; }
48868  no_x=yes
48869else
48870  # If each of the values was on the command line, it overrides each guess.
48871  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48872  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48873  # Update the cache value to reflect the command line values.
48874  ac_cv_have_x="have_x=yes\
48875	ac_x_includes='$x_includes'\
48876	ac_x_libraries='$x_libraries'"
48877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48878$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48879fi
48880
48881    if test "$no_x" = yes; then
48882  # Not all programs may use this symbol, but it does not hurt to define it.
48883
48884$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48885
48886  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48887else
48888  if test -n "$x_includes"; then
48889    X_CFLAGS="$X_CFLAGS -I$x_includes"
48890  fi
48891
48892  # It would also be nice to do this for all -L options, not just this one.
48893  if test -n "$x_libraries"; then
48894    X_LIBS="$X_LIBS -L$x_libraries"
48895    # For Solaris; some versions of Sun CC require a space after -R and
48896    # others require no space.  Words are not sufficient . . . .
48897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48898$as_echo_n "checking whether -R must be followed by a space... " >&6; }
48899    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48900    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48901    ac_cxx_werror_flag=yes
48902    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48903/* end confdefs.h.  */
48904
48905int
48906main ()
48907{
48908
48909  ;
48910  return 0;
48911}
48912_ACEOF
48913if ac_fn_cxx_try_link "$LINENO"; then :
48914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48915$as_echo "no" >&6; }
48916       X_LIBS="$X_LIBS -R$x_libraries"
48917else
48918  LIBS="$ac_xsave_LIBS -R $x_libraries"
48919       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48920/* end confdefs.h.  */
48921
48922int
48923main ()
48924{
48925
48926  ;
48927  return 0;
48928}
48929_ACEOF
48930if ac_fn_cxx_try_link "$LINENO"; then :
48931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48932$as_echo "yes" >&6; }
48933	  X_LIBS="$X_LIBS -R $x_libraries"
48934else
48935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48936$as_echo "neither works" >&6; }
48937fi
48938rm -f core conftest.err conftest.$ac_objext \
48939    conftest$ac_exeext conftest.$ac_ext
48940fi
48941rm -f core conftest.err conftest.$ac_objext \
48942    conftest$ac_exeext conftest.$ac_ext
48943    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48944    LIBS=$ac_xsave_LIBS
48945  fi
48946
48947  # Check for system-dependent libraries X programs must link with.
48948  # Do this before checking for the system-independent R6 libraries
48949  # (-lICE), since we may need -lsocket or whatever for X linking.
48950
48951  if test "$ISC" = yes; then
48952    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48953  else
48954    # Martyn Johnson says this is needed for Ultrix, if the X
48955    # libraries were built with DECnet support.  And Karl Berry says
48956    # the Alpha needs dnet_stub (dnet does not exist).
48957    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48958    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48959/* end confdefs.h.  */
48960
48961/* Override any GCC internal prototype to avoid an error.
48962   Use char because int might match the return type of a GCC
48963   builtin and then its argument prototype would still apply.  */
48964#ifdef __cplusplus
48965extern "C"
48966#endif
48967char XOpenDisplay ();
48968int
48969main ()
48970{
48971return XOpenDisplay ();
48972  ;
48973  return 0;
48974}
48975_ACEOF
48976if ac_fn_cxx_try_link "$LINENO"; then :
48977
48978else
48979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48980$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48981if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48982  $as_echo_n "(cached) " >&6
48983else
48984  ac_check_lib_save_LIBS=$LIBS
48985LIBS="-ldnet  $LIBS"
48986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48987/* end confdefs.h.  */
48988
48989/* Override any GCC internal prototype to avoid an error.
48990   Use char because int might match the return type of a GCC
48991   builtin and then its argument prototype would still apply.  */
48992#ifdef __cplusplus
48993extern "C"
48994#endif
48995char dnet_ntoa ();
48996int
48997main ()
48998{
48999return dnet_ntoa ();
49000  ;
49001  return 0;
49002}
49003_ACEOF
49004if ac_fn_cxx_try_link "$LINENO"; then :
49005  ac_cv_lib_dnet_dnet_ntoa=yes
49006else
49007  ac_cv_lib_dnet_dnet_ntoa=no
49008fi
49009rm -f core conftest.err conftest.$ac_objext \
49010    conftest$ac_exeext conftest.$ac_ext
49011LIBS=$ac_check_lib_save_LIBS
49012fi
49013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
49014$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
49015if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
49016  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
49017fi
49018
49019    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
49020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
49021$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
49022if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
49023  $as_echo_n "(cached) " >&6
49024else
49025  ac_check_lib_save_LIBS=$LIBS
49026LIBS="-ldnet_stub  $LIBS"
49027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49028/* end confdefs.h.  */
49029
49030/* Override any GCC internal prototype to avoid an error.
49031   Use char because int might match the return type of a GCC
49032   builtin and then its argument prototype would still apply.  */
49033#ifdef __cplusplus
49034extern "C"
49035#endif
49036char dnet_ntoa ();
49037int
49038main ()
49039{
49040return dnet_ntoa ();
49041  ;
49042  return 0;
49043}
49044_ACEOF
49045if ac_fn_cxx_try_link "$LINENO"; then :
49046  ac_cv_lib_dnet_stub_dnet_ntoa=yes
49047else
49048  ac_cv_lib_dnet_stub_dnet_ntoa=no
49049fi
49050rm -f core conftest.err conftest.$ac_objext \
49051    conftest$ac_exeext conftest.$ac_ext
49052LIBS=$ac_check_lib_save_LIBS
49053fi
49054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
49055$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
49056if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
49057  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
49058fi
49059
49060    fi
49061fi
49062rm -f core conftest.err conftest.$ac_objext \
49063    conftest$ac_exeext conftest.$ac_ext
49064    LIBS="$ac_xsave_LIBS"
49065
49066    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
49067    # to get the SysV transport functions.
49068    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
49069    # needs -lnsl.
49070    # The nsl library prevents programs from opening the X display
49071    # on Irix 5.2, according to T.E. Dickey.
49072    # The functions gethostbyname, getservbyname, and inet_addr are
49073    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
49074    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
49075if test "x$ac_cv_func_gethostbyname" = xyes; then :
49076
49077fi
49078
49079    if test $ac_cv_func_gethostbyname = no; then
49080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
49081$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
49082if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
49083  $as_echo_n "(cached) " >&6
49084else
49085  ac_check_lib_save_LIBS=$LIBS
49086LIBS="-lnsl  $LIBS"
49087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49088/* end confdefs.h.  */
49089
49090/* Override any GCC internal prototype to avoid an error.
49091   Use char because int might match the return type of a GCC
49092   builtin and then its argument prototype would still apply.  */
49093#ifdef __cplusplus
49094extern "C"
49095#endif
49096char gethostbyname ();
49097int
49098main ()
49099{
49100return gethostbyname ();
49101  ;
49102  return 0;
49103}
49104_ACEOF
49105if ac_fn_cxx_try_link "$LINENO"; then :
49106  ac_cv_lib_nsl_gethostbyname=yes
49107else
49108  ac_cv_lib_nsl_gethostbyname=no
49109fi
49110rm -f core conftest.err conftest.$ac_objext \
49111    conftest$ac_exeext conftest.$ac_ext
49112LIBS=$ac_check_lib_save_LIBS
49113fi
49114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
49115$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
49116if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
49117  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
49118fi
49119
49120      if test $ac_cv_lib_nsl_gethostbyname = no; then
49121	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
49122$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
49123if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
49124  $as_echo_n "(cached) " >&6
49125else
49126  ac_check_lib_save_LIBS=$LIBS
49127LIBS="-lbsd  $LIBS"
49128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49129/* end confdefs.h.  */
49130
49131/* Override any GCC internal prototype to avoid an error.
49132   Use char because int might match the return type of a GCC
49133   builtin and then its argument prototype would still apply.  */
49134#ifdef __cplusplus
49135extern "C"
49136#endif
49137char gethostbyname ();
49138int
49139main ()
49140{
49141return gethostbyname ();
49142  ;
49143  return 0;
49144}
49145_ACEOF
49146if ac_fn_cxx_try_link "$LINENO"; then :
49147  ac_cv_lib_bsd_gethostbyname=yes
49148else
49149  ac_cv_lib_bsd_gethostbyname=no
49150fi
49151rm -f core conftest.err conftest.$ac_objext \
49152    conftest$ac_exeext conftest.$ac_ext
49153LIBS=$ac_check_lib_save_LIBS
49154fi
49155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
49156$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
49157if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
49158  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
49159fi
49160
49161      fi
49162    fi
49163
49164    # lieder@skyler.mavd.honeywell.com says without -lsocket,
49165    # socket/setsockopt and other routines are undefined under SCO ODT
49166    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
49167    # on later versions), says Simon Leinen: it contains gethostby*
49168    # variants that don't use the name server (or something).  -lsocket
49169    # must be given before -lnsl if both are needed.  We assume that
49170    # if connect needs -lnsl, so does gethostbyname.
49171    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
49172if test "x$ac_cv_func_connect" = xyes; then :
49173
49174fi
49175
49176    if test $ac_cv_func_connect = no; then
49177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
49178$as_echo_n "checking for connect in -lsocket... " >&6; }
49179if ${ac_cv_lib_socket_connect+:} false; then :
49180  $as_echo_n "(cached) " >&6
49181else
49182  ac_check_lib_save_LIBS=$LIBS
49183LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
49184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49185/* end confdefs.h.  */
49186
49187/* Override any GCC internal prototype to avoid an error.
49188   Use char because int might match the return type of a GCC
49189   builtin and then its argument prototype would still apply.  */
49190#ifdef __cplusplus
49191extern "C"
49192#endif
49193char connect ();
49194int
49195main ()
49196{
49197return connect ();
49198  ;
49199  return 0;
49200}
49201_ACEOF
49202if ac_fn_cxx_try_link "$LINENO"; then :
49203  ac_cv_lib_socket_connect=yes
49204else
49205  ac_cv_lib_socket_connect=no
49206fi
49207rm -f core conftest.err conftest.$ac_objext \
49208    conftest$ac_exeext conftest.$ac_ext
49209LIBS=$ac_check_lib_save_LIBS
49210fi
49211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
49212$as_echo "$ac_cv_lib_socket_connect" >&6; }
49213if test "x$ac_cv_lib_socket_connect" = xyes; then :
49214  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
49215fi
49216
49217    fi
49218
49219    # Guillermo Gomez says -lposix is necessary on A/UX.
49220    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
49221if test "x$ac_cv_func_remove" = xyes; then :
49222
49223fi
49224
49225    if test $ac_cv_func_remove = no; then
49226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
49227$as_echo_n "checking for remove in -lposix... " >&6; }
49228if ${ac_cv_lib_posix_remove+:} false; then :
49229  $as_echo_n "(cached) " >&6
49230else
49231  ac_check_lib_save_LIBS=$LIBS
49232LIBS="-lposix  $LIBS"
49233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49234/* end confdefs.h.  */
49235
49236/* Override any GCC internal prototype to avoid an error.
49237   Use char because int might match the return type of a GCC
49238   builtin and then its argument prototype would still apply.  */
49239#ifdef __cplusplus
49240extern "C"
49241#endif
49242char remove ();
49243int
49244main ()
49245{
49246return remove ();
49247  ;
49248  return 0;
49249}
49250_ACEOF
49251if ac_fn_cxx_try_link "$LINENO"; then :
49252  ac_cv_lib_posix_remove=yes
49253else
49254  ac_cv_lib_posix_remove=no
49255fi
49256rm -f core conftest.err conftest.$ac_objext \
49257    conftest$ac_exeext conftest.$ac_ext
49258LIBS=$ac_check_lib_save_LIBS
49259fi
49260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
49261$as_echo "$ac_cv_lib_posix_remove" >&6; }
49262if test "x$ac_cv_lib_posix_remove" = xyes; then :
49263  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
49264fi
49265
49266    fi
49267
49268    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
49269    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
49270if test "x$ac_cv_func_shmat" = xyes; then :
49271
49272fi
49273
49274    if test $ac_cv_func_shmat = no; then
49275      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
49276$as_echo_n "checking for shmat in -lipc... " >&6; }
49277if ${ac_cv_lib_ipc_shmat+:} false; then :
49278  $as_echo_n "(cached) " >&6
49279else
49280  ac_check_lib_save_LIBS=$LIBS
49281LIBS="-lipc  $LIBS"
49282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49283/* end confdefs.h.  */
49284
49285/* Override any GCC internal prototype to avoid an error.
49286   Use char because int might match the return type of a GCC
49287   builtin and then its argument prototype would still apply.  */
49288#ifdef __cplusplus
49289extern "C"
49290#endif
49291char shmat ();
49292int
49293main ()
49294{
49295return shmat ();
49296  ;
49297  return 0;
49298}
49299_ACEOF
49300if ac_fn_cxx_try_link "$LINENO"; then :
49301  ac_cv_lib_ipc_shmat=yes
49302else
49303  ac_cv_lib_ipc_shmat=no
49304fi
49305rm -f core conftest.err conftest.$ac_objext \
49306    conftest$ac_exeext conftest.$ac_ext
49307LIBS=$ac_check_lib_save_LIBS
49308fi
49309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
49310$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
49311if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
49312  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
49313fi
49314
49315    fi
49316  fi
49317
49318  # Check for libraries that X11R6 Xt/Xaw programs need.
49319  ac_save_LDFLAGS=$LDFLAGS
49320  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
49321  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
49322  # check for ICE first), but we must link in the order -lSM -lICE or
49323  # we get undefined symbols.  So assume we have SM if we have ICE.
49324  # These have to be linked with before -lX11, unlike the other
49325  # libraries we check for below, so use a different variable.
49326  # John Interrante, Karl Berry
49327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
49328$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
49329if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
49330  $as_echo_n "(cached) " >&6
49331else
49332  ac_check_lib_save_LIBS=$LIBS
49333LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49335/* end confdefs.h.  */
49336
49337/* Override any GCC internal prototype to avoid an error.
49338   Use char because int might match the return type of a GCC
49339   builtin and then its argument prototype would still apply.  */
49340#ifdef __cplusplus
49341extern "C"
49342#endif
49343char IceConnectionNumber ();
49344int
49345main ()
49346{
49347return IceConnectionNumber ();
49348  ;
49349  return 0;
49350}
49351_ACEOF
49352if ac_fn_cxx_try_link "$LINENO"; then :
49353  ac_cv_lib_ICE_IceConnectionNumber=yes
49354else
49355  ac_cv_lib_ICE_IceConnectionNumber=no
49356fi
49357rm -f core conftest.err conftest.$ac_objext \
49358    conftest$ac_exeext conftest.$ac_ext
49359LIBS=$ac_check_lib_save_LIBS
49360fi
49361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49362$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49363if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49364  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49365fi
49366
49367  LDFLAGS=$ac_save_LDFLAGS
49368
49369fi
49370
49371
49372    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49373    # this doesn't make sense so we remove it.
49374    if test "x$COMPILE_TYPE" = xcross; then
49375      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49376    fi
49377
49378    if test "x$no_x" = xyes; then
49379
49380  # Print a helpful message on how to acquire the necessary build dependency.
49381  # x11 is the help tag: freetype, cups, alsa etc
49382  MISSING_DEPENDENCY=x11
49383
49384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49385    cygwin_help $MISSING_DEPENDENCY
49386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49387    msys_help $MISSING_DEPENDENCY
49388  else
49389    PKGHANDLER_COMMAND=
49390
49391    case $PKGHANDLER in
49392      apt-get)
49393        apt_help     $MISSING_DEPENDENCY ;;
49394      yum)
49395        yum_help     $MISSING_DEPENDENCY ;;
49396      port)
49397        port_help    $MISSING_DEPENDENCY ;;
49398      pkgutil)
49399        pkgutil_help $MISSING_DEPENDENCY ;;
49400      pkgadd)
49401        pkgadd_help  $MISSING_DEPENDENCY ;;
49402    esac
49403
49404    if test "x$PKGHANDLER_COMMAND" != x; then
49405      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49406    fi
49407  fi
49408
49409      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49410    fi
49411
49412    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49413      OPENWIN_HOME="/usr/openwin"
49414      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49415      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49416          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49417          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49418          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49419    fi
49420
49421    ac_ext=c
49422ac_cpp='$CPP $CPPFLAGS'
49423ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49424ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49425ac_compiler_gnu=$ac_cv_c_compiler_gnu
49426
49427    OLD_CFLAGS="$CFLAGS"
49428    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49429
49430    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49431    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49432do :
49433  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49434ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49435          # include <X11/Xlib.h>
49436          # include <X11/Xutil.h>
49437
49438
49439"
49440if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49441  cat >>confdefs.h <<_ACEOF
49442#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49443_ACEOF
49444 X11_HEADERS_OK=yes
49445else
49446  X11_HEADERS_OK=no; break
49447fi
49448
49449done
49450
49451
49452    if test "x$X11_HEADERS_OK" = xno; then
49453
49454  # Print a helpful message on how to acquire the necessary build dependency.
49455  # x11 is the help tag: freetype, cups, alsa etc
49456  MISSING_DEPENDENCY=x11
49457
49458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49459    cygwin_help $MISSING_DEPENDENCY
49460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49461    msys_help $MISSING_DEPENDENCY
49462  else
49463    PKGHANDLER_COMMAND=
49464
49465    case $PKGHANDLER in
49466      apt-get)
49467        apt_help     $MISSING_DEPENDENCY ;;
49468      yum)
49469        yum_help     $MISSING_DEPENDENCY ;;
49470      port)
49471        port_help    $MISSING_DEPENDENCY ;;
49472      pkgutil)
49473        pkgutil_help $MISSING_DEPENDENCY ;;
49474      pkgadd)
49475        pkgadd_help  $MISSING_DEPENDENCY ;;
49476    esac
49477
49478    if test "x$PKGHANDLER_COMMAND" != x; then
49479      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49480    fi
49481  fi
49482
49483      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49484    fi
49485
49486    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49487    # defined in libawt_xawt.
49488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49489$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49490    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49491/* end confdefs.h.  */
49492#include <X11/extensions/Xrender.h>
49493int
49494main ()
49495{
49496XLinearGradient x;
49497  ;
49498  return 0;
49499}
49500_ACEOF
49501if ac_fn_c_try_compile "$LINENO"; then :
49502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49503$as_echo "yes" >&6; }
49504else
49505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49506$as_echo "no" >&6; }
49507         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49508fi
49509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49510
49511    CFLAGS="$OLD_CFLAGS"
49512    ac_ext=cpp
49513ac_cpp='$CXXCPP $CPPFLAGS'
49514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49517
49518  fi # NEEDS_LIB_X11
49519
49520
49521
49522
49523
49524
49525# Check whether --with-cups was given.
49526if test "${with_cups+set}" = set; then :
49527  withval=$with_cups;
49528fi
49529
49530
49531# Check whether --with-cups-include was given.
49532if test "${with_cups_include+set}" = set; then :
49533  withval=$with_cups_include;
49534fi
49535
49536
49537  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49538    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49539        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49540      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49541$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49542    fi
49543    CUPS_CFLAGS=
49544  else
49545    CUPS_FOUND=no
49546
49547    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49548      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49549    fi
49550
49551    if test "x${with_cups}" != x; then
49552      CUPS_CFLAGS="-I${with_cups}/include"
49553      CUPS_FOUND=yes
49554    fi
49555    if test "x${with_cups_include}" != x; then
49556      CUPS_CFLAGS="-I${with_cups_include}"
49557      CUPS_FOUND=yes
49558    fi
49559    if test "x$CUPS_FOUND" = xno; then
49560      # Are the cups headers installed in the default /usr/include location?
49561      for ac_header in cups/cups.h cups/ppd.h
49562do :
49563  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49564ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49565if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49566  cat >>confdefs.h <<_ACEOF
49567#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49568_ACEOF
49569
49570          CUPS_FOUND=yes
49571          CUPS_CFLAGS=
49572          DEFAULT_CUPS=yes
49573
49574fi
49575
49576done
49577
49578    fi
49579    if test "x$CUPS_FOUND" = xno; then
49580      # Getting nervous now? Lets poke around for standard Solaris third-party
49581      # package installation locations.
49582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49583$as_echo_n "checking for cups headers... " >&6; }
49584      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49585        # An SFW package seems to be installed!
49586        CUPS_FOUND=yes
49587        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49588      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49589        # A CSW package seems to be installed!
49590        CUPS_FOUND=yes
49591        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49592      fi
49593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49594$as_echo "$CUPS_FOUND" >&6; }
49595    fi
49596    if test "x$CUPS_FOUND" = xno; then
49597
49598  # Print a helpful message on how to acquire the necessary build dependency.
49599  # cups is the help tag: freetype, cups, alsa etc
49600  MISSING_DEPENDENCY=cups
49601
49602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49603    cygwin_help $MISSING_DEPENDENCY
49604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49605    msys_help $MISSING_DEPENDENCY
49606  else
49607    PKGHANDLER_COMMAND=
49608
49609    case $PKGHANDLER in
49610      apt-get)
49611        apt_help     $MISSING_DEPENDENCY ;;
49612      yum)
49613        yum_help     $MISSING_DEPENDENCY ;;
49614      port)
49615        port_help    $MISSING_DEPENDENCY ;;
49616      pkgutil)
49617        pkgutil_help $MISSING_DEPENDENCY ;;
49618      pkgadd)
49619        pkgadd_help  $MISSING_DEPENDENCY ;;
49620    esac
49621
49622    if test "x$PKGHANDLER_COMMAND" != x; then
49623      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49624    fi
49625  fi
49626
49627      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49628    fi
49629  fi
49630
49631
49632
49633
49634
49635# Check whether --with-freetype was given.
49636if test "${with_freetype+set}" = set; then :
49637  withval=$with_freetype;
49638fi
49639
49640
49641# Check whether --with-freetype-include was given.
49642if test "${with_freetype_include+set}" = set; then :
49643  withval=$with_freetype_include;
49644fi
49645
49646
49647# Check whether --with-freetype-lib was given.
49648if test "${with_freetype_lib+set}" = set; then :
49649  withval=$with_freetype_lib;
49650fi
49651
49652
49653# Check whether --with-freetype-src was given.
49654if test "${with_freetype_src+set}" = set; then :
49655  withval=$with_freetype_src;
49656fi
49657
49658  # Check whether --enable-freetype-bundling was given.
49659if test "${enable_freetype_bundling+set}" = set; then :
49660  enableval=$enable_freetype_bundling;
49661fi
49662
49663
49664  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49665  FREETYPE_BASE_NAME=freetype
49666  FREETYPE_CFLAGS=
49667  FREETYPE_LIBS=
49668  FREETYPE_BUNDLE_LIB_PATH=
49669
49670  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49671    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49672        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49673        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49674        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49675      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49676$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49677    fi
49678    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49679      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49680$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49681    fi
49682  else
49683    # freetype is needed to build; go get it!
49684
49685    BUNDLE_FREETYPE="$enable_freetype_bundling"
49686
49687    if  test "x$with_freetype_src" != x; then
49688      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49689        # Try to build freetype if --with-freetype-src was given on Windows
49690
49691  FREETYPE_SRC_PATH="$with_freetype_src"
49692  BUILD_FREETYPE=yes
49693
49694  # Check if the freetype sources are acessible..
49695  if ! test -d $FREETYPE_SRC_PATH; then
49696    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
49697$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49698    BUILD_FREETYPE=no
49699  fi
49700  # ..and contain a vc2010 project file
49701  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49702  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49703    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
49704$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49705    BUILD_FREETYPE=no
49706  fi
49707  # Now check if configure found a version of 'msbuild.exe'
49708  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49709    { $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
49710$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;}
49711    BUILD_FREETYPE=no
49712  fi
49713
49714  # Ready to go..
49715  if test "x$BUILD_FREETYPE" = xyes; then
49716    # msbuild requires trailing slashes for output directories
49717    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49718    freetype_lib_path_unix="$freetype_lib_path"
49719    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49720
49721  unix_path="$vcxproj_path"
49722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49723    windows_path=`$CYGPATH -m "$unix_path"`
49724    vcxproj_path="$windows_path"
49725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49726    windows_path=`cmd //c echo $unix_path`
49727    vcxproj_path="$windows_path"
49728  fi
49729
49730
49731  unix_path="$freetype_lib_path"
49732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49733    windows_path=`$CYGPATH -m "$unix_path"`
49734    freetype_lib_path="$windows_path"
49735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49736    windows_path=`cmd //c echo $unix_path`
49737    freetype_lib_path="$windows_path"
49738  fi
49739
49740
49741  unix_path="$freetype_obj_path"
49742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49743    windows_path=`$CYGPATH -m "$unix_path"`
49744    freetype_obj_path="$windows_path"
49745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49746    windows_path=`cmd //c echo $unix_path`
49747    freetype_obj_path="$windows_path"
49748  fi
49749
49750    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49751      freetype_platform=x64
49752    else
49753      freetype_platform=win32
49754    fi
49755
49756    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49757    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49758    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49759    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49760    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49761$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49762
49763    # First we try to build the freetype.dll
49764    $ECHO -e "@echo off\n"\
49765        "$MSBUILD $vcxproj_path "\
49766        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49767        "/p:Configuration=\"Release Multithreaded\" "\
49768        "/p:Platform=$freetype_platform "\
49769        "/p:ConfigurationType=DynamicLibrary "\
49770        "/p:TargetName=freetype "\
49771        "/p:OutDir=\"$freetype_lib_path\" "\
49772        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49773    cmd /c freetype.bat
49774
49775    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49776      # If that succeeds we also build freetype.lib
49777      $ECHO -e "@echo off\n"\
49778          "$MSBUILD $vcxproj_path "\
49779          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49780          "/p:Configuration=\"Release Multithreaded\" "\
49781          "/p:Platform=$freetype_platform "\
49782          "/p:ConfigurationType=StaticLibrary "\
49783          "/p:TargetName=freetype "\
49784          "/p:OutDir=\"$freetype_lib_path\" "\
49785          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49786      cmd /c freetype.bat
49787
49788      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49789        # Once we build both, lib and dll, set freetype lib and include path appropriately
49790        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49791        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49792        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49793$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49794      else
49795        BUILD_FREETYPE=no
49796      fi
49797    else
49798      BUILD_FREETYPE=no
49799    fi
49800  fi
49801
49802        if test "x$BUILD_FREETYPE" = xyes; then
49803          # Okay, we built it. Check that it works.
49804
49805  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49806  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49807  METHOD="--with-freetype-src"
49808
49809  # Let's start with an optimistic view of the world :-)
49810  FOUND_FREETYPE=yes
49811
49812  # First look for the canonical freetype main include file ft2build.h.
49813  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49814    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49815    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49816    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49817      # Fail.
49818      FOUND_FREETYPE=no
49819    fi
49820  fi
49821
49822  if test "x$FOUND_FREETYPE" = xyes; then
49823    # Include file found, let's continue the sanity check.
49824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49825$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49826
49827    # Reset to default value
49828    FREETYPE_BASE_NAME=freetype
49829    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49830    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49831      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49833        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49834        # for the .6 version explicitly.
49835        FREETYPE_BASE_NAME=freetype.6
49836        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49837        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49838$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49839      else
49840        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49842        FOUND_FREETYPE=no
49843      fi
49844    else
49845      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49846        # On Windows, we will need both .lib and .dll file.
49847        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49848          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49849$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49850          FOUND_FREETYPE=no
49851        fi
49852      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49854        # Found lib in isa dir, use that instead.
49855        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49856        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49857$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49858      fi
49859    fi
49860  fi
49861
49862  if test "x$FOUND_FREETYPE" = xyes; then
49863
49864  # Only process if variable expands to non-empty
49865
49866  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49868
49869  # Input might be given as Windows format, start by converting to
49870  # unix format.
49871  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49872  new_path=`$CYGPATH -u "$path"`
49873
49874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49877  # "foo.exe" is OK but "foo" is an error.
49878  #
49879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49880  # It is also a way to make sure we got the proper file name for the real test later on.
49881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49882  if test "x$test_shortpath" = x; then
49883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49886  fi
49887
49888  # Call helper function which possibly converts this using DOS-style short mode.
49889  # If so, the updated path is stored in $new_path.
49890
49891  input_path="$new_path"
49892  # Check if we need to convert this using DOS-style short mode. If the path
49893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49894  # take no chances and rewrite it.
49895  # Note: m4 eats our [], so we need to use [ and ] instead.
49896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49897  if test "x$has_forbidden_chars" != x; then
49898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49902      # Going to short mode and back again did indeed matter. Since short mode is
49903      # case insensitive, let's make it lowercase to improve readability.
49904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49905      # Now convert it back to Unix-style (cygpath)
49906      input_path=`$CYGPATH -u "$shortmode_path"`
49907      new_path="$input_path"
49908    fi
49909  fi
49910
49911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49912  if test "x$test_cygdrive_prefix" = x; then
49913    # As a simple fix, exclude /usr/bin since it's not a real path.
49914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49916      # a path prefixed by /cygdrive for fixpath to work.
49917      new_path="$CYGWIN_ROOT_PATH$input_path"
49918    fi
49919  fi
49920
49921
49922  if test "x$path" != "x$new_path"; then
49923    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49926  fi
49927
49928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49929
49930  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49931  has_colon=`$ECHO $path | $GREP ^.:`
49932  new_path="$path"
49933  if test "x$has_colon" = x; then
49934    # Not in mixed or Windows style, start by that.
49935    new_path=`cmd //c echo $path`
49936  fi
49937
49938
49939  input_path="$new_path"
49940  # Check if we need to convert this using DOS-style short mode. If the path
49941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49942  # take no chances and rewrite it.
49943  # Note: m4 eats our [], so we need to use [ and ] instead.
49944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49945  if test "x$has_forbidden_chars" != x; then
49946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49948  fi
49949
49950
49951  windows_path="$new_path"
49952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49953    unix_path=`$CYGPATH -u "$windows_path"`
49954    new_path="$unix_path"
49955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49957    new_path="$unix_path"
49958  fi
49959
49960  if test "x$path" != "x$new_path"; then
49961    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49964  fi
49965
49966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49968
49969    else
49970      # We're on a unix platform. Hooray! :)
49971      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49972      has_space=`$ECHO "$path" | $GREP " "`
49973      if test "x$has_space" != x; then
49974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49977      fi
49978
49979      # Use eval to expand a potential ~
49980      eval path="$path"
49981      if test ! -f "$path" && test ! -d "$path"; then
49982        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49983      fi
49984
49985      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49986    fi
49987  fi
49988
49989
49990  # Only process if variable expands to non-empty
49991
49992  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49994
49995  # Input might be given as Windows format, start by converting to
49996  # unix format.
49997  path="$POTENTIAL_FREETYPE_LIB_PATH"
49998  new_path=`$CYGPATH -u "$path"`
49999
50000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50003  # "foo.exe" is OK but "foo" is an error.
50004  #
50005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50006  # It is also a way to make sure we got the proper file name for the real test later on.
50007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50008  if test "x$test_shortpath" = x; then
50009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50011    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50012  fi
50013
50014  # Call helper function which possibly converts this using DOS-style short mode.
50015  # If so, the updated path is stored in $new_path.
50016
50017  input_path="$new_path"
50018  # Check if we need to convert this using DOS-style short mode. If the path
50019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50020  # take no chances and rewrite it.
50021  # Note: m4 eats our [], so we need to use [ and ] instead.
50022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50023  if test "x$has_forbidden_chars" != x; then
50024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50028      # Going to short mode and back again did indeed matter. Since short mode is
50029      # case insensitive, let's make it lowercase to improve readability.
50030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50031      # Now convert it back to Unix-style (cygpath)
50032      input_path=`$CYGPATH -u "$shortmode_path"`
50033      new_path="$input_path"
50034    fi
50035  fi
50036
50037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50038  if test "x$test_cygdrive_prefix" = x; then
50039    # As a simple fix, exclude /usr/bin since it's not a real path.
50040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50042      # a path prefixed by /cygdrive for fixpath to work.
50043      new_path="$CYGWIN_ROOT_PATH$input_path"
50044    fi
50045  fi
50046
50047
50048  if test "x$path" != "x$new_path"; then
50049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50052  fi
50053
50054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50055
50056  path="$POTENTIAL_FREETYPE_LIB_PATH"
50057  has_colon=`$ECHO $path | $GREP ^.:`
50058  new_path="$path"
50059  if test "x$has_colon" = x; then
50060    # Not in mixed or Windows style, start by that.
50061    new_path=`cmd //c echo $path`
50062  fi
50063
50064
50065  input_path="$new_path"
50066  # Check if we need to convert this using DOS-style short mode. If the path
50067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50068  # take no chances and rewrite it.
50069  # Note: m4 eats our [], so we need to use [ and ] instead.
50070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50071  if test "x$has_forbidden_chars" != x; then
50072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50074  fi
50075
50076
50077  windows_path="$new_path"
50078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50079    unix_path=`$CYGPATH -u "$windows_path"`
50080    new_path="$unix_path"
50081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50083    new_path="$unix_path"
50084  fi
50085
50086  if test "x$path" != "x$new_path"; then
50087    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50089$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50090  fi
50091
50092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50094
50095    else
50096      # We're on a unix platform. Hooray! :)
50097      path="$POTENTIAL_FREETYPE_LIB_PATH"
50098      has_space=`$ECHO "$path" | $GREP " "`
50099      if test "x$has_space" != x; then
50100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50102        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50103      fi
50104
50105      # Use eval to expand a potential ~
50106      eval path="$path"
50107      if test ! -f "$path" && test ! -d "$path"; then
50108        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50109      fi
50110
50111      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50112    fi
50113  fi
50114
50115
50116    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50118$as_echo_n "checking for freetype includes... " >&6; }
50119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50120$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50121    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50123$as_echo_n "checking for freetype libraries... " >&6; }
50124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50125$as_echo "$FREETYPE_LIB_PATH" >&6; }
50126  fi
50127
50128          if test "x$FOUND_FREETYPE" != xyes; then
50129            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
50130          fi
50131        else
50132          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
50133$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
50134          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
50135        fi
50136      else
50137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
50138$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
50139      fi
50140    fi
50141
50142    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
50143      # User has specified settings
50144
50145      if test "x$BUNDLE_FREETYPE" = x; then
50146        # If not specified, default is to bundle freetype
50147        BUNDLE_FREETYPE=yes
50148      fi
50149
50150      if test "x$with_freetype" != x; then
50151        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
50152        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
50153      fi
50154
50155      # Allow --with-freetype-lib and --with-freetype-include to override
50156      if test "x$with_freetype_include" != x; then
50157        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
50158      fi
50159      if test "x$with_freetype_lib" != x; then
50160        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
50161      fi
50162
50163      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50164        # Okay, we got it. Check that it works.
50165
50166  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50167  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50168  METHOD="--with-freetype"
50169
50170  # Let's start with an optimistic view of the world :-)
50171  FOUND_FREETYPE=yes
50172
50173  # First look for the canonical freetype main include file ft2build.h.
50174  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50175    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50176    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50177    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50178      # Fail.
50179      FOUND_FREETYPE=no
50180    fi
50181  fi
50182
50183  if test "x$FOUND_FREETYPE" = xyes; then
50184    # Include file found, let's continue the sanity check.
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50186$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50187
50188    # Reset to default value
50189    FREETYPE_BASE_NAME=freetype
50190    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50191    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50192      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50194        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50195        # for the .6 version explicitly.
50196        FREETYPE_BASE_NAME=freetype.6
50197        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50198        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50199$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50200      else
50201        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50202$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50203        FOUND_FREETYPE=no
50204      fi
50205    else
50206      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50207        # On Windows, we will need both .lib and .dll file.
50208        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50209          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50210$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50211          FOUND_FREETYPE=no
50212        fi
50213      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50214          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50215        # Found lib in isa dir, use that instead.
50216        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50217        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50218$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50219      fi
50220    fi
50221  fi
50222
50223  if test "x$FOUND_FREETYPE" = xyes; then
50224
50225  # Only process if variable expands to non-empty
50226
50227  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50229
50230  # Input might be given as Windows format, start by converting to
50231  # unix format.
50232  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50233  new_path=`$CYGPATH -u "$path"`
50234
50235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50238  # "foo.exe" is OK but "foo" is an error.
50239  #
50240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50241  # It is also a way to make sure we got the proper file name for the real test later on.
50242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50243  if test "x$test_shortpath" = x; then
50244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50246    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50247  fi
50248
50249  # Call helper function which possibly converts this using DOS-style short mode.
50250  # If so, the updated path is stored in $new_path.
50251
50252  input_path="$new_path"
50253  # Check if we need to convert this using DOS-style short mode. If the path
50254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50255  # take no chances and rewrite it.
50256  # Note: m4 eats our [], so we need to use [ and ] instead.
50257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50258  if test "x$has_forbidden_chars" != x; then
50259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50263      # Going to short mode and back again did indeed matter. Since short mode is
50264      # case insensitive, let's make it lowercase to improve readability.
50265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50266      # Now convert it back to Unix-style (cygpath)
50267      input_path=`$CYGPATH -u "$shortmode_path"`
50268      new_path="$input_path"
50269    fi
50270  fi
50271
50272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50273  if test "x$test_cygdrive_prefix" = x; then
50274    # As a simple fix, exclude /usr/bin since it's not a real path.
50275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50277      # a path prefixed by /cygdrive for fixpath to work.
50278      new_path="$CYGWIN_ROOT_PATH$input_path"
50279    fi
50280  fi
50281
50282
50283  if test "x$path" != "x$new_path"; then
50284    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50287  fi
50288
50289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50290
50291  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50292  has_colon=`$ECHO $path | $GREP ^.:`
50293  new_path="$path"
50294  if test "x$has_colon" = x; then
50295    # Not in mixed or Windows style, start by that.
50296    new_path=`cmd //c echo $path`
50297  fi
50298
50299
50300  input_path="$new_path"
50301  # Check if we need to convert this using DOS-style short mode. If the path
50302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50303  # take no chances and rewrite it.
50304  # Note: m4 eats our [], so we need to use [ and ] instead.
50305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50306  if test "x$has_forbidden_chars" != x; then
50307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50309  fi
50310
50311
50312  windows_path="$new_path"
50313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50314    unix_path=`$CYGPATH -u "$windows_path"`
50315    new_path="$unix_path"
50316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50318    new_path="$unix_path"
50319  fi
50320
50321  if test "x$path" != "x$new_path"; then
50322    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50324$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50325  fi
50326
50327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50329
50330    else
50331      # We're on a unix platform. Hooray! :)
50332      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50333      has_space=`$ECHO "$path" | $GREP " "`
50334      if test "x$has_space" != x; then
50335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50338      fi
50339
50340      # Use eval to expand a potential ~
50341      eval path="$path"
50342      if test ! -f "$path" && test ! -d "$path"; then
50343        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50344      fi
50345
50346      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50347    fi
50348  fi
50349
50350
50351  # Only process if variable expands to non-empty
50352
50353  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50355
50356  # Input might be given as Windows format, start by converting to
50357  # unix format.
50358  path="$POTENTIAL_FREETYPE_LIB_PATH"
50359  new_path=`$CYGPATH -u "$path"`
50360
50361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50364  # "foo.exe" is OK but "foo" is an error.
50365  #
50366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50367  # It is also a way to make sure we got the proper file name for the real test later on.
50368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50369  if test "x$test_shortpath" = x; then
50370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50372    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50373  fi
50374
50375  # Call helper function which possibly converts this using DOS-style short mode.
50376  # If so, the updated path is stored in $new_path.
50377
50378  input_path="$new_path"
50379  # Check if we need to convert this using DOS-style short mode. If the path
50380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50381  # take no chances and rewrite it.
50382  # Note: m4 eats our [], so we need to use [ and ] instead.
50383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50384  if test "x$has_forbidden_chars" != x; then
50385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50389      # Going to short mode and back again did indeed matter. Since short mode is
50390      # case insensitive, let's make it lowercase to improve readability.
50391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50392      # Now convert it back to Unix-style (cygpath)
50393      input_path=`$CYGPATH -u "$shortmode_path"`
50394      new_path="$input_path"
50395    fi
50396  fi
50397
50398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50399  if test "x$test_cygdrive_prefix" = x; then
50400    # As a simple fix, exclude /usr/bin since it's not a real path.
50401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50403      # a path prefixed by /cygdrive for fixpath to work.
50404      new_path="$CYGWIN_ROOT_PATH$input_path"
50405    fi
50406  fi
50407
50408
50409  if test "x$path" != "x$new_path"; then
50410    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50413  fi
50414
50415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50416
50417  path="$POTENTIAL_FREETYPE_LIB_PATH"
50418  has_colon=`$ECHO $path | $GREP ^.:`
50419  new_path="$path"
50420  if test "x$has_colon" = x; then
50421    # Not in mixed or Windows style, start by that.
50422    new_path=`cmd //c echo $path`
50423  fi
50424
50425
50426  input_path="$new_path"
50427  # Check if we need to convert this using DOS-style short mode. If the path
50428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50429  # take no chances and rewrite it.
50430  # Note: m4 eats our [], so we need to use [ and ] instead.
50431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50432  if test "x$has_forbidden_chars" != x; then
50433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50435  fi
50436
50437
50438  windows_path="$new_path"
50439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50440    unix_path=`$CYGPATH -u "$windows_path"`
50441    new_path="$unix_path"
50442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50444    new_path="$unix_path"
50445  fi
50446
50447  if test "x$path" != "x$new_path"; then
50448    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50450$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50451  fi
50452
50453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50455
50456    else
50457      # We're on a unix platform. Hooray! :)
50458      path="$POTENTIAL_FREETYPE_LIB_PATH"
50459      has_space=`$ECHO "$path" | $GREP " "`
50460      if test "x$has_space" != x; then
50461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50464      fi
50465
50466      # Use eval to expand a potential ~
50467      eval path="$path"
50468      if test ! -f "$path" && test ! -d "$path"; then
50469        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50470      fi
50471
50472      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50473    fi
50474  fi
50475
50476
50477    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50479$as_echo_n "checking for freetype includes... " >&6; }
50480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50481$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50482    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50484$as_echo_n "checking for freetype libraries... " >&6; }
50485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50486$as_echo "$FREETYPE_LIB_PATH" >&6; }
50487  fi
50488
50489        if test "x$FOUND_FREETYPE" != xyes; then
50490          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50491        fi
50492      else
50493        # User specified only one of lib or include. This is an error.
50494        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50495          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50496$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50497          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50498        else
50499          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50500$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50501          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50502        fi
50503      fi
50504    else
50505      # User did not specify settings, but we need freetype. Try to locate it.
50506
50507      if test "x$BUNDLE_FREETYPE" = x; then
50508        # If not specified, default is to bundle freetype only on windows
50509        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50510          BUNDLE_FREETYPE=yes
50511        else
50512          BUNDLE_FREETYPE=no
50513        fi
50514      fi
50515
50516      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50517      if test "x$SYSROOT" = x; then
50518        if test "x$FOUND_FREETYPE" != xyes; then
50519          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50520          if test "x$PKG_CONFIG" != x; then
50521
50522pkg_failed=no
50523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50524$as_echo_n "checking for FREETYPE... " >&6; }
50525
50526if test -n "$FREETYPE_CFLAGS"; then
50527    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50528 elif test -n "$PKG_CONFIG"; then
50529    if test -n "$PKG_CONFIG" && \
50530    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50531  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50532  ac_status=$?
50533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50534  test $ac_status = 0; }; then
50535  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50536else
50537  pkg_failed=yes
50538fi
50539 else
50540    pkg_failed=untried
50541fi
50542if test -n "$FREETYPE_LIBS"; then
50543    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50544 elif test -n "$PKG_CONFIG"; then
50545    if test -n "$PKG_CONFIG" && \
50546    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50547  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50548  ac_status=$?
50549  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50550  test $ac_status = 0; }; then
50551  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50552else
50553  pkg_failed=yes
50554fi
50555 else
50556    pkg_failed=untried
50557fi
50558
50559
50560
50561if test $pkg_failed = yes; then
50562
50563if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50564        _pkg_short_errors_supported=yes
50565else
50566        _pkg_short_errors_supported=no
50567fi
50568        if test $_pkg_short_errors_supported = yes; then
50569	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50570        else
50571	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50572        fi
50573	# Put the nasty error message in config.log where it belongs
50574	echo "$FREETYPE_PKG_ERRORS" >&5
50575
50576	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50577$as_echo "no" >&6; }
50578                FOUND_FREETYPE=no
50579elif test $pkg_failed = untried; then
50580	FOUND_FREETYPE=no
50581else
50582	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50583	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50585$as_echo "yes" >&6; }
50586	FOUND_FREETYPE=yes
50587fi
50588            if test "x$FOUND_FREETYPE" = xyes; then
50589              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50590              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50591              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50592              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50593                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50594              fi
50595              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50596              if test "x$BUNDLE_FREETYPE" = xyes; then
50597                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50598$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50599                FOUND_FREETYPE=no
50600              else
50601                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50602$as_echo_n "checking for freetype... " >&6; }
50603                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50604$as_echo "yes (using pkg-config)" >&6; }
50605              fi
50606            fi
50607          fi
50608        fi
50609      fi
50610
50611      if test "x$FOUND_FREETYPE" != xyes; then
50612        # Check in well-known locations
50613        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50614          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50615
50616  windows_path="$FREETYPE_BASE_DIR"
50617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50618    unix_path=`$CYGPATH -u "$windows_path"`
50619    FREETYPE_BASE_DIR="$unix_path"
50620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50622    FREETYPE_BASE_DIR="$unix_path"
50623  fi
50624
50625
50626  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50627  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50628  METHOD="well-known location"
50629
50630  # Let's start with an optimistic view of the world :-)
50631  FOUND_FREETYPE=yes
50632
50633  # First look for the canonical freetype main include file ft2build.h.
50634  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50635    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50636    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50637    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50638      # Fail.
50639      FOUND_FREETYPE=no
50640    fi
50641  fi
50642
50643  if test "x$FOUND_FREETYPE" = xyes; then
50644    # Include file found, let's continue the sanity check.
50645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50646$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50647
50648    # Reset to default value
50649    FREETYPE_BASE_NAME=freetype
50650    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50651    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50652      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50653          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50654        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50655        # for the .6 version explicitly.
50656        FREETYPE_BASE_NAME=freetype.6
50657        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50658        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50659$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50660      else
50661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50662$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50663        FOUND_FREETYPE=no
50664      fi
50665    else
50666      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50667        # On Windows, we will need both .lib and .dll file.
50668        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50669          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50670$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50671          FOUND_FREETYPE=no
50672        fi
50673      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50674          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50675        # Found lib in isa dir, use that instead.
50676        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50677        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50678$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50679      fi
50680    fi
50681  fi
50682
50683  if test "x$FOUND_FREETYPE" = xyes; then
50684
50685  # Only process if variable expands to non-empty
50686
50687  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50689
50690  # Input might be given as Windows format, start by converting to
50691  # unix format.
50692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50693  new_path=`$CYGPATH -u "$path"`
50694
50695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50698  # "foo.exe" is OK but "foo" is an error.
50699  #
50700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50701  # It is also a way to make sure we got the proper file name for the real test later on.
50702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50703  if test "x$test_shortpath" = x; then
50704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50706    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50707  fi
50708
50709  # Call helper function which possibly converts this using DOS-style short mode.
50710  # If so, the updated path is stored in $new_path.
50711
50712  input_path="$new_path"
50713  # Check if we need to convert this using DOS-style short mode. If the path
50714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50715  # take no chances and rewrite it.
50716  # Note: m4 eats our [], so we need to use [ and ] instead.
50717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50718  if test "x$has_forbidden_chars" != x; then
50719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50723      # Going to short mode and back again did indeed matter. Since short mode is
50724      # case insensitive, let's make it lowercase to improve readability.
50725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50726      # Now convert it back to Unix-style (cygpath)
50727      input_path=`$CYGPATH -u "$shortmode_path"`
50728      new_path="$input_path"
50729    fi
50730  fi
50731
50732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50733  if test "x$test_cygdrive_prefix" = x; then
50734    # As a simple fix, exclude /usr/bin since it's not a real path.
50735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50737      # a path prefixed by /cygdrive for fixpath to work.
50738      new_path="$CYGWIN_ROOT_PATH$input_path"
50739    fi
50740  fi
50741
50742
50743  if test "x$path" != "x$new_path"; then
50744    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50747  fi
50748
50749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50750
50751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50752  has_colon=`$ECHO $path | $GREP ^.:`
50753  new_path="$path"
50754  if test "x$has_colon" = x; then
50755    # Not in mixed or Windows style, start by that.
50756    new_path=`cmd //c echo $path`
50757  fi
50758
50759
50760  input_path="$new_path"
50761  # Check if we need to convert this using DOS-style short mode. If the path
50762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50763  # take no chances and rewrite it.
50764  # Note: m4 eats our [], so we need to use [ and ] instead.
50765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50766  if test "x$has_forbidden_chars" != x; then
50767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50769  fi
50770
50771
50772  windows_path="$new_path"
50773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50774    unix_path=`$CYGPATH -u "$windows_path"`
50775    new_path="$unix_path"
50776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50778    new_path="$unix_path"
50779  fi
50780
50781  if test "x$path" != "x$new_path"; then
50782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50785  fi
50786
50787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50789
50790    else
50791      # We're on a unix platform. Hooray! :)
50792      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50793      has_space=`$ECHO "$path" | $GREP " "`
50794      if test "x$has_space" != x; then
50795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50798      fi
50799
50800      # Use eval to expand a potential ~
50801      eval path="$path"
50802      if test ! -f "$path" && test ! -d "$path"; then
50803        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50804      fi
50805
50806      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50807    fi
50808  fi
50809
50810
50811  # Only process if variable expands to non-empty
50812
50813  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50815
50816  # Input might be given as Windows format, start by converting to
50817  # unix format.
50818  path="$POTENTIAL_FREETYPE_LIB_PATH"
50819  new_path=`$CYGPATH -u "$path"`
50820
50821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50824  # "foo.exe" is OK but "foo" is an error.
50825  #
50826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50827  # It is also a way to make sure we got the proper file name for the real test later on.
50828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50829  if test "x$test_shortpath" = x; then
50830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50833  fi
50834
50835  # Call helper function which possibly converts this using DOS-style short mode.
50836  # If so, the updated path is stored in $new_path.
50837
50838  input_path="$new_path"
50839  # Check if we need to convert this using DOS-style short mode. If the path
50840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50841  # take no chances and rewrite it.
50842  # Note: m4 eats our [], so we need to use [ and ] instead.
50843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50844  if test "x$has_forbidden_chars" != x; then
50845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50849      # Going to short mode and back again did indeed matter. Since short mode is
50850      # case insensitive, let's make it lowercase to improve readability.
50851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50852      # Now convert it back to Unix-style (cygpath)
50853      input_path=`$CYGPATH -u "$shortmode_path"`
50854      new_path="$input_path"
50855    fi
50856  fi
50857
50858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50859  if test "x$test_cygdrive_prefix" = x; then
50860    # As a simple fix, exclude /usr/bin since it's not a real path.
50861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50863      # a path prefixed by /cygdrive for fixpath to work.
50864      new_path="$CYGWIN_ROOT_PATH$input_path"
50865    fi
50866  fi
50867
50868
50869  if test "x$path" != "x$new_path"; then
50870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50873  fi
50874
50875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50876
50877  path="$POTENTIAL_FREETYPE_LIB_PATH"
50878  has_colon=`$ECHO $path | $GREP ^.:`
50879  new_path="$path"
50880  if test "x$has_colon" = x; then
50881    # Not in mixed or Windows style, start by that.
50882    new_path=`cmd //c echo $path`
50883  fi
50884
50885
50886  input_path="$new_path"
50887  # Check if we need to convert this using DOS-style short mode. If the path
50888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50889  # take no chances and rewrite it.
50890  # Note: m4 eats our [], so we need to use [ and ] instead.
50891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50892  if test "x$has_forbidden_chars" != x; then
50893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50895  fi
50896
50897
50898  windows_path="$new_path"
50899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50900    unix_path=`$CYGPATH -u "$windows_path"`
50901    new_path="$unix_path"
50902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50904    new_path="$unix_path"
50905  fi
50906
50907  if test "x$path" != "x$new_path"; then
50908    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50911  fi
50912
50913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50915
50916    else
50917      # We're on a unix platform. Hooray! :)
50918      path="$POTENTIAL_FREETYPE_LIB_PATH"
50919      has_space=`$ECHO "$path" | $GREP " "`
50920      if test "x$has_space" != x; then
50921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50924      fi
50925
50926      # Use eval to expand a potential ~
50927      eval path="$path"
50928      if test ! -f "$path" && test ! -d "$path"; then
50929        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50930      fi
50931
50932      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50933    fi
50934  fi
50935
50936
50937    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50939$as_echo_n "checking for freetype includes... " >&6; }
50940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50941$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50942    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50944$as_echo_n "checking for freetype libraries... " >&6; }
50945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50946$as_echo "$FREETYPE_LIB_PATH" >&6; }
50947  fi
50948
50949          if test "x$FOUND_FREETYPE" != xyes; then
50950            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50951
50952  windows_path="$FREETYPE_BASE_DIR"
50953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50954    unix_path=`$CYGPATH -u "$windows_path"`
50955    FREETYPE_BASE_DIR="$unix_path"
50956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50958    FREETYPE_BASE_DIR="$unix_path"
50959  fi
50960
50961
50962  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50963  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50964  METHOD="well-known location"
50965
50966  # Let's start with an optimistic view of the world :-)
50967  FOUND_FREETYPE=yes
50968
50969  # First look for the canonical freetype main include file ft2build.h.
50970  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50971    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50972    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50973    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50974      # Fail.
50975      FOUND_FREETYPE=no
50976    fi
50977  fi
50978
50979  if test "x$FOUND_FREETYPE" = xyes; then
50980    # Include file found, let's continue the sanity check.
50981    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50982$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50983
50984    # Reset to default value
50985    FREETYPE_BASE_NAME=freetype
50986    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50987    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50988      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50990        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50991        # for the .6 version explicitly.
50992        FREETYPE_BASE_NAME=freetype.6
50993        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50994        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50995$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50996      else
50997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50998$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50999        FOUND_FREETYPE=no
51000      fi
51001    else
51002      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51003        # On Windows, we will need both .lib and .dll file.
51004        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51005          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51006$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51007          FOUND_FREETYPE=no
51008        fi
51009      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51010          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51011        # Found lib in isa dir, use that instead.
51012        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51013        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51014$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51015      fi
51016    fi
51017  fi
51018
51019  if test "x$FOUND_FREETYPE" = xyes; then
51020
51021  # Only process if variable expands to non-empty
51022
51023  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51025
51026  # Input might be given as Windows format, start by converting to
51027  # unix format.
51028  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51029  new_path=`$CYGPATH -u "$path"`
51030
51031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51034  # "foo.exe" is OK but "foo" is an error.
51035  #
51036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51037  # It is also a way to make sure we got the proper file name for the real test later on.
51038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51039  if test "x$test_shortpath" = x; then
51040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51042    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51043  fi
51044
51045  # Call helper function which possibly converts this using DOS-style short mode.
51046  # If so, the updated path is stored in $new_path.
51047
51048  input_path="$new_path"
51049  # Check if we need to convert this using DOS-style short mode. If the path
51050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51051  # take no chances and rewrite it.
51052  # Note: m4 eats our [], so we need to use [ and ] instead.
51053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51054  if test "x$has_forbidden_chars" != x; then
51055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51059      # Going to short mode and back again did indeed matter. Since short mode is
51060      # case insensitive, let's make it lowercase to improve readability.
51061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51062      # Now convert it back to Unix-style (cygpath)
51063      input_path=`$CYGPATH -u "$shortmode_path"`
51064      new_path="$input_path"
51065    fi
51066  fi
51067
51068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51069  if test "x$test_cygdrive_prefix" = x; then
51070    # As a simple fix, exclude /usr/bin since it's not a real path.
51071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51073      # a path prefixed by /cygdrive for fixpath to work.
51074      new_path="$CYGWIN_ROOT_PATH$input_path"
51075    fi
51076  fi
51077
51078
51079  if test "x$path" != "x$new_path"; then
51080    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51083  fi
51084
51085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51086
51087  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51088  has_colon=`$ECHO $path | $GREP ^.:`
51089  new_path="$path"
51090  if test "x$has_colon" = x; then
51091    # Not in mixed or Windows style, start by that.
51092    new_path=`cmd //c echo $path`
51093  fi
51094
51095
51096  input_path="$new_path"
51097  # Check if we need to convert this using DOS-style short mode. If the path
51098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51099  # take no chances and rewrite it.
51100  # Note: m4 eats our [], so we need to use [ and ] instead.
51101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51102  if test "x$has_forbidden_chars" != x; then
51103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51105  fi
51106
51107
51108  windows_path="$new_path"
51109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51110    unix_path=`$CYGPATH -u "$windows_path"`
51111    new_path="$unix_path"
51112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51114    new_path="$unix_path"
51115  fi
51116
51117  if test "x$path" != "x$new_path"; then
51118    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51121  fi
51122
51123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51125
51126    else
51127      # We're on a unix platform. Hooray! :)
51128      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51129      has_space=`$ECHO "$path" | $GREP " "`
51130      if test "x$has_space" != x; then
51131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51134      fi
51135
51136      # Use eval to expand a potential ~
51137      eval path="$path"
51138      if test ! -f "$path" && test ! -d "$path"; then
51139        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51140      fi
51141
51142      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51143    fi
51144  fi
51145
51146
51147  # Only process if variable expands to non-empty
51148
51149  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51151
51152  # Input might be given as Windows format, start by converting to
51153  # unix format.
51154  path="$POTENTIAL_FREETYPE_LIB_PATH"
51155  new_path=`$CYGPATH -u "$path"`
51156
51157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51160  # "foo.exe" is OK but "foo" is an error.
51161  #
51162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51163  # It is also a way to make sure we got the proper file name for the real test later on.
51164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51165  if test "x$test_shortpath" = x; then
51166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51167$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51168    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51169  fi
51170
51171  # Call helper function which possibly converts this using DOS-style short mode.
51172  # If so, the updated path is stored in $new_path.
51173
51174  input_path="$new_path"
51175  # Check if we need to convert this using DOS-style short mode. If the path
51176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51177  # take no chances and rewrite it.
51178  # Note: m4 eats our [], so we need to use [ and ] instead.
51179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51180  if test "x$has_forbidden_chars" != x; then
51181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51185      # Going to short mode and back again did indeed matter. Since short mode is
51186      # case insensitive, let's make it lowercase to improve readability.
51187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51188      # Now convert it back to Unix-style (cygpath)
51189      input_path=`$CYGPATH -u "$shortmode_path"`
51190      new_path="$input_path"
51191    fi
51192  fi
51193
51194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51195  if test "x$test_cygdrive_prefix" = x; then
51196    # As a simple fix, exclude /usr/bin since it's not a real path.
51197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51199      # a path prefixed by /cygdrive for fixpath to work.
51200      new_path="$CYGWIN_ROOT_PATH$input_path"
51201    fi
51202  fi
51203
51204
51205  if test "x$path" != "x$new_path"; then
51206    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51208$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51209  fi
51210
51211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51212
51213  path="$POTENTIAL_FREETYPE_LIB_PATH"
51214  has_colon=`$ECHO $path | $GREP ^.:`
51215  new_path="$path"
51216  if test "x$has_colon" = x; then
51217    # Not in mixed or Windows style, start by that.
51218    new_path=`cmd //c echo $path`
51219  fi
51220
51221
51222  input_path="$new_path"
51223  # Check if we need to convert this using DOS-style short mode. If the path
51224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51225  # take no chances and rewrite it.
51226  # Note: m4 eats our [], so we need to use [ and ] instead.
51227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51228  if test "x$has_forbidden_chars" != x; then
51229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51231  fi
51232
51233
51234  windows_path="$new_path"
51235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51236    unix_path=`$CYGPATH -u "$windows_path"`
51237    new_path="$unix_path"
51238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51240    new_path="$unix_path"
51241  fi
51242
51243  if test "x$path" != "x$new_path"; then
51244    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51247  fi
51248
51249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51251
51252    else
51253      # We're on a unix platform. Hooray! :)
51254      path="$POTENTIAL_FREETYPE_LIB_PATH"
51255      has_space=`$ECHO "$path" | $GREP " "`
51256      if test "x$has_space" != x; then
51257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51260      fi
51261
51262      # Use eval to expand a potential ~
51263      eval path="$path"
51264      if test ! -f "$path" && test ! -d "$path"; then
51265        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51266      fi
51267
51268      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51269    fi
51270  fi
51271
51272
51273    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51275$as_echo_n "checking for freetype includes... " >&6; }
51276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51277$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51278    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51280$as_echo_n "checking for freetype libraries... " >&6; }
51281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51282$as_echo "$FREETYPE_LIB_PATH" >&6; }
51283  fi
51284
51285          fi
51286        else
51287          FREETYPE_BASE_DIR="$SYSROOT/usr"
51288
51289  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51290  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51291  METHOD="well-known location"
51292
51293  # Let's start with an optimistic view of the world :-)
51294  FOUND_FREETYPE=yes
51295
51296  # First look for the canonical freetype main include file ft2build.h.
51297  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51298    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51299    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51300    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51301      # Fail.
51302      FOUND_FREETYPE=no
51303    fi
51304  fi
51305
51306  if test "x$FOUND_FREETYPE" = xyes; then
51307    # Include file found, let's continue the sanity check.
51308    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51309$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51310
51311    # Reset to default value
51312    FREETYPE_BASE_NAME=freetype
51313    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51314    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51315      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51316          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51317        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51318        # for the .6 version explicitly.
51319        FREETYPE_BASE_NAME=freetype.6
51320        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51321        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51322$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51323      else
51324        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51325$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51326        FOUND_FREETYPE=no
51327      fi
51328    else
51329      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51330        # On Windows, we will need both .lib and .dll file.
51331        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51332          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51333$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51334          FOUND_FREETYPE=no
51335        fi
51336      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51337          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51338        # Found lib in isa dir, use that instead.
51339        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51340        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51341$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51342      fi
51343    fi
51344  fi
51345
51346  if test "x$FOUND_FREETYPE" = xyes; then
51347
51348  # Only process if variable expands to non-empty
51349
51350  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51352
51353  # Input might be given as Windows format, start by converting to
51354  # unix format.
51355  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51356  new_path=`$CYGPATH -u "$path"`
51357
51358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51361  # "foo.exe" is OK but "foo" is an error.
51362  #
51363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51364  # It is also a way to make sure we got the proper file name for the real test later on.
51365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51366  if test "x$test_shortpath" = x; then
51367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51368$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51369    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51370  fi
51371
51372  # Call helper function which possibly converts this using DOS-style short mode.
51373  # If so, the updated path is stored in $new_path.
51374
51375  input_path="$new_path"
51376  # Check if we need to convert this using DOS-style short mode. If the path
51377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51378  # take no chances and rewrite it.
51379  # Note: m4 eats our [], so we need to use [ and ] instead.
51380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51381  if test "x$has_forbidden_chars" != x; then
51382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51386      # Going to short mode and back again did indeed matter. Since short mode is
51387      # case insensitive, let's make it lowercase to improve readability.
51388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51389      # Now convert it back to Unix-style (cygpath)
51390      input_path=`$CYGPATH -u "$shortmode_path"`
51391      new_path="$input_path"
51392    fi
51393  fi
51394
51395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51396  if test "x$test_cygdrive_prefix" = x; then
51397    # As a simple fix, exclude /usr/bin since it's not a real path.
51398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51400      # a path prefixed by /cygdrive for fixpath to work.
51401      new_path="$CYGWIN_ROOT_PATH$input_path"
51402    fi
51403  fi
51404
51405
51406  if test "x$path" != "x$new_path"; then
51407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51410  fi
51411
51412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51413
51414  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51415  has_colon=`$ECHO $path | $GREP ^.:`
51416  new_path="$path"
51417  if test "x$has_colon" = x; then
51418    # Not in mixed or Windows style, start by that.
51419    new_path=`cmd //c echo $path`
51420  fi
51421
51422
51423  input_path="$new_path"
51424  # Check if we need to convert this using DOS-style short mode. If the path
51425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51426  # take no chances and rewrite it.
51427  # Note: m4 eats our [], so we need to use [ and ] instead.
51428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51429  if test "x$has_forbidden_chars" != x; then
51430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51432  fi
51433
51434
51435  windows_path="$new_path"
51436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51437    unix_path=`$CYGPATH -u "$windows_path"`
51438    new_path="$unix_path"
51439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51441    new_path="$unix_path"
51442  fi
51443
51444  if test "x$path" != "x$new_path"; then
51445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51448  fi
51449
51450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51452
51453    else
51454      # We're on a unix platform. Hooray! :)
51455      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51456      has_space=`$ECHO "$path" | $GREP " "`
51457      if test "x$has_space" != x; then
51458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51461      fi
51462
51463      # Use eval to expand a potential ~
51464      eval path="$path"
51465      if test ! -f "$path" && test ! -d "$path"; then
51466        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51467      fi
51468
51469      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51470    fi
51471  fi
51472
51473
51474  # Only process if variable expands to non-empty
51475
51476  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51478
51479  # Input might be given as Windows format, start by converting to
51480  # unix format.
51481  path="$POTENTIAL_FREETYPE_LIB_PATH"
51482  new_path=`$CYGPATH -u "$path"`
51483
51484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51487  # "foo.exe" is OK but "foo" is an error.
51488  #
51489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51490  # It is also a way to make sure we got the proper file name for the real test later on.
51491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51492  if test "x$test_shortpath" = x; then
51493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51496  fi
51497
51498  # Call helper function which possibly converts this using DOS-style short mode.
51499  # If so, the updated path is stored in $new_path.
51500
51501  input_path="$new_path"
51502  # Check if we need to convert this using DOS-style short mode. If the path
51503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51504  # take no chances and rewrite it.
51505  # Note: m4 eats our [], so we need to use [ and ] instead.
51506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51507  if test "x$has_forbidden_chars" != x; then
51508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51512      # Going to short mode and back again did indeed matter. Since short mode is
51513      # case insensitive, let's make it lowercase to improve readability.
51514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51515      # Now convert it back to Unix-style (cygpath)
51516      input_path=`$CYGPATH -u "$shortmode_path"`
51517      new_path="$input_path"
51518    fi
51519  fi
51520
51521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51522  if test "x$test_cygdrive_prefix" = x; then
51523    # As a simple fix, exclude /usr/bin since it's not a real path.
51524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51526      # a path prefixed by /cygdrive for fixpath to work.
51527      new_path="$CYGWIN_ROOT_PATH$input_path"
51528    fi
51529  fi
51530
51531
51532  if test "x$path" != "x$new_path"; then
51533    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51536  fi
51537
51538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51539
51540  path="$POTENTIAL_FREETYPE_LIB_PATH"
51541  has_colon=`$ECHO $path | $GREP ^.:`
51542  new_path="$path"
51543  if test "x$has_colon" = x; then
51544    # Not in mixed or Windows style, start by that.
51545    new_path=`cmd //c echo $path`
51546  fi
51547
51548
51549  input_path="$new_path"
51550  # Check if we need to convert this using DOS-style short mode. If the path
51551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51552  # take no chances and rewrite it.
51553  # Note: m4 eats our [], so we need to use [ and ] instead.
51554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51555  if test "x$has_forbidden_chars" != x; then
51556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51558  fi
51559
51560
51561  windows_path="$new_path"
51562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51563    unix_path=`$CYGPATH -u "$windows_path"`
51564    new_path="$unix_path"
51565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51567    new_path="$unix_path"
51568  fi
51569
51570  if test "x$path" != "x$new_path"; then
51571    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51574  fi
51575
51576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51578
51579    else
51580      # We're on a unix platform. Hooray! :)
51581      path="$POTENTIAL_FREETYPE_LIB_PATH"
51582      has_space=`$ECHO "$path" | $GREP " "`
51583      if test "x$has_space" != x; then
51584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51587      fi
51588
51589      # Use eval to expand a potential ~
51590      eval path="$path"
51591      if test ! -f "$path" && test ! -d "$path"; then
51592        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51593      fi
51594
51595      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51596    fi
51597  fi
51598
51599
51600    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51602$as_echo_n "checking for freetype includes... " >&6; }
51603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51604$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51605    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51607$as_echo_n "checking for freetype libraries... " >&6; }
51608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51609$as_echo "$FREETYPE_LIB_PATH" >&6; }
51610  fi
51611
51612
51613          if test "x$FOUND_FREETYPE" != xyes; then
51614            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51615
51616  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51617  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51618  METHOD="well-known location"
51619
51620  # Let's start with an optimistic view of the world :-)
51621  FOUND_FREETYPE=yes
51622
51623  # First look for the canonical freetype main include file ft2build.h.
51624  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51625    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51626    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51627    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51628      # Fail.
51629      FOUND_FREETYPE=no
51630    fi
51631  fi
51632
51633  if test "x$FOUND_FREETYPE" = xyes; then
51634    # Include file found, let's continue the sanity check.
51635    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51636$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51637
51638    # Reset to default value
51639    FREETYPE_BASE_NAME=freetype
51640    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51641    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51642      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51643          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51644        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51645        # for the .6 version explicitly.
51646        FREETYPE_BASE_NAME=freetype.6
51647        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51648        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51649$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51650      else
51651        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51652$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51653        FOUND_FREETYPE=no
51654      fi
51655    else
51656      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51657        # On Windows, we will need both .lib and .dll file.
51658        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51659          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51660$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51661          FOUND_FREETYPE=no
51662        fi
51663      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51664          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51665        # Found lib in isa dir, use that instead.
51666        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51667        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51668$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51669      fi
51670    fi
51671  fi
51672
51673  if test "x$FOUND_FREETYPE" = xyes; then
51674
51675  # Only process if variable expands to non-empty
51676
51677  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51679
51680  # Input might be given as Windows format, start by converting to
51681  # unix format.
51682  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51683  new_path=`$CYGPATH -u "$path"`
51684
51685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51688  # "foo.exe" is OK but "foo" is an error.
51689  #
51690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51691  # It is also a way to make sure we got the proper file name for the real test later on.
51692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51693  if test "x$test_shortpath" = x; then
51694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51696    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51697  fi
51698
51699  # Call helper function which possibly converts this using DOS-style short mode.
51700  # If so, the updated path is stored in $new_path.
51701
51702  input_path="$new_path"
51703  # Check if we need to convert this using DOS-style short mode. If the path
51704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51705  # take no chances and rewrite it.
51706  # Note: m4 eats our [], so we need to use [ and ] instead.
51707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51708  if test "x$has_forbidden_chars" != x; then
51709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51713      # Going to short mode and back again did indeed matter. Since short mode is
51714      # case insensitive, let's make it lowercase to improve readability.
51715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51716      # Now convert it back to Unix-style (cygpath)
51717      input_path=`$CYGPATH -u "$shortmode_path"`
51718      new_path="$input_path"
51719    fi
51720  fi
51721
51722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51723  if test "x$test_cygdrive_prefix" = x; then
51724    # As a simple fix, exclude /usr/bin since it's not a real path.
51725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51727      # a path prefixed by /cygdrive for fixpath to work.
51728      new_path="$CYGWIN_ROOT_PATH$input_path"
51729    fi
51730  fi
51731
51732
51733  if test "x$path" != "x$new_path"; then
51734    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51737  fi
51738
51739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51740
51741  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51742  has_colon=`$ECHO $path | $GREP ^.:`
51743  new_path="$path"
51744  if test "x$has_colon" = x; then
51745    # Not in mixed or Windows style, start by that.
51746    new_path=`cmd //c echo $path`
51747  fi
51748
51749
51750  input_path="$new_path"
51751  # Check if we need to convert this using DOS-style short mode. If the path
51752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51753  # take no chances and rewrite it.
51754  # Note: m4 eats our [], so we need to use [ and ] instead.
51755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51756  if test "x$has_forbidden_chars" != x; then
51757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51759  fi
51760
51761
51762  windows_path="$new_path"
51763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51764    unix_path=`$CYGPATH -u "$windows_path"`
51765    new_path="$unix_path"
51766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51768    new_path="$unix_path"
51769  fi
51770
51771  if test "x$path" != "x$new_path"; then
51772    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51775  fi
51776
51777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51779
51780    else
51781      # We're on a unix platform. Hooray! :)
51782      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51783      has_space=`$ECHO "$path" | $GREP " "`
51784      if test "x$has_space" != x; then
51785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51786$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51788      fi
51789
51790      # Use eval to expand a potential ~
51791      eval path="$path"
51792      if test ! -f "$path" && test ! -d "$path"; then
51793        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51794      fi
51795
51796      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51797    fi
51798  fi
51799
51800
51801  # Only process if variable expands to non-empty
51802
51803  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51805
51806  # Input might be given as Windows format, start by converting to
51807  # unix format.
51808  path="$POTENTIAL_FREETYPE_LIB_PATH"
51809  new_path=`$CYGPATH -u "$path"`
51810
51811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51814  # "foo.exe" is OK but "foo" is an error.
51815  #
51816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51817  # It is also a way to make sure we got the proper file name for the real test later on.
51818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51819  if test "x$test_shortpath" = x; then
51820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51822    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51823  fi
51824
51825  # Call helper function which possibly converts this using DOS-style short mode.
51826  # If so, the updated path is stored in $new_path.
51827
51828  input_path="$new_path"
51829  # Check if we need to convert this using DOS-style short mode. If the path
51830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51831  # take no chances and rewrite it.
51832  # Note: m4 eats our [], so we need to use [ and ] instead.
51833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51834  if test "x$has_forbidden_chars" != x; then
51835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51839      # Going to short mode and back again did indeed matter. Since short mode is
51840      # case insensitive, let's make it lowercase to improve readability.
51841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51842      # Now convert it back to Unix-style (cygpath)
51843      input_path=`$CYGPATH -u "$shortmode_path"`
51844      new_path="$input_path"
51845    fi
51846  fi
51847
51848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51849  if test "x$test_cygdrive_prefix" = x; then
51850    # As a simple fix, exclude /usr/bin since it's not a real path.
51851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51853      # a path prefixed by /cygdrive for fixpath to work.
51854      new_path="$CYGWIN_ROOT_PATH$input_path"
51855    fi
51856  fi
51857
51858
51859  if test "x$path" != "x$new_path"; then
51860    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51863  fi
51864
51865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51866
51867  path="$POTENTIAL_FREETYPE_LIB_PATH"
51868  has_colon=`$ECHO $path | $GREP ^.:`
51869  new_path="$path"
51870  if test "x$has_colon" = x; then
51871    # Not in mixed or Windows style, start by that.
51872    new_path=`cmd //c echo $path`
51873  fi
51874
51875
51876  input_path="$new_path"
51877  # Check if we need to convert this using DOS-style short mode. If the path
51878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51879  # take no chances and rewrite it.
51880  # Note: m4 eats our [], so we need to use [ and ] instead.
51881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51882  if test "x$has_forbidden_chars" != x; then
51883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51885  fi
51886
51887
51888  windows_path="$new_path"
51889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51890    unix_path=`$CYGPATH -u "$windows_path"`
51891    new_path="$unix_path"
51892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51894    new_path="$unix_path"
51895  fi
51896
51897  if test "x$path" != "x$new_path"; then
51898    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51901  fi
51902
51903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51905
51906    else
51907      # We're on a unix platform. Hooray! :)
51908      path="$POTENTIAL_FREETYPE_LIB_PATH"
51909      has_space=`$ECHO "$path" | $GREP " "`
51910      if test "x$has_space" != x; then
51911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51914      fi
51915
51916      # Use eval to expand a potential ~
51917      eval path="$path"
51918      if test ! -f "$path" && test ! -d "$path"; then
51919        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51920      fi
51921
51922      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51923    fi
51924  fi
51925
51926
51927    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51929$as_echo_n "checking for freetype includes... " >&6; }
51930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51931$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51932    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51934$as_echo_n "checking for freetype libraries... " >&6; }
51935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51936$as_echo "$FREETYPE_LIB_PATH" >&6; }
51937  fi
51938
51939          fi
51940
51941          if test "x$FOUND_FREETYPE" != xyes; then
51942            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51943
51944  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51945  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51946  METHOD="well-known location"
51947
51948  # Let's start with an optimistic view of the world :-)
51949  FOUND_FREETYPE=yes
51950
51951  # First look for the canonical freetype main include file ft2build.h.
51952  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51953    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51954    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51955    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51956      # Fail.
51957      FOUND_FREETYPE=no
51958    fi
51959  fi
51960
51961  if test "x$FOUND_FREETYPE" = xyes; then
51962    # Include file found, let's continue the sanity check.
51963    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51964$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51965
51966    # Reset to default value
51967    FREETYPE_BASE_NAME=freetype
51968    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51969    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51970      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51971          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51972        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51973        # for the .6 version explicitly.
51974        FREETYPE_BASE_NAME=freetype.6
51975        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51976        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51977$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51978      else
51979        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51980$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51981        FOUND_FREETYPE=no
51982      fi
51983    else
51984      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51985        # On Windows, we will need both .lib and .dll file.
51986        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51987          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51988$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51989          FOUND_FREETYPE=no
51990        fi
51991      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51992          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51993        # Found lib in isa dir, use that instead.
51994        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51995        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51996$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51997      fi
51998    fi
51999  fi
52000
52001  if test "x$FOUND_FREETYPE" = xyes; then
52002
52003  # Only process if variable expands to non-empty
52004
52005  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52007
52008  # Input might be given as Windows format, start by converting to
52009  # unix format.
52010  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52011  new_path=`$CYGPATH -u "$path"`
52012
52013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52016  # "foo.exe" is OK but "foo" is an error.
52017  #
52018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52019  # It is also a way to make sure we got the proper file name for the real test later on.
52020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52021  if test "x$test_shortpath" = x; then
52022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52024    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52025  fi
52026
52027  # Call helper function which possibly converts this using DOS-style short mode.
52028  # If so, the updated path is stored in $new_path.
52029
52030  input_path="$new_path"
52031  # Check if we need to convert this using DOS-style short mode. If the path
52032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52033  # take no chances and rewrite it.
52034  # Note: m4 eats our [], so we need to use [ and ] instead.
52035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52036  if test "x$has_forbidden_chars" != x; then
52037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52041      # Going to short mode and back again did indeed matter. Since short mode is
52042      # case insensitive, let's make it lowercase to improve readability.
52043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52044      # Now convert it back to Unix-style (cygpath)
52045      input_path=`$CYGPATH -u "$shortmode_path"`
52046      new_path="$input_path"
52047    fi
52048  fi
52049
52050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52051  if test "x$test_cygdrive_prefix" = x; then
52052    # As a simple fix, exclude /usr/bin since it's not a real path.
52053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52055      # a path prefixed by /cygdrive for fixpath to work.
52056      new_path="$CYGWIN_ROOT_PATH$input_path"
52057    fi
52058  fi
52059
52060
52061  if test "x$path" != "x$new_path"; then
52062    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52065  fi
52066
52067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52068
52069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52070  has_colon=`$ECHO $path | $GREP ^.:`
52071  new_path="$path"
52072  if test "x$has_colon" = x; then
52073    # Not in mixed or Windows style, start by that.
52074    new_path=`cmd //c echo $path`
52075  fi
52076
52077
52078  input_path="$new_path"
52079  # Check if we need to convert this using DOS-style short mode. If the path
52080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52081  # take no chances and rewrite it.
52082  # Note: m4 eats our [], so we need to use [ and ] instead.
52083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52084  if test "x$has_forbidden_chars" != x; then
52085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52087  fi
52088
52089
52090  windows_path="$new_path"
52091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52092    unix_path=`$CYGPATH -u "$windows_path"`
52093    new_path="$unix_path"
52094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52096    new_path="$unix_path"
52097  fi
52098
52099  if test "x$path" != "x$new_path"; then
52100    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52103  fi
52104
52105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52107
52108    else
52109      # We're on a unix platform. Hooray! :)
52110      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52111      has_space=`$ECHO "$path" | $GREP " "`
52112      if test "x$has_space" != x; then
52113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52116      fi
52117
52118      # Use eval to expand a potential ~
52119      eval path="$path"
52120      if test ! -f "$path" && test ! -d "$path"; then
52121        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52122      fi
52123
52124      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52125    fi
52126  fi
52127
52128
52129  # Only process if variable expands to non-empty
52130
52131  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52133
52134  # Input might be given as Windows format, start by converting to
52135  # unix format.
52136  path="$POTENTIAL_FREETYPE_LIB_PATH"
52137  new_path=`$CYGPATH -u "$path"`
52138
52139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52142  # "foo.exe" is OK but "foo" is an error.
52143  #
52144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52145  # It is also a way to make sure we got the proper file name for the real test later on.
52146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52147  if test "x$test_shortpath" = x; then
52148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52150    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52151  fi
52152
52153  # Call helper function which possibly converts this using DOS-style short mode.
52154  # If so, the updated path is stored in $new_path.
52155
52156  input_path="$new_path"
52157  # Check if we need to convert this using DOS-style short mode. If the path
52158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52159  # take no chances and rewrite it.
52160  # Note: m4 eats our [], so we need to use [ and ] instead.
52161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52162  if test "x$has_forbidden_chars" != x; then
52163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52167      # Going to short mode and back again did indeed matter. Since short mode is
52168      # case insensitive, let's make it lowercase to improve readability.
52169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52170      # Now convert it back to Unix-style (cygpath)
52171      input_path=`$CYGPATH -u "$shortmode_path"`
52172      new_path="$input_path"
52173    fi
52174  fi
52175
52176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52177  if test "x$test_cygdrive_prefix" = x; then
52178    # As a simple fix, exclude /usr/bin since it's not a real path.
52179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52181      # a path prefixed by /cygdrive for fixpath to work.
52182      new_path="$CYGWIN_ROOT_PATH$input_path"
52183    fi
52184  fi
52185
52186
52187  if test "x$path" != "x$new_path"; then
52188    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52191  fi
52192
52193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52194
52195  path="$POTENTIAL_FREETYPE_LIB_PATH"
52196  has_colon=`$ECHO $path | $GREP ^.:`
52197  new_path="$path"
52198  if test "x$has_colon" = x; then
52199    # Not in mixed or Windows style, start by that.
52200    new_path=`cmd //c echo $path`
52201  fi
52202
52203
52204  input_path="$new_path"
52205  # Check if we need to convert this using DOS-style short mode. If the path
52206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52207  # take no chances and rewrite it.
52208  # Note: m4 eats our [], so we need to use [ and ] instead.
52209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52210  if test "x$has_forbidden_chars" != x; then
52211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52213  fi
52214
52215
52216  windows_path="$new_path"
52217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52218    unix_path=`$CYGPATH -u "$windows_path"`
52219    new_path="$unix_path"
52220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52222    new_path="$unix_path"
52223  fi
52224
52225  if test "x$path" != "x$new_path"; then
52226    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52229  fi
52230
52231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52233
52234    else
52235      # We're on a unix platform. Hooray! :)
52236      path="$POTENTIAL_FREETYPE_LIB_PATH"
52237      has_space=`$ECHO "$path" | $GREP " "`
52238      if test "x$has_space" != x; then
52239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52242      fi
52243
52244      # Use eval to expand a potential ~
52245      eval path="$path"
52246      if test ! -f "$path" && test ! -d "$path"; then
52247        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52248      fi
52249
52250      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52251    fi
52252  fi
52253
52254
52255    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52257$as_echo_n "checking for freetype includes... " >&6; }
52258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52259$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52260    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52262$as_echo_n "checking for freetype libraries... " >&6; }
52263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52264$as_echo "$FREETYPE_LIB_PATH" >&6; }
52265  fi
52266
52267          fi
52268
52269          if test "x$FOUND_FREETYPE" != xyes; then
52270            FREETYPE_BASE_DIR="$SYSROOT/usr"
52271            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52272
52273  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52274  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
52275  METHOD="well-known location"
52276
52277  # Let's start with an optimistic view of the world :-)
52278  FOUND_FREETYPE=yes
52279
52280  # First look for the canonical freetype main include file ft2build.h.
52281  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52282    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52283    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52284    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52285      # Fail.
52286      FOUND_FREETYPE=no
52287    fi
52288  fi
52289
52290  if test "x$FOUND_FREETYPE" = xyes; then
52291    # Include file found, let's continue the sanity check.
52292    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52293$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52294
52295    # Reset to default value
52296    FREETYPE_BASE_NAME=freetype
52297    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52298    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52299      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52300          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52301        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52302        # for the .6 version explicitly.
52303        FREETYPE_BASE_NAME=freetype.6
52304        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52305        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52306$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52307      else
52308        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52309$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52310        FOUND_FREETYPE=no
52311      fi
52312    else
52313      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52314        # On Windows, we will need both .lib and .dll file.
52315        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52316          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52317$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52318          FOUND_FREETYPE=no
52319        fi
52320      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52321          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52322        # Found lib in isa dir, use that instead.
52323        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52324        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52325$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52326      fi
52327    fi
52328  fi
52329
52330  if test "x$FOUND_FREETYPE" = xyes; then
52331
52332  # Only process if variable expands to non-empty
52333
52334  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52336
52337  # Input might be given as Windows format, start by converting to
52338  # unix format.
52339  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52340  new_path=`$CYGPATH -u "$path"`
52341
52342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52345  # "foo.exe" is OK but "foo" is an error.
52346  #
52347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52348  # It is also a way to make sure we got the proper file name for the real test later on.
52349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52350  if test "x$test_shortpath" = x; then
52351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52352$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52353    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52354  fi
52355
52356  # Call helper function which possibly converts this using DOS-style short mode.
52357  # If so, the updated path is stored in $new_path.
52358
52359  input_path="$new_path"
52360  # Check if we need to convert this using DOS-style short mode. If the path
52361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52362  # take no chances and rewrite it.
52363  # Note: m4 eats our [], so we need to use [ and ] instead.
52364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52365  if test "x$has_forbidden_chars" != x; then
52366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52370      # Going to short mode and back again did indeed matter. Since short mode is
52371      # case insensitive, let's make it lowercase to improve readability.
52372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52373      # Now convert it back to Unix-style (cygpath)
52374      input_path=`$CYGPATH -u "$shortmode_path"`
52375      new_path="$input_path"
52376    fi
52377  fi
52378
52379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52380  if test "x$test_cygdrive_prefix" = x; then
52381    # As a simple fix, exclude /usr/bin since it's not a real path.
52382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52384      # a path prefixed by /cygdrive for fixpath to work.
52385      new_path="$CYGWIN_ROOT_PATH$input_path"
52386    fi
52387  fi
52388
52389
52390  if test "x$path" != "x$new_path"; then
52391    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52393$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52394  fi
52395
52396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52397
52398  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52399  has_colon=`$ECHO $path | $GREP ^.:`
52400  new_path="$path"
52401  if test "x$has_colon" = x; then
52402    # Not in mixed or Windows style, start by that.
52403    new_path=`cmd //c echo $path`
52404  fi
52405
52406
52407  input_path="$new_path"
52408  # Check if we need to convert this using DOS-style short mode. If the path
52409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52410  # take no chances and rewrite it.
52411  # Note: m4 eats our [], so we need to use [ and ] instead.
52412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52413  if test "x$has_forbidden_chars" != x; then
52414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52416  fi
52417
52418
52419  windows_path="$new_path"
52420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52421    unix_path=`$CYGPATH -u "$windows_path"`
52422    new_path="$unix_path"
52423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52425    new_path="$unix_path"
52426  fi
52427
52428  if test "x$path" != "x$new_path"; then
52429    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52431$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52432  fi
52433
52434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52436
52437    else
52438      # We're on a unix platform. Hooray! :)
52439      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52440      has_space=`$ECHO "$path" | $GREP " "`
52441      if test "x$has_space" != x; then
52442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52444        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52445      fi
52446
52447      # Use eval to expand a potential ~
52448      eval path="$path"
52449      if test ! -f "$path" && test ! -d "$path"; then
52450        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52451      fi
52452
52453      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52454    fi
52455  fi
52456
52457
52458  # Only process if variable expands to non-empty
52459
52460  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52461    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52462
52463  # Input might be given as Windows format, start by converting to
52464  # unix format.
52465  path="$POTENTIAL_FREETYPE_LIB_PATH"
52466  new_path=`$CYGPATH -u "$path"`
52467
52468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52471  # "foo.exe" is OK but "foo" is an error.
52472  #
52473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52474  # It is also a way to make sure we got the proper file name for the real test later on.
52475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52476  if test "x$test_shortpath" = x; then
52477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52479    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52480  fi
52481
52482  # Call helper function which possibly converts this using DOS-style short mode.
52483  # If so, the updated path is stored in $new_path.
52484
52485  input_path="$new_path"
52486  # Check if we need to convert this using DOS-style short mode. If the path
52487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52488  # take no chances and rewrite it.
52489  # Note: m4 eats our [], so we need to use [ and ] instead.
52490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52491  if test "x$has_forbidden_chars" != x; then
52492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52496      # Going to short mode and back again did indeed matter. Since short mode is
52497      # case insensitive, let's make it lowercase to improve readability.
52498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52499      # Now convert it back to Unix-style (cygpath)
52500      input_path=`$CYGPATH -u "$shortmode_path"`
52501      new_path="$input_path"
52502    fi
52503  fi
52504
52505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52506  if test "x$test_cygdrive_prefix" = x; then
52507    # As a simple fix, exclude /usr/bin since it's not a real path.
52508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52510      # a path prefixed by /cygdrive for fixpath to work.
52511      new_path="$CYGWIN_ROOT_PATH$input_path"
52512    fi
52513  fi
52514
52515
52516  if test "x$path" != "x$new_path"; then
52517    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52519$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52520  fi
52521
52522    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52523
52524  path="$POTENTIAL_FREETYPE_LIB_PATH"
52525  has_colon=`$ECHO $path | $GREP ^.:`
52526  new_path="$path"
52527  if test "x$has_colon" = x; then
52528    # Not in mixed or Windows style, start by that.
52529    new_path=`cmd //c echo $path`
52530  fi
52531
52532
52533  input_path="$new_path"
52534  # Check if we need to convert this using DOS-style short mode. If the path
52535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52536  # take no chances and rewrite it.
52537  # Note: m4 eats our [], so we need to use [ and ] instead.
52538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52539  if test "x$has_forbidden_chars" != x; then
52540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52542  fi
52543
52544
52545  windows_path="$new_path"
52546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52547    unix_path=`$CYGPATH -u "$windows_path"`
52548    new_path="$unix_path"
52549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52551    new_path="$unix_path"
52552  fi
52553
52554  if test "x$path" != "x$new_path"; then
52555    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52557$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52558  fi
52559
52560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52562
52563    else
52564      # We're on a unix platform. Hooray! :)
52565      path="$POTENTIAL_FREETYPE_LIB_PATH"
52566      has_space=`$ECHO "$path" | $GREP " "`
52567      if test "x$has_space" != x; then
52568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52570        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52571      fi
52572
52573      # Use eval to expand a potential ~
52574      eval path="$path"
52575      if test ! -f "$path" && test ! -d "$path"; then
52576        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52577      fi
52578
52579      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52580    fi
52581  fi
52582
52583
52584    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52586$as_echo_n "checking for freetype includes... " >&6; }
52587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52588$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52589    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52591$as_echo_n "checking for freetype libraries... " >&6; }
52592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52593$as_echo "$FREETYPE_LIB_PATH" >&6; }
52594  fi
52595
52596            else
52597
52598  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52599  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52600  METHOD="well-known location"
52601
52602  # Let's start with an optimistic view of the world :-)
52603  FOUND_FREETYPE=yes
52604
52605  # First look for the canonical freetype main include file ft2build.h.
52606  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52607    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52608    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52609    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52610      # Fail.
52611      FOUND_FREETYPE=no
52612    fi
52613  fi
52614
52615  if test "x$FOUND_FREETYPE" = xyes; then
52616    # Include file found, let's continue the sanity check.
52617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52618$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52619
52620    # Reset to default value
52621    FREETYPE_BASE_NAME=freetype
52622    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52623    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52624      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52625          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52626        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52627        # for the .6 version explicitly.
52628        FREETYPE_BASE_NAME=freetype.6
52629        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52630        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52631$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52632      else
52633        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52634$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52635        FOUND_FREETYPE=no
52636      fi
52637    else
52638      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52639        # On Windows, we will need both .lib and .dll file.
52640        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52641          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52643          FOUND_FREETYPE=no
52644        fi
52645      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52647        # Found lib in isa dir, use that instead.
52648        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52649        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52650$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52651      fi
52652    fi
52653  fi
52654
52655  if test "x$FOUND_FREETYPE" = xyes; then
52656
52657  # Only process if variable expands to non-empty
52658
52659  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52661
52662  # Input might be given as Windows format, start by converting to
52663  # unix format.
52664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52665  new_path=`$CYGPATH -u "$path"`
52666
52667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52670  # "foo.exe" is OK but "foo" is an error.
52671  #
52672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52673  # It is also a way to make sure we got the proper file name for the real test later on.
52674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52675  if test "x$test_shortpath" = x; then
52676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52678    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52679  fi
52680
52681  # Call helper function which possibly converts this using DOS-style short mode.
52682  # If so, the updated path is stored in $new_path.
52683
52684  input_path="$new_path"
52685  # Check if we need to convert this using DOS-style short mode. If the path
52686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52687  # take no chances and rewrite it.
52688  # Note: m4 eats our [], so we need to use [ and ] instead.
52689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52690  if test "x$has_forbidden_chars" != x; then
52691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52695      # Going to short mode and back again did indeed matter. Since short mode is
52696      # case insensitive, let's make it lowercase to improve readability.
52697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52698      # Now convert it back to Unix-style (cygpath)
52699      input_path=`$CYGPATH -u "$shortmode_path"`
52700      new_path="$input_path"
52701    fi
52702  fi
52703
52704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52705  if test "x$test_cygdrive_prefix" = x; then
52706    # As a simple fix, exclude /usr/bin since it's not a real path.
52707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52709      # a path prefixed by /cygdrive for fixpath to work.
52710      new_path="$CYGWIN_ROOT_PATH$input_path"
52711    fi
52712  fi
52713
52714
52715  if test "x$path" != "x$new_path"; then
52716    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52719  fi
52720
52721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52722
52723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52724  has_colon=`$ECHO $path | $GREP ^.:`
52725  new_path="$path"
52726  if test "x$has_colon" = x; then
52727    # Not in mixed or Windows style, start by that.
52728    new_path=`cmd //c echo $path`
52729  fi
52730
52731
52732  input_path="$new_path"
52733  # Check if we need to convert this using DOS-style short mode. If the path
52734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52735  # take no chances and rewrite it.
52736  # Note: m4 eats our [], so we need to use [ and ] instead.
52737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52738  if test "x$has_forbidden_chars" != x; then
52739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52741  fi
52742
52743
52744  windows_path="$new_path"
52745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52746    unix_path=`$CYGPATH -u "$windows_path"`
52747    new_path="$unix_path"
52748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52750    new_path="$unix_path"
52751  fi
52752
52753  if test "x$path" != "x$new_path"; then
52754    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52757  fi
52758
52759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52761
52762    else
52763      # We're on a unix platform. Hooray! :)
52764      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52765      has_space=`$ECHO "$path" | $GREP " "`
52766      if test "x$has_space" != x; then
52767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52770      fi
52771
52772      # Use eval to expand a potential ~
52773      eval path="$path"
52774      if test ! -f "$path" && test ! -d "$path"; then
52775        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52776      fi
52777
52778      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52779    fi
52780  fi
52781
52782
52783  # Only process if variable expands to non-empty
52784
52785  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52787
52788  # Input might be given as Windows format, start by converting to
52789  # unix format.
52790  path="$POTENTIAL_FREETYPE_LIB_PATH"
52791  new_path=`$CYGPATH -u "$path"`
52792
52793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52796  # "foo.exe" is OK but "foo" is an error.
52797  #
52798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52799  # It is also a way to make sure we got the proper file name for the real test later on.
52800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52801  if test "x$test_shortpath" = x; then
52802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52804    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52805  fi
52806
52807  # Call helper function which possibly converts this using DOS-style short mode.
52808  # If so, the updated path is stored in $new_path.
52809
52810  input_path="$new_path"
52811  # Check if we need to convert this using DOS-style short mode. If the path
52812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52813  # take no chances and rewrite it.
52814  # Note: m4 eats our [], so we need to use [ and ] instead.
52815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52816  if test "x$has_forbidden_chars" != x; then
52817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52821      # Going to short mode and back again did indeed matter. Since short mode is
52822      # case insensitive, let's make it lowercase to improve readability.
52823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52824      # Now convert it back to Unix-style (cygpath)
52825      input_path=`$CYGPATH -u "$shortmode_path"`
52826      new_path="$input_path"
52827    fi
52828  fi
52829
52830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52831  if test "x$test_cygdrive_prefix" = x; then
52832    # As a simple fix, exclude /usr/bin since it's not a real path.
52833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52835      # a path prefixed by /cygdrive for fixpath to work.
52836      new_path="$CYGWIN_ROOT_PATH$input_path"
52837    fi
52838  fi
52839
52840
52841  if test "x$path" != "x$new_path"; then
52842    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52845  fi
52846
52847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52848
52849  path="$POTENTIAL_FREETYPE_LIB_PATH"
52850  has_colon=`$ECHO $path | $GREP ^.:`
52851  new_path="$path"
52852  if test "x$has_colon" = x; then
52853    # Not in mixed or Windows style, start by that.
52854    new_path=`cmd //c echo $path`
52855  fi
52856
52857
52858  input_path="$new_path"
52859  # Check if we need to convert this using DOS-style short mode. If the path
52860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52861  # take no chances and rewrite it.
52862  # Note: m4 eats our [], so we need to use [ and ] instead.
52863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52864  if test "x$has_forbidden_chars" != x; then
52865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52867  fi
52868
52869
52870  windows_path="$new_path"
52871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52872    unix_path=`$CYGPATH -u "$windows_path"`
52873    new_path="$unix_path"
52874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52876    new_path="$unix_path"
52877  fi
52878
52879  if test "x$path" != "x$new_path"; then
52880    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52883  fi
52884
52885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52887
52888    else
52889      # We're on a unix platform. Hooray! :)
52890      path="$POTENTIAL_FREETYPE_LIB_PATH"
52891      has_space=`$ECHO "$path" | $GREP " "`
52892      if test "x$has_space" != x; then
52893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52895        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52896      fi
52897
52898      # Use eval to expand a potential ~
52899      eval path="$path"
52900      if test ! -f "$path" && test ! -d "$path"; then
52901        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52902      fi
52903
52904      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52905    fi
52906  fi
52907
52908
52909    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52911$as_echo_n "checking for freetype includes... " >&6; }
52912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52913$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52914    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52916$as_echo_n "checking for freetype libraries... " >&6; }
52917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52918$as_echo "$FREETYPE_LIB_PATH" >&6; }
52919  fi
52920
52921              if test "x$FOUND_FREETYPE" != xyes; then
52922
52923  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52924  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52925  METHOD="well-known location"
52926
52927  # Let's start with an optimistic view of the world :-)
52928  FOUND_FREETYPE=yes
52929
52930  # First look for the canonical freetype main include file ft2build.h.
52931  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52932    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52933    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52934    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52935      # Fail.
52936      FOUND_FREETYPE=no
52937    fi
52938  fi
52939
52940  if test "x$FOUND_FREETYPE" = xyes; then
52941    # Include file found, let's continue the sanity check.
52942    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52943$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52944
52945    # Reset to default value
52946    FREETYPE_BASE_NAME=freetype
52947    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52948    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52949      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52950          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52951        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52952        # for the .6 version explicitly.
52953        FREETYPE_BASE_NAME=freetype.6
52954        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52955        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52956$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52957      else
52958        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52959$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52960        FOUND_FREETYPE=no
52961      fi
52962    else
52963      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52964        # On Windows, we will need both .lib and .dll file.
52965        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52966          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52967$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52968          FOUND_FREETYPE=no
52969        fi
52970      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52971          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52972        # Found lib in isa dir, use that instead.
52973        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52974        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52975$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52976      fi
52977    fi
52978  fi
52979
52980  if test "x$FOUND_FREETYPE" = xyes; then
52981
52982  # Only process if variable expands to non-empty
52983
52984  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52986
52987  # Input might be given as Windows format, start by converting to
52988  # unix format.
52989  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52990  new_path=`$CYGPATH -u "$path"`
52991
52992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52995  # "foo.exe" is OK but "foo" is an error.
52996  #
52997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52998  # It is also a way to make sure we got the proper file name for the real test later on.
52999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53000  if test "x$test_shortpath" = x; then
53001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53002$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53003    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53004  fi
53005
53006  # Call helper function which possibly converts this using DOS-style short mode.
53007  # If so, the updated path is stored in $new_path.
53008
53009  input_path="$new_path"
53010  # Check if we need to convert this using DOS-style short mode. If the path
53011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53012  # take no chances and rewrite it.
53013  # Note: m4 eats our [], so we need to use [ and ] instead.
53014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53015  if test "x$has_forbidden_chars" != x; then
53016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53020      # Going to short mode and back again did indeed matter. Since short mode is
53021      # case insensitive, let's make it lowercase to improve readability.
53022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53023      # Now convert it back to Unix-style (cygpath)
53024      input_path=`$CYGPATH -u "$shortmode_path"`
53025      new_path="$input_path"
53026    fi
53027  fi
53028
53029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53030  if test "x$test_cygdrive_prefix" = x; then
53031    # As a simple fix, exclude /usr/bin since it's not a real path.
53032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53034      # a path prefixed by /cygdrive for fixpath to work.
53035      new_path="$CYGWIN_ROOT_PATH$input_path"
53036    fi
53037  fi
53038
53039
53040  if test "x$path" != "x$new_path"; then
53041    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53044  fi
53045
53046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53047
53048  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53049  has_colon=`$ECHO $path | $GREP ^.:`
53050  new_path="$path"
53051  if test "x$has_colon" = x; then
53052    # Not in mixed or Windows style, start by that.
53053    new_path=`cmd //c echo $path`
53054  fi
53055
53056
53057  input_path="$new_path"
53058  # Check if we need to convert this using DOS-style short mode. If the path
53059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53060  # take no chances and rewrite it.
53061  # Note: m4 eats our [], so we need to use [ and ] instead.
53062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53063  if test "x$has_forbidden_chars" != x; then
53064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53066  fi
53067
53068
53069  windows_path="$new_path"
53070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53071    unix_path=`$CYGPATH -u "$windows_path"`
53072    new_path="$unix_path"
53073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53075    new_path="$unix_path"
53076  fi
53077
53078  if test "x$path" != "x$new_path"; then
53079    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53081$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53082  fi
53083
53084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53086
53087    else
53088      # We're on a unix platform. Hooray! :)
53089      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53090      has_space=`$ECHO "$path" | $GREP " "`
53091      if test "x$has_space" != x; then
53092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53093$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53094        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53095      fi
53096
53097      # Use eval to expand a potential ~
53098      eval path="$path"
53099      if test ! -f "$path" && test ! -d "$path"; then
53100        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53101      fi
53102
53103      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53104    fi
53105  fi
53106
53107
53108  # Only process if variable expands to non-empty
53109
53110  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53112
53113  # Input might be given as Windows format, start by converting to
53114  # unix format.
53115  path="$POTENTIAL_FREETYPE_LIB_PATH"
53116  new_path=`$CYGPATH -u "$path"`
53117
53118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53121  # "foo.exe" is OK but "foo" is an error.
53122  #
53123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53124  # It is also a way to make sure we got the proper file name for the real test later on.
53125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53126  if test "x$test_shortpath" = x; then
53127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53129    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53130  fi
53131
53132  # Call helper function which possibly converts this using DOS-style short mode.
53133  # If so, the updated path is stored in $new_path.
53134
53135  input_path="$new_path"
53136  # Check if we need to convert this using DOS-style short mode. If the path
53137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53138  # take no chances and rewrite it.
53139  # Note: m4 eats our [], so we need to use [ and ] instead.
53140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53141  if test "x$has_forbidden_chars" != x; then
53142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53146      # Going to short mode and back again did indeed matter. Since short mode is
53147      # case insensitive, let's make it lowercase to improve readability.
53148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53149      # Now convert it back to Unix-style (cygpath)
53150      input_path=`$CYGPATH -u "$shortmode_path"`
53151      new_path="$input_path"
53152    fi
53153  fi
53154
53155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53156  if test "x$test_cygdrive_prefix" = x; then
53157    # As a simple fix, exclude /usr/bin since it's not a real path.
53158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53160      # a path prefixed by /cygdrive for fixpath to work.
53161      new_path="$CYGWIN_ROOT_PATH$input_path"
53162    fi
53163  fi
53164
53165
53166  if test "x$path" != "x$new_path"; then
53167    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53170  fi
53171
53172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53173
53174  path="$POTENTIAL_FREETYPE_LIB_PATH"
53175  has_colon=`$ECHO $path | $GREP ^.:`
53176  new_path="$path"
53177  if test "x$has_colon" = x; then
53178    # Not in mixed or Windows style, start by that.
53179    new_path=`cmd //c echo $path`
53180  fi
53181
53182
53183  input_path="$new_path"
53184  # Check if we need to convert this using DOS-style short mode. If the path
53185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53186  # take no chances and rewrite it.
53187  # Note: m4 eats our [], so we need to use [ and ] instead.
53188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53189  if test "x$has_forbidden_chars" != x; then
53190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53192  fi
53193
53194
53195  windows_path="$new_path"
53196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53197    unix_path=`$CYGPATH -u "$windows_path"`
53198    new_path="$unix_path"
53199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53201    new_path="$unix_path"
53202  fi
53203
53204  if test "x$path" != "x$new_path"; then
53205    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53208  fi
53209
53210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53212
53213    else
53214      # We're on a unix platform. Hooray! :)
53215      path="$POTENTIAL_FREETYPE_LIB_PATH"
53216      has_space=`$ECHO "$path" | $GREP " "`
53217      if test "x$has_space" != x; then
53218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53219$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53221      fi
53222
53223      # Use eval to expand a potential ~
53224      eval path="$path"
53225      if test ! -f "$path" && test ! -d "$path"; then
53226        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53227      fi
53228
53229      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53230    fi
53231  fi
53232
53233
53234    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53236$as_echo_n "checking for freetype includes... " >&6; }
53237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53238$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53239    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53241$as_echo_n "checking for freetype libraries... " >&6; }
53242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53243$as_echo "$FREETYPE_LIB_PATH" >&6; }
53244  fi
53245
53246              fi
53247            fi
53248          fi
53249        fi
53250      fi # end check in well-known locations
53251
53252      if test "x$FOUND_FREETYPE" != xyes; then
53253
53254  # Print a helpful message on how to acquire the necessary build dependency.
53255  # freetype is the help tag: freetype, cups, alsa etc
53256  MISSING_DEPENDENCY=freetype
53257
53258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53259    cygwin_help $MISSING_DEPENDENCY
53260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53261    msys_help $MISSING_DEPENDENCY
53262  else
53263    PKGHANDLER_COMMAND=
53264
53265    case $PKGHANDLER in
53266      apt-get)
53267        apt_help     $MISSING_DEPENDENCY ;;
53268      yum)
53269        yum_help     $MISSING_DEPENDENCY ;;
53270      port)
53271        port_help    $MISSING_DEPENDENCY ;;
53272      pkgutil)
53273        pkgutil_help $MISSING_DEPENDENCY ;;
53274      pkgadd)
53275        pkgadd_help  $MISSING_DEPENDENCY ;;
53276    esac
53277
53278    if test "x$PKGHANDLER_COMMAND" != x; then
53279      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53280    fi
53281  fi
53282
53283        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
53284      fi
53285    fi # end user specified settings
53286
53287    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
53288    if test "x$FREETYPE_CFLAGS" = x; then
53289
53290  # Only process if variable expands to non-empty
53291
53292  if test "x$FREETYPE_INCLUDE_PATH" != x; then
53293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53294
53295  # Input might be given as Windows format, start by converting to
53296  # unix format.
53297  path="$FREETYPE_INCLUDE_PATH"
53298  new_path=`$CYGPATH -u "$path"`
53299
53300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53303  # "foo.exe" is OK but "foo" is an error.
53304  #
53305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53306  # It is also a way to make sure we got the proper file name for the real test later on.
53307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53308  if test "x$test_shortpath" = x; then
53309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53310$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53311    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
53312  fi
53313
53314  # Call helper function which possibly converts this using DOS-style short mode.
53315  # If so, the updated path is stored in $new_path.
53316
53317  input_path="$new_path"
53318  # Check if we need to convert this using DOS-style short mode. If the path
53319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53320  # take no chances and rewrite it.
53321  # Note: m4 eats our [], so we need to use [ and ] instead.
53322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53323  if test "x$has_forbidden_chars" != x; then
53324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53328      # Going to short mode and back again did indeed matter. Since short mode is
53329      # case insensitive, let's make it lowercase to improve readability.
53330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53331      # Now convert it back to Unix-style (cygpath)
53332      input_path=`$CYGPATH -u "$shortmode_path"`
53333      new_path="$input_path"
53334    fi
53335  fi
53336
53337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53338  if test "x$test_cygdrive_prefix" = x; then
53339    # As a simple fix, exclude /usr/bin since it's not a real path.
53340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53342      # a path prefixed by /cygdrive for fixpath to work.
53343      new_path="$CYGWIN_ROOT_PATH$input_path"
53344    fi
53345  fi
53346
53347
53348  if test "x$path" != "x$new_path"; then
53349    FREETYPE_INCLUDE_PATH="$new_path"
53350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53351$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53352  fi
53353
53354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53355
53356  path="$FREETYPE_INCLUDE_PATH"
53357  has_colon=`$ECHO $path | $GREP ^.:`
53358  new_path="$path"
53359  if test "x$has_colon" = x; then
53360    # Not in mixed or Windows style, start by that.
53361    new_path=`cmd //c echo $path`
53362  fi
53363
53364
53365  input_path="$new_path"
53366  # Check if we need to convert this using DOS-style short mode. If the path
53367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53368  # take no chances and rewrite it.
53369  # Note: m4 eats our [], so we need to use [ and ] instead.
53370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53371  if test "x$has_forbidden_chars" != x; then
53372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53374  fi
53375
53376
53377  windows_path="$new_path"
53378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53379    unix_path=`$CYGPATH -u "$windows_path"`
53380    new_path="$unix_path"
53381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53383    new_path="$unix_path"
53384  fi
53385
53386  if test "x$path" != "x$new_path"; then
53387    FREETYPE_INCLUDE_PATH="$new_path"
53388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53389$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53390  fi
53391
53392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53394
53395    else
53396      # We're on a unix platform. Hooray! :)
53397      path="$FREETYPE_INCLUDE_PATH"
53398      has_space=`$ECHO "$path" | $GREP " "`
53399      if test "x$has_space" != x; then
53400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53401$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53403      fi
53404
53405      # Use eval to expand a potential ~
53406      eval path="$path"
53407      if test ! -f "$path" && test ! -d "$path"; then
53408        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53409      fi
53410
53411      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53412    fi
53413  fi
53414
53415      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53416        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53417      else
53418        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53419      fi
53420    fi
53421
53422    if test "x$FREETYPE_LIBS" = x; then
53423
53424  # Only process if variable expands to non-empty
53425
53426  if test "x$FREETYPE_LIB_PATH" != x; then
53427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53428
53429  # Input might be given as Windows format, start by converting to
53430  # unix format.
53431  path="$FREETYPE_LIB_PATH"
53432  new_path=`$CYGPATH -u "$path"`
53433
53434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53437  # "foo.exe" is OK but "foo" is an error.
53438  #
53439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53440  # It is also a way to make sure we got the proper file name for the real test later on.
53441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53442  if test "x$test_shortpath" = x; then
53443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53444$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53445    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53446  fi
53447
53448  # Call helper function which possibly converts this using DOS-style short mode.
53449  # If so, the updated path is stored in $new_path.
53450
53451  input_path="$new_path"
53452  # Check if we need to convert this using DOS-style short mode. If the path
53453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53454  # take no chances and rewrite it.
53455  # Note: m4 eats our [], so we need to use [ and ] instead.
53456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53457  if test "x$has_forbidden_chars" != x; then
53458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53462      # Going to short mode and back again did indeed matter. Since short mode is
53463      # case insensitive, let's make it lowercase to improve readability.
53464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53465      # Now convert it back to Unix-style (cygpath)
53466      input_path=`$CYGPATH -u "$shortmode_path"`
53467      new_path="$input_path"
53468    fi
53469  fi
53470
53471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53472  if test "x$test_cygdrive_prefix" = x; then
53473    # As a simple fix, exclude /usr/bin since it's not a real path.
53474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53476      # a path prefixed by /cygdrive for fixpath to work.
53477      new_path="$CYGWIN_ROOT_PATH$input_path"
53478    fi
53479  fi
53480
53481
53482  if test "x$path" != "x$new_path"; then
53483    FREETYPE_LIB_PATH="$new_path"
53484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53485$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53486  fi
53487
53488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53489
53490  path="$FREETYPE_LIB_PATH"
53491  has_colon=`$ECHO $path | $GREP ^.:`
53492  new_path="$path"
53493  if test "x$has_colon" = x; then
53494    # Not in mixed or Windows style, start by that.
53495    new_path=`cmd //c echo $path`
53496  fi
53497
53498
53499  input_path="$new_path"
53500  # Check if we need to convert this using DOS-style short mode. If the path
53501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53502  # take no chances and rewrite it.
53503  # Note: m4 eats our [], so we need to use [ and ] instead.
53504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53505  if test "x$has_forbidden_chars" != x; then
53506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53508  fi
53509
53510
53511  windows_path="$new_path"
53512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53513    unix_path=`$CYGPATH -u "$windows_path"`
53514    new_path="$unix_path"
53515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53517    new_path="$unix_path"
53518  fi
53519
53520  if test "x$path" != "x$new_path"; then
53521    FREETYPE_LIB_PATH="$new_path"
53522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53523$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53524  fi
53525
53526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53528
53529    else
53530      # We're on a unix platform. Hooray! :)
53531      path="$FREETYPE_LIB_PATH"
53532      has_space=`$ECHO "$path" | $GREP " "`
53533      if test "x$has_space" != x; then
53534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53535$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53537      fi
53538
53539      # Use eval to expand a potential ~
53540      eval path="$path"
53541      if test ! -f "$path" && test ! -d "$path"; then
53542        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53543      fi
53544
53545      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53546    fi
53547  fi
53548
53549      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53550        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53551      else
53552        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53553      fi
53554    fi
53555
53556    # Try to compile it
53557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53558$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53559    ac_ext=cpp
53560ac_cpp='$CXXCPP $CPPFLAGS'
53561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53564
53565    PREV_CXXCFLAGS="$CXXFLAGS"
53566    PREV_LIBS="$LIBS"
53567    PREV_CXX="$CXX"
53568    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53569    LIBS="$LIBS $FREETYPE_LIBS"
53570    CXX="$FIXPATH $CXX"
53571    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53572/* end confdefs.h.  */
53573
53574          #include<ft2build.h>
53575          #include FT_FREETYPE_H
53576          int main () {
53577            FT_Init_FreeType(NULL);
53578            return 0;
53579          }
53580
53581_ACEOF
53582if ac_fn_cxx_try_link "$LINENO"; then :
53583
53584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53585$as_echo "yes" >&6; }
53586
53587else
53588
53589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53590$as_echo "no" >&6; }
53591          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53592$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53593          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53594$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53595
53596
53597  # Print a helpful message on how to acquire the necessary build dependency.
53598  # freetype is the help tag: freetype, cups, alsa etc
53599  MISSING_DEPENDENCY=freetype
53600
53601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53602    cygwin_help $MISSING_DEPENDENCY
53603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53604    msys_help $MISSING_DEPENDENCY
53605  else
53606    PKGHANDLER_COMMAND=
53607
53608    case $PKGHANDLER in
53609      apt-get)
53610        apt_help     $MISSING_DEPENDENCY ;;
53611      yum)
53612        yum_help     $MISSING_DEPENDENCY ;;
53613      port)
53614        port_help    $MISSING_DEPENDENCY ;;
53615      pkgutil)
53616        pkgutil_help $MISSING_DEPENDENCY ;;
53617      pkgadd)
53618        pkgadd_help  $MISSING_DEPENDENCY ;;
53619    esac
53620
53621    if test "x$PKGHANDLER_COMMAND" != x; then
53622      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53623    fi
53624  fi
53625
53626
53627          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53628
53629
53630fi
53631rm -f core conftest.err conftest.$ac_objext \
53632    conftest$ac_exeext conftest.$ac_ext
53633    CXXCFLAGS="$PREV_CXXFLAGS"
53634    LIBS="$PREV_LIBS"
53635    CXX="$PREV_CXX"
53636    ac_ext=cpp
53637ac_cpp='$CXXCPP $CPPFLAGS'
53638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53641
53642
53643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53644$as_echo_n "checking if we should bundle freetype... " >&6; }
53645    if test "x$BUNDLE_FREETYPE" = xyes; then
53646      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53647    fi
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53649$as_echo "$BUNDLE_FREETYPE" >&6; }
53650
53651  fi # end freetype needed
53652
53653
53654
53655
53656
53657
53658
53659# Check whether --with-alsa was given.
53660if test "${with_alsa+set}" = set; then :
53661  withval=$with_alsa;
53662fi
53663
53664
53665# Check whether --with-alsa-include was given.
53666if test "${with_alsa_include+set}" = set; then :
53667  withval=$with_alsa_include;
53668fi
53669
53670
53671# Check whether --with-alsa-lib was given.
53672if test "${with_alsa_lib+set}" = set; then :
53673  withval=$with_alsa_lib;
53674fi
53675
53676
53677  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53678    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53679        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53680        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53681      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53682$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53683    fi
53684    ALSA_CFLAGS=
53685    ALSA_LIBS=
53686  else
53687    ALSA_FOUND=no
53688
53689    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53690      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53691    fi
53692
53693    if test "x${with_alsa}" != x; then
53694      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53695      ALSA_CFLAGS="-I${with_alsa}/include"
53696      ALSA_FOUND=yes
53697    fi
53698    if test "x${with_alsa_include}" != x; then
53699      ALSA_CFLAGS="-I${with_alsa_include}"
53700      ALSA_FOUND=yes
53701    fi
53702    if test "x${with_alsa_lib}" != x; then
53703      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53704      ALSA_FOUND=yes
53705    fi
53706    # Do not try pkg-config if we have a sysroot set.
53707    if test "x$SYSROOT" = x; then
53708      if test "x$ALSA_FOUND" = xno; then
53709
53710pkg_failed=no
53711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53712$as_echo_n "checking for ALSA... " >&6; }
53713
53714if test -n "$ALSA_CFLAGS"; then
53715    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53716 elif test -n "$PKG_CONFIG"; then
53717    if test -n "$PKG_CONFIG" && \
53718    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53719  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53720  ac_status=$?
53721  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53722  test $ac_status = 0; }; then
53723  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53724else
53725  pkg_failed=yes
53726fi
53727 else
53728    pkg_failed=untried
53729fi
53730if test -n "$ALSA_LIBS"; then
53731    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53732 elif test -n "$PKG_CONFIG"; then
53733    if test -n "$PKG_CONFIG" && \
53734    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53735  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53736  ac_status=$?
53737  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53738  test $ac_status = 0; }; then
53739  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53740else
53741  pkg_failed=yes
53742fi
53743 else
53744    pkg_failed=untried
53745fi
53746
53747
53748
53749if test $pkg_failed = yes; then
53750
53751if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53752        _pkg_short_errors_supported=yes
53753else
53754        _pkg_short_errors_supported=no
53755fi
53756        if test $_pkg_short_errors_supported = yes; then
53757	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53758        else
53759	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53760        fi
53761	# Put the nasty error message in config.log where it belongs
53762	echo "$ALSA_PKG_ERRORS" >&5
53763
53764	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53765$as_echo "no" >&6; }
53766                ALSA_FOUND=no
53767elif test $pkg_failed = untried; then
53768	ALSA_FOUND=no
53769else
53770	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53771	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53773$as_echo "yes" >&6; }
53774	ALSA_FOUND=yes
53775fi
53776      fi
53777    fi
53778    if test "x$ALSA_FOUND" = xno; then
53779      for ac_header in alsa/asoundlib.h
53780do :
53781  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53782if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53783  cat >>confdefs.h <<_ACEOF
53784#define HAVE_ALSA_ASOUNDLIB_H 1
53785_ACEOF
53786
53787            ALSA_FOUND=yes
53788            ALSA_CFLAGS=-Iignoreme
53789            ALSA_LIBS=-lasound
53790            DEFAULT_ALSA=yes
53791
53792else
53793  ALSA_FOUND=no
53794
53795fi
53796
53797done
53798
53799    fi
53800    if test "x$ALSA_FOUND" = xno; then
53801
53802  # Print a helpful message on how to acquire the necessary build dependency.
53803  # alsa is the help tag: freetype, cups, alsa etc
53804  MISSING_DEPENDENCY=alsa
53805
53806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53807    cygwin_help $MISSING_DEPENDENCY
53808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53809    msys_help $MISSING_DEPENDENCY
53810  else
53811    PKGHANDLER_COMMAND=
53812
53813    case $PKGHANDLER in
53814      apt-get)
53815        apt_help     $MISSING_DEPENDENCY ;;
53816      yum)
53817        yum_help     $MISSING_DEPENDENCY ;;
53818      port)
53819        port_help    $MISSING_DEPENDENCY ;;
53820      pkgutil)
53821        pkgutil_help $MISSING_DEPENDENCY ;;
53822      pkgadd)
53823        pkgadd_help  $MISSING_DEPENDENCY ;;
53824    esac
53825
53826    if test "x$PKGHANDLER_COMMAND" != x; then
53827      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53828    fi
53829  fi
53830
53831      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53832    fi
53833  fi
53834
53835
53836
53837
53838
53839
53840# Check whether --with-libffi was given.
53841if test "${with_libffi+set}" = set; then :
53842  withval=$with_libffi;
53843fi
53844
53845
53846# Check whether --with-libffi-include was given.
53847if test "${with_libffi_include+set}" = set; then :
53848  withval=$with_libffi_include;
53849fi
53850
53851
53852# Check whether --with-libffi-lib was given.
53853if test "${with_libffi_lib+set}" = set; then :
53854  withval=$with_libffi_lib;
53855fi
53856
53857
53858  if test "x$NEEDS_LIB_FFI" = xfalse; then
53859    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53860        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53861        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53862      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53863$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53864    fi
53865    LIBFFI_CFLAGS=
53866    LIBFFI_LIBS=
53867  else
53868    LIBFFI_FOUND=no
53869
53870    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53871      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53872    fi
53873
53874    if test "x${with_libffi}" != x; then
53875      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53876      LIBFFI_CFLAGS="-I${with_libffi}/include"
53877      LIBFFI_FOUND=yes
53878    fi
53879    if test "x${with_libffi_include}" != x; then
53880      LIBFFI_CFLAGS="-I${with_libffi_include}"
53881      LIBFFI_FOUND=yes
53882    fi
53883    if test "x${with_libffi_lib}" != x; then
53884      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53885      LIBFFI_FOUND=yes
53886    fi
53887    # Do not try pkg-config if we have a sysroot set.
53888    if test "x$SYSROOT" = x; then
53889      if test "x$LIBFFI_FOUND" = xno; then
53890        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53891
53892pkg_failed=no
53893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53894$as_echo_n "checking for LIBFFI... " >&6; }
53895
53896if test -n "$LIBFFI_CFLAGS"; then
53897    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53898 elif test -n "$PKG_CONFIG"; then
53899    if test -n "$PKG_CONFIG" && \
53900    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53901  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53902  ac_status=$?
53903  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53904  test $ac_status = 0; }; then
53905  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53906else
53907  pkg_failed=yes
53908fi
53909 else
53910    pkg_failed=untried
53911fi
53912if test -n "$LIBFFI_LIBS"; then
53913    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53914 elif test -n "$PKG_CONFIG"; then
53915    if test -n "$PKG_CONFIG" && \
53916    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53917  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53918  ac_status=$?
53919  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53920  test $ac_status = 0; }; then
53921  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53922else
53923  pkg_failed=yes
53924fi
53925 else
53926    pkg_failed=untried
53927fi
53928
53929
53930
53931if test $pkg_failed = yes; then
53932
53933if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53934        _pkg_short_errors_supported=yes
53935else
53936        _pkg_short_errors_supported=no
53937fi
53938        if test $_pkg_short_errors_supported = yes; then
53939	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53940        else
53941	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53942        fi
53943	# Put the nasty error message in config.log where it belongs
53944	echo "$LIBFFI_PKG_ERRORS" >&5
53945
53946	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53947$as_echo "no" >&6; }
53948                LIBFFI_FOUND=no
53949elif test $pkg_failed = untried; then
53950	LIBFFI_FOUND=no
53951else
53952	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53953	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53955$as_echo "yes" >&6; }
53956	LIBFFI_FOUND=yes
53957fi
53958      fi
53959    fi
53960    if test "x$LIBFFI_FOUND" = xno; then
53961      for ac_header in ffi.h
53962do :
53963  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53964if test "x$ac_cv_header_ffi_h" = xyes; then :
53965  cat >>confdefs.h <<_ACEOF
53966#define HAVE_FFI_H 1
53967_ACEOF
53968
53969            LIBFFI_FOUND=yes
53970            LIBFFI_CFLAGS=
53971            LIBFFI_LIBS=-lffi
53972
53973else
53974  LIBFFI_FOUND=no
53975
53976fi
53977
53978done
53979
53980    fi
53981    if test "x$LIBFFI_FOUND" = xno; then
53982
53983  # Print a helpful message on how to acquire the necessary build dependency.
53984  # ffi is the help tag: freetype, cups, alsa etc
53985  MISSING_DEPENDENCY=ffi
53986
53987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53988    cygwin_help $MISSING_DEPENDENCY
53989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53990    msys_help $MISSING_DEPENDENCY
53991  else
53992    PKGHANDLER_COMMAND=
53993
53994    case $PKGHANDLER in
53995      apt-get)
53996        apt_help     $MISSING_DEPENDENCY ;;
53997      yum)
53998        yum_help     $MISSING_DEPENDENCY ;;
53999      port)
54000        port_help    $MISSING_DEPENDENCY ;;
54001      pkgutil)
54002        pkgutil_help $MISSING_DEPENDENCY ;;
54003      pkgadd)
54004        pkgadd_help  $MISSING_DEPENDENCY ;;
54005    esac
54006
54007    if test "x$PKGHANDLER_COMMAND" != x; then
54008      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54009    fi
54010  fi
54011
54012      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
54013    fi
54014
54015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
54016$as_echo_n "checking if libffi works... " >&6; }
54017    ac_ext=c
54018ac_cpp='$CPP $CPPFLAGS'
54019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54021ac_compiler_gnu=$ac_cv_c_compiler_gnu
54022
54023    OLD_CFLAGS="$CFLAGS"
54024    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
54025    OLD_LIBS="$LIBS"
54026    LIBS="$LIBS $LIBFFI_LIBS"
54027    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54028/* end confdefs.h.  */
54029#include <ffi.h>
54030int
54031main ()
54032{
54033
54034          ffi_call(NULL, NULL, NULL, NULL);
54035          return 0;
54036
54037  ;
54038  return 0;
54039}
54040_ACEOF
54041if ac_fn_c_try_link "$LINENO"; then :
54042  LIBFFI_WORKS=yes
54043else
54044  LIBFFI_WORKS=no
54045
54046fi
54047rm -f core conftest.err conftest.$ac_objext \
54048    conftest$ac_exeext conftest.$ac_ext
54049    CFLAGS="$OLD_CFLAGS"
54050    LIBS="$OLD_LIBS"
54051    ac_ext=cpp
54052ac_cpp='$CXXCPP $CPPFLAGS'
54053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54056
54057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
54058$as_echo "$LIBFFI_WORKS" >&6; }
54059
54060    if test "x$LIBFFI_WORKS" = xno; then
54061
54062  # Print a helpful message on how to acquire the necessary build dependency.
54063  # ffi is the help tag: freetype, cups, alsa etc
54064  MISSING_DEPENDENCY=ffi
54065
54066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54067    cygwin_help $MISSING_DEPENDENCY
54068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54069    msys_help $MISSING_DEPENDENCY
54070  else
54071    PKGHANDLER_COMMAND=
54072
54073    case $PKGHANDLER in
54074      apt-get)
54075        apt_help     $MISSING_DEPENDENCY ;;
54076      yum)
54077        yum_help     $MISSING_DEPENDENCY ;;
54078      port)
54079        port_help    $MISSING_DEPENDENCY ;;
54080      pkgutil)
54081        pkgutil_help $MISSING_DEPENDENCY ;;
54082      pkgadd)
54083        pkgadd_help  $MISSING_DEPENDENCY ;;
54084    esac
54085
54086    if test "x$PKGHANDLER_COMMAND" != x; then
54087      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54088    fi
54089  fi
54090
54091      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
54092    fi
54093  fi
54094
54095
54096
54097
54098
54099  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
54100    # Extract the first word of "llvm-config", so it can be a program name with args.
54101set dummy llvm-config; ac_word=$2
54102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54103$as_echo_n "checking for $ac_word... " >&6; }
54104if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
54105  $as_echo_n "(cached) " >&6
54106else
54107  if test -n "$LLVM_CONFIG"; then
54108  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
54109else
54110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54111for as_dir in $PATH
54112do
54113  IFS=$as_save_IFS
54114  test -z "$as_dir" && as_dir=.
54115    for ac_exec_ext in '' $ac_executable_extensions; do
54116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
54117    ac_cv_prog_LLVM_CONFIG="llvm-config"
54118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
54119    break 2
54120  fi
54121done
54122  done
54123IFS=$as_save_IFS
54124
54125fi
54126fi
54127LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
54128if test -n "$LLVM_CONFIG"; then
54129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
54130$as_echo "$LLVM_CONFIG" >&6; }
54131else
54132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54133$as_echo "no" >&6; }
54134fi
54135
54136
54137
54138    if test "x$LLVM_CONFIG" != xllvm-config; then
54139      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
54140    fi
54141
54142    llvm_components="jit mcjit engine nativecodegen native"
54143    unset LLVM_CFLAGS
54144    for flag in $("$LLVM_CONFIG" --cxxflags); do
54145      if echo "${flag}" | grep -q '^-[ID]'; then
54146        if test "${flag}" != "-D_DEBUG" ; then
54147          if test "${LLVM_CFLAGS}" != "" ; then
54148            LLVM_CFLAGS="${LLVM_CFLAGS} "
54149          fi
54150          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
54151        fi
54152      fi
54153    done
54154    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
54155    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
54156
54157    unset LLVM_LDFLAGS
54158    for flag in $("${LLVM_CONFIG}" --ldflags); do
54159      if echo "${flag}" | grep -q '^-L'; then
54160        if test "${LLVM_LDFLAGS}" != ""; then
54161          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
54162        fi
54163        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
54164      fi
54165    done
54166
54167    unset LLVM_LIBS
54168    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
54169      if echo "${flag}" | grep -q '^-l'; then
54170        if test "${LLVM_LIBS}" != ""; then
54171          LLVM_LIBS="${LLVM_LIBS} "
54172        fi
54173        LLVM_LIBS="${LLVM_LIBS}${flag}"
54174      fi
54175    done
54176
54177
54178
54179
54180  fi
54181
54182
54183
54184# Check whether --with-libjpeg was given.
54185if test "${with_libjpeg+set}" = set; then :
54186  withval=$with_libjpeg;
54187fi
54188
54189
54190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
54191$as_echo_n "checking for which libjpeg to use... " >&6; }
54192  # default is bundled
54193  DEFAULT_LIBJPEG=bundled
54194  # if user didn't specify, use DEFAULT_LIBJPEG
54195  if test "x${with_libjpeg}" = "x"; then
54196    with_libjpeg=${DEFAULT_LIBJPEG}
54197  fi
54198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
54199$as_echo "${with_libjpeg}" >&6; }
54200
54201  if test "x${with_libjpeg}" = "xbundled"; then
54202    USE_EXTERNAL_LIBJPEG=false
54203  elif test "x${with_libjpeg}" = "xsystem"; then
54204    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
54205if test "x$ac_cv_header_jpeglib_h" = xyes; then :
54206
54207else
54208   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
54209fi
54210
54211
54212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
54213$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
54214if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
54215  $as_echo_n "(cached) " >&6
54216else
54217  ac_check_lib_save_LIBS=$LIBS
54218LIBS="-ljpeg  $LIBS"
54219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54220/* end confdefs.h.  */
54221
54222/* Override any GCC internal prototype to avoid an error.
54223   Use char because int might match the return type of a GCC
54224   builtin and then its argument prototype would still apply.  */
54225#ifdef __cplusplus
54226extern "C"
54227#endif
54228char jpeg_CreateDecompress ();
54229int
54230main ()
54231{
54232return jpeg_CreateDecompress ();
54233  ;
54234  return 0;
54235}
54236_ACEOF
54237if ac_fn_cxx_try_link "$LINENO"; then :
54238  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
54239else
54240  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
54241fi
54242rm -f core conftest.err conftest.$ac_objext \
54243    conftest$ac_exeext conftest.$ac_ext
54244LIBS=$ac_check_lib_save_LIBS
54245fi
54246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
54247$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
54248if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
54249  cat >>confdefs.h <<_ACEOF
54250#define HAVE_LIBJPEG 1
54251_ACEOF
54252
54253  LIBS="-ljpeg $LIBS"
54254
54255else
54256   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
54257fi
54258
54259
54260    USE_EXTERNAL_LIBJPEG=true
54261  else
54262    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
54263  fi
54264
54265
54266
54267
54268
54269# Check whether --with-giflib was given.
54270if test "${with_giflib+set}" = set; then :
54271  withval=$with_giflib;
54272fi
54273
54274
54275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
54276$as_echo_n "checking for which giflib to use... " >&6; }
54277  # default is bundled
54278  DEFAULT_GIFLIB=bundled
54279  # if user didn't specify, use DEFAULT_GIFLIB
54280  if test "x${with_giflib}" = "x"; then
54281    with_giflib=${DEFAULT_GIFLIB}
54282  fi
54283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
54284$as_echo "${with_giflib}" >&6; }
54285
54286  if test "x${with_giflib}" = "xbundled"; then
54287    USE_EXTERNAL_LIBGIF=false
54288  elif test "x${with_giflib}" = "xsystem"; then
54289    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
54290if test "x$ac_cv_header_gif_lib_h" = xyes; then :
54291
54292else
54293   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
54294fi
54295
54296
54297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
54298$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
54299if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
54300  $as_echo_n "(cached) " >&6
54301else
54302  ac_check_lib_save_LIBS=$LIBS
54303LIBS="-lgif  $LIBS"
54304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54305/* end confdefs.h.  */
54306
54307/* Override any GCC internal prototype to avoid an error.
54308   Use char because int might match the return type of a GCC
54309   builtin and then its argument prototype would still apply.  */
54310#ifdef __cplusplus
54311extern "C"
54312#endif
54313char DGifGetCode ();
54314int
54315main ()
54316{
54317return DGifGetCode ();
54318  ;
54319  return 0;
54320}
54321_ACEOF
54322if ac_fn_cxx_try_link "$LINENO"; then :
54323  ac_cv_lib_gif_DGifGetCode=yes
54324else
54325  ac_cv_lib_gif_DGifGetCode=no
54326fi
54327rm -f core conftest.err conftest.$ac_objext \
54328    conftest$ac_exeext conftest.$ac_ext
54329LIBS=$ac_check_lib_save_LIBS
54330fi
54331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54332$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54333if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54334  cat >>confdefs.h <<_ACEOF
54335#define HAVE_LIBGIF 1
54336_ACEOF
54337
54338  LIBS="-lgif $LIBS"
54339
54340else
54341   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54342fi
54343
54344
54345    USE_EXTERNAL_LIBGIF=true
54346  else
54347    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54348  fi
54349
54350
54351
54352
54353
54354# Check whether --with-libpng was given.
54355if test "${with_libpng+set}" = set; then :
54356  withval=$with_libpng;
54357fi
54358
54359
54360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54361$as_echo_n "checking for which libpng to use... " >&6; }
54362
54363  # default is bundled
54364  DEFAULT_LIBPNG=bundled
54365  # if user didn't specify, use DEFAULT_LIBPNG
54366  if test "x${with_libpng}" = "x"; then
54367      with_libpng=${DEFAULT_LIBPNG}
54368  fi
54369
54370  if test "x${with_libpng}" = "xbundled"; then
54371      USE_EXTERNAL_LIBPNG=false
54372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54373$as_echo "bundled" >&6; }
54374  elif test "x${with_libpng}" = "xsystem"; then
54375
54376pkg_failed=no
54377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54378$as_echo_n "checking for PNG... " >&6; }
54379
54380if test -n "$PNG_CFLAGS"; then
54381    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54382 elif test -n "$PKG_CONFIG"; then
54383    if test -n "$PKG_CONFIG" && \
54384    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54385  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54386  ac_status=$?
54387  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54388  test $ac_status = 0; }; then
54389  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54390else
54391  pkg_failed=yes
54392fi
54393 else
54394    pkg_failed=untried
54395fi
54396if test -n "$PNG_LIBS"; then
54397    pkg_cv_PNG_LIBS="$PNG_LIBS"
54398 elif test -n "$PKG_CONFIG"; then
54399    if test -n "$PKG_CONFIG" && \
54400    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54401  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54402  ac_status=$?
54403  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54404  test $ac_status = 0; }; then
54405  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54406else
54407  pkg_failed=yes
54408fi
54409 else
54410    pkg_failed=untried
54411fi
54412
54413
54414
54415if test $pkg_failed = yes; then
54416
54417if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54418        _pkg_short_errors_supported=yes
54419else
54420        _pkg_short_errors_supported=no
54421fi
54422        if test $_pkg_short_errors_supported = yes; then
54423	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54424        else
54425	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54426        fi
54427	# Put the nasty error message in config.log where it belongs
54428	echo "$PNG_PKG_ERRORS" >&5
54429
54430	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54431$as_echo "no" >&6; }
54432                 LIBPNG_FOUND=no
54433elif test $pkg_failed = untried; then
54434	 LIBPNG_FOUND=no
54435else
54436	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54437	PNG_LIBS=$pkg_cv_PNG_LIBS
54438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54439$as_echo "yes" >&6; }
54440	 LIBPNG_FOUND=yes
54441fi
54442      if test "x${LIBPNG_FOUND}" = "xyes"; then
54443          USE_EXTERNAL_LIBPNG=true
54444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54445$as_echo "system" >&6; }
54446      else
54447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54448$as_echo "system not found" >&6; }
54449          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54450      fi
54451  else
54452      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54453  fi
54454
54455
54456
54457
54458
54459# Check whether --with-zlib was given.
54460if test "${with_zlib+set}" = set; then :
54461  withval=$with_zlib;
54462fi
54463
54464
54465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54466$as_echo_n "checking for compress in -lz... " >&6; }
54467if ${ac_cv_lib_z_compress+:} false; then :
54468  $as_echo_n "(cached) " >&6
54469else
54470  ac_check_lib_save_LIBS=$LIBS
54471LIBS="-lz  $LIBS"
54472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54473/* end confdefs.h.  */
54474
54475/* Override any GCC internal prototype to avoid an error.
54476   Use char because int might match the return type of a GCC
54477   builtin and then its argument prototype would still apply.  */
54478#ifdef __cplusplus
54479extern "C"
54480#endif
54481char compress ();
54482int
54483main ()
54484{
54485return compress ();
54486  ;
54487  return 0;
54488}
54489_ACEOF
54490if ac_fn_cxx_try_link "$LINENO"; then :
54491  ac_cv_lib_z_compress=yes
54492else
54493  ac_cv_lib_z_compress=no
54494fi
54495rm -f core conftest.err conftest.$ac_objext \
54496    conftest$ac_exeext conftest.$ac_ext
54497LIBS=$ac_check_lib_save_LIBS
54498fi
54499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54500$as_echo "$ac_cv_lib_z_compress" >&6; }
54501if test "x$ac_cv_lib_z_compress" = xyes; then :
54502   ZLIB_FOUND=yes
54503else
54504   ZLIB_FOUND=no
54505fi
54506
54507
54508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54509$as_echo_n "checking for which zlib to use... " >&6; }
54510
54511  DEFAULT_ZLIB=bundled
54512  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54513    # On macosx default is system...on others default is bundled
54514    DEFAULT_ZLIB=system
54515  fi
54516
54517  if test "x${ZLIB_FOUND}" != "xyes"; then
54518    # If we don't find any system...set default to bundled
54519    DEFAULT_ZLIB=bundled
54520  fi
54521
54522  # If user didn't specify, use DEFAULT_ZLIB
54523  if test "x${with_zlib}" = "x"; then
54524    with_zlib=${DEFAULT_ZLIB}
54525  fi
54526
54527  if test "x${with_zlib}" = "xbundled"; then
54528    USE_EXTERNAL_LIBZ=false
54529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54530$as_echo "bundled" >&6; }
54531  elif test "x${with_zlib}" = "xsystem"; then
54532    if test "x${ZLIB_FOUND}" = "xyes"; then
54533      USE_EXTERNAL_LIBZ=true
54534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54535$as_echo "system" >&6; }
54536    else
54537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54538$as_echo "system not found" >&6; }
54539      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54540    fi
54541  else
54542    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54543  fi
54544
54545
54546
54547
54548
54549# Check whether --with-lcms was given.
54550if test "${with_lcms+set}" = set; then :
54551  withval=$with_lcms;
54552fi
54553
54554
54555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54556$as_echo_n "checking for which lcms to use... " >&6; }
54557
54558  DEFAULT_LCMS=bundled
54559  # If user didn't specify, use DEFAULT_LCMS
54560  if test "x${with_lcms}" = "x"; then
54561      with_lcms=${DEFAULT_LCMS}
54562  fi
54563
54564  if test "x${with_lcms}" = "xbundled"; then
54565    USE_EXTERNAL_LCMS=false
54566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54567$as_echo "bundled" >&6; }
54568  elif test "x${with_lcms}" = "xsystem"; then
54569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54570$as_echo "system" >&6; }
54571
54572pkg_failed=no
54573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54574$as_echo_n "checking for LCMS... " >&6; }
54575
54576if test -n "$LCMS_CFLAGS"; then
54577    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54578 elif test -n "$PKG_CONFIG"; then
54579    if test -n "$PKG_CONFIG" && \
54580    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54581  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54582  ac_status=$?
54583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54584  test $ac_status = 0; }; then
54585  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54586else
54587  pkg_failed=yes
54588fi
54589 else
54590    pkg_failed=untried
54591fi
54592if test -n "$LCMS_LIBS"; then
54593    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54594 elif test -n "$PKG_CONFIG"; then
54595    if test -n "$PKG_CONFIG" && \
54596    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54597  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54598  ac_status=$?
54599  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54600  test $ac_status = 0; }; then
54601  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54602else
54603  pkg_failed=yes
54604fi
54605 else
54606    pkg_failed=untried
54607fi
54608
54609
54610
54611if test $pkg_failed = yes; then
54612
54613if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54614        _pkg_short_errors_supported=yes
54615else
54616        _pkg_short_errors_supported=no
54617fi
54618        if test $_pkg_short_errors_supported = yes; then
54619	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54620        else
54621	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54622        fi
54623	# Put the nasty error message in config.log where it belongs
54624	echo "$LCMS_PKG_ERRORS" >&5
54625
54626	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54627$as_echo "no" >&6; }
54628                LCMS_FOUND=no
54629elif test $pkg_failed = untried; then
54630	LCMS_FOUND=no
54631else
54632	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54633	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54635$as_echo "yes" >&6; }
54636	LCMS_FOUND=yes
54637fi
54638    if test "x${LCMS_FOUND}" = "xyes"; then
54639      USE_EXTERNAL_LCMS=true
54640    else
54641      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54642    fi
54643  else
54644    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54645  fi
54646
54647
54648
54649
54650
54651
54652
54653
54654
54655
54656
54657  # Setup libm (the maths library)
54658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54659$as_echo_n "checking for cos in -lm... " >&6; }
54660if ${ac_cv_lib_m_cos+:} false; then :
54661  $as_echo_n "(cached) " >&6
54662else
54663  ac_check_lib_save_LIBS=$LIBS
54664LIBS="-lm  $LIBS"
54665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54666/* end confdefs.h.  */
54667
54668/* Override any GCC internal prototype to avoid an error.
54669   Use char because int might match the return type of a GCC
54670   builtin and then its argument prototype would still apply.  */
54671#ifdef __cplusplus
54672extern "C"
54673#endif
54674char cos ();
54675int
54676main ()
54677{
54678return cos ();
54679  ;
54680  return 0;
54681}
54682_ACEOF
54683if ac_fn_cxx_try_link "$LINENO"; then :
54684  ac_cv_lib_m_cos=yes
54685else
54686  ac_cv_lib_m_cos=no
54687fi
54688rm -f core conftest.err conftest.$ac_objext \
54689    conftest$ac_exeext conftest.$ac_ext
54690LIBS=$ac_check_lib_save_LIBS
54691fi
54692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54693$as_echo "$ac_cv_lib_m_cos" >&6; }
54694if test "x$ac_cv_lib_m_cos" = xyes; then :
54695  cat >>confdefs.h <<_ACEOF
54696#define HAVE_LIBM 1
54697_ACEOF
54698
54699  LIBS="-lm $LIBS"
54700
54701else
54702
54703      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54704$as_echo "$as_me: Maths library was not found" >&6;}
54705
54706fi
54707
54708  LIBM=-lm
54709
54710
54711  # Setup libdl (for dynamic library loading)
54712  save_LIBS="$LIBS"
54713  LIBS=""
54714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54715$as_echo_n "checking for dlopen in -ldl... " >&6; }
54716if ${ac_cv_lib_dl_dlopen+:} false; then :
54717  $as_echo_n "(cached) " >&6
54718else
54719  ac_check_lib_save_LIBS=$LIBS
54720LIBS="-ldl  $LIBS"
54721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54722/* end confdefs.h.  */
54723
54724/* Override any GCC internal prototype to avoid an error.
54725   Use char because int might match the return type of a GCC
54726   builtin and then its argument prototype would still apply.  */
54727#ifdef __cplusplus
54728extern "C"
54729#endif
54730char dlopen ();
54731int
54732main ()
54733{
54734return dlopen ();
54735  ;
54736  return 0;
54737}
54738_ACEOF
54739if ac_fn_cxx_try_link "$LINENO"; then :
54740  ac_cv_lib_dl_dlopen=yes
54741else
54742  ac_cv_lib_dl_dlopen=no
54743fi
54744rm -f core conftest.err conftest.$ac_objext \
54745    conftest$ac_exeext conftest.$ac_ext
54746LIBS=$ac_check_lib_save_LIBS
54747fi
54748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54749$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54750if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54751  cat >>confdefs.h <<_ACEOF
54752#define HAVE_LIBDL 1
54753_ACEOF
54754
54755  LIBS="-ldl $LIBS"
54756
54757fi
54758
54759  LIBDL="$LIBS"
54760
54761  LIBS="$save_LIBS"
54762
54763  # Deprecated libraries, keep the flags for backwards compatibility
54764  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54765
54766
54767# Check whether --with-dxsdk was given.
54768if test "${with_dxsdk+set}" = set; then :
54769  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54770$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54771fi
54772
54773
54774
54775
54776# Check whether --with-dxsdk-lib was given.
54777if test "${with_dxsdk_lib+set}" = set; then :
54778  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54779$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54780fi
54781
54782
54783
54784
54785# Check whether --with-dxsdk-include was given.
54786if test "${with_dxsdk_include+set}" = set; then :
54787  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54788$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54789fi
54790
54791
54792  fi
54793
54794  # Control if libzip can use mmap. Available for purposes of overriding.
54795  LIBZIP_CAN_USE_MMAP=true
54796
54797
54798
54799
54800
54801
54802
54803
54804
54805
54806
54807
54808
54809
54810###############################################################################
54811#
54812# We need to do some final tweaking, when everything else is done.
54813#
54814###############################################################################
54815
54816
54817  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54818
54819
54820  # The name of the Service Agent jar.
54821  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54822  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54823    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54824  fi
54825
54826
54827
54828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54829$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54830
54831  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54832    ENABLE_INTREE_EC=yes
54833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54834$as_echo "yes" >&6; }
54835  else
54836    ENABLE_INTREE_EC=no
54837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54838$as_echo "no" >&6; }
54839  fi
54840
54841
54842
54843
54844###############################################################################
54845#
54846# Configure parts of the build that only affect the build performance,
54847# not the result.
54848#
54849###############################################################################
54850
54851
54852  # How many cores do we have on this build system?
54853
54854# Check whether --with-num-cores was given.
54855if test "${with_num_cores+set}" = set; then :
54856  withval=$with_num_cores;
54857fi
54858
54859  if test "x$with_num_cores" = x; then
54860    # The number of cores were not specified, try to probe them.
54861
54862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54863$as_echo_n "checking for number of cores... " >&6; }
54864  NUM_CORES=1
54865  FOUND_CORES=no
54866
54867  if test -f /proc/cpuinfo; then
54868    # Looks like a Linux (or cygwin) system
54869    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54870    FOUND_CORES=yes
54871  elif test -x /usr/sbin/psrinfo; then
54872    # Looks like a Solaris system
54873    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54874    FOUND_CORES=yes
54875  elif test -x /usr/sbin/system_profiler; then
54876    # Looks like a MacOSX system
54877    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54878    FOUND_CORES=yes
54879  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54880    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54881    FOUND_CORES=yes
54882  elif test -n "$NUMBER_OF_PROCESSORS"; then
54883    # On windows, look in the env
54884    NUM_CORES=$NUMBER_OF_PROCESSORS
54885    FOUND_CORES=yes
54886  fi
54887
54888  if test "x$FOUND_CORES" = xyes; then
54889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54890$as_echo "$NUM_CORES" >&6; }
54891  else
54892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54893$as_echo "could not detect number of cores, defaulting to 1" >&6; }
54894    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54895$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54896  fi
54897
54898  else
54899    NUM_CORES=$with_num_cores
54900  fi
54901
54902
54903
54904  # How much memory do we have on this build system?
54905
54906# Check whether --with-memory-size was given.
54907if test "${with_memory_size+set}" = set; then :
54908  withval=$with_memory_size;
54909fi
54910
54911  if test "x$with_memory_size" = x; then
54912    # The memory size was not specified, try to probe it.
54913
54914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54915$as_echo_n "checking for memory size... " >&6; }
54916  # Default to 1024 MB
54917  MEMORY_SIZE=1024
54918  FOUND_MEM=no
54919
54920  if test -f /proc/meminfo; then
54921    # Looks like a Linux (or cygwin) system
54922    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54923    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54924    FOUND_MEM=yes
54925  elif test -x /usr/sbin/prtconf; then
54926    # Looks like a Solaris or AIX system
54927    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54928    FOUND_MEM=yes
54929  elif test -x /usr/sbin/system_profiler; then
54930    # Looks like a MacOSX system
54931    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54932    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54933    FOUND_MEM=yes
54934  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54935    # Windows, but without cygwin
54936    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54937    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54938    FOUND_MEM=yes
54939  fi
54940
54941  if test "x$FOUND_MEM" = xyes; then
54942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54943$as_echo "$MEMORY_SIZE MB" >&6; }
54944  else
54945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54946$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54947    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54948$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54949  fi
54950
54951  else
54952    MEMORY_SIZE=$with_memory_size
54953  fi
54954
54955
54956
54957  # Provide a decent default number of parallel jobs for make depending on
54958  # number of cores, amount of memory and machine architecture.
54959
54960# Check whether --with-jobs was given.
54961if test "${with_jobs+set}" = set; then :
54962  withval=$with_jobs;
54963fi
54964
54965  if test "x$with_jobs" = x; then
54966    # Number of jobs was not specified, calculate.
54967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54968$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54969    # Approximate memory in GB.
54970    memory_gb=`expr $MEMORY_SIZE / 1024`
54971    # Pick the lowest of memory in gb and number of cores.
54972    if test "$memory_gb" -lt "$NUM_CORES"; then
54973      JOBS="$memory_gb"
54974    else
54975      JOBS="$NUM_CORES"
54976      # On bigger machines, leave some room for other processes to run
54977      if test "$JOBS" -gt "4"; then
54978        JOBS=`expr $JOBS '*' 90 / 100`
54979      fi
54980    fi
54981    # Cap number of jobs to 16
54982    if test "$JOBS" -gt "16"; then
54983      JOBS=16
54984    fi
54985    if test "$JOBS" -eq "0"; then
54986      JOBS=1
54987    fi
54988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54989$as_echo "$JOBS" >&6; }
54990  else
54991    JOBS=$with_jobs
54992  fi
54993
54994
54995
54996# Setup arguments for the boot jdk (after cores and memory have been setup)
54997
54998  ##############################################################################
54999  #
55000  # Specify jvm options for anything that is run with the Boot JDK.
55001  # Not all JVM:s accept the same arguments on the command line.
55002  #
55003
55004# Check whether --with-boot-jdk-jvmargs was given.
55005if test "${with_boot_jdk_jvmargs+set}" = set; then :
55006  withval=$with_boot_jdk_jvmargs;
55007fi
55008
55009
55010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
55011$as_echo_n "checking flags for boot jdk java command ... " >&6; }
55012
55013  # Disable special log output when a debug build is used as Boot JDK...
55014
55015  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
55016  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
55017  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
55018  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55019  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55020  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55021    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
55022    JVM_ARG_OK=true
55023  else
55024    $ECHO "Arg failed:" >&5
55025    $ECHO "$OUTPUT" >&5
55026    JVM_ARG_OK=false
55027  fi
55028
55029
55030  # Apply user provided options.
55031
55032  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
55033  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
55034  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
55035  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55036  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55037  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55038    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
55039    JVM_ARG_OK=true
55040  else
55041    $ECHO "Arg failed:" >&5
55042    $ECHO "$OUTPUT" >&5
55043    JVM_ARG_OK=false
55044  fi
55045
55046
55047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
55048$as_echo "$boot_jdk_jvmargs" >&6; }
55049
55050  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
55051  JAVA_FLAGS=$boot_jdk_jvmargs
55052
55053
55054
55055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
55056$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
55057
55058  # Starting amount of heap memory.
55059
55060  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
55061  $ECHO "Command: $JAVA -Xms64M -version" >&5
55062  OUTPUT=`$JAVA -Xms64M -version 2>&1`
55063  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55064  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55065  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55066    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
55067    JVM_ARG_OK=true
55068  else
55069    $ECHO "Arg failed:" >&5
55070    $ECHO "$OUTPUT" >&5
55071    JVM_ARG_OK=false
55072  fi
55073
55074
55075  # Maximum amount of heap memory.
55076  # Maximum stack size.
55077  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
55078  if test "x$BOOT_JDK_BITS" = "x32"; then
55079    if test "$JVM_MAX_HEAP" -gt "1100"; then
55080      JVM_MAX_HEAP=1100
55081    elif test "$JVM_MAX_HEAP" -lt "512"; then
55082      JVM_MAX_HEAP=512
55083    fi
55084    STACK_SIZE=768
55085  else
55086    # Running a 64 bit JVM allows for and requires a bigger heap
55087    if test "$JVM_MAX_HEAP" -gt "1600"; then
55088      JVM_MAX_HEAP=1600
55089    elif test "$JVM_MAX_HEAP" -lt "512"; then
55090      JVM_MAX_HEAP=512
55091    fi
55092    STACK_SIZE=1536
55093  fi
55094
55095  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
55096  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
55097  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
55098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55101    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
55102    JVM_ARG_OK=true
55103  else
55104    $ECHO "Arg failed:" >&5
55105    $ECHO "$OUTPUT" >&5
55106    JVM_ARG_OK=false
55107  fi
55108
55109
55110  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
55111  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
55112  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
55113  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55114  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55115  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55116    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
55117    JVM_ARG_OK=true
55118  else
55119    $ECHO "Arg failed:" >&5
55120    $ECHO "$OUTPUT" >&5
55121    JVM_ARG_OK=false
55122  fi
55123
55124
55125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
55126$as_echo "$boot_jdk_jvmargs_big" >&6; }
55127
55128  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
55129
55130
55131
55132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
55133$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
55134
55135  # Use serial gc for small short lived tools if possible
55136
55137  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
55138  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
55139  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
55140  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55141  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55142  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55143    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
55144    JVM_ARG_OK=true
55145  else
55146    $ECHO "Arg failed:" >&5
55147    $ECHO "$OUTPUT" >&5
55148    JVM_ARG_OK=false
55149  fi
55150
55151
55152  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
55153  $ECHO "Command: $JAVA -Xms32M -version" >&5
55154  OUTPUT=`$JAVA -Xms32M -version 2>&1`
55155  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55156  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55157  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55158    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
55159    JVM_ARG_OK=true
55160  else
55161    $ECHO "Arg failed:" >&5
55162    $ECHO "$OUTPUT" >&5
55163    JVM_ARG_OK=false
55164  fi
55165
55166
55167  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
55168  $ECHO "Command: $JAVA -Xmx512M -version" >&5
55169  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
55170  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55171  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55172  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55173    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
55174    JVM_ARG_OK=true
55175  else
55176    $ECHO "Arg failed:" >&5
55177    $ECHO "$OUTPUT" >&5
55178    JVM_ARG_OK=false
55179  fi
55180
55181
55182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
55183$as_echo "$boot_jdk_jvmargs_small" >&6; }
55184
55185  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
55186
55187
55188  JAVA_TOOL_FLAGS_SMALL=""
55189  for f in $JAVA_FLAGS_SMALL; do
55190    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
55191  done
55192
55193
55194
55195# Setup smart javac (after cores and memory have been setup)
55196
55197
55198# Check whether --with-sjavac-server-java was given.
55199if test "${with_sjavac_server_java+set}" = set; then :
55200  withval=$with_sjavac_server_java;
55201fi
55202
55203
55204  if test "x$with_sjavac_server_java" != x; then
55205    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
55206    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
55207    if test "x$FOUND_VERSION" = x; then
55208      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
55209    fi
55210  else
55211    SJAVAC_SERVER_JAVA="$JAVA"
55212  fi
55213
55214
55215  if test "$MEMORY_SIZE" -gt "3000"; then
55216
55217  $ECHO "Check if jvm arg is ok: -d64" >&5
55218  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
55219  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
55220  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55221  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55222  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55223    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
55224    JVM_ARG_OK=true
55225  else
55226    $ECHO "Arg failed:" >&5
55227    $ECHO "$OUTPUT" >&5
55228    JVM_ARG_OK=false
55229  fi
55230
55231    if test "$JVM_ARG_OK" = true; then
55232      JVM_64BIT=true
55233      JVM_ARG_OK=false
55234    fi
55235  fi
55236
55237  MX_VALUE=`expr $MEMORY_SIZE / 2`
55238  if test "$JVM_64BIT" = true; then
55239    # Set ms lower than mx since more than one instance of the server might
55240    # get launched at the same time before they figure out which instance won.
55241    MS_VALUE=512
55242    if test "$MX_VALUE" -gt "2048"; then
55243      MX_VALUE=2048
55244    fi
55245  else
55246    MS_VALUE=256
55247    if test "$MX_VALUE" -gt "1500"; then
55248      MX_VALUE=1500
55249    fi
55250  fi
55251  if test "$MX_VALUE" -lt "512"; then
55252    MX_VALUE=512
55253  fi
55254
55255  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
55256  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
55257  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
55258  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55259  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55260  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55261    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
55262    JVM_ARG_OK=true
55263  else
55264    $ECHO "Arg failed:" >&5
55265    $ECHO "$OUTPUT" >&5
55266    JVM_ARG_OK=false
55267  fi
55268
55269
55270
55271  # Check whether --enable-sjavac was given.
55272if test "${enable_sjavac+set}" = set; then :
55273  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
55274else
55275  ENABLE_SJAVAC="no"
55276fi
55277
55278  if test "x$JVM_ARG_OK" = "xfalse"; then
55279    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
55280$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
55281    ENABLE_SJAVAC="no"
55282  fi
55283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
55284$as_echo_n "checking whether to use sjavac... " >&6; }
55285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
55286$as_echo "$ENABLE_SJAVAC" >&6; }
55287
55288
55289  # Check whether --enable-javac-server was given.
55290if test "${enable_javac_server+set}" = set; then :
55291  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
55292else
55293  ENABLE_JAVAC_SERVER="no"
55294fi
55295
55296  if test "x$JVM_ARG_OK" = "xfalse"; then
55297    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
55298$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
55299    ENABLE_JAVAC_SERVER="no"
55300  fi
55301  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
55302$as_echo_n "checking whether to use javac server... " >&6; }
55303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
55304$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
55305
55306
55307
55308# Can the C/C++ compiler use precompiled headers?
55309
55310
55311  ###############################################################################
55312  #
55313  # Can the C/C++ compiler use precompiled headers?
55314  #
55315  # Check whether --enable-precompiled-headers was given.
55316if test "${enable_precompiled_headers+set}" = set; then :
55317  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
55318else
55319  ENABLE_PRECOMPH=yes
55320fi
55321
55322
55323  USE_PRECOMPILED_HEADER=1
55324  if test "x$ENABLE_PRECOMPH" = xno; then
55325    USE_PRECOMPILED_HEADER=0
55326  fi
55327
55328  if test "x$ENABLE_PRECOMPH" = xyes; then
55329    # Check that the compiler actually supports precomp headers.
55330    if test "x$TOOLCHAIN_TYPE" = xgcc; then
55331      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55332$as_echo_n "checking that precompiled headers work... " >&6; }
55333      echo "int alfa();" > conftest.h
55334      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55335      if test ! -f conftest.hpp.gch; then
55336        USE_PRECOMPILED_HEADER=0
55337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55338$as_echo "no" >&6; }
55339      else
55340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55341$as_echo "yes" >&6; }
55342      fi
55343      rm -f conftest.h conftest.hpp.gch
55344    fi
55345  fi
55346
55347
55348
55349
55350# Setup use of ccache, if available
55351
55352  # Check whether --enable-ccache was given.
55353if test "${enable_ccache+set}" = set; then :
55354  enableval=$enable_ccache;
55355fi
55356
55357
55358  CCACHE=
55359  CCACHE_STATUS=
55360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55361$as_echo_n "checking is ccache enabled... " >&6; }
55362  if test "x$enable_ccache" = xyes; then
55363    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55365$as_echo "yes" >&6; }
55366      OLD_PATH="$PATH"
55367      if test "x$TOOLCHAIN_PATH" != x; then
55368        PATH=$TOOLCHAIN_PATH:$PATH
55369      fi
55370
55371
55372
55373  # Publish this variable in the help.
55374
55375
55376  if [ -z "${CCACHE+x}" ]; then
55377    # The variable is not set by user, try to locate tool using the code snippet
55378    for ac_prog in ccache
55379do
55380  # Extract the first word of "$ac_prog", so it can be a program name with args.
55381set dummy $ac_prog; ac_word=$2
55382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55383$as_echo_n "checking for $ac_word... " >&6; }
55384if ${ac_cv_path_CCACHE+:} false; then :
55385  $as_echo_n "(cached) " >&6
55386else
55387  case $CCACHE in
55388  [\\/]* | ?:[\\/]*)
55389  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55390  ;;
55391  *)
55392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55393for as_dir in $PATH
55394do
55395  IFS=$as_save_IFS
55396  test -z "$as_dir" && as_dir=.
55397    for ac_exec_ext in '' $ac_executable_extensions; do
55398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55399    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55401    break 2
55402  fi
55403done
55404  done
55405IFS=$as_save_IFS
55406
55407  ;;
55408esac
55409fi
55410CCACHE=$ac_cv_path_CCACHE
55411if test -n "$CCACHE"; then
55412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55413$as_echo "$CCACHE" >&6; }
55414else
55415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55416$as_echo "no" >&6; }
55417fi
55418
55419
55420  test -n "$CCACHE" && break
55421done
55422
55423  else
55424    # The variable is set, but is it from the command line or the environment?
55425
55426    # Try to remove the string !CCACHE! from our list.
55427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55429      # If it failed, the variable was not from the command line. Ignore it,
55430      # but warn the user (except for BASH, which is always set by the calling BASH).
55431      if test "xCCACHE" != xBASH; then
55432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55433$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55434      fi
55435      # Try to locate tool using the code snippet
55436      for ac_prog in ccache
55437do
55438  # Extract the first word of "$ac_prog", so it can be a program name with args.
55439set dummy $ac_prog; ac_word=$2
55440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55441$as_echo_n "checking for $ac_word... " >&6; }
55442if ${ac_cv_path_CCACHE+:} false; then :
55443  $as_echo_n "(cached) " >&6
55444else
55445  case $CCACHE in
55446  [\\/]* | ?:[\\/]*)
55447  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55448  ;;
55449  *)
55450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55451for as_dir in $PATH
55452do
55453  IFS=$as_save_IFS
55454  test -z "$as_dir" && as_dir=.
55455    for ac_exec_ext in '' $ac_executable_extensions; do
55456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55457    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55459    break 2
55460  fi
55461done
55462  done
55463IFS=$as_save_IFS
55464
55465  ;;
55466esac
55467fi
55468CCACHE=$ac_cv_path_CCACHE
55469if test -n "$CCACHE"; then
55470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55471$as_echo "$CCACHE" >&6; }
55472else
55473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55474$as_echo "no" >&6; }
55475fi
55476
55477
55478  test -n "$CCACHE" && break
55479done
55480
55481    else
55482      # If it succeeded, then it was overridden by the user. We will use it
55483      # for the tool.
55484
55485      # First remove it from the list of overridden variables, so we can test
55486      # for unknown variables in the end.
55487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55488
55489      # Check if we try to supply an empty value
55490      if test "x$CCACHE" = x; then
55491        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55492$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55494$as_echo_n "checking for CCACHE... " >&6; }
55495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55496$as_echo "disabled" >&6; }
55497      else
55498        # Check if the provided tool contains a complete path.
55499        tool_specified="$CCACHE"
55500        tool_basename="${tool_specified##*/}"
55501        if test "x$tool_basename" = "x$tool_specified"; then
55502          # A command without a complete path is provided, search $PATH.
55503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55504$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55505          # Extract the first word of "$tool_basename", so it can be a program name with args.
55506set dummy $tool_basename; ac_word=$2
55507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55508$as_echo_n "checking for $ac_word... " >&6; }
55509if ${ac_cv_path_CCACHE+:} false; then :
55510  $as_echo_n "(cached) " >&6
55511else
55512  case $CCACHE in
55513  [\\/]* | ?:[\\/]*)
55514  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55515  ;;
55516  *)
55517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55518for as_dir in $PATH
55519do
55520  IFS=$as_save_IFS
55521  test -z "$as_dir" && as_dir=.
55522    for ac_exec_ext in '' $ac_executable_extensions; do
55523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55524    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55526    break 2
55527  fi
55528done
55529  done
55530IFS=$as_save_IFS
55531
55532  ;;
55533esac
55534fi
55535CCACHE=$ac_cv_path_CCACHE
55536if test -n "$CCACHE"; then
55537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55538$as_echo "$CCACHE" >&6; }
55539else
55540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55541$as_echo "no" >&6; }
55542fi
55543
55544
55545          if test "x$CCACHE" = x; then
55546            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55547          fi
55548        else
55549          # Otherwise we believe it is a complete path. Use it as it is.
55550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55551$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55553$as_echo_n "checking for CCACHE... " >&6; }
55554          if test ! -x "$tool_specified"; then
55555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55556$as_echo "not found" >&6; }
55557            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55558          fi
55559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55560$as_echo "$tool_specified" >&6; }
55561        fi
55562      fi
55563    fi
55564
55565  fi
55566
55567
55568
55569  if test "x$CCACHE" = x; then
55570    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55571  fi
55572
55573
55574      PATH="$OLD_PATH"
55575      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55576      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55577    else
55578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55579$as_echo "no" >&6; }
55580      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55581$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55582    fi
55583  elif test "x$enable_ccache" = xno; then
55584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55585$as_echo "no, explicitly disabled" >&6; }
55586    CCACHE_STATUS="Disabled"
55587  elif test "x$enable_ccache" = x; then
55588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55589$as_echo "no" >&6; }
55590  else
55591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55592$as_echo "unknown" >&6; }
55593    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55594  fi
55595
55596
55597
55598# Check whether --with-ccache-dir was given.
55599if test "${with_ccache_dir+set}" = set; then :
55600  withval=$with_ccache_dir;
55601fi
55602
55603
55604  if test "x$with_ccache_dir" != x; then
55605    # When using a non home ccache directory, assume the use is to share ccache files
55606    # with other users. Thus change the umask.
55607    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55608    if test "x$CCACHE" = x; then
55609      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55610$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55611    fi
55612  fi
55613
55614  if test "x$CCACHE" != x; then
55615
55616  if test "x$CCACHE" != x; then
55617    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55618      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55619          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55620      if test "x$HAS_BAD_CCACHE" != "x"; then
55621        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55622      fi
55623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55624$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55625      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55626      PUSHED_FLAGS="$CXXFLAGS"
55627      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55628      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55629/* end confdefs.h.  */
55630
55631int
55632main ()
55633{
55634
55635  ;
55636  return 0;
55637}
55638_ACEOF
55639if ac_fn_cxx_try_compile "$LINENO"; then :
55640  CC_KNOWS_CCACHE_TRICK=yes
55641else
55642  CC_KNOWS_CCACHE_TRICK=no
55643fi
55644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55645      CXXFLAGS="$PUSHED_FLAGS"
55646      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55648$as_echo "yes" >&6; }
55649        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55650
55651        CCACHE_SLOPPINESS=pch_defines,time_macros
55652      else
55653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55654$as_echo "no" >&6; }
55655        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55656      fi
55657    fi
55658
55659    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55660        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55661
55662    if test "x$SET_CCACHE_DIR" != x; then
55663      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55664      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55665    fi
55666  fi
55667
55668  fi
55669
55670
55671###############################################################################
55672#
55673# And now the finish...
55674#
55675###############################################################################
55676
55677# Check for some common pitfalls
55678
55679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55680    file_to_test="$SRC_ROOT/LICENSE"
55681    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55682      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
55683    fi
55684  fi
55685
55686
55687  # Did user specify any unknown variables?
55688
55689  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55690    # Replace the separating ! with spaces before presenting for end user.
55691    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55693$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55694  fi
55695
55696
55697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55698$as_echo_n "checking if build directory is on local disk... " >&6; }
55699
55700  # df -l lists only local disks; if the given directory is not found then
55701  # a non-zero exit code is given
55702  if test "x$DF" = x; then
55703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55704      # msys does not have df; use Windows "net use" instead.
55705      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55706      if test "x$IS_NETWORK_DISK" = x; then
55707        OUTPUT_DIR_IS_LOCAL="yes"
55708      else
55709        OUTPUT_DIR_IS_LOCAL="no"
55710      fi
55711    else
55712      # No df here, say it's local
55713      OUTPUT_DIR_IS_LOCAL="yes"
55714    fi
55715  else
55716    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55717      OUTPUT_DIR_IS_LOCAL="yes"
55718    else
55719      OUTPUT_DIR_IS_LOCAL="no"
55720    fi
55721  fi
55722
55723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55724$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55725
55726
55727
55728  # Check if the user has any old-style ALT_ variables set.
55729  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55730
55731  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55732  # Since we can't properly handle the dependencies for this, warn the user about the situation
55733  if test -e $OUTPUT_ROOT/spec.gmk; then
55734    IS_RECONFIGURE=yes
55735  else
55736    IS_RECONFIGURE=no
55737  fi
55738
55739
55740# At the end, call the custom hook. (Dummy macro if no custom sources available)
55741
55742
55743# We're messing a bit with internal autoconf variables to put the config.status
55744# in the output directory instead of the current directory.
55745CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55746
55747# Create the actual output files. Now the main work of configure is done.
55748cat >confcache <<\_ACEOF
55749# This file is a shell script that caches the results of configure
55750# tests run on this system so they can be shared between configure
55751# scripts and configure runs, see configure's option --config-cache.
55752# It is not useful on other systems.  If it contains results you don't
55753# want to keep, you may remove or edit it.
55754#
55755# config.status only pays attention to the cache file if you give it
55756# the --recheck option to rerun configure.
55757#
55758# `ac_cv_env_foo' variables (set or unset) will be overridden when
55759# loading this file, other *unset* `ac_cv_foo' will be assigned the
55760# following values.
55761
55762_ACEOF
55763
55764# The following way of writing the cache mishandles newlines in values,
55765# but we know of no workaround that is simple, portable, and efficient.
55766# So, we kill variables containing newlines.
55767# Ultrix sh set writes to stderr and can't be redirected directly,
55768# and sets the high bit in the cache file unless we assign to the vars.
55769(
55770  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55771    eval ac_val=\$$ac_var
55772    case $ac_val in #(
55773    *${as_nl}*)
55774      case $ac_var in #(
55775      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55776$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55777      esac
55778      case $ac_var in #(
55779      _ | IFS | as_nl) ;; #(
55780      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55781      *) { eval $ac_var=; unset $ac_var;} ;;
55782      esac ;;
55783    esac
55784  done
55785
55786  (set) 2>&1 |
55787    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55788    *${as_nl}ac_space=\ *)
55789      # `set' does not quote correctly, so add quotes: double-quote
55790      # substitution turns \\\\ into \\, and sed turns \\ into \.
55791      sed -n \
55792	"s/'/'\\\\''/g;
55793	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55794      ;; #(
55795    *)
55796      # `set' quotes correctly as required by POSIX, so do not add quotes.
55797      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55798      ;;
55799    esac |
55800    sort
55801) |
55802  sed '
55803     /^ac_cv_env_/b end
55804     t clear
55805     :clear
55806     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55807     t end
55808     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55809     :end' >>confcache
55810if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55811  if test -w "$cache_file"; then
55812    if test "x$cache_file" != "x/dev/null"; then
55813      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55814$as_echo "$as_me: updating cache $cache_file" >&6;}
55815      if test ! -f "$cache_file" || test -h "$cache_file"; then
55816	cat confcache >"$cache_file"
55817      else
55818        case $cache_file in #(
55819        */* | ?:*)
55820	  mv -f confcache "$cache_file"$$ &&
55821	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55822        *)
55823	  mv -f confcache "$cache_file" ;;
55824	esac
55825      fi
55826    fi
55827  else
55828    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55829$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55830  fi
55831fi
55832rm -f confcache
55833
55834test "x$prefix" = xNONE && prefix=$ac_default_prefix
55835# Let make expand exec_prefix.
55836test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55837
55838# Transform confdefs.h into DEFS.
55839# Protect against shell expansion while executing Makefile rules.
55840# Protect against Makefile macro expansion.
55841#
55842# If the first sed substitution is executed (which looks for macros that
55843# take arguments), then branch to the quote section.  Otherwise,
55844# look for a macro that doesn't take arguments.
55845ac_script='
55846:mline
55847/\\$/{
55848 N
55849 s,\\\n,,
55850 b mline
55851}
55852t clear
55853:clear
55854s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
55855t quote
55856s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
55857t quote
55858b any
55859:quote
55860s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55861s/\[/\\&/g
55862s/\]/\\&/g
55863s/\$/$$/g
55864H
55865:any
55866${
55867	g
55868	s/^\n//
55869	s/\n/ /g
55870	p
55871}
55872'
55873DEFS=`sed -n "$ac_script" confdefs.h`
55874
55875
55876ac_libobjs=
55877ac_ltlibobjs=
55878U=
55879for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55880  # 1. Remove the extension, and $U if already installed.
55881  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55882  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55883  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55884  #    will be set to the directory where LIBOBJS objects are built.
55885  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55886  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55887done
55888LIBOBJS=$ac_libobjs
55889
55890LTLIBOBJS=$ac_ltlibobjs
55891
55892
55893
55894: "${CONFIG_STATUS=./config.status}"
55895ac_write_fail=0
55896ac_clean_files_save=$ac_clean_files
55897ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55898{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55899$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55900as_write_fail=0
55901cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55902#! $SHELL
55903# Generated by $as_me.
55904# Run this file to recreate the current configuration.
55905# Compiler output produced by configure, useful for debugging
55906# configure, is in config.log if it exists.
55907
55908debug=false
55909ac_cs_recheck=false
55910ac_cs_silent=false
55911
55912SHELL=\${CONFIG_SHELL-$SHELL}
55913export SHELL
55914_ASEOF
55915cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55916## -------------------- ##
55917## M4sh Initialization. ##
55918## -------------------- ##
55919
55920# Be more Bourne compatible
55921DUALCASE=1; export DUALCASE # for MKS sh
55922if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55923  emulate sh
55924  NULLCMD=:
55925  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55926  # is contrary to our usage.  Disable this feature.
55927  alias -g '${1+"$@"}'='"$@"'
55928  setopt NO_GLOB_SUBST
55929else
55930  case `(set -o) 2>/dev/null` in #(
55931  *posix*) :
55932    set -o posix ;; #(
55933  *) :
55934     ;;
55935esac
55936fi
55937
55938
55939as_nl='
55940'
55941export as_nl
55942# Printing a long string crashes Solaris 7 /usr/bin/printf.
55943as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55944as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55945as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55946# Prefer a ksh shell builtin over an external printf program on Solaris,
55947# but without wasting forks for bash or zsh.
55948if test -z "$BASH_VERSION$ZSH_VERSION" \
55949    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55950  as_echo='print -r --'
55951  as_echo_n='print -rn --'
55952elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55953  as_echo='printf %s\n'
55954  as_echo_n='printf %s'
55955else
55956  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55957    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55958    as_echo_n='/usr/ucb/echo -n'
55959  else
55960    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55961    as_echo_n_body='eval
55962      arg=$1;
55963      case $arg in #(
55964      *"$as_nl"*)
55965	expr "X$arg" : "X\\(.*\\)$as_nl";
55966	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55967      esac;
55968      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55969    '
55970    export as_echo_n_body
55971    as_echo_n='sh -c $as_echo_n_body as_echo'
55972  fi
55973  export as_echo_body
55974  as_echo='sh -c $as_echo_body as_echo'
55975fi
55976
55977# The user is always right.
55978if test "${PATH_SEPARATOR+set}" != set; then
55979  PATH_SEPARATOR=:
55980  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55981    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55982      PATH_SEPARATOR=';'
55983  }
55984fi
55985
55986
55987# IFS
55988# We need space, tab and new line, in precisely that order.  Quoting is
55989# there to prevent editors from complaining about space-tab.
55990# (If _AS_PATH_WALK were called with IFS unset, it would disable word
55991# splitting by setting IFS to empty value.)
55992IFS=" ""	$as_nl"
55993
55994# Find who we are.  Look in the path if we contain no directory separator.
55995as_myself=
55996case $0 in #((
55997  *[\\/]* ) as_myself=$0 ;;
55998  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55999for as_dir in $PATH
56000do
56001  IFS=$as_save_IFS
56002  test -z "$as_dir" && as_dir=.
56003    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
56004  done
56005IFS=$as_save_IFS
56006
56007     ;;
56008esac
56009# We did not find ourselves, most probably we were run as `sh COMMAND'
56010# in which case we are not to be found in the path.
56011if test "x$as_myself" = x; then
56012  as_myself=$0
56013fi
56014if test ! -f "$as_myself"; then
56015  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
56016  exit 1
56017fi
56018
56019# Unset variables that we do not need and which cause bugs (e.g. in
56020# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
56021# suppresses any "Segmentation fault" message there.  '((' could
56022# trigger a bug in pdksh 5.2.14.
56023for as_var in BASH_ENV ENV MAIL MAILPATH
56024do eval test x\${$as_var+set} = xset \
56025  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
56026done
56027PS1='$ '
56028PS2='> '
56029PS4='+ '
56030
56031# NLS nuisances.
56032LC_ALL=C
56033export LC_ALL
56034LANGUAGE=C
56035export LANGUAGE
56036
56037# CDPATH.
56038(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
56039
56040
56041# as_fn_error STATUS ERROR [LINENO LOG_FD]
56042# ----------------------------------------
56043# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
56044# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
56045# script with STATUS, using 1 if that was 0.
56046as_fn_error ()
56047{
56048  as_status=$1; test $as_status -eq 0 && as_status=1
56049  if test "$4"; then
56050    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
56051    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
56052  fi
56053  $as_echo "$as_me: error: $2" >&2
56054  as_fn_exit $as_status
56055} # as_fn_error
56056
56057
56058# as_fn_set_status STATUS
56059# -----------------------
56060# Set $? to STATUS, without forking.
56061as_fn_set_status ()
56062{
56063  return $1
56064} # as_fn_set_status
56065
56066# as_fn_exit STATUS
56067# -----------------
56068# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
56069as_fn_exit ()
56070{
56071  set +e
56072  as_fn_set_status $1
56073  exit $1
56074} # as_fn_exit
56075
56076# as_fn_unset VAR
56077# ---------------
56078# Portably unset VAR.
56079as_fn_unset ()
56080{
56081  { eval $1=; unset $1;}
56082}
56083as_unset=as_fn_unset
56084# as_fn_append VAR VALUE
56085# ----------------------
56086# Append the text in VALUE to the end of the definition contained in VAR. Take
56087# advantage of any shell optimizations that allow amortized linear growth over
56088# repeated appends, instead of the typical quadratic growth present in naive
56089# implementations.
56090if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
56091  eval 'as_fn_append ()
56092  {
56093    eval $1+=\$2
56094  }'
56095else
56096  as_fn_append ()
56097  {
56098    eval $1=\$$1\$2
56099  }
56100fi # as_fn_append
56101
56102# as_fn_arith ARG...
56103# ------------------
56104# Perform arithmetic evaluation on the ARGs, and store the result in the
56105# global $as_val. Take advantage of shells that can avoid forks. The arguments
56106# must be portable across $(()) and expr.
56107if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
56108  eval 'as_fn_arith ()
56109  {
56110    as_val=$(( $* ))
56111  }'
56112else
56113  as_fn_arith ()
56114  {
56115    as_val=`expr "$@" || test $? -eq 1`
56116  }
56117fi # as_fn_arith
56118
56119
56120if expr a : '\(a\)' >/dev/null 2>&1 &&
56121   test "X`expr 00001 : '.*\(...\)'`" = X001; then
56122  as_expr=expr
56123else
56124  as_expr=false
56125fi
56126
56127if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
56128  as_basename=basename
56129else
56130  as_basename=false
56131fi
56132
56133if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
56134  as_dirname=dirname
56135else
56136  as_dirname=false
56137fi
56138
56139as_me=`$as_basename -- "$0" ||
56140$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
56141	 X"$0" : 'X\(//\)$' \| \
56142	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
56143$as_echo X/"$0" |
56144    sed '/^.*\/\([^/][^/]*\)\/*$/{
56145	    s//\1/
56146	    q
56147	  }
56148	  /^X\/\(\/\/\)$/{
56149	    s//\1/
56150	    q
56151	  }
56152	  /^X\/\(\/\).*/{
56153	    s//\1/
56154	    q
56155	  }
56156	  s/.*/./; q'`
56157
56158# Avoid depending upon Character Ranges.
56159as_cr_letters='abcdefghijklmnopqrstuvwxyz'
56160as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
56161as_cr_Letters=$as_cr_letters$as_cr_LETTERS
56162as_cr_digits='0123456789'
56163as_cr_alnum=$as_cr_Letters$as_cr_digits
56164
56165ECHO_C= ECHO_N= ECHO_T=
56166case `echo -n x` in #(((((
56167-n*)
56168  case `echo 'xy\c'` in
56169  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
56170  xy)  ECHO_C='\c';;
56171  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
56172       ECHO_T='	';;
56173  esac;;
56174*)
56175  ECHO_N='-n';;
56176esac
56177
56178rm -f conf$$ conf$$.exe conf$$.file
56179if test -d conf$$.dir; then
56180  rm -f conf$$.dir/conf$$.file
56181else
56182  rm -f conf$$.dir
56183  mkdir conf$$.dir 2>/dev/null
56184fi
56185if (echo >conf$$.file) 2>/dev/null; then
56186  if ln -s conf$$.file conf$$ 2>/dev/null; then
56187    as_ln_s='ln -s'
56188    # ... but there are two gotchas:
56189    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
56190    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
56191    # In both cases, we have to default to `cp -pR'.
56192    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
56193      as_ln_s='cp -pR'
56194  elif ln conf$$.file conf$$ 2>/dev/null; then
56195    as_ln_s=ln
56196  else
56197    as_ln_s='cp -pR'
56198  fi
56199else
56200  as_ln_s='cp -pR'
56201fi
56202rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
56203rmdir conf$$.dir 2>/dev/null
56204
56205
56206# as_fn_mkdir_p
56207# -------------
56208# Create "$as_dir" as a directory, including parents if necessary.
56209as_fn_mkdir_p ()
56210{
56211
56212  case $as_dir in #(
56213  -*) as_dir=./$as_dir;;
56214  esac
56215  test -d "$as_dir" || eval $as_mkdir_p || {
56216    as_dirs=
56217    while :; do
56218      case $as_dir in #(
56219      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
56220      *) as_qdir=$as_dir;;
56221      esac
56222      as_dirs="'$as_qdir' $as_dirs"
56223      as_dir=`$as_dirname -- "$as_dir" ||
56224$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56225	 X"$as_dir" : 'X\(//\)[^/]' \| \
56226	 X"$as_dir" : 'X\(//\)$' \| \
56227	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
56228$as_echo X"$as_dir" |
56229    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56230	    s//\1/
56231	    q
56232	  }
56233	  /^X\(\/\/\)[^/].*/{
56234	    s//\1/
56235	    q
56236	  }
56237	  /^X\(\/\/\)$/{
56238	    s//\1/
56239	    q
56240	  }
56241	  /^X\(\/\).*/{
56242	    s//\1/
56243	    q
56244	  }
56245	  s/.*/./; q'`
56246      test -d "$as_dir" && break
56247    done
56248    test -z "$as_dirs" || eval "mkdir $as_dirs"
56249  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
56250
56251
56252} # as_fn_mkdir_p
56253if mkdir -p . 2>/dev/null; then
56254  as_mkdir_p='mkdir -p "$as_dir"'
56255else
56256  test -d ./-p && rmdir ./-p
56257  as_mkdir_p=false
56258fi
56259
56260
56261# as_fn_executable_p FILE
56262# -----------------------
56263# Test if FILE is an executable regular file.
56264as_fn_executable_p ()
56265{
56266  test -f "$1" && test -x "$1"
56267} # as_fn_executable_p
56268as_test_x='test -x'
56269as_executable_p=as_fn_executable_p
56270
56271# Sed expression to map a string onto a valid CPP name.
56272as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
56273
56274# Sed expression to map a string onto a valid variable name.
56275as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
56276
56277
56278exec 6>&1
56279## ----------------------------------- ##
56280## Main body of $CONFIG_STATUS script. ##
56281## ----------------------------------- ##
56282_ASEOF
56283test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
56284
56285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56286# Save the log message, to keep $0 and so on meaningful, and to
56287# report actual input values of CONFIG_FILES etc. instead of their
56288# values after options handling.
56289ac_log="
56290This file was extended by OpenJDK $as_me jdk9, which was
56291generated by GNU Autoconf 2.69.  Invocation command line was
56292
56293  CONFIG_FILES    = $CONFIG_FILES
56294  CONFIG_HEADERS  = $CONFIG_HEADERS
56295  CONFIG_LINKS    = $CONFIG_LINKS
56296  CONFIG_COMMANDS = $CONFIG_COMMANDS
56297  $ $0 $@
56298
56299on `(hostname || uname -n) 2>/dev/null | sed 1q`
56300"
56301
56302_ACEOF
56303
56304case $ac_config_files in *"
56305"*) set x $ac_config_files; shift; ac_config_files=$*;;
56306esac
56307
56308
56309
56310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56311# Files that config.status was made for.
56312config_files="$ac_config_files"
56313
56314_ACEOF
56315
56316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56317ac_cs_usage="\
56318\`$as_me' instantiates files and other configuration actions
56319from templates according to the current configuration.  Unless the files
56320and actions are specified as TAGs, all are instantiated by default.
56321
56322Usage: $0 [OPTION]... [TAG]...
56323
56324  -h, --help       print this help, then exit
56325  -V, --version    print version number and configuration settings, then exit
56326      --config     print configuration, then exit
56327  -q, --quiet, --silent
56328                   do not print progress messages
56329  -d, --debug      don't remove temporary files
56330      --recheck    update $as_me by reconfiguring in the same conditions
56331      --file=FILE[:TEMPLATE]
56332                   instantiate the configuration file FILE
56333
56334Configuration files:
56335$config_files
56336
56337Report bugs to <build-dev@openjdk.java.net>.
56338OpenJDK home page: <http://openjdk.java.net>."
56339
56340_ACEOF
56341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56342ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56343ac_cs_version="\\
56344OpenJDK config.status jdk9
56345configured by $0, generated by GNU Autoconf 2.69,
56346  with options \\"\$ac_cs_config\\"
56347
56348Copyright (C) 2012 Free Software Foundation, Inc.
56349This config.status script is free software; the Free Software Foundation
56350gives unlimited permission to copy, distribute and modify it."
56351
56352ac_pwd='$ac_pwd'
56353srcdir='$srcdir'
56354AWK='$AWK'
56355test -n "\$AWK" || AWK=awk
56356_ACEOF
56357
56358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56359# The default lists apply if the user does not specify any file.
56360ac_need_defaults=:
56361while test $# != 0
56362do
56363  case $1 in
56364  --*=?*)
56365    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56366    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56367    ac_shift=:
56368    ;;
56369  --*=)
56370    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56371    ac_optarg=
56372    ac_shift=:
56373    ;;
56374  *)
56375    ac_option=$1
56376    ac_optarg=$2
56377    ac_shift=shift
56378    ;;
56379  esac
56380
56381  case $ac_option in
56382  # Handling of the options.
56383  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56384    ac_cs_recheck=: ;;
56385  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56386    $as_echo "$ac_cs_version"; exit ;;
56387  --config | --confi | --conf | --con | --co | --c )
56388    $as_echo "$ac_cs_config"; exit ;;
56389  --debug | --debu | --deb | --de | --d | -d )
56390    debug=: ;;
56391  --file | --fil | --fi | --f )
56392    $ac_shift
56393    case $ac_optarg in
56394    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56395    '') as_fn_error $? "missing file argument" ;;
56396    esac
56397    as_fn_append CONFIG_FILES " '$ac_optarg'"
56398    ac_need_defaults=false;;
56399  --he | --h |  --help | --hel | -h )
56400    $as_echo "$ac_cs_usage"; exit ;;
56401  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56402  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56403    ac_cs_silent=: ;;
56404
56405  # This is an error.
56406  -*) as_fn_error $? "unrecognized option: \`$1'
56407Try \`$0 --help' for more information." ;;
56408
56409  *) as_fn_append ac_config_targets " $1"
56410     ac_need_defaults=false ;;
56411
56412  esac
56413  shift
56414done
56415
56416ac_configure_extra_args=
56417
56418if $ac_cs_silent; then
56419  exec 6>/dev/null
56420  ac_configure_extra_args="$ac_configure_extra_args --silent"
56421fi
56422
56423_ACEOF
56424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56425if \$ac_cs_recheck; then
56426  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56427  shift
56428  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56429  CONFIG_SHELL='$SHELL'
56430  export CONFIG_SHELL
56431  exec "\$@"
56432fi
56433
56434_ACEOF
56435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56436exec 5>>config.log
56437{
56438  echo
56439  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56440## Running $as_me. ##
56441_ASBOX
56442  $as_echo "$ac_log"
56443} >&5
56444
56445_ACEOF
56446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56447_ACEOF
56448
56449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56450
56451# Handling of arguments.
56452for ac_config_target in $ac_config_targets
56453do
56454  case $ac_config_target in
56455    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56456    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56457    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56458    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56459    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56460
56461  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56462  esac
56463done
56464
56465
56466# If the user did not use the arguments to specify the items to instantiate,
56467# then the envvar interface is used.  Set only those that are not.
56468# We use the long form for the default assignment because of an extremely
56469# bizarre bug on SunOS 4.1.3.
56470if $ac_need_defaults; then
56471  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56472fi
56473
56474# Have a temporary directory for convenience.  Make it in the build tree
56475# simply because there is no reason against having it here, and in addition,
56476# creating and moving files from /tmp can sometimes cause problems.
56477# Hook for its removal unless debugging.
56478# Note that there is a small window in which the directory will not be cleaned:
56479# after its creation but before its name has been assigned to `$tmp'.
56480$debug ||
56481{
56482  tmp= ac_tmp=
56483  trap 'exit_status=$?
56484  : "${ac_tmp:=$tmp}"
56485  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56486' 0
56487  trap 'as_fn_exit 1' 1 2 13 15
56488}
56489# Create a (secure) tmp directory for tmp files.
56490
56491{
56492  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56493  test -d "$tmp"
56494}  ||
56495{
56496  tmp=./conf$$-$RANDOM
56497  (umask 077 && mkdir "$tmp")
56498} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56499ac_tmp=$tmp
56500
56501# Set up the scripts for CONFIG_FILES section.
56502# No need to generate them if there are no CONFIG_FILES.
56503# This happens for instance with `./config.status config.h'.
56504if test -n "$CONFIG_FILES"; then
56505
56506
56507ac_cr=`echo X | tr X '\015'`
56508# On cygwin, bash can eat \r inside `` if the user requested igncr.
56509# But we know of no other shell where ac_cr would be empty at this
56510# point, so we can use a bashism as a fallback.
56511if test "x$ac_cr" = x; then
56512  eval ac_cr=\$\'\\r\'
56513fi
56514ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56515if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56516  ac_cs_awk_cr='\\r'
56517else
56518  ac_cs_awk_cr=$ac_cr
56519fi
56520
56521echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56522_ACEOF
56523
56524
56525{
56526  echo "cat >conf$$subs.awk <<_ACEOF" &&
56527  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56528  echo "_ACEOF"
56529} >conf$$subs.sh ||
56530  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56531ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56532ac_delim='%!_!# '
56533for ac_last_try in false false false false false :; do
56534  . ./conf$$subs.sh ||
56535    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56536
56537  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56538  if test $ac_delim_n = $ac_delim_num; then
56539    break
56540  elif $ac_last_try; then
56541    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56542  else
56543    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56544  fi
56545done
56546rm -f conf$$subs.sh
56547
56548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56549cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56550_ACEOF
56551sed -n '
56552h
56553s/^/S["/; s/!.*/"]=/
56554p
56555g
56556s/^[^!]*!//
56557:repl
56558t repl
56559s/'"$ac_delim"'$//
56560t delim
56561:nl
56562h
56563s/\(.\{148\}\)..*/\1/
56564t more1
56565s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56566p
56567n
56568b repl
56569:more1
56570s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56571p
56572g
56573s/.\{148\}//
56574t nl
56575:delim
56576h
56577s/\(.\{148\}\)..*/\1/
56578t more2
56579s/["\\]/\\&/g; s/^/"/; s/$/"/
56580p
56581b
56582:more2
56583s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56584p
56585g
56586s/.\{148\}//
56587t delim
56588' <conf$$subs.awk | sed '
56589/^[^""]/{
56590  N
56591  s/\n//
56592}
56593' >>$CONFIG_STATUS || ac_write_fail=1
56594rm -f conf$$subs.awk
56595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56596_ACAWK
56597cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56598  for (key in S) S_is_set[key] = 1
56599  FS = ""
56600
56601}
56602{
56603  line = $ 0
56604  nfields = split(line, field, "@")
56605  substed = 0
56606  len = length(field[1])
56607  for (i = 2; i < nfields; i++) {
56608    key = field[i]
56609    keylen = length(key)
56610    if (S_is_set[key]) {
56611      value = S[key]
56612      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56613      len += length(value) + length(field[++i])
56614      substed = 1
56615    } else
56616      len += 1 + keylen
56617  }
56618
56619  print line
56620}
56621
56622_ACAWK
56623_ACEOF
56624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56625if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56626  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56627else
56628  cat
56629fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56630  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56631_ACEOF
56632
56633# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56634# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56635# trailing colons and then remove the whole line if VPATH becomes empty
56636# (actually we leave an empty line to preserve line numbers).
56637if test "x$srcdir" = x.; then
56638  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56639h
56640s///
56641s/^/:/
56642s/[	 ]*$/:/
56643s/:\$(srcdir):/:/g
56644s/:\${srcdir}:/:/g
56645s/:@srcdir@:/:/g
56646s/^:*//
56647s/:*$//
56648x
56649s/\(=[	 ]*\).*/\1/
56650G
56651s/\n//
56652s/^[^=]*=[	 ]*$//
56653}'
56654fi
56655
56656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56657fi # test -n "$CONFIG_FILES"
56658
56659
56660eval set X "  :F $CONFIG_FILES      "
56661shift
56662for ac_tag
56663do
56664  case $ac_tag in
56665  :[FHLC]) ac_mode=$ac_tag; continue;;
56666  esac
56667  case $ac_mode$ac_tag in
56668  :[FHL]*:*);;
56669  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56670  :[FH]-) ac_tag=-:-;;
56671  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56672  esac
56673  ac_save_IFS=$IFS
56674  IFS=:
56675  set x $ac_tag
56676  IFS=$ac_save_IFS
56677  shift
56678  ac_file=$1
56679  shift
56680
56681  case $ac_mode in
56682  :L) ac_source=$1;;
56683  :[FH])
56684    ac_file_inputs=
56685    for ac_f
56686    do
56687      case $ac_f in
56688      -) ac_f="$ac_tmp/stdin";;
56689      *) # Look for the file first in the build tree, then in the source tree
56690	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56691	 # because $ac_f cannot contain `:'.
56692	 test -f "$ac_f" ||
56693	   case $ac_f in
56694	   [\\/$]*) false;;
56695	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56696	   esac ||
56697	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56698      esac
56699      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56700      as_fn_append ac_file_inputs " '$ac_f'"
56701    done
56702
56703    # Let's still pretend it is `configure' which instantiates (i.e., don't
56704    # use $as_me), people would be surprised to read:
56705    #    /* config.h.  Generated by config.status.  */
56706    configure_input='Generated from '`
56707	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56708	`' by configure.'
56709    if test x"$ac_file" != x-; then
56710      configure_input="$ac_file.  $configure_input"
56711      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56712$as_echo "$as_me: creating $ac_file" >&6;}
56713    fi
56714    # Neutralize special characters interpreted by sed in replacement strings.
56715    case $configure_input in #(
56716    *\&* | *\|* | *\\* )
56717       ac_sed_conf_input=`$as_echo "$configure_input" |
56718       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56719    *) ac_sed_conf_input=$configure_input;;
56720    esac
56721
56722    case $ac_tag in
56723    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56724      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56725    esac
56726    ;;
56727  esac
56728
56729  ac_dir=`$as_dirname -- "$ac_file" ||
56730$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56731	 X"$ac_file" : 'X\(//\)[^/]' \| \
56732	 X"$ac_file" : 'X\(//\)$' \| \
56733	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56734$as_echo X"$ac_file" |
56735    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56736	    s//\1/
56737	    q
56738	  }
56739	  /^X\(\/\/\)[^/].*/{
56740	    s//\1/
56741	    q
56742	  }
56743	  /^X\(\/\/\)$/{
56744	    s//\1/
56745	    q
56746	  }
56747	  /^X\(\/\).*/{
56748	    s//\1/
56749	    q
56750	  }
56751	  s/.*/./; q'`
56752  as_dir="$ac_dir"; as_fn_mkdir_p
56753  ac_builddir=.
56754
56755case "$ac_dir" in
56756.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56757*)
56758  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56759  # A ".." for each directory in $ac_dir_suffix.
56760  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56761  case $ac_top_builddir_sub in
56762  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56763  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56764  esac ;;
56765esac
56766ac_abs_top_builddir=$ac_pwd
56767ac_abs_builddir=$ac_pwd$ac_dir_suffix
56768# for backward compatibility:
56769ac_top_builddir=$ac_top_build_prefix
56770
56771case $srcdir in
56772  .)  # We are building in place.
56773    ac_srcdir=.
56774    ac_top_srcdir=$ac_top_builddir_sub
56775    ac_abs_top_srcdir=$ac_pwd ;;
56776  [\\/]* | ?:[\\/]* )  # Absolute name.
56777    ac_srcdir=$srcdir$ac_dir_suffix;
56778    ac_top_srcdir=$srcdir
56779    ac_abs_top_srcdir=$srcdir ;;
56780  *) # Relative name.
56781    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56782    ac_top_srcdir=$ac_top_build_prefix$srcdir
56783    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56784esac
56785ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56786
56787
56788  case $ac_mode in
56789  :F)
56790  #
56791  # CONFIG_FILE
56792  #
56793
56794_ACEOF
56795
56796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56797# If the template does not know about datarootdir, expand it.
56798# FIXME: This hack should be removed a few years after 2.60.
56799ac_datarootdir_hack=; ac_datarootdir_seen=
56800ac_sed_dataroot='
56801/datarootdir/ {
56802  p
56803  q
56804}
56805/@datadir@/p
56806/@docdir@/p
56807/@infodir@/p
56808/@localedir@/p
56809/@mandir@/p'
56810case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56811*datarootdir*) ac_datarootdir_seen=yes;;
56812*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56813  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56814$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56815_ACEOF
56816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56817  ac_datarootdir_hack='
56818  s&@datadir@&$datadir&g
56819  s&@docdir@&$docdir&g
56820  s&@infodir@&$infodir&g
56821  s&@localedir@&$localedir&g
56822  s&@mandir@&$mandir&g
56823  s&\\\${datarootdir}&$datarootdir&g' ;;
56824esac
56825_ACEOF
56826
56827# Neutralize VPATH when `$srcdir' = `.'.
56828# Shell code in configure.ac might set extrasub.
56829# FIXME: do we really want to maintain this feature?
56830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56831ac_sed_extra="$ac_vpsub
56832$extrasub
56833_ACEOF
56834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56835:t
56836/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56837s|@configure_input@|$ac_sed_conf_input|;t t
56838s&@top_builddir@&$ac_top_builddir_sub&;t t
56839s&@top_build_prefix@&$ac_top_build_prefix&;t t
56840s&@srcdir@&$ac_srcdir&;t t
56841s&@abs_srcdir@&$ac_abs_srcdir&;t t
56842s&@top_srcdir@&$ac_top_srcdir&;t t
56843s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56844s&@builddir@&$ac_builddir&;t t
56845s&@abs_builddir@&$ac_abs_builddir&;t t
56846s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56847$ac_datarootdir_hack
56848"
56849eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56850  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56851
56852test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56853  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56854  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
56855      "$ac_tmp/out"`; test -z "$ac_out"; } &&
56856  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56857which seems to be undefined.  Please make sure it is defined" >&5
56858$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56859which seems to be undefined.  Please make sure it is defined" >&2;}
56860
56861  rm -f "$ac_tmp/stdin"
56862  case $ac_file in
56863  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56864  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56865  esac \
56866  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56867 ;;
56868
56869
56870
56871  esac
56872
56873done # for ac_tag
56874
56875
56876as_fn_exit 0
56877_ACEOF
56878ac_clean_files=$ac_clean_files_save
56879
56880test $ac_write_fail = 0 ||
56881  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56882
56883
56884# configure is writing to config.log, and then calls config.status.
56885# config.status does its own redirection, appending to config.log.
56886# Unfortunately, on DOS this fails, as config.log is still kept open
56887# by configure, so config.status won't be able to write to it; its
56888# output is simply discarded.  So we exec the FD to /dev/null,
56889# effectively closing config.log, so it can be properly (re)opened and
56890# appended to by config.status.  When coming back to configure, we
56891# need to make the FD available again.
56892if test "$no_create" != yes; then
56893  ac_cs_success=:
56894  ac_config_status_args=
56895  test "$silent" = yes &&
56896    ac_config_status_args="$ac_config_status_args --quiet"
56897  exec 5>/dev/null
56898  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56899  exec 5>>config.log
56900  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56901  # would make configure fail if this is the last instruction.
56902  $ac_cs_success || as_fn_exit 1
56903fi
56904if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56905  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56906$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56907fi
56908
56909
56910# After AC_OUTPUT, we need to do final work
56911
56912
56913  # Try to move config.log (generated by autoconf) to the configure-support directory.
56914  if test -e ./config.log; then
56915    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56916  fi
56917
56918  # Rotate our log file (configure.log)
56919  if test -e "$OUTPUT_ROOT/configure.log.old"; then
56920    $RM -f "$OUTPUT_ROOT/configure.log.old"
56921  fi
56922  if test -e "$OUTPUT_ROOT/configure.log"; then
56923    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56924  fi
56925
56926  # Move configure.log from current directory to the build output root
56927  if test -e ./configure.log; then
56928    echo found it
56929    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56930  fi
56931
56932  # Make the compare script executable
56933  $CHMOD +x $OUTPUT_ROOT/compare.sh
56934
56935
56936# Finally output some useful information to the user
56937
56938  # Finally output some useful information to the user
56939
56940  printf "\n"
56941  printf "====================================================\n"
56942  if test "x$no_create" != "xyes"; then
56943    if test "x$IS_RECONFIGURE" != "xyes"; then
56944      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56945    else
56946      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56947    fi
56948  else
56949    if test "x$IS_RECONFIGURE" != "xyes"; then
56950      printf "A configuration has been successfully checked but not created\n"
56951    else
56952      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56953    fi
56954  fi
56955  if test "x$CONFIGURE_COMMAND_LINE" != x; then
56956    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56957  else
56958    printf "using default settings.\n"
56959  fi
56960
56961  printf "\n"
56962  printf "Configuration summary:\n"
56963  printf "* Debug level:    $DEBUG_LEVEL\n"
56964  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56965  printf "* JDK variant:    $JDK_VARIANT\n"
56966  printf "* JVM variants:   $with_jvm_variants\n"
56967  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56968  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
56969
56970  printf "\n"
56971  printf "Tools summary:\n"
56972  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56973    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56974  fi
56975  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56976  if test "x$TOOLCHAIN_VERSION" != "x"; then
56977    print_version=" $TOOLCHAIN_VERSION"
56978  fi
56979  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56980  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56981  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56982
56983  printf "\n"
56984  printf "Build performance summary:\n"
56985  printf "* Cores to use:   $JOBS\n"
56986  printf "* Memory limit:   $MEMORY_SIZE MB\n"
56987  if test "x$CCACHE_STATUS" != "x"; then
56988    printf "* ccache status:  $CCACHE_STATUS\n"
56989  fi
56990  printf "\n"
56991
56992  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56993    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56994    printf "will result in longer build times.\n"
56995    printf "\n"
56996  fi
56997
56998  if test "x$FOUND_ALT_VARIABLES" != "x"; then
56999    printf "WARNING: You have old-style ALT_ environment variables set.\n"
57000    printf "These are not respected, and will be ignored. It is recommended\n"
57001    printf "that you clean your environment. The following variables are set:\n"
57002    printf "$FOUND_ALT_VARIABLES\n"
57003    printf "\n"
57004  fi
57005
57006  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
57007    printf "WARNING: Your build output directory is not on a local disk.\n"
57008    printf "This will severely degrade build performance!\n"
57009    printf "It is recommended that you create an output directory on a local disk,\n"
57010    printf "and run the configure script again from that directory.\n"
57011    printf "\n"
57012  fi
57013
57014  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
57015    printf "WARNING: The result of this configuration has overridden an older\n"
57016    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
57017    printf "proper build. Failure to do so might result in strange build problems.\n"
57018    printf "\n"
57019  fi
57020
57021  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
57022    printf "WARNING: The result of this configuration was not saved.\n"
57023    printf "You should run without '--no-create | -n' to create the configuration.\n"
57024    printf "\n"
57025  fi
57026
57027
57028
57029  # Locate config.log.
57030  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
57031    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
57032  elif test -e "./config.log"; then
57033    CONFIG_LOG_PATH="."
57034  fi
57035
57036  if test -e "$CONFIG_LOG_PATH/config.log"; then
57037    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
57038    if test $? -eq 0; then
57039      printf "The following warnings were produced. Repeated here for convenience:\n"
57040      # We must quote sed expression (using []) to stop m4 from eating the [].
57041      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
57042      printf "\n"
57043    fi
57044  fi
57045
57046