generated-configure.sh revision 2741:d9c2fd996753
1104630Ssam#!/bin/bash
2104478Ssam#
3139749Simp# ##########################################################
4104478Ssam# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5104478Ssam# ##########################################################
6104478Ssam#
7162969Sjhb#! /bin/sh
8104478Ssam# Guess values for system-dependent variables and create Makefiles.
9104478Ssam# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10104478Ssam#
11104478Ssam# Report bugs to <build-dev@openjdk.java.net>.
12104478Ssam#
13104478Ssam#
14104478Ssam# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15104478Ssam#
16104478Ssam#
17104478Ssam# This configure script is free software; the Free Software Foundation
18104478Ssam# gives unlimited permission to copy, distribute and modify it.
19104478Ssam## -------------------- ##
20104478Ssam## M4sh Initialization. ##
21104478Ssam## -------------------- ##
22104478Ssam
23104478Ssam# Be more Bourne compatible
24104478SsamDUALCASE=1; export DUALCASE # for MKS sh
25104478Ssamif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26104478Ssam  emulate sh
27104478Ssam  NULLCMD=:
28104478Ssam  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29104478Ssam  # is contrary to our usage.  Disable this feature.
30104478Ssam  alias -g '${1+"$@"}'='"$@"'
31104478Ssam  setopt NO_GLOB_SUBST
32104478Ssamelse
33104478Ssam  case `(set -o) 2>/dev/null` in #(
34104478Ssam  *posix*) :
35104478Ssam    set -o posix ;; #(
36104478Ssam  *) :
37104478Ssam     ;;
38104478Ssamesac
39104478Ssamfi
40104478Ssam
41119418Sobrien
42119418Sobrienas_nl='
43119418Sobrien'
44104478Ssamexport as_nl
45104478Ssam# Printing a long string crashes Solaris 7 /usr/bin/printf.
46104478Ssamas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47104478Ssamas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48112124Ssamas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49112124Ssam# Prefer a ksh shell builtin over an external printf program on Solaris,
50104478Ssam# but without wasting forks for bash or zsh.
51104478Ssamif test -z "$BASH_VERSION$ZSH_VERSION" \
52104478Ssam    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53104478Ssam  as_echo='print -r --'
54104478Ssam  as_echo_n='print -rn --'
55104478Ssamelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56129879Sphk  as_echo='printf %s\n'
57104478Ssam  as_echo_n='printf %s'
58104478Ssamelse
59104478Ssam  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60104478Ssam    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61104478Ssam    as_echo_n='/usr/ucb/echo -n'
62104478Ssam  else
63104478Ssam    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64104478Ssam    as_echo_n_body='eval
65104478Ssam      arg=$1;
66104478Ssam      case $arg in #(
67104478Ssam      *"$as_nl"*)
68104478Ssam	expr "X$arg" : "X\\(.*\\)$as_nl";
69104478Ssam	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70104478Ssam      esac;
71104478Ssam      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72104478Ssam    '
73104478Ssam    export as_echo_n_body
74104478Ssam    as_echo_n='sh -c $as_echo_n_body as_echo'
75104478Ssam  fi
76167755Ssam  export as_echo_body
77104478Ssam  as_echo='sh -c $as_echo_body as_echo'
78167755Ssamfi
79167755Ssam
80119287Simp# The user is always right.
81119287Simpif test "${PATH_SEPARATOR+set}" != set; then
82104478Ssam  PATH_SEPARATOR=:
83104478Ssam  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84104478Ssam    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85104478Ssam      PATH_SEPARATOR=';'
86104478Ssam  }
87104478Ssamfi
88104478Ssam
89104478Ssam
90163648Sru# IFS
91111416Ssam# We need space, tab and new line, in precisely that order.  Quoting is
92104478Ssam# there to prevent editors from complaining about space-tab.
93104478Ssam# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94104478Ssam# splitting by setting IFS to empty value.)
95104478SsamIFS=" ""	$as_nl"
96112124Ssam
97112124Ssam# Find who we are.  Look in the path if we contain no directory separator.
98112124Ssamas_myself=
99104478Ssamcase $0 in #((
100104478Ssam  *[\\/]* ) as_myself=$0 ;;
101104478Ssam  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102104478Ssamfor as_dir in $PATH
103104478Ssamdo
104104478Ssam  IFS=$as_save_IFS
105104478Ssam  test -z "$as_dir" && as_dir=.
106104478Ssam    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107104478Ssam  done
108104478SsamIFS=$as_save_IFS
109104478Ssam
110194023Savg     ;;
111104478Ssamesac
112167755Ssam# We did not find ourselves, most probably we were run as `sh COMMAND'
113167755Ssam# in which case we are not to be found in the path.
114167755Ssamif test "x$as_myself" = x; then
115167755Ssam  as_myself=$0
116167755Ssamfi
117104478Ssamif test ! -f "$as_myself"; then
118104478Ssam  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119104478Ssam  exit 1
120104478Ssamfi
121104478Ssam
122104478Ssam# Unset variables that we do not need and which cause bugs (e.g. in
123104478Ssam# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124104478Ssam# suppresses any "Segmentation fault" message there.  '((' could
125104478Ssam# trigger a bug in pdksh 5.2.14.
126167755Ssamfor as_var in BASH_ENV ENV MAIL MAILPATH
127167755Ssamdo eval test x\${$as_var+set} = xset \
128167755Ssam  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129167755Ssamdone
130167755SsamPS1='$ '
131167755SsamPS2='> '
132227843SmariusPS4='+ '
133104478Ssam
134104478Ssam# NLS nuisances.
135104478SsamLC_ALL=C
136104478Ssamexport LC_ALL
137104478SsamLANGUAGE=C
138104478Ssamexport LANGUAGE
139104478Ssam
140104478Ssam# CDPATH.
141104478Ssam(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142105251Smarkm
143112124Ssam# Use a proper internal environment variable to ensure we don't fall
144112124Ssam  # into an infinite loop, continuously re-executing ourselves.
145112124Ssam  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146104478Ssam    _as_can_reexec=no; export _as_can_reexec;
147104478Ssam    # We cannot yet assume a decent shell, so we have to provide a
148104478Ssam# neutralization value for shells without unset; and this also
149111416Ssam# works around shells that cannot unset nonexistent variables.
150104478Ssam# Preserve -v and -x to the replacement shell.
151104478SsamBASH_ENV=/dev/null
152104478SsamENV=/dev/null
153104478Ssam(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154104478Ssamcase $- in # ((((
155104478Ssam  *v*x* | *x*v* ) as_opts=-vx ;;
156108823Ssam  *v* ) as_opts=-v ;;
157108823Ssam  *x* ) as_opts=-x ;;
158104478Ssam  * ) as_opts= ;;
159104478Ssamesac
160104478Ssamexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161104478Ssam# Admittedly, this is quite paranoid, since all the known shells bail
162104478Ssam# out after a failed `exec'.
163104478Ssam$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164104478Ssamas_fn_exit 255
165104478Ssam  fi
166104478Ssam  # We don't want this to propagate to other subprocesses.
167104478Ssam          { _as_can_reexec=; unset _as_can_reexec;}
168104630Ssamif test "x$CONFIG_SHELL" = x; then
169104630Ssam  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170104478Ssam  emulate sh
171104478Ssam  NULLCMD=:
172104478Ssam  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173104478Ssam  # is contrary to our usage.  Disable this feature.
174104478Ssam  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175104478Ssam  setopt NO_GLOB_SUBST
176227309Sedelse
177227309Sed  case \`(set -o) 2>/dev/null\` in #(
178109595Ssam  *posix*) :
179104478Ssam    set -o posix ;; #(
180104478Ssam  *) :
181104478Ssam     ;;
182104478Ssamesac
183104478Ssamfi
184104478Ssam"
185109595Ssam  as_required="as_fn_return () { (exit \$1); }
186109595Ssamas_fn_success () { as_fn_return 0; }
187104478Ssamas_fn_failure () { as_fn_return 1; }
188104478Ssamas_fn_ret_success () { return 0; }
189104478Ssamas_fn_ret_failure () { return 1; }
190104478Ssam
191104478Ssamexitcode=0
192104478Ssamas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193104478Ssamas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194104478Ssamas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195104478Ssamas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196104478Ssamif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197104478Ssam
198104478Ssamelse
199109595Ssam  exitcode=1; echo positional parameters were not saved.
200109595Ssamfi
201104478Ssamtest x\$exitcode = x0 || exit 1
202105215Sphktest -x / || exit 1"
203104478Ssam  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204104478Ssam  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205114105Ssam  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206114105Ssam  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207114105Ssamtest \$(( 1 + 1 )) = 2 || exit 1"
208142880Simp  if (eval "$as_required") 2>/dev/null; then :
209104478Ssam  as_have_required=yes
210104478Ssamelse
211104478Ssam  as_have_required=no
212142880Simpfi
213104478Ssam  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214111646Ssam
215111646Ssamelse
216111646Ssam  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217104478Ssamas_found=false
218104478Ssamfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219110522Ssamdo
220191894Sphilip  IFS=$as_save_IFS
221191894Sphilip  test -z "$as_dir" && as_dir=.
222110522Ssam  as_found=:
223142880Simp  case $as_dir in #(
224104478Ssam	 /*)
225104478Ssam	   for as_base in sh bash ksh sh5; do
226104478Ssam	     # Try only shells that exist, to save several forks.
227104478Ssam	     as_shell=$as_dir/$as_base
228104478Ssam	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229104478Ssam		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230104478Ssam  CONFIG_SHELL=$as_shell as_have_required=yes
231104478Ssam		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232104478Ssam  break 2
233104478Ssamfi
234111646Ssamfi
235111646Ssam	   done;;
236104478Ssam       esac
237104478Ssam  as_found=false
238104478Ssamdone
239104478Ssam$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240110522Ssam	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241191894Sphilip  CONFIG_SHELL=$SHELL as_have_required=yes
242104478Ssamfi; }
243104478SsamIFS=$as_save_IFS
244104478Ssam
245104478Ssam
246104478Ssam      if test "x$CONFIG_SHELL" != x; then :
247104478Ssam  export CONFIG_SHELL
248104478Ssam             # We cannot yet assume a decent shell, so we have to provide a
249114105Ssam# neutralization value for shells without unset; and this also
250114105Ssam# works around shells that cannot unset nonexistent variables.
251114105Ssam# Preserve -v and -x to the replacement shell.
252114105SsamBASH_ENV=/dev/null
253114105SsamENV=/dev/null
254114105Ssam(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255104478Ssamcase $- in # ((((
256104478Ssam  *v*x* | *x*v* ) as_opts=-vx ;;
257104478Ssam  *v* ) as_opts=-v ;;
258104478Ssam  *x* ) as_opts=-x ;;
259112124Ssam  * ) as_opts= ;;
260112124Ssamesac
261112124Ssamexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262284959Smarkm# Admittedly, this is quite paranoid, since all the known shells bail
263284959Smarkm# out after a failed `exec'.
264112124Ssam$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265112124Ssamexit 255
266104478Ssamfi
267104478Ssam
268104478Ssam    if test x$as_have_required = xno; then :
269104478Ssam  $as_echo "$0: This script requires a shell more modern than all"
270104478Ssam  $as_echo "$0: the shells that I found on your system."
271254263Sscottl  if test x${ZSH_VERSION+set} = xset ; then
272104478Ssam    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273104478Ssam    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274104478Ssam  else
275104478Ssam    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276104478Ssam$0: build-dev@openjdk.java.net about your system, including
277104478Ssam$0: any error possibly output before this message. Then
278104478Ssam$0: install a modern shell, or manually run the script
279104478Ssam$0: under such a shell if you do have one."
280104478Ssam  fi
281104478Ssam  exit 1
282104478Ssamfi
283104478Ssamfi
284104478Ssamfi
285104478SsamSHELL=${CONFIG_SHELL-/bin/sh}
286104478Ssamexport SHELL
287104478Ssam# Unset more variables known to interfere with behavior of common tools.
288104478SsamCLICOLOR_FORCE= GREP_OPTIONS=
289104478Ssamunset CLICOLOR_FORCE GREP_OPTIONS
290104478Ssam
291104478Ssam## --------------------- ##
292111646Ssam## M4sh Shell Functions. ##
293111646Ssam## --------------------- ##
294104478Ssam# as_fn_unset VAR
295104478Ssam# ---------------
296104478Ssam# Portably unset VAR.
297104478Ssamas_fn_unset ()
298104478Ssam{
299104478Ssam  { eval $1=; unset $1;}
300104478Ssam}
301114105Ssamas_unset=as_fn_unset
302114105Ssam
303114105Ssam# as_fn_set_status STATUS
304191894Sphilip# -----------------------
305191894Sphilip# Set $? to STATUS, without forking.
306114105Ssamas_fn_set_status ()
307114105Ssam{
308114105Ssam  return $1
309104478Ssam} # as_fn_set_status
310104478Ssam
311104478Ssam# as_fn_exit STATUS
312104478Ssam# -----------------
313104478Ssam# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314104478Ssamas_fn_exit ()
315162969Sjhb{
316254263Sscottl  set +e
317104478Ssam  as_fn_set_status $1
318162969Sjhb  exit $1
319104478Ssam} # as_fn_exit
320104478Ssam
321104478Ssam# as_fn_mkdir_p
322127135Snjl# -------------
323127135Snjl# Create "$as_dir" as a directory, including parents if necessary.
324104478Ssamas_fn_mkdir_p ()
325104478Ssam{
326104478Ssam
327104478Ssam  case $as_dir in #(
328104478Ssam  -*) as_dir=./$as_dir;;
329104478Ssam  esac
330104478Ssam  test -d "$as_dir" || eval $as_mkdir_p || {
331104478Ssam    as_dirs=
332104478Ssam    while :; do
333104478Ssam      case $as_dir in #(
334104478Ssam      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335127135Snjl      *) as_qdir=$as_dir;;
336127135Snjl      esac
337104478Ssam      as_dirs="'$as_qdir' $as_dirs"
338104478Ssam      as_dir=`$as_dirname -- "$as_dir" ||
339108823Ssam$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340104478Ssam	 X"$as_dir" : 'X\(//\)[^/]' \| \
341104478Ssam	 X"$as_dir" : 'X\(//\)$' \| \
342104478Ssam	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343104478Ssam$as_echo X"$as_dir" |
344104478Ssam    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345115747Ssam	    s//\1/
346166901Spiso	    q
347104478Ssam	  }
348108823Ssam	  /^X\(\/\/\)[^/].*/{
349104478Ssam	    s//\1/
350104478Ssam	    q
351167755Ssam	  }
352104478Ssam	  /^X\(\/\/\)$/{
353104478Ssam	    s//\1/
354108823Ssam	    q
355104478Ssam	  }
356104478Ssam	  /^X\(\/\).*/{
357104478Ssam	    s//\1/
358104478Ssam	    q
359104478Ssam	  }
360232874Sscottl	  s/.*/./; q'`
361104478Ssam      test -d "$as_dir" && break
362104478Ssam    done
363104478Ssam    test -z "$as_dirs" || eval "mkdir $as_dirs"
364104478Ssam  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365108823Ssam
366104478Ssam
367108823Ssam} # as_fn_mkdir_p
368104478Ssam
369117126Sscottl# as_fn_executable_p FILE
370104478Ssam# -----------------------
371104478Ssam# Test if FILE is an executable regular file.
372108823Ssamas_fn_executable_p ()
373104478Ssam{
374104478Ssam  test -f "$1" && test -x "$1"
375104478Ssam} # as_fn_executable_p
376104478Ssam# as_fn_append VAR VALUE
377104478Ssam# ----------------------
378104478Ssam# Append the text in VALUE to the end of the definition contained in VAR. Take
379104478Ssam# advantage of any shell optimizations that allow amortized linear growth over
380104478Ssam# repeated appends, instead of the typical quadratic growth present in naive
381104478Ssam# implementations.
382104478Ssamif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383104478Ssam  eval 'as_fn_append ()
384104478Ssam  {
385104478Ssam    eval $1+=\$2
386104478Ssam  }'
387104478Ssamelse
388104478Ssam  as_fn_append ()
389104478Ssam  {
390104478Ssam    eval $1=\$$1\$2
391104478Ssam  }
392104478Ssamfi # as_fn_append
393104478Ssam
394104478Ssam# as_fn_arith ARG...
395104478Ssam# ------------------
396104478Ssam# Perform arithmetic evaluation on the ARGs, and store the result in the
397104478Ssam# global $as_val. Take advantage of shells that can avoid forks. The arguments
398104478Ssam# must be portable across $(()) and expr.
399115747Ssamif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400115747Ssam  eval 'as_fn_arith ()
401115747Ssam  {
402115747Ssam    as_val=$(( $* ))
403104478Ssam  }'
404104478Ssamelse
405104478Ssam  as_fn_arith ()
406167755Ssam  {
407167755Ssam    as_val=`expr "$@" || test $? -eq 1`
408167755Ssam  }
409167755Ssamfi # as_fn_arith
410104478Ssam
411104478Ssam
412104478Ssam# as_fn_error STATUS ERROR [LINENO LOG_FD]
413104478Ssam# ----------------------------------------
414104478Ssam# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415104478Ssam# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416104478Ssam# script with STATUS, using 1 if that was 0.
417104478Ssamas_fn_error ()
418104478Ssam{
419104478Ssam  as_status=$1; test $as_status -eq 0 && as_status=1
420104478Ssam  if test "$4"; then
421104478Ssam    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422104478Ssam    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423104478Ssam  fi
424104478Ssam  $as_echo "$as_me: error: $2" >&2
425104478Ssam  as_fn_exit $as_status
426104478Ssam} # as_fn_error
427104478Ssam
428104478Ssamif expr a : '\(a\)' >/dev/null 2>&1 &&
429112124Ssam   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430112124Ssam  as_expr=expr
431112124Ssamelse
432112124Ssam  as_expr=false
433112124Ssamfi
434112124Ssam
435112124Ssamif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436112124Ssam  as_basename=basename
437112124Ssamelse
438104478Ssam  as_basename=false
439104478Ssamfi
440104478Ssam
441104478Ssamif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442104478Ssam  as_dirname=dirname
443104478Ssamelse
444104478Ssam  as_dirname=false
445104478Ssamfi
446104478Ssam
447104478Ssamas_me=`$as_basename -- "$0" ||
448104478Ssam$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449104478Ssam	 X"$0" : 'X\(//\)$' \| \
450104478Ssam	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451104478Ssam$as_echo X/"$0" |
452104478Ssam    sed '/^.*\/\([^/][^/]*\)\/*$/{
453104478Ssam	    s//\1/
454104478Ssam	    q
455104478Ssam	  }
456104478Ssam	  /^X\/\(\/\/\)$/{
457104478Ssam	    s//\1/
458104478Ssam	    q
459104478Ssam	  }
460283291Sjkim	  /^X\/\(\/\).*/{
461104478Ssam	    s//\1/
462104478Ssam	    q
463104478Ssam	  }
464104478Ssam	  s/.*/./; q'`
465104478Ssam
466115747Ssam# Avoid depending upon Character Ranges.
467115747Ssamas_cr_letters='abcdefghijklmnopqrstuvwxyz'
468104478Ssamas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469104478Ssamas_cr_Letters=$as_cr_letters$as_cr_LETTERS
470104478Ssamas_cr_digits='0123456789'
471104478Ssamas_cr_alnum=$as_cr_Letters$as_cr_digits
472167755Ssam
473104630Ssam
474167755Ssam  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475104630Ssam  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476104478Ssam  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477361044Sjhb  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478104478Ssam  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479108823Ssam  sed -n '
480108823Ssam    p
481108823Ssam    /[$]LINENO/=
482108823Ssam  ' <$as_myself |
483108823Ssam    sed '
484108823Ssam      s/[$]LINENO.*/&-/
485108823Ssam      t lineno
486108823Ssam      b
487104478Ssam      :lineno
488104478Ssam      N
489104478Ssam      :loop
490104478Ssam      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491104478Ssam      t loop
492104478Ssam      s/-\n.*//
493104478Ssam    ' >$as_me.lineno &&
494104478Ssam  chmod +x "$as_me.lineno" ||
495104478Ssam    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496104478Ssam
497104478Ssam  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498104478Ssam  # already done that, so ensure we don't try to do so again and fall
499108823Ssam  # in an infinite loop.  This has already happened in practice.
500108823Ssam  _as_can_reexec=no; export _as_can_reexec
501115747Ssam  # Don't try to exec as it changes $[0], causing all sort of problems
502115747Ssam  # (the dirname of $[0] is not the place where we might find the
503115747Ssam  # original and so on.  Autoconf is especially sensitive to this).
504104478Ssam  . "./$as_me.lineno"
505104478Ssam  # Exit status is that of the last command.
506104478Ssam  exit
507104478Ssam}
508104478Ssam
509112124SsamECHO_C= ECHO_N= ECHO_T=
510112124Ssamcase `echo -n x` in #(((((
511112124Ssam-n*)
512112124Ssam  case `echo 'xy\c'` in
513112124Ssam  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514108823Ssam  xy)  ECHO_C='\c';;
515108823Ssam  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516108823Ssam       ECHO_T='	';;
517108823Ssam  esac;;
518163648Sru*)
519108823Ssam  ECHO_N='-n';;
520108823Ssamesac
521108823Ssam
522115747Ssamrm -f conf$$ conf$$.exe conf$$.file
523159224Spjdif test -d conf$$.dir; then
524108823Ssam  rm -f conf$$.dir/conf$$.file
525108823Ssamelse
526108823Ssam  rm -f conf$$.dir
527108823Ssam  mkdir conf$$.dir 2>/dev/null
528108823Ssamfi
529108823Ssamif (echo >conf$$.file) 2>/dev/null; then
530108823Ssam  if ln -s conf$$.file conf$$ 2>/dev/null; then
531115747Ssam    as_ln_s='ln -s'
532108823Ssam    # ... but there are two gotchas:
533104478Ssam    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534104478Ssam    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535104478Ssam    # In both cases, we have to default to `cp -pR'.
536104478Ssam    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537104478Ssam      as_ln_s='cp -pR'
538104478Ssam  elif ln conf$$.file conf$$ 2>/dev/null; then
539104478Ssam    as_ln_s=ln
540104478Ssam  else
541104478Ssam    as_ln_s='cp -pR'
542104478Ssam  fi
543104478Ssamelse
544104478Ssam  as_ln_s='cp -pR'
545104478Ssamfi
546104478Ssamrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547194023Savgrmdir conf$$.dir 2>/dev/null
548104478Ssam
549104478Ssamif mkdir -p . 2>/dev/null; then
550104478Ssam  as_mkdir_p='mkdir -p "$as_dir"'
551104478Ssamelse
552104478Ssam  test -d ./-p && rmdir ./-p
553194023Savg  as_mkdir_p=false
554104478Ssamfi
555104478Ssam
556104478Ssamas_test_x='test -x'
557104478Ssamas_executable_p=as_fn_executable_p
558104478Ssam
559104478Ssam# Sed expression to map a string onto a valid CPP name.
560104478Ssamas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561104478Ssam
562104478Ssam# Sed expression to map a string onto a valid variable name.
563104478Ssamas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564104478Ssam
565104478Ssam
566104478Ssamtest -n "$DJDIR" || exec 7<&0 </dev/null
567104478Ssamexec 6>&1
568104478Ssam
569104478Ssam# Name of the host.
570104478Ssam# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571104478Ssam# so uname gets run too.
572104478Ssamac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573104478Ssam
574104478Ssam#
575104478Ssam# Initializations.
576104478Ssam#
577104478Ssamac_default_prefix=/usr/local
578104478Ssamac_clean_files=
579104478Ssamac_config_libobj_dir=.
580104478SsamLIBOBJS=
581104478Ssamcross_compiling=no
582104478Ssamsubdirs=
583104478SsamMFLAGS=
584104478SsamMAKEFLAGS=
585104478Ssam
586104478Ssam# Identity of this package.
587104478SsamPACKAGE_NAME='OpenJDK'
588104478SsamPACKAGE_TARNAME='openjdk'
589104478SsamPACKAGE_VERSION='jdk9'
590104478SsamPACKAGE_STRING='OpenJDK jdk9'
591104478SsamPACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592104478SsamPACKAGE_URL='http://openjdk.java.net'
593104478Ssam
594104478Ssam# Factoring default headers for most tests.
595104478Ssamac_includes_default="\
596104478Ssam#include <stdio.h>
597104478Ssam#ifdef HAVE_SYS_TYPES_H
598115747Ssam# include <sys/types.h>
599104478Ssam#endif
600104478Ssam#ifdef HAVE_SYS_STAT_H
601104478Ssam# include <sys/stat.h>
602104478Ssam#endif
603104478Ssam#ifdef STDC_HEADERS
604104478Ssam# include <stdlib.h>
605104478Ssam# include <stddef.h>
606104478Ssam#else
607115747Ssam# ifdef HAVE_STDLIB_H
608104478Ssam#  include <stdlib.h>
609104478Ssam# endif
610104478Ssam#endif
611104478Ssam#ifdef HAVE_STRING_H
612104478Ssam# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613104478Ssam#  include <memory.h>
614104478Ssam# endif
615163648Sru# include <string.h>
616104478Ssam#endif
617104478Ssam#ifdef HAVE_STRINGS_H
618108471Ssam# include <strings.h>
619104478Ssam#endif
620104478Ssam#ifdef HAVE_INTTYPES_H
621104478Ssam# include <inttypes.h>
622104478Ssam#endif
623104478Ssam#ifdef HAVE_STDINT_H
624104478Ssam# include <stdint.h>
625104478Ssam#endif
626104478Ssam#ifdef HAVE_UNISTD_H
627104478Ssam# include <unistd.h>
628104478Ssam#endif"
629104478Ssam
630104478Ssamac_subst_vars='LTLIBOBJS
631104478SsamLIBOBJS
632104478SsamCFLAGS_CCACHE
633104478SsamCCACHE
634104478SsamUSE_PRECOMPILED_HEADER
635104478SsamBUILD_ICECC
636104478SsamICECC
637104478SsamICECC_WRAPPER
638104478SsamICECC_CREATE_ENV
639115747SsamICECC_CMD
640104478SsamENABLE_JAVAC_SERVER
641104478SsamENABLE_SJAVAC
642104478SsamSJAVAC_SERVER_JAVA_FLAGS
643104478SsamSJAVAC_SERVER_JAVA
644104478SsamJAVA_TOOL_FLAGS_SMALL
645104478SsamJAVA_FLAGS_SMALL
646104478SsamJAVA_FLAGS_JAVAC
647104478SsamBOOTCYCLE_JVM_ARGS_BIG
648104478SsamJAVA_FLAGS_BIG
649104478SsamJAVA_FLAGS
650115747SsamTEST_JOBS
651104478SsamJOBS
652104478SsamMEMORY_SIZE
653104478SsamNUM_CORES
654108823SsamENABLE_GENERATE_CLASSLIST
655104478SsamBUILD_FAILURE_HANDLER
656104478SsamENABLE_INTREE_EC
657104478SsamVALID_JVM_FEATURES
658104478SsamJVM_FEATURES_custom
659108823SsamJVM_FEATURES_zeroshark
660104478SsamJVM_FEATURES_zero
661104478SsamJVM_FEATURES_minimal
662104478SsamJVM_FEATURES_core
663163648SruJVM_FEATURES_client
664104478SsamJVM_FEATURES_server
665104478SsamINCLUDE_GRAAL
666104478SsamSTLPORT_LIB
667104478SsamLIBZIP_CAN_USE_MMAP
668104478SsamLIBDL
669104478SsamLIBM
670104478SsamUSE_EXTERNAL_LCMS
671104478SsamLCMS_LIBS
672115747SsamLCMS_CFLAGS
673104478SsamUSE_EXTERNAL_LIBZ
674104478SsamUSE_EXTERNAL_LIBPNG
675104478SsamPNG_LIBS
676104478SsamPNG_CFLAGS
677104478SsamUSE_EXTERNAL_LIBGIF
678104478SsamUSE_EXTERNAL_LIBJPEG
679104478SsamLLVM_LIBS
680104478SsamLLVM_LDFLAGS
681104478SsamLLVM_CFLAGS
682104478SsamLLVM_CONFIG
683104478SsamLIBFFI_LIB_FILE
684104478SsamENABLE_LIBFFI_BUNDLING
685104478SsamLIBFFI_LIBS
686104478SsamLIBFFI_CFLAGS
687104478SsamALSA_LIBS
688104478SsamALSA_CFLAGS
689115747SsamFREETYPE_BUNDLE_LIB_PATH
690104478SsamFREETYPE_LIBS
691104478SsamFREETYPE_CFLAGS
692115747SsamCUPS_CFLAGS
693104478SsamX_EXTRA_LIBS
694104478SsamX_LIBS
695104478SsamX_PRE_LIBS
696158828SpjdX_CFLAGS
697158828SpjdXMKMF
698158828SpjdMSVCP_DLL
699158828SpjdMSVCR_DLL
700104478SsamLIBCXX
701104478SsamFIXPATH_DETACH_FLAG
702104478SsamFIXPATH
703104478SsamBUILD_GTEST
704104478SsamENABLE_AOT
705104478SsamGCOV_ENABLED
706158828SpjdZIP_EXTERNAL_DEBUG_SYMBOLS
707104478SsamCOPY_DEBUG_SYMBOLS
708104478SsamCOMPILE_WITH_DEBUG_SYMBOLS
709104478SsamCFLAGS_WARNINGS_ARE_ERRORS
710104478SsamBUILD_CC_DISABLE_WARNING_PREFIX
711104478SsamDISABLE_WARNING_PREFIX
712104478SsamWARNINGS_AS_ERRORS
713104478SsamCOMPILER_SUPPORTS_TARGET_BITS_FLAG
714111416SsamLDFLAGS_TESTEXE
715104478SsamLDFLAGS_TESTLIB
716104478SsamCXXFLAGS_TESTEXE
717104478SsamCXXFLAGS_TESTLIB
718104478SsamCFLAGS_TESTEXE
719104478SsamCFLAGS_TESTLIB
720104478SsamOPENJDK_BUILD_JVM_LIBS
721104478SsamOPENJDK_BUILD_JVM_ASFLAGS
722108471SsamOPENJDK_BUILD_JVM_LDFLAGS
723108471SsamOPENJDK_BUILD_JVM_CFLAGS
724108471SsamOPENJDK_BUILD_LDFLAGS_HASH_STYLE
725111416SsamOPENJDK_BUILD_LDFLAGS_CXX_JDK
726111416SsamOPENJDK_BUILD_JDKEXE_LIBS
727108471SsamOPENJDK_BUILD_JDKLIB_LIBS
728108471SsamOPENJDK_BUILD_LDFLAGS_JDKEXE
729108471SsamOPENJDK_BUILD_LDFLAGS_JDKLIB
730108471SsamOPENJDK_BUILD_CXXFLAGS_JDKEXE
731108471SsamOPENJDK_BUILD_CXXFLAGS_JDKLIB
732111416SsamOPENJDK_BUILD_CFLAGS_JDKEXE
733111416SsamOPENJDK_BUILD_CFLAGS_JDKLIB
734111416SsamOPENJDK_BUILD_CXXSTD_CXXFLAG
735111416SsamJVM_LIBS
736111416SsamJVM_ASFLAGS
737111416SsamJVM_LDFLAGS
738111416SsamJVM_CFLAGS
739111416SsamLDFLAGS_HASH_STYLE
740111416SsamLDFLAGS_CXX_JDK
741111416SsamJDKEXE_LIBS
742111416SsamJDKLIB_LIBS
743111416SsamLDFLAGS_JDKEXE
744111416SsamLDFLAGS_JDKLIB
745111416SsamCXXFLAGS_JDKEXE
746104478SsamCXXFLAGS_JDKLIB
747108471SsamCFLAGS_JDKEXE
748104478SsamCFLAGS_JDKLIB
749104478SsamMACOSX_VERSION_MIN
750108471SsamCXXSTD_CXXFLAG
751108471SsamJDK_ARCH_ABI_PROP_NAME
752111416SsamCXX_O_FLAG_SIZE
753104478SsamCXX_O_FLAG_NONE
754111416SsamCXX_O_FLAG_DEBUG
755111416SsamCXX_O_FLAG_NORM
756111416SsamCXX_O_FLAG_HI
757111416SsamCXX_O_FLAG_HIGHEST
758111416SsamCXX_O_FLAG_HIGHEST_JVM
759111416SsamC_O_FLAG_SIZE
760104478SsamC_O_FLAG_NONE
761111416SsamC_O_FLAG_DEBUG
762104478SsamC_O_FLAG_NORM
763104478SsamC_O_FLAG_HI
764104478SsamC_O_FLAG_HIGHEST
765104478SsamC_O_FLAG_HIGHEST_JVM
766104478SsamJVM_CFLAGS_SYMBOLS
767104478SsamCXXFLAGS_DEBUG_SYMBOLS
768163648SruCFLAGS_DEBUG_SYMBOLS
769104478SsamCXX_FLAG_DEPS
770104478SsamC_FLAG_DEPS
771104478SsamSHARED_LIBRARY_FLAGS
772104478SsamSET_SHARED_LIBRARY_MAPFILE
773104478SsamSET_SHARED_LIBRARY_NAME
774104478SsamSET_SHARED_LIBRARY_ORIGIN
775104478SsamSET_EXECUTABLE_ORIGIN
776104478SsamCXX_FLAG_REORDER
777104478SsamC_FLAG_REORDER
778104478SsamJVM_RCFLAGS
779104478SsamRC_FLAGS
780104478SsamAR_OUT_OPTION
781104478SsamLD_OUT_OPTION
782104478SsamEXE_OUT_OPTION
783104478SsamCC_OUT_OPTION
784163648SruSTRIPFLAGS
785104478SsamARFLAGS
786104478SsamCOMPILER_BINDCMD_FILE_FLAG
787104478SsamCOMPILER_COMMAND_FILE_FLAG
788104478SsamCOMPILER_TARGET_BITS_FLAG
789104478SsamJIB_JAR
790104478SsamJT_HOME
791104478SsamJTREGEXE
792104478SsamHOTSPOT_TOOLCHAIN_TYPE
793104478SsamUSING_BROKEN_SUSE_LD
794108471SsamPACKAGE_PATH
795108471SsamBUILD_AS
796108471SsamBUILD_LDCXX
797108823SsamBUILD_LD
798104478SsamBUILD_STRIP
799104478SsamBUILD_OBJCOPY
800104478SsamBUILD_AR
801111416SsamBUILD_NM
802104478SsamBUILD_CXX
803111416SsamBUILD_CC
804104478SsamBUILD_SYSROOT_LDFLAGS
805111416SsamBUILD_SYSROOT_CFLAGS
806111416Ssamac_ct_OBJDUMP
807111416SsamOBJDUMP
808111416Ssamac_ct_OBJCOPY
809111416SsamOBJCOPY
810104478Ssamac_ct_NM
811111416Ssamac_ct_STRIP
812111416SsamGNM
813104478SsamNM
814111416SsamSTRIP
815111416SsamMSBUILD
816111416SsamDUMPBIN
817111416SsamRC
818104478SsamMT
819163648SruLIPO
820111416Ssamac_ct_AR
821111416SsamAR
822111416SsamAS
823108471SsamLDCXX
824108471SsamLD
825111416SsamCXXCPP
826104478SsamCPP
827104478SsamCXX_VERSION_NUMBER
828159225SpjdCC_VERSION_NUMBER
829159225Spjdac_ct_CXX
830159225SpjdCXXFLAGS
831159225SpjdCXX
832159225SpjdTOOLCHAIN_PATH_CXX
833159225SpjdPOTENTIAL_CXX
834159225SpjdOBJEXT
835159225SpjdEXEEXT
836159225Spjdac_ct_CC
837159225SpjdCPPFLAGS
838159225SpjdLDFLAGS
839159225SpjdCFLAGS
840159225SpjdCC
841159225SpjdTOOLCHAIN_PATH_CC
842159225SpjdPOTENTIAL_CC
843159225SpjdTOOLCHAIN_VERSION
844159225SpjdVS_LIB
845159225SpjdVS_INCLUDE
846159225SpjdVS_PATH
847159225SpjdCYGWIN_LINK
848159225SpjdSYSROOT_LDFLAGS
849159225SpjdSYSROOT_CFLAGS
850159225SpjdEXTRA_LDFLAGS
851159225SpjdEXTRA_CXXFLAGS
852159225SpjdEXTRA_CFLAGS
853159225SpjdEXE_SUFFIX
854159225SpjdOBJ_SUFFIX
855159225SpjdSTATIC_LIBRARY
856159225SpjdSHARED_LIBRARY
857159225SpjdSTATIC_LIBRARY_SUFFIX
858159225SpjdSHARED_LIBRARY_SUFFIX
859159225SpjdLIBRARY_PREFIX
860159225SpjdTOOLCHAIN_TYPE
861159232SpjdSTATIC_BUILD
862159225SpjdIMPORT_MODULES_MAKE
863159225SpjdIMPORT_MODULES_SRC
864159225SpjdIMPORT_MODULES_MAN
865159225SpjdIMPORT_MODULES_LEGAL
866159232SpjdIMPORT_MODULES_CONF
867159232SpjdIMPORT_MODULES_LIBS
868159225SpjdIMPORT_MODULES_CMDS
869159225SpjdIMPORT_MODULES_CLASSES
870159225SpjdBUILD_OUTPUT
871159225SpjdJDK_TOPDIR
872159225SpjdNASHORN_TOPDIR
873159225SpjdHOTSPOT_TOPDIR
874159225SpjdJAXWS_TOPDIR
875159225SpjdJAXP_TOPDIR
876159225SpjdCORBA_TOPDIR
877159232SpjdLANGTOOLS_TOPDIR
878159225SpjdEXTERNAL_BUILDJDK
879159225SpjdBUILD_JDK
880159225SpjdCREATE_BUILDJDK
881159225SpjdJLINK
882159232SpjdJMOD
883159232SpjdJAVAC_FLAGS
884159225SpjdBOOT_JDK_MODULAR
885159225SpjdBOOT_JDK_SOURCETARGET
886159225SpjdJARSIGNER
887159225SpjdJAR
888159225SpjdJAVAH
889159225SpjdJAVAC
890159225SpjdJAVA
891104478SsamBOOT_JDK
892104478SsamJAVA_CHECK
893104478SsamJAVAC_CHECK
894104478SsamVERSION_IS_GA
895104478SsamVERSION_SHORT
896104478SsamVERSION_STRING
897167755SsamVERSION_NUMBER_FOUR_POSITIONS
898104478SsamVERSION_NUMBER
899167755SsamVERSION_OPT
900104478SsamVERSION_BUILD
901104478SsamVERSION_PRE
902159225SpjdVERSION_PATCH
903104478SsamVERSION_SECURITY
904104478SsamVERSION_MINOR
905104478SsamVERSION_MAJOR
906104478SsamMACOSX_BUNDLE_ID_BASE
907104478SsamMACOSX_BUNDLE_NAME_BASE
908104478SsamHOTSPOT_VM_DISTRO
909104478SsamCOMPANY_NAME
910104478SsamJDK_RC_PLATFORM_NAME
911104478SsamPRODUCT_SUFFIX
912104478SsamPRODUCT_NAME
913104478SsamLAUNCHER_NAME
914104478SsamJLINK_KEEP_PACKAGED_MODULES
915104478SsamCOPYRIGHT_YEAR
916104478SsamCOMPRESS_JARS
917104478SsamINCLUDE_SA
918104478SsamUNLIMITED_CRYPTO
919104478SsamCACERTS_FILE
920104478SsamENABLE_FULL_DOCS
921104478SsamENABLE_HEADLESS_ONLY
922104478SsamDEFAULT_MAKE_TARGET
923104478SsamOS_VERSION_MICRO
924104478SsamOS_VERSION_MINOR
925104478SsamOS_VERSION_MAJOR
926104478SsamPKG_CONFIG
927104478SsamBASH_ARGS
928104478SsamSETFILE
929104478SsamCODESIGN
930104478SsamXATTR
931104478SsamDSYMUTIL
932104478SsamIS_GNU_TIME
933104478SsamPATCH
934104478SsamDTRACE
935104478SsamFLOCK
936104478SsamTIME
937104478SsamSTAT
938104478SsamHG
939104478SsamDOT
940104478SsamREADELF
941104478SsamOTOOL
942104478SsamLDD
943104478SsamZIPEXE
944104478SsamUNZIP
945104478SsamTAR_SUPPORTS_TRANSFORM
946104478SsamTAR_INCLUDE_PARAM
947104478SsamTAR_CREATE_EXTRA_PARAM
948104478SsamTAR_TYPE
949104478SsamFIND_DELETE
950104478SsamOUTPUT_SYNC
951104478SsamOUTPUT_SYNC_SUPPORTED
952104478SsamCHECK_TOOLSDIR_MAKE
953104478SsamCHECK_TOOLSDIR_GMAKE
954104478SsamCHECK_MAKE
955104478SsamCHECK_GMAKE
956104478SsamMAKE
957115747SsamPKGHANDLER
958104478SsamCONFIGURESUPPORT_OUTPUTDIR
959104478SsamOUTPUT_ROOT
960104478SsamCONF_NAME
961104478SsamSPEC
962104478SsamSDKROOT
963159225SpjdXCODEBUILD
964159225SpjdJVM_VARIANT_MAIN
965159225SpjdVALID_JVM_VARIANTS
966159225SpjdJVM_VARIANTS
967104478SsamDEBUG_LEVEL
968104478SsamHOTSPOT_DEBUG_LEVEL
969104478SsamJDK_VARIANT
970158705SpjdUSERNAME
971158705SpjdCANONICAL_TOPDIR
972158705SpjdORIGINAL_TOPDIR
973159233SpjdTOPDIR
974158705SpjdPATH_SEP
975159233SpjdHOTSPOT_BUILD_CPU_DEFINE
976158705SpjdHOTSPOT_BUILD_CPU_ARCH
977158705SpjdHOTSPOT_BUILD_CPU
978159225SpjdHOTSPOT_BUILD_OS_TYPE
979159225SpjdHOTSPOT_BUILD_OS
980159225SpjdOPENJDK_BUILD_BUNDLE_PLATFORM
981104478SsamOPENJDK_BUILD_OS_EXPORT_DIR
982104478SsamOPENJDK_BUILD_CPU_OSARCH
983104478SsamOPENJDK_BUILD_CPU_ISADIR
984104478SsamOPENJDK_BUILD_CPU_LEGACY_LIB
985104478SsamOPENJDK_BUILD_CPU_LEGACY
986104478SsamHOTSPOT_TARGET_CPU_DEFINE
987104478SsamHOTSPOT_TARGET_CPU_ARCH
988104478SsamHOTSPOT_TARGET_CPU
989104478SsamHOTSPOT_TARGET_OS_TYPE
990104478SsamHOTSPOT_TARGET_OS
991104478SsamDEFINE_CROSS_COMPILE_ARCH
992167755SsamOPENJDK_TARGET_BUNDLE_PLATFORM
993104478SsamOPENJDK_TARGET_OS_EXPORT_DIR
994167755SsamOPENJDK_TARGET_CPU_OSARCH
995115747SsamOPENJDK_TARGET_CPU_ISADIR
996116924SsamOPENJDK_TARGET_CPU_LEGACY_LIB
997104478SsamOPENJDK_TARGET_CPU_LEGACY
998104478SsamRELEASE_FILE_OS_ARCH
999104478SsamRELEASE_FILE_OS_NAME
1000104478SsamOPENJDK_MODULE_TARGET_PLATFORM
1001104478SsamCOMPILE_TYPE
1002115747SsamOPENJDK_TARGET_CPU_ENDIAN
1003115747SsamOPENJDK_TARGET_CPU_BITS
1004115747SsamOPENJDK_TARGET_CPU_ARCH
1005115747SsamOPENJDK_TARGET_CPU
1006115747SsamOPENJDK_TARGET_OS_ENV
1007115747SsamOPENJDK_TARGET_OS_TYPE
1008104478SsamOPENJDK_TARGET_OS
1009115747SsamOPENJDK_BUILD_CPU_ENDIAN
1010104478SsamOPENJDK_BUILD_CPU_BITS
1011104478SsamOPENJDK_BUILD_CPU_ARCH
1012104478SsamOPENJDK_BUILD_CPU
1013104478SsamOPENJDK_BUILD_OS_ENV
1014104478SsamOPENJDK_BUILD_OS_TYPE
1015104478SsamOPENJDK_BUILD_OS
1016104478SsamOPENJDK_BUILD_AUTOCONF_NAME
1017104478SsamOPENJDK_TARGET_AUTOCONF_NAME
1018104478Ssamtarget_os
1019104478Ssamtarget_vendor
1020104478Ssamtarget_cpu
1021159341Spjdtarget
1022159341Spjdhost_os
1023104478Ssamhost_vendor
1024159341Spjdhost_cpu
1025159341Spjdhost
1026104478Ssambuild_os
1027104478Ssambuild_vendor
1028104478Ssambuild_cpu
1029104478Ssambuild
1030104478SsamPANDOC
1031104478SsamNICE
1032167755SsamCPIO
1033104478SsamDF
1034167755SsamREADLINK
1035104478SsamCYGPATH
1036104478SsamSED
1037104478SsamFGREP
1038104478SsamEGREP
1039104478SsamGREP
1040104478SsamAWK
1041104478SsamXARGS
1042104478SsamWHICH
1043104478SsamWC
1044104478SsamUNIQ
1045104478SsamUNAME
1046104478SsamTR
1047104478SsamTOUCH
1048104478SsamTEE
1049104478SsamTAR
1050108471SsamTAIL
1051104478SsamSORT
1052104478SsamSH
1053104478SsamRMDIR
1054115747SsamRM
1055104478SsamPRINTF
1056104478SsamNAWK
1057104478SsamMV
1058115747SsamMKTEMP
1059104478SsamMKDIR
1060104478SsamLS
1061104478SsamLN
1062163648SruGZIP
1063115747SsamGUNZIP
1064104478SsamHEAD
1065104478SsamFIND
1066104478SsamFILE
1067104478SsamEXPR
1068104478SsamECHO
1069104478SsamDIRNAME
1070104478SsamDIFF
1071104478SsamDATE
1072104478SsamCUT
1073104478SsamCP
1074104478SsamCOMM
1075104478SsamCMP
1076104478SsamCHMOD
1077104478SsamCAT
1078104478SsamBASH
1079104478SsamBASENAME
1080108471SsamDATE_WHEN_CONFIGURED
1081104478SsamORIGINAL_PATH
1082104478SsamCONFIGURE_COMMAND_LINE
1083104478Ssamtarget_alias
1084104478Ssamhost_alias
1085104478Ssambuild_alias
1086104478SsamLIBS
1087104478SsamECHO_T
1088104478SsamECHO_N
1089104478SsamECHO_C
1090104478SsamDEFS
1091104478Ssammandir
1092104478Ssamlocaledir
1093108471Ssamlibdir
1094104478Ssampsdir
1095104478Ssampdfdir
1096104478Ssamdvidir
1097104478Ssamhtmldir
1098104478Ssaminfodir
1099104478Ssamdocdir
1100104478Ssamoldincludedir
1101104478Ssamincludedir
1102104478Ssamlocalstatedir
1103104478Ssamsharedstatedir
1104104478Ssamsysconfdir
1105104478Ssamdatadir
1106104478Ssamdatarootdir
1107104478Ssamlibexecdir
1108104478Ssamsbindir
1109108471Ssambindir
1110104478Ssamprogram_transform_name
1111104478Ssamprefix
1112104478Ssamexec_prefix
1113104478SsamPACKAGE_URL
1114104478SsamPACKAGE_BUGREPORT
1115104478SsamPACKAGE_STRING
1116104478SsamPACKAGE_VERSION
1117104478SsamPACKAGE_TARNAME
1118104478SsamPACKAGE_NAME
1119104478SsamPATH_SEPARATOR
1120104478SsamSHELL'
1121104478Ssamac_subst_files=''
1122104478Ssamac_user_opts='
1123104478Ssamenable_option_checking
1124104478Ssamwith_target_bits
1125104478Ssamenable_openjdk_only
1126104478Ssamwith_custom_make_dir
1127104478Ssamwith_jdk_variant
1128104478Ssamenable_debug
1129104478Ssamwith_debug_level
1130104478Ssamwith_jvm_variants
1131104478Ssamwith_cpu_port
1132108471Ssamwith_devkit
1133104478Ssamwith_sys_root
1134104478Ssamwith_sysroot
1135104478Ssamwith_tools_dir
1136104478Ssamwith_toolchain_path
1137104478Ssamwith_extra_path
1138104478Ssamwith_sdk_name
1139159225Spjdwith_conf_name
1140159225Spjdwith_output_sync
1141159225Spjdwith_default_make_target
1142159225Spjdenable_headless_only
1143159225Spjdenable_full_docs
1144104478Ssamwith_cacerts_file
1145104478Ssamenable_unlimited_crypto
1146104478Ssamwith_copyright_year
1147104478Ssamenable_keep_packaged_modules
1148104478Ssamwith_milestone
1149104478Ssamwith_update_version
1150104478Ssamwith_user_release_suffix
1151104478Ssamwith_build_number
1152104478Ssamwith_version_string
1153104478Ssamwith_version_pre
1154104478Ssamwith_version_opt
1155104478Ssamwith_version_build
1156104478Ssamwith_version_major
1157104478Ssamwith_version_minor
1158159242Spjdwith_version_security
1159159242Spjdwith_version_patch
1160104478Ssamwith_boot_jdk
1161104478Ssamwith_build_jdk
1162104478Ssamwith_add_source_root
1163104478Ssamwith_override_source_root
1164104478Ssamwith_adds_and_overrides
1165104478Ssamwith_override_langtools
1166159242Spjdwith_override_corba
1167159242Spjdwith_override_jaxp
1168159242Spjdwith_override_jaxws
1169159242Spjdwith_override_hotspot
1170104478Ssamwith_override_nashorn
1171104478Ssamwith_override_jdk
1172104478Ssamwith_import_hotspot
1173104478Ssamwith_import_modules
1174104478Ssamenable_static_build
1175104478Ssamwith_toolchain_type
1176104478Ssamwith_extra_cflags
1177104478Ssamwith_extra_cxxflags
1178104478Ssamwith_extra_ldflags
1179104478Ssamwith_toolchain_version
1180104478Ssamwith_build_devkit
1181104478Ssamwith_jtreg
1182104478Ssamwith_jib
1183159225Spjdwith_abi_profile
1184159225Spjdenable_warnings_as_errors
1185159225Spjdwith_native_debug_symbols
1186159225Spjdenable_debug_symbols
1187159225Spjdenable_zip_debug_info
1188104478Ssamenable_native_coverage
1189104478Ssamenable_dtrace
1190104478Ssamenable_aot
1191104478Ssamenable_hotspot_gtest
1192104478Ssamwith_stdc__lib
1193104478Ssamwith_msvcr_dll
1194104478Ssamwith_msvcp_dll
1195104478Ssamwith_x
1196104478Ssamwith_cups
1197104478Ssamwith_cups_include
1198104478Ssamwith_freetype
1199104478Ssamwith_freetype_include
1200104478Ssamwith_freetype_lib
1201104478Ssamwith_freetype_src
1202104478Ssamenable_freetype_bundling
1203104478Ssamwith_alsa
1204104478Ssamwith_alsa_include
1205104478Ssamwith_alsa_lib
1206104478Ssamwith_libffi
1207104478Ssamwith_libffi_include
1208104478Ssamwith_libffi_lib
1209104478Ssamenable_libffi_bundling
1210104478Ssamwith_libjpeg
1211104478Ssamwith_giflib
1212104478Ssamwith_libpng
1213104478Ssamwith_zlib
1214104478Ssamwith_lcms
1215104478Ssamwith_dxsdk
1216104478Ssamwith_dxsdk_lib
1217104478Ssamwith_dxsdk_include
1218104478Ssamwith_jvm_features
1219104478Ssamwith_jvm_interpreter
1220104478Ssamenable_jtreg_failure_handler
1221104478Ssamenable_generate_classlist
1222104478Ssamwith_num_cores
1223104478Ssamwith_memory_size
1224104478Ssamwith_jobs
1225104478Ssamwith_test_jobs
1226104478Ssamwith_boot_jdk_jvmargs
1227104478Ssamwith_sjavac_server_java
1228104478Ssamenable_sjavac
1229104478Ssamenable_javac_server
1230104478Ssamenable_icecc
1231104478Ssamenable_precompiled_headers
1232104478Ssamenable_ccache
1233104478Ssamwith_ccache_dir
1234104478Ssam'
1235104478Ssam      ac_precious_vars='build_alias
1236104478Ssamhost_alias
1237104478Ssamtarget_alias
1238104478SsamBASENAME
1239104478SsamBASH
1240104478SsamCAT
1241104478SsamCHMOD
1242104478SsamCMP
1243104478SsamCOMM
1244104478SsamCP
1245104478SsamCUT
1246104478SsamDATE
1247104478SsamDIFF
1248104478SsamDIRNAME
1249104478SsamECHO
1250104478SsamEXPR
1251104478SsamFILE
1252104478SsamFIND
1253104478SsamHEAD
1254104478SsamGUNZIP
1255104478SsamGZIP
1256104478SsamLN
1257104478SsamLS
1258104478SsamMKDIR
1259104478SsamMKTEMP
1260104478SsamMV
1261104478SsamNAWK
1262104478SsamPRINTF
1263104478SsamRM
1264104478SsamRMDIR
1265104478SsamSH
1266104478SsamSORT
1267104478SsamTAIL
1268104478SsamTAR
1269104478SsamTEE
1270104478SsamTOUCH
1271104478SsamTR
1272104478SsamUNAME
1273104478SsamUNIQ
1274104478SsamWC
1275104478SsamWHICH
1276104478SsamXARGS
1277104478SsamAWK
1278104478SsamGREP
1279104478SsamEGREP
1280104478SsamFGREP
1281104478SsamSED
1282104478SsamCYGPATH
1283104478SsamREADLINK
1284104478SsamDF
1285104478SsamCPIO
1286104478SsamNICE
1287104478SsamPANDOC
1288104478SsamMAKE
1289104478SsamUNZIP
1290104478SsamZIPEXE
1291104478SsamLDD
1292104478SsamOTOOL
1293104478SsamREADELF
1294104478SsamDOT
1295104478SsamHG
1296104478SsamSTAT
1297104478SsamTIME
1298104478SsamFLOCK
1299104478SsamDTRACE
1300104478SsamPATCH
1301104478SsamDSYMUTIL
1302104478SsamXATTR
1303104478SsamCODESIGN
1304104478SsamSETFILE
1305104478SsamPKG_CONFIG
1306104478SsamJAVA
1307104478SsamJAVAC
1308104478SsamJAVAH
1309104478SsamJAR
1310104478SsamJARSIGNER
1311104478SsamCC
1312104478SsamCFLAGS
1313104478SsamLDFLAGS
1314104478SsamLIBS
1315104478SsamCPPFLAGS
1316104478SsamCXX
1317104478SsamCXXFLAGS
1318104478SsamCCC
1319104478SsamCPP
1320104478SsamCXXCPP
1321104478SsamAS
1322104478SsamAR
1323104478SsamLIPO
1324104478SsamSTRIP
1325104478SsamNM
1326104478SsamGNM
1327104478SsamOBJCOPY
1328104478SsamOBJDUMP
1329104478SsamBUILD_CC
1330104478SsamBUILD_CXX
1331104478SsamBUILD_NM
1332104478SsamBUILD_AR
1333104478SsamBUILD_OBJCOPY
1334104478SsamBUILD_STRIP
1335104478SsamJTREGEXE
1336104478SsamXMKMF
1337104478SsamFREETYPE_CFLAGS
1338104478SsamFREETYPE_LIBS
1339104478SsamALSA_CFLAGS
1340104478SsamALSA_LIBS
1341104478SsamLIBFFI_CFLAGS
1342104478SsamLIBFFI_LIBS
1343104478SsamPNG_CFLAGS
1344104478SsamPNG_LIBS
1345104478SsamLCMS_CFLAGS
1346104478SsamLCMS_LIBS
1347104478SsamICECC_CMD
1348104478SsamICECC_CREATE_ENV
1349104478SsamICECC_WRAPPER
1350104478SsamCCACHE'
1351104478Ssam
1352104478Ssam
1353104478Ssam# Initialize some variables set by options.
1354104478Ssamac_init_help=
1355104478Ssamac_init_version=false
1356104478Ssamac_unrecognized_opts=
1357104478Ssamac_unrecognized_sep=
1358104478Ssam# The variables have the same names as the options, with
1359104478Ssam# dashes changed to underlines.
1360104478Ssamcache_file=/dev/null
1361104478Ssamexec_prefix=NONE
1362104478Ssamno_create=
1363104478Ssamno_recursion=
1364104478Ssamprefix=NONE
1365104478Ssamprogram_prefix=NONE
1366160931Sjhbprogram_suffix=NONE
1367243857Sglebiusprogram_transform_name=s,x,x,
1368160931Sjhbsilent=
1369160931Sjhbsite=
1370160931Sjhbsrcdir=
1371243857Sglebiusverbose=
1372104478Ssamx_includes=NONE
1373104478Ssamx_libraries=NONE
1374243857Sglebius
1375104478Ssam# Installation directory options.
1376104478Ssam# These are left unexpanded so users can "make install exec_prefix=/foo"
1377160931Sjhb# and all the variables that are supposed to be based on exec_prefix
1378243857Sglebius# by default will actually change.
1379160931Sjhb# Use braces instead of parens because sh, perl, etc. also accept them.
1380160931Sjhb# (The list follows the same order as the GNU Coding Standards.)
1381160931Sjhbbindir='${exec_prefix}/bin'
1382104478Ssamsbindir='${exec_prefix}/sbin'
1383104478Ssamlibexecdir='${exec_prefix}/libexec'
1384104478Ssamdatarootdir='${prefix}/share'
1385104478Ssamdatadir='${datarootdir}'
1386104478Ssamsysconfdir='${prefix}/etc'
1387160931Sjhbsharedstatedir='${prefix}/com'
1388160931Sjhblocalstatedir='${prefix}/var'
1389160931Sjhbincludedir='${prefix}/include'
1390104478Ssamoldincludedir='/usr/include'
1391104478Ssamdocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1392104478Ssaminfodir='${datarootdir}/info'
1393160931Sjhbhtmldir='${docdir}'
1394243857Sglebiusdvidir='${docdir}'
1395160931Sjhbpdfdir='${docdir}'
1396160931Sjhbpsdir='${docdir}'
1397160931Sjhblibdir='${exec_prefix}/lib'
1398243857Sglebiuslocaledir='${datarootdir}/locale'
1399104478Ssammandir='${datarootdir}/man'
1400104478Ssam
1401160931Sjhbac_prev=
1402160931Sjhbac_dashdash=
1403160931Sjhbfor ac_option
1404160931Sjhbdo
1405160931Sjhb  # If the previous option needs an argument, assign it.
1406104478Ssam  if test -n "$ac_prev"; then
1407104478Ssam    eval $ac_prev=\$ac_option
1408104478Ssam    ac_prev=
1409104478Ssam    continue
1410104478Ssam  fi
1411104478Ssam
1412104478Ssam  case $ac_option in
1413104478Ssam  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1414104478Ssam  *=)   ac_optarg= ;;
1415162969Sjhb  *)    ac_optarg=yes ;;
1416104478Ssam  esac
1417104478Ssam
1418104478Ssam  # Accept the important Cygnus configure options, so we can diagnose typos.
1419104478Ssam
1420104478Ssam  case $ac_dashdash$ac_option in
1421104478Ssam  --)
1422104478Ssam    ac_dashdash=yes ;;
1423104478Ssam
1424104478Ssam  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1425104478Ssam    ac_prev=bindir ;;
1426104478Ssam  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1427104478Ssam    bindir=$ac_optarg ;;
1428104478Ssam
1429104478Ssam  -build | --build | --buil | --bui | --bu)
1430104478Ssam    ac_prev=build_alias ;;
1431104478Ssam  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1432104478Ssam    build_alias=$ac_optarg ;;
1433104478Ssam
1434108471Ssam  -cache-file | --cache-file | --cache-fil | --cache-fi \
1435104478Ssam  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1436104478Ssam    ac_prev=cache_file ;;
1437104478Ssam  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1438104478Ssam  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1439104478Ssam    cache_file=$ac_optarg ;;
1440104478Ssam
1441104478Ssam  --config-cache | -C)
1442104478Ssam    cache_file=config.cache ;;
1443104478Ssam
1444104478Ssam  -datadir | --datadir | --datadi | --datad)
1445104478Ssam    ac_prev=datadir ;;
1446104478Ssam  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1447104478Ssam    datadir=$ac_optarg ;;
1448104478Ssam
1449104478Ssam  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1450104478Ssam  | --dataroo | --dataro | --datar)
1451104478Ssam    ac_prev=datarootdir ;;
1452104478Ssam  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1453104478Ssam  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1454104478Ssam    datarootdir=$ac_optarg ;;
1455104478Ssam
1456104478Ssam  -disable-* | --disable-*)
1457104478Ssam    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1458104478Ssam    # Reject names that are not valid shell variable names.
1459104478Ssam    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1460104478Ssam      as_fn_error $? "invalid feature name: $ac_useropt"
1461104478Ssam    ac_useropt_orig=$ac_useropt
1462104478Ssam    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1463104478Ssam    case $ac_user_opts in
1464104478Ssam      *"
1465104478Ssam"enable_$ac_useropt"
1466104478Ssam"*) ;;
1467104478Ssam      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1468104478Ssam	 ac_unrecognized_sep=', ';;
1469104478Ssam    esac
1470104478Ssam    eval enable_$ac_useropt=no ;;
1471104478Ssam
1472104478Ssam  -docdir | --docdir | --docdi | --doc | --do)
1473104478Ssam    ac_prev=docdir ;;
1474104478Ssam  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1475104478Ssam    docdir=$ac_optarg ;;
1476104478Ssam
1477104478Ssam  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1478104478Ssam    ac_prev=dvidir ;;
1479104478Ssam  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1480104478Ssam    dvidir=$ac_optarg ;;
1481104478Ssam
1482104478Ssam  -enable-* | --enable-*)
1483104478Ssam    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1484104478Ssam    # Reject names that are not valid shell variable names.
1485104478Ssam    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1486104478Ssam      as_fn_error $? "invalid feature name: $ac_useropt"
1487104478Ssam    ac_useropt_orig=$ac_useropt
1488104478Ssam    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1489104478Ssam    case $ac_user_opts in
1490104478Ssam      *"
1491104478Ssam"enable_$ac_useropt"
1492104478Ssam"*) ;;
1493104478Ssam      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1494104478Ssam	 ac_unrecognized_sep=', ';;
1495104478Ssam    esac
1496104478Ssam    eval enable_$ac_useropt=\$ac_optarg ;;
1497104478Ssam
1498104478Ssam  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1499104478Ssam  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1500104478Ssam  | --exec | --exe | --ex)
1501162969Sjhb    ac_prev=exec_prefix ;;
1502104478Ssam  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1503104478Ssam  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1504104478Ssam  | --exec=* | --exe=* | --ex=*)
1505104478Ssam    exec_prefix=$ac_optarg ;;
1506104478Ssam
1507104478Ssam  -gas | --gas | --ga | --g)
1508104478Ssam    # Obsolete; use --with-gas.
1509104478Ssam    with_gas=yes ;;
1510104478Ssam
1511104478Ssam  -help | --help | --hel | --he | -h)
1512162969Sjhb    ac_init_help=long ;;
1513104478Ssam  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1514104478Ssam    ac_init_help=recursive ;;
1515104478Ssam  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1516104478Ssam    ac_init_help=short ;;
1517104478Ssam
1518104478Ssam  -host | --host | --hos | --ho)
1519104478Ssam    ac_prev=host_alias ;;
1520115747Ssam  -host=* | --host=* | --hos=* | --ho=*)
1521104478Ssam    host_alias=$ac_optarg ;;
1522104478Ssam
1523104478Ssam  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1524104478Ssam    ac_prev=htmldir ;;
1525111416Ssam  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1526104478Ssam  | --ht=*)
1527115747Ssam    htmldir=$ac_optarg ;;
1528104478Ssam
1529104478Ssam  -includedir | --includedir | --includedi | --included | --include \
1530104478Ssam  | --includ | --inclu | --incl | --inc)
1531104478Ssam    ac_prev=includedir ;;
1532104478Ssam  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1533104478Ssam  | --includ=* | --inclu=* | --incl=* | --inc=*)
1534104478Ssam    includedir=$ac_optarg ;;
1535104478Ssam
1536104478Ssam  -infodir | --infodir | --infodi | --infod | --info | --inf)
1537104478Ssam    ac_prev=infodir ;;
1538104478Ssam  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1539104478Ssam    infodir=$ac_optarg ;;
1540104478Ssam
1541104478Ssam  -libdir | --libdir | --libdi | --libd)
1542104478Ssam    ac_prev=libdir ;;
1543158828Spjd  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1544158828Spjd    libdir=$ac_optarg ;;
1545115747Ssam
1546158828Spjd  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1547158828Spjd  | --libexe | --libex | --libe)
1548158828Spjd    ac_prev=libexecdir ;;
1549158828Spjd  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1550115747Ssam  | --libexe=* | --libex=* | --libe=*)
1551104478Ssam    libexecdir=$ac_optarg ;;
1552104478Ssam
1553104478Ssam  -localedir | --localedir | --localedi | --localed | --locale)
1554104478Ssam    ac_prev=localedir ;;
1555104478Ssam  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1556104478Ssam    localedir=$ac_optarg ;;
1557104478Ssam
1558104478Ssam  -localstatedir | --localstatedir | --localstatedi | --localstated \
1559104478Ssam  | --localstate | --localstat | --localsta | --localst | --locals)
1560104478Ssam    ac_prev=localstatedir ;;
1561104478Ssam  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1562104478Ssam  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1563104478Ssam    localstatedir=$ac_optarg ;;
1564104478Ssam
1565104478Ssam  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1566112099Ssam    ac_prev=mandir ;;
1567112099Ssam  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1568112099Ssam    mandir=$ac_optarg ;;
1569108823Ssam
1570104478Ssam  -nfp | --nfp | --nf)
1571104478Ssam    # Obsolete; use --without-fp.
1572104478Ssam    with_fp=no ;;
1573104478Ssam
1574104478Ssam  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1575104478Ssam  | --no-cr | --no-c | -n)
1576104478Ssam    no_create=yes ;;
1577104478Ssam
1578104478Ssam  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1579104478Ssam  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1580104478Ssam    no_recursion=yes ;;
1581104478Ssam
1582104478Ssam  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1583104478Ssam  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1584104478Ssam  | --oldin | --oldi | --old | --ol | --o)
1585104478Ssam    ac_prev=oldincludedir ;;
1586104478Ssam  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1587104478Ssam  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1588104478Ssam  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1589104478Ssam    oldincludedir=$ac_optarg ;;
1590104478Ssam
1591104478Ssam  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1592159242Spjd    ac_prev=prefix ;;
1593159242Spjd  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1594159242Spjd    prefix=$ac_optarg ;;
1595104478Ssam
1596104478Ssam  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1597104478Ssam  | --program-pre | --program-pr | --program-p)
1598104478Ssam    ac_prev=program_prefix ;;
1599104478Ssam  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1600104478Ssam  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1601104478Ssam    program_prefix=$ac_optarg ;;
1602104478Ssam
1603159242Spjd  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1604159242Spjd  | --program-suf | --program-su | --program-s)
1605159242Spjd    ac_prev=program_suffix ;;
1606104478Ssam  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1607104478Ssam  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1608115747Ssam    program_suffix=$ac_optarg ;;
1609104478Ssam
1610115747Ssam  -program-transform-name | --program-transform-name \
1611104478Ssam  | --program-transform-nam | --program-transform-na \
1612104478Ssam  | --program-transform-n | --program-transform- \
1613104478Ssam  | --program-transform | --program-transfor \
1614104478Ssam  | --program-transfo | --program-transf \
1615104478Ssam  | --program-trans | --program-tran \
1616104478Ssam  | --progr-tra | --program-tr | --program-t)
1617104478Ssam    ac_prev=program_transform_name ;;
1618104478Ssam  -program-transform-name=* | --program-transform-name=* \
1619104478Ssam  | --program-transform-nam=* | --program-transform-na=* \
1620104478Ssam  | --program-transform-n=* | --program-transform-=* \
1621104478Ssam  | --program-transform=* | --program-transfor=* \
1622104478Ssam  | --program-transfo=* | --program-transf=* \
1623104478Ssam  | --program-trans=* | --program-tran=* \
1624104478Ssam  | --progr-tra=* | --program-tr=* | --program-t=*)
1625104478Ssam    program_transform_name=$ac_optarg ;;
1626104478Ssam
1627104478Ssam  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1628104478Ssam    ac_prev=pdfdir ;;
1629104478Ssam  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1630104478Ssam    pdfdir=$ac_optarg ;;
1631104478Ssam
1632104478Ssam  -psdir | --psdir | --psdi | --psd | --ps)
1633104478Ssam    ac_prev=psdir ;;
1634104478Ssam  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1635104478Ssam    psdir=$ac_optarg ;;
1636104478Ssam
1637104478Ssam  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1638104478Ssam  | -silent | --silent | --silen | --sile | --sil)
1639104478Ssam    silent=yes ;;
1640104478Ssam
1641104478Ssam  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1642104478Ssam    ac_prev=sbindir ;;
1643104478Ssam  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1644104478Ssam  | --sbi=* | --sb=*)
1645104478Ssam    sbindir=$ac_optarg ;;
1646104478Ssam
1647104478Ssam  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1648104478Ssam  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1649104478Ssam  | --sharedst | --shareds | --shared | --share | --shar \
1650104478Ssam  | --sha | --sh)
1651104478Ssam    ac_prev=sharedstatedir ;;
1652104478Ssam  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1653104478Ssam  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1654104478Ssam  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1655104478Ssam  | --sha=* | --sh=*)
1656104478Ssam    sharedstatedir=$ac_optarg ;;
1657104478Ssam
1658104478Ssam  -site | --site | --sit)
1659104478Ssam    ac_prev=site ;;
1660104478Ssam  -site=* | --site=* | --sit=*)
1661104478Ssam    site=$ac_optarg ;;
1662104478Ssam
1663104478Ssam  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1664108823Ssam    ac_prev=srcdir ;;
1665104478Ssam  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1666108823Ssam    srcdir=$ac_optarg ;;
1667104478Ssam
1668104478Ssam  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1669163648Sru  | --syscon | --sysco | --sysc | --sys | --sy)
1670104478Ssam    ac_prev=sysconfdir ;;
1671104478Ssam  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1672104478Ssam  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1673104478Ssam    sysconfdir=$ac_optarg ;;
1674104478Ssam
1675104478Ssam  -target | --target | --targe | --targ | --tar | --ta | --t)
1676104478Ssam    ac_prev=target_alias ;;
1677104478Ssam  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1678104478Ssam    target_alias=$ac_optarg ;;
1679104478Ssam
1680104478Ssam  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1681104478Ssam    verbose=yes ;;
1682104478Ssam
1683104478Ssam  -version | --version | --versio | --versi | --vers | -V)
1684104478Ssam    ac_init_version=: ;;
1685104478Ssam
1686108823Ssam  -with-* | --with-*)
1687104478Ssam    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1688104478Ssam    # Reject names that are not valid shell variable names.
1689104478Ssam    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1690104478Ssam      as_fn_error $? "invalid package name: $ac_useropt"
1691104478Ssam    ac_useropt_orig=$ac_useropt
1692104478Ssam    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1693108823Ssam    case $ac_user_opts in
1694112124Ssam      *"
1695112124Ssam"with_$ac_useropt"
1696112124Ssam"*) ;;
1697104478Ssam      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1698104478Ssam	 ac_unrecognized_sep=', ';;
1699104478Ssam    esac
1700104478Ssam    eval with_$ac_useropt=\$ac_optarg ;;
1701104478Ssam
1702104478Ssam  -without-* | --without-*)
1703104478Ssam    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1704104478Ssam    # Reject names that are not valid shell variable names.
1705104478Ssam    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1706104478Ssam      as_fn_error $? "invalid package name: $ac_useropt"
1707104478Ssam    ac_useropt_orig=$ac_useropt
1708104630Ssam    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1709104478Ssam    case $ac_user_opts in
1710108823Ssam      *"
1711108823Ssam"with_$ac_useropt"
1712108823Ssam"*) ;;
1713108823Ssam      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1714104478Ssam	 ac_unrecognized_sep=', ';;
1715104478Ssam    esac
1716104478Ssam    eval with_$ac_useropt=no ;;
1717104630Ssam
1718104630Ssam  --x)
1719104630Ssam    # Obsolete; use --with-x.
1720104630Ssam    with_x=yes ;;
1721104630Ssam
1722104630Ssam  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1723104630Ssam  | --x-incl | --x-inc | --x-in | --x-i)
1724104630Ssam    ac_prev=x_includes ;;
1725104630Ssam  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1726104630Ssam  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1727104630Ssam    x_includes=$ac_optarg ;;
1728104630Ssam
1729104630Ssam  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1730104630Ssam  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1731104478Ssam    ac_prev=x_libraries ;;
1732104478Ssam  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1733104478Ssam  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1734104478Ssam    x_libraries=$ac_optarg ;;
1735104478Ssam
1736104478Ssam  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1737104478SsamTry \`$0 --help' for more information"
1738104478Ssam    ;;
1739104478Ssam
1740104478Ssam  *=*)
1741104478Ssam    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1742104478Ssam    # Reject names that are not valid shell variable names.
1743104478Ssam    case $ac_envvar in #(
1744104478Ssam      '' | [0-9]* | *[!_$as_cr_alnum]* )
1745104478Ssam      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1746104478Ssam    esac
1747104478Ssam    eval $ac_envvar=\$ac_optarg
1748104478Ssam    export $ac_envvar ;;
1749108823Ssam
1750108823Ssam  *)
1751104478Ssam    # FIXME: should be removed in autoconf 3.0.
1752104478Ssam    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1753104478Ssam    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1754104478Ssam      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1755104478Ssam    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1756104478Ssam    ;;
1757104478Ssam
1758104478Ssam  esac
1759104478Ssamdone
1760104478Ssam
1761104478Ssamif test -n "$ac_prev"; then
1762104478Ssam  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1763104478Ssam  as_fn_error $? "missing argument to $ac_option"
1764104478Ssamfi
1765104478Ssam
1766104478Ssamif test -n "$ac_unrecognized_opts"; then
1767104478Ssam  case $enable_option_checking in
1768104478Ssam    no) ;;
1769104478Ssam    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1770104478Ssam    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1771104478Ssam  esac
1772104478Ssamfi
1773104478Ssam
1774104478Ssam# Check all directory arguments for consistency.
1775104478Ssamfor ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1776104478Ssam		datadir sysconfdir sharedstatedir localstatedir includedir \
1777104478Ssam		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1778104478Ssam		libdir localedir mandir
1779104478Ssamdo
1780104478Ssam  eval ac_val=\$$ac_var
1781104478Ssam  # Remove trailing slashes.
1782115747Ssam  case $ac_val in
1783104478Ssam    */ )
1784115747Ssam      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1785104478Ssam      eval $ac_var=\$ac_val;;
1786104478Ssam  esac
1787104478Ssam  # Be sure to have absolute directory names.
1788104478Ssam  case $ac_val in
1789104478Ssam    [\\/$]* | ?:[\\/]* )  continue;;
1790104478Ssam    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1791104478Ssam  esac
1792104478Ssam  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1793104478Ssamdone
1794104478Ssam
1795104478Ssam# There might be people who depend on the old broken behavior: `$host'
1796104478Ssam# used to hold the argument of --host etc.
1797104478Ssam# FIXME: To remove some day.
1798104478Ssambuild=$build_alias
1799104478Ssamhost=$host_alias
1800104478Ssamtarget=$target_alias
1801104478Ssam
1802104478Ssam# FIXME: To remove some day.
1803104478Ssamif test "x$host_alias" != x; then
1804104478Ssam  if test "x$build_alias" = x; then
1805104478Ssam    cross_compiling=maybe
1806104478Ssam  elif test "x$build_alias" != "x$host_alias"; then
1807104478Ssam    cross_compiling=yes
1808104478Ssam  fi
1809108823Ssamfi
1810104478Ssam
1811104478Ssamac_tool_prefix=
1812104478Ssamtest -n "$host_alias" && ac_tool_prefix=$host_alias-
1813104478Ssam
1814104478Ssamtest "$silent" = yes && exec 6>/dev/null
1815115747Ssam
1816104478Ssam
1817104478Ssamac_pwd=`pwd` && test -n "$ac_pwd" &&
1818104478Ssamac_ls_di=`ls -di .` &&
1819104478Ssamac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1820104478Ssam  as_fn_error $? "working directory cannot be determined"
1821104478Ssamtest "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1822104478Ssam  as_fn_error $? "pwd does not report name of working directory"
1823104478Ssam
1824115747Ssam
1825104478Ssam# Find the source files, if location was not specified.
1826104478Ssamif test -z "$srcdir"; then
1827104478Ssam  ac_srcdir_defaulted=yes
1828104478Ssam  # Try the directory containing this script, then the parent directory.
1829104478Ssam  ac_confdir=`$as_dirname -- "$as_myself" ||
1830104478Ssam$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1831104478Ssam	 X"$as_myself" : 'X\(//\)[^/]' \| \
1832104478Ssam	 X"$as_myself" : 'X\(//\)$' \| \
1833104478Ssam	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1834104478Ssam$as_echo X"$as_myself" |
1835104478Ssam    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1836104478Ssam	    s//\1/
1837104478Ssam	    q
1838104478Ssam	  }
1839104478Ssam	  /^X\(\/\/\)[^/].*/{
1840104478Ssam	    s//\1/
1841104478Ssam	    q
1842104478Ssam	  }
1843104478Ssam	  /^X\(\/\/\)$/{
1844104478Ssam	    s//\1/
1845104478Ssam	    q
1846108823Ssam	  }
1847232874Sscottl	  /^X\(\/\).*/{
1848108823Ssam	    s//\1/
1849108823Ssam	    q
1850108823Ssam	  }
1851108823Ssam	  s/.*/./; q'`
1852108823Ssam  srcdir=$ac_confdir
1853108823Ssam  if test ! -r "$srcdir/$ac_unique_file"; then
1854108823Ssam    srcdir=..
1855108823Ssam  fi
1856117126Sscottlelse
1857108823Ssam  ac_srcdir_defaulted=no
1858108823Ssamfi
1859108823Ssamif test ! -r "$srcdir/$ac_unique_file"; then
1860108823Ssam  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1861104478Ssam  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1862108823Ssamfi
1863104478Ssamac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1864108823Ssamac_abs_confdir=`(
1865108823Ssam	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1866108823Ssam	pwd)`
1867108823Ssam# When building in place, set srcdir=.
1868205844Simpif test "$ac_abs_confdir" = "$ac_pwd"; then
1869205844Simp  srcdir=.
1870108823Ssamfi
1871108823Ssam# Remove unnecessary trailing slashes from srcdir.
1872108823Ssam# Double slashes in file names in object file debugging info
1873108823Ssam# mess up M-x gdb in Emacs.
1874104478Ssamcase $srcdir in
1875104478Ssam*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1876104478Ssamesac
1877104478Ssamfor ac_var in $ac_precious_vars; do
1878108823Ssam  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1879108823Ssam  eval ac_env_${ac_var}_value=\$${ac_var}
1880108823Ssam  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1881108823Ssam  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1882108823Ssamdone
1883104478Ssam
1884104478Ssam#
1885104478Ssam# Report the --help message.
1886104478Ssam#
1887108823Ssamif test "$ac_init_help" = "long"; then
1888108823Ssam  # Omit some internal or obsolete options to make the list less imposing.
1889104478Ssam  # This message is too long to be a string in the A/UX 3.1 sh.
1890108823Ssam  cat <<_ACEOF
1891104478Ssam\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1892108823Ssam
1893108823SsamUsage: $0 [OPTION]... [VAR=VALUE]...
1894104478Ssam
1895104478SsamTo assign environment variables (e.g., CC, CFLAGS...), specify them as
1896104478SsamVAR=VALUE.  See below for descriptions of some of the useful variables.
1897104478Ssam
1898104478SsamDefaults for the options are specified in brackets.
1899104478Ssam
1900108823SsamConfiguration:
1901108823Ssam  -h, --help              display this help and exit
1902108823Ssam      --help=short        display options specific to this package
1903104478Ssam      --help=recursive    display the short help of all the included packages
1904104478Ssam  -V, --version           display version information and exit
1905104478Ssam  -q, --quiet, --silent   do not print \`checking ...' messages
1906104478Ssam      --cache-file=FILE   cache test results in FILE [disabled]
1907104478Ssam  -C, --config-cache      alias for \`--cache-file=config.cache'
1908104478Ssam  -n, --no-create         do not create output files
1909104478Ssam      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1910104478Ssam
1911104478SsamInstallation directories:
1912104478Ssam  --prefix=PREFIX         install architecture-independent files in PREFIX
1913104478Ssam                          [$ac_default_prefix]
1914104478Ssam  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1915104478Ssam                          [PREFIX]
1916104478Ssam
1917104478SsamBy default, \`make install' will install all the files in
1918104478Ssam\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1919104478Ssaman installation prefix other than \`$ac_default_prefix' using \`--prefix',
1920104478Ssamfor instance \`--prefix=\$HOME'.
1921104478Ssam
1922104478SsamFor better control, use the options below.
1923104478Ssam
1924104478SsamFine tuning of the installation directories:
1925104478Ssam  --bindir=DIR            user executables [EPREFIX/bin]
1926104478Ssam  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1927104478Ssam  --libexecdir=DIR        program executables [EPREFIX/libexec]
1928104478Ssam  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1929104478Ssam  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1930104630Ssam  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1931104630Ssam  --libdir=DIR            object code libraries [EPREFIX/lib]
1932104630Ssam  --includedir=DIR        C header files [PREFIX/include]
1933104630Ssam  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1934104630Ssam  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1935104630Ssam  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1936104630Ssam  --infodir=DIR           info documentation [DATAROOTDIR/info]
1937104630Ssam  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1938104630Ssam  --mandir=DIR            man documentation [DATAROOTDIR/man]
1939104630Ssam  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1940104630Ssam  --htmldir=DIR           html documentation [DOCDIR]
1941104630Ssam  --dvidir=DIR            dvi documentation [DOCDIR]
1942104630Ssam  --pdfdir=DIR            pdf documentation [DOCDIR]
1943104630Ssam  --psdir=DIR             ps documentation [DOCDIR]
1944104630Ssam_ACEOF
1945104478Ssam
1946104478Ssam  cat <<\_ACEOF
1947104478Ssam
1948104478SsamX features:
1949104478Ssam  --x-includes=DIR    X include files are in DIR
1950104478Ssam  --x-libraries=DIR   X library files are in DIR
1951104478Ssam
1952104478SsamSystem types:
1953104478Ssam  --build=BUILD     configure for building on BUILD [guessed]
1954104478Ssam  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1955104478Ssam  --target=TARGET   configure for building compilers for TARGET [HOST]
1956104478Ssam_ACEOF
1957104478Ssamfi
1958104478Ssam
1959104478Ssamif test -n "$ac_init_help"; then
1960104478Ssam  case $ac_init_help in
1961104478Ssam     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1962104478Ssam   esac
1963104478Ssam  cat <<\_ACEOF
1964104478Ssam
1965104478SsamOptional Features:
1966104478Ssam  --disable-option-checking  ignore unrecognized --enable/--with options
1967104478Ssam  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1968104478Ssam  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1969104478Ssam  --enable-openjdk-only   suppress building custom source even if present
1970104478Ssam                          [disabled]
1971104478Ssam  --enable-debug          set the debug level to fastdebug (shorthand for
1972104478Ssam                          --with-debug-level=fastdebug) [disabled]
1973104478Ssam  --enable-headless-only  only build headless (no GUI) support [disabled]
1974104478Ssam  --enable-full-docs      build complete documentation [enabled if all tools
1975104478Ssam                          found]
1976104478Ssam  --disable-unlimited-crypto
1977104478Ssam                          Disable unlimited crypto policy [enabled]
1978104478Ssam  --disable-keep-packaged-modules
1979104478Ssam                          Do not keep packaged modules in jdk image [enable]
1980104478Ssam  --enable-static-build   enable static library build [disabled]
1981104478Ssam  --disable-warnings-as-errors
1982104478Ssam                          do not consider native warnings to be an error
1983163648Sru                          [enabled]
1984104478Ssam  --enable-debug-symbols  Deprecated. Option is kept for backwards
1985104478Ssam                          compatibility and is ignored
1986108471Ssam  --enable-zip-debug-info Deprecated. Option is kept for backwards
1987104478Ssam                          compatibility and is ignored
1988104478Ssam  --enable-native-coverage
1989104478Ssam                          enable native compilation with code coverage
1990108823Ssam                          data[disabled]
1991108823Ssam  --enable-dtrace[=yes/no/auto]
1992104478Ssam                          enable dtrace. Default is auto, where dtrace is
1993104478Ssam                          enabled if all dependencies are present.
1994104478Ssam  --enable-aot[=yes/no/auto]
1995104478Ssam                          enable ahead of time compilation feature. Default is
1996104478Ssam                          auto, where aot is enabled if all dependencies are
1997104478Ssam                          present.
1998104478Ssam  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1999104478Ssam  --disable-freetype-bundling
2000104478Ssam                          disable bundling of the freetype library with the
2001104478Ssam                          build result [enabled on Windows or when using
2002104478Ssam                          --with-freetype, disabled otherwise]
2003104478Ssam  --enable-libffi-bundling
2004104478Ssam                          enable bundling of libffi.so to make the built JDK
2005104478Ssam                          runnable on more systems
2006104478Ssam  --enable-jtreg-failure-handler
2007162969Sjhb                          forces build of the jtreg failure handler to be
2008104478Ssam                          enabled, missing dependencies become fatal errors.
2009104478Ssam                          Default is auto, where the failure handler is built
2010104478Ssam                          if all dependencies are present and otherwise just
2011162969Sjhb                          disabled.
2012104478Ssam  --disable-generate-classlist
2013162969Sjhb                          forces enabling or disabling of the generation of a
2014104478Ssam                          CDS classlist at build time. Default is to generate
2015104478Ssam                          it when either the server or client JVMs are built.
2016104478Ssam  --enable-sjavac         use sjavac to do fast incremental compiles
2017104478Ssam                          [disabled]
2018104478Ssam  --disable-javac-server  disable javac server [enabled]
2019104478Ssam  --enable-icecc          enable distribted compilation of native code using
2020104478Ssam                          icecc/icecream [disabled]
2021104478Ssam  --disable-precompiled-headers
2022104478Ssam                          disable using precompiled headers when compiling C++
2023104478Ssam                          [enabled]
2024104478Ssam  --enable-ccache         enable using ccache to speed up recompilations
2025104478Ssam                          [disabled]
2026104478Ssam
2027104478SsamOptional Packages:
2028162969Sjhb  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029104478Ssam  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030162969Sjhb  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031104478Ssam                          support it), e.g. --with-target-bits=32 [guessed]
2032104478Ssam  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033104478Ssam                          compatibility and is ignored
2034104478Ssam  --with-jdk-variant      JDK variant to build (normal) [normal]
2035104478Ssam  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036104478Ssam                          optimized) [release]
2037104478Ssam  --with-jvm-variants     JVM variants (separated by commas) to build
2038104478Ssam                          (server,client,minimal,core,zero,zeroshark,custom)
2039104478Ssam                          [server]
2040104478Ssam  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2041104478Ssam                          (arm64,aarch64) [aarch64]
2042104478Ssam  --with-devkit           use this devkit for compilers, tools and resources
2043104478Ssam  --with-sys-root         alias for --with-sysroot for backwards compatability
2044104478Ssam  --with-sysroot          use this directory as sysroot
2045104478Ssam  --with-tools-dir        alias for --with-toolchain-path for backwards
2046104478Ssam                          compatibility
2047104478Ssam  --with-toolchain-path   prepend these directories when searching for
2048104478Ssam                          toolchain binaries (compilers etc)
2049104478Ssam  --with-extra-path       prepend these directories to the default path
2050104478Ssam  --with-sdk-name         use the platform SDK of the given name. [macosx]
2051104478Ssam  --with-conf-name        use this as the name of the configuration [generated
2052104478Ssam                          from important configuration options]
2053104478Ssam  --with-output-sync      set make output sync type if supported by make.
2054104478Ssam                          [recurse]
2055104478Ssam  --with-default-make-target
2056104478Ssam                          set the default make target [exploded-image]
2057104478Ssam  --with-cacerts-file     specify alternative cacerts file
2058104478Ssam  --with-copyright-year   Set copyright year value for build [current year]
2059104478Ssam  --with-milestone        Deprecated. Option is kept for backwards
2060104478Ssam                          compatibility and is ignored
2061104478Ssam  --with-update-version   Deprecated. Option is kept for backwards
2062104478Ssam                          compatibility and is ignored
2063104478Ssam  --with-user-release-suffix
2064104478Ssam                          Deprecated. Option is kept for backwards
2065104478Ssam                          compatibility and is ignored
2066104478Ssam  --with-build-number     Deprecated. Option is kept for backwards
2067104478Ssam                          compatibility and is ignored
2068104478Ssam  --with-version-string   Set version string [calculated]
2069104478Ssam  --with-version-pre      Set the base part of the version 'PRE' field
2070104478Ssam                          (pre-release identifier) ['internal']
2071104478Ssam  --with-version-opt      Set version 'OPT' field (build metadata)
2072104478Ssam                          [<timestamp>.<user>.<dirname>]
2073104478Ssam  --with-version-build    Set version 'BUILD' field (build number) [not
2074104478Ssam                          specified]
2075104478Ssam  --with-version-major    Set version 'MAJOR' field (first number) [current
2076104478Ssam                          source value]
2077104478Ssam  --with-version-minor    Set version 'MINOR' field (second number) [current
2078104478Ssam                          source value]
2079104478Ssam  --with-version-security Set version 'SECURITY' field (third number) [current
2080104478Ssam                          source value]
2081104478Ssam  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2082104478Ssam                          specified]
2083104478Ssam  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2084104478Ssam  --with-build-jdk        path to JDK of same version as is being built[the
2085104478Ssam                          newly built JDK]
2086104478Ssam  --with-add-source-root  Deprecated. Option is kept for backwards
2087104478Ssam                          compatibility and is ignored
2088104478Ssam  --with-override-source-root
2089104478Ssam                          Deprecated. Option is kept for backwards
2090104478Ssam                          compatibility and is ignored
2091104478Ssam  --with-adds-and-overrides
2092104478Ssam                          Deprecated. Option is kept for backwards
2093104478Ssam                          compatibility and is ignored
2094104478Ssam  --with-override-langtools
2095104478Ssam                          Deprecated. Option is kept for backwards
2096167755Ssam                          compatibility and is ignored
2097104478Ssam  --with-override-corba   Deprecated. Option is kept for backwards
2098167755Ssam                          compatibility and is ignored
2099104630Ssam  --with-override-jaxp    Deprecated. Option is kept for backwards
2100104478Ssam                          compatibility and is ignored
2101104478Ssam  --with-override-jaxws   Deprecated. Option is kept for backwards
2102104478Ssam                          compatibility and is ignored
2103104478Ssam  --with-override-hotspot Deprecated. Option is kept for backwards
2104104478Ssam                          compatibility and is ignored
2105104478Ssam  --with-override-nashorn Deprecated. Option is kept for backwards
2106104478Ssam                          compatibility and is ignored
2107104478Ssam  --with-override-jdk     Deprecated. Option is kept for backwards
2108163648Sru                          compatibility and is ignored
2109104478Ssam  --with-import_hotspot   Deprecated. Option is kept for backwards
2110104478Ssam                          compatibility and is ignored
2111104478Ssam  --with-import-modules   import a set of prebuilt modules either as a zip
2112104478Ssam                          file or an exploded directory
2113104478Ssam  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2114104630Ssam                          to show possible values [platform dependent]
2115104630Ssam  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2116104630Ssam  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2117104630Ssam  --with-extra-ldflags    extra flags to be used when linking jdk
2118104630Ssam  --with-toolchain-version
2119104478Ssam                          the version of the toolchain to look for, use
2120104478Ssam                          '--help' to show possible values [platform
2121104478Ssam                          dependent]
2122104478Ssam  --with-build-devkit     Devkit to use for the build platform toolchain
2123104478Ssam  --with-jtreg            Regression Test Harness [probed]
2124104478Ssam  --with-jib              Jib dependency management tool [not used]
2125104478Ssam  --with-abi-profile      specify ABI profile for ARM builds
2126104478Ssam                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2127104478Ssam                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2128104630Ssam                          [toolchain dependent]
2129104478Ssam  --with-native-debug-symbols
2130104478Ssam                          set the native debug symbol configuration (none,
2131104478Ssam                          internal, external, zipped) [varying]
2132104630Ssam  --with-stdc++lib=<static>,<dynamic>,<default>
2133104478Ssam                          force linking of the C++ runtime on Linux to either
2134104478Ssam                          static or dynamic, default is static with dynamic as
2135104630Ssam                          fallback
2136104478Ssam  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2137104478Ssam                          (Windows only) [probed]
2138104478Ssam  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2139104478Ssam                          (Windows only) [probed]
2140104478Ssam  --with-x                use the X Window System
2141104478Ssam  --with-cups             specify prefix directory for the cups package
2142104478Ssam                          (expecting the headers under PATH/include)
2143104478Ssam  --with-cups-include     specify directory for the cups include files
2144104478Ssam  --with-freetype         specify prefix directory for the freetype package
2145104478Ssam                          (expecting the libraries under PATH/lib and the
2146104478Ssam                          headers under PATH/include)
2147104478Ssam  --with-freetype-include specify directory for the freetype include files
2148104478Ssam  --with-freetype-lib     specify directory for the freetype library
2149104478Ssam  --with-freetype-src     specify directory with freetype sources to
2150104478Ssam                          automatically build the library (experimental,
2151104478Ssam                          Windows-only)
2152104478Ssam  --with-alsa             specify prefix directory for the alsa package
2153104478Ssam                          (expecting the libraries under PATH/lib and the
2154104478Ssam                          headers under PATH/include)
2155104478Ssam  --with-alsa-include     specify directory for the alsa include files
2156104478Ssam  --with-alsa-lib         specify directory for the alsa library
2157104478Ssam  --with-libffi           specify prefix directory for the libffi package
2158104478Ssam                          (expecting the libraries under PATH/lib and the
2159104478Ssam                          headers under PATH/include)
2160104478Ssam  --with-libffi-include   specify directory for the libffi include files
2161104478Ssam  --with-libffi-lib       specify directory for the libffi library
2162104478Ssam  --with-libjpeg          use libjpeg from build system or OpenJDK source
2163104478Ssam                          (system, bundled) [bundled]
2164104478Ssam  --with-giflib           use giflib from build system or OpenJDK source
2165104478Ssam                          (system, bundled) [bundled]
2166104478Ssam  --with-libpng           use libpng from build system or OpenJDK source
2167104478Ssam                          (system, bundled) [bundled]
2168104478Ssam  --with-zlib             use zlib from build system or OpenJDK source
2169104630Ssam                          (system, bundled) [bundled]
2170104478Ssam  --with-lcms             use lcms2 from build system or OpenJDK source
2171104630Ssam                          (system, bundled) [bundled]
2172104478Ssam  --with-dxsdk            Deprecated. Option is kept for backwards
2173104630Ssam                          compatibility and is ignored
2174104478Ssam  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2175104478Ssam                          compatibility and is ignored
2176104630Ssam  --with-dxsdk-include    Deprecated. Option is kept for backwards
2177104478Ssam                          compatibility and is ignored
2178104478Ssam  --with-jvm-features     additional JVM features to enable (separated by
2179104478Ssam                          comma), use '--help' to show possible values [none]
2180104478Ssam  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2181104478Ssam                          compatibility and is ignored
2182104478Ssam  --with-num-cores        number of cores in the build system, e.g.
2183104478Ssam                          --with-num-cores=8 [probed]
2184104478Ssam  --with-memory-size      memory (in MB) available in the build system, e.g.
2185104478Ssam                          --with-memory-size=1024 [probed]
2186104478Ssam  --with-jobs             number of parallel jobs to let make run [calculated
2187104478Ssam                          based on cores and memory]
2188104478Ssam  --with-test-jobs        number of parallel tests jobs to run [based on build
2189104478Ssam                          jobs]
2190104478Ssam  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2191104478Ssam                          invocations of boot JDK, overriding the default
2192104478Ssam                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2193104478Ssam                          -enableassertions"
2194104478Ssam  --with-sjavac-server-java
2195104478Ssam                          use this java binary for running the sjavac
2196104478Ssam                          background server [Boot JDK java]
2197104478Ssam  --with-ccache-dir       where to store ccache files [~/.ccache]
2198104478Ssam
2199104478SsamSome influential environment variables:
2200104478Ssam  BASENAME    Override default value for BASENAME
2201104478Ssam  BASH        Override default value for BASH
2202104478Ssam  CAT         Override default value for CAT
2203104478Ssam  CHMOD       Override default value for CHMOD
2204104478Ssam  CMP         Override default value for CMP
2205104478Ssam  COMM        Override default value for COMM
2206104478Ssam  CP          Override default value for CP
2207104478Ssam  CUT         Override default value for CUT
2208104478Ssam  DATE        Override default value for DATE
2209104478Ssam  DIFF        Override default value for DIFF
2210104478Ssam  DIRNAME     Override default value for DIRNAME
2211104478Ssam  ECHO        Override default value for ECHO
2212104478Ssam  EXPR        Override default value for EXPR
2213104478Ssam  FILE        Override default value for FILE
2214104478Ssam  FIND        Override default value for FIND
2215104478Ssam  HEAD        Override default value for HEAD
2216104478Ssam  GUNZIP      Override default value for GUNZIP
2217104478Ssam  GZIP        Override default value for GZIP
2218104478Ssam  LN          Override default value for LN
2219104478Ssam  LS          Override default value for LS
2220104478Ssam  MKDIR       Override default value for MKDIR
2221104478Ssam  MKTEMP      Override default value for MKTEMP
2222104478Ssam  MV          Override default value for MV
2223104478Ssam  NAWK        Override default value for NAWK
2224104478Ssam  PRINTF      Override default value for PRINTF
2225104478Ssam  RM          Override default value for RM
2226104478Ssam  RMDIR       Override default value for RMDIR
2227104478Ssam  SH          Override default value for SH
2228104478Ssam  SORT        Override default value for SORT
2229104478Ssam  TAIL        Override default value for TAIL
2230104478Ssam  TAR         Override default value for TAR
2231104478Ssam  TEE         Override default value for TEE
2232104478Ssam  TOUCH       Override default value for TOUCH
2233104478Ssam  TR          Override default value for TR
2234104478Ssam  UNAME       Override default value for UNAME
2235104478Ssam  UNIQ        Override default value for UNIQ
2236104478Ssam  WC          Override default value for WC
2237104478Ssam  WHICH       Override default value for WHICH
2238104478Ssam  XARGS       Override default value for XARGS
2239104478Ssam  AWK         Override default value for AWK
2240104478Ssam  GREP        Override default value for GREP
2241104478Ssam  EGREP       Override default value for EGREP
2242104478Ssam  FGREP       Override default value for FGREP
2243104478Ssam  SED         Override default value for SED
2244104478Ssam  CYGPATH     Override default value for CYGPATH
2245104478Ssam  READLINK    Override default value for READLINK
2246104478Ssam  DF          Override default value for DF
2247104478Ssam  CPIO        Override default value for CPIO
2248104478Ssam  NICE        Override default value for NICE
2249104478Ssam  PANDOC      Override default value for PANDOC
2250104478Ssam  MAKE        Override default value for MAKE
2251104478Ssam  UNZIP       Override default value for UNZIP
2252104478Ssam  ZIPEXE      Override default value for ZIPEXE
2253104478Ssam  LDD         Override default value for LDD
2254104478Ssam  OTOOL       Override default value for OTOOL
2255104478Ssam  READELF     Override default value for READELF
2256104478Ssam  DOT         Override default value for DOT
2257104478Ssam  HG          Override default value for HG
2258104478Ssam  STAT        Override default value for STAT
2259104478Ssam  TIME        Override default value for TIME
2260104478Ssam  FLOCK       Override default value for FLOCK
2261104478Ssam  DTRACE      Override default value for DTRACE
2262104478Ssam  PATCH       Override default value for PATCH
2263104478Ssam  DSYMUTIL    Override default value for DSYMUTIL
2264104478Ssam  XATTR       Override default value for XATTR
2265104478Ssam  CODESIGN    Override default value for CODESIGN
2266104478Ssam  SETFILE     Override default value for SETFILE
2267104478Ssam  PKG_CONFIG  path to pkg-config utility
2268104478Ssam  JAVA        Override default value for JAVA
2269104478Ssam  JAVAC       Override default value for JAVAC
2270104478Ssam  JAVAH       Override default value for JAVAH
2271104478Ssam  JAR         Override default value for JAR
2272104478Ssam  JARSIGNER   Override default value for JARSIGNER
2273104478Ssam  CC          C compiler command
2274104478Ssam  CFLAGS      C compiler flags
2275104478Ssam  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2276104630Ssam              nonstandard directory <lib dir>
2277104630Ssam  LIBS        libraries to pass to the linker, e.g. -l<library>
2278104478Ssam  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2279104478Ssam              you have headers in a nonstandard directory <include dir>
2280104478Ssam  CXX         C++ compiler command
2281104478Ssam  CXXFLAGS    C++ compiler flags
2282104478Ssam  CPP         C preprocessor
2283104478Ssam  CXXCPP      C++ preprocessor
2284104478Ssam  AS          Override default value for AS
2285104478Ssam  AR          Override default value for AR
2286104478Ssam  LIPO        Override default value for LIPO
2287104478Ssam  STRIP       Override default value for STRIP
2288104478Ssam  NM          Override default value for NM
2289104478Ssam  GNM         Override default value for GNM
2290108823Ssam  OBJCOPY     Override default value for OBJCOPY
2291108823Ssam  OBJDUMP     Override default value for OBJDUMP
2292108823Ssam  BUILD_CC    Override default value for BUILD_CC
2293108823Ssam  BUILD_CXX   Override default value for BUILD_CXX
2294104478Ssam  BUILD_NM    Override default value for BUILD_NM
2295104478Ssam  BUILD_AR    Override default value for BUILD_AR
2296115747Ssam  BUILD_OBJCOPY
2297104478Ssam              Override default value for BUILD_OBJCOPY
2298104478Ssam  BUILD_STRIP Override default value for BUILD_STRIP
2299104478Ssam  JTREGEXE    Override default value for JTREGEXE
2300115747Ssam  XMKMF       Path to xmkmf, Makefile generator for X Window System
2301104478Ssam  FREETYPE_CFLAGS
2302104478Ssam              C compiler flags for FREETYPE, overriding pkg-config
2303104478Ssam  FREETYPE_LIBS
2304104478Ssam              linker flags for FREETYPE, overriding pkg-config
2305104478Ssam  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2306267448Sjhb  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2307104478Ssam  LIBFFI_CFLAGS
2308267448Sjhb              C compiler flags for LIBFFI, overriding pkg-config
2309104478Ssam  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2310104478Ssam  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2311104478Ssam  PNG_LIBS    linker flags for PNG, overriding pkg-config
2312267448Sjhb  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2313104478Ssam  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2314104478Ssam  ICECC_CMD   Override default value for ICECC_CMD
2315104478Ssam  ICECC_CREATE_ENV
2316267448Sjhb              Override default value for ICECC_CREATE_ENV
2317104478Ssam  ICECC_WRAPPER
2318104478Ssam              Override default value for ICECC_WRAPPER
2319104478Ssam  CCACHE      Override default value for CCACHE
2320267448Sjhb
2321104478SsamUse these variables to override the choices made by `configure' or to help
2322104478Ssamit to find libraries and programs with nonstandard names/locations.
2323104478Ssam
2324267448SjhbReport bugs to <build-dev@openjdk.java.net>.
2325104478SsamOpenJDK home page: <http://openjdk.java.net>.
2326104478Ssam_ACEOF
2327104478Ssamac_status=$?
2328104478Ssamfi
2329104478Ssam
2330104478Ssamif test "$ac_init_help" = "recursive"; then
2331104478Ssam  # If there are subdirs, report their specific --help.
2332104478Ssam  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2333104630Ssam    test -d "$ac_dir" ||
2334104630Ssam      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2335104630Ssam      continue
2336105215Sphk    ac_builddir=.
2337104630Ssam
2338104630Ssamcase "$ac_dir" in
2339104630Ssam.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2340104630Ssam*)
2341104630Ssam  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2342104630Ssam  # A ".." for each directory in $ac_dir_suffix.
2343104630Ssam  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2344104630Ssam  case $ac_top_builddir_sub in
2345104630Ssam  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2346104630Ssam  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2347104630Ssam  esac ;;
2348104630Ssamesac
2349104630Ssamac_abs_top_builddir=$ac_pwd
2350104630Ssamac_abs_builddir=$ac_pwd$ac_dir_suffix
2351104630Ssam# for backward compatibility:
2352104630Ssamac_top_builddir=$ac_top_build_prefix
2353104630Ssam
2354104630Ssamcase $srcdir in
2355104630Ssam  .)  # We are building in place.
2356104630Ssam    ac_srcdir=.
2357104630Ssam    ac_top_srcdir=$ac_top_builddir_sub
2358104630Ssam    ac_abs_top_srcdir=$ac_pwd ;;
2359104630Ssam  [\\/]* | ?:[\\/]* )  # Absolute name.
2360104630Ssam    ac_srcdir=$srcdir$ac_dir_suffix;
2361104630Ssam    ac_top_srcdir=$srcdir
2362104630Ssam    ac_abs_top_srcdir=$srcdir ;;
2363104630Ssam  *) # Relative name.
2364104630Ssam    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2365104630Ssam    ac_top_srcdir=$ac_top_build_prefix$srcdir
2366104630Ssam    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2367104630Ssamesac
2368104630Ssamac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2369104630Ssam
2370104630Ssam    cd "$ac_dir" || { ac_status=$?; continue; }
2371104630Ssam    # Check for guested configure.
2372104630Ssam    if test -f "$ac_srcdir/configure.gnu"; then
2373104630Ssam      echo &&
2374104630Ssam      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2375104630Ssam    elif test -f "$ac_srcdir/configure"; then
2376104630Ssam      echo &&
2377104630Ssam      $SHELL "$ac_srcdir/configure" --help=recursive
2378104630Ssam    else
2379104630Ssam      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2380104630Ssam    fi || ac_status=$?
2381104630Ssam    cd "$ac_pwd" || { ac_status=$?; break; }
2382104630Ssam  done
2383104630Ssamfi
2384104630Ssam
2385104630Ssamtest -n "$ac_init_help" && exit $ac_status
2386104630Ssamif $ac_init_version; then
2387104630Ssam  cat <<\_ACEOF
2388104630SsamOpenJDK configure jdk9
2389104630Ssamgenerated by GNU Autoconf 2.69
2390104630Ssam
2391104630SsamCopyright (C) 2012 Free Software Foundation, Inc.
2392104630SsamThis configure script is free software; the Free Software Foundation
2393104630Ssamgives unlimited permission to copy, distribute and modify it.
2394104630Ssam_ACEOF
2395104630Ssam  exit
2396104630Ssamfi
2397104630Ssam
2398104630Ssam## ------------------------ ##
2399104630Ssam## Autoconf initialization. ##
2400104630Ssam## ------------------------ ##
2401104630Ssam
2402104630Ssam# ac_fn_c_try_compile LINENO
2403104630Ssam# --------------------------
2404104630Ssam# Try to compile conftest.$ac_ext, and return whether this succeeded.
2405104630Ssamac_fn_c_try_compile ()
2406104630Ssam{
2407104630Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408104630Ssam  rm -f conftest.$ac_objext
2409104630Ssam  if { { ac_try="$ac_compile"
2410104630Ssamcase "(($ac_try" in
2411104630Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412104630Ssam  *) ac_try_echo=$ac_try;;
2413104630Ssamesac
2414104630Ssameval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415104630Ssam$as_echo "$ac_try_echo"; } >&5
2416104630Ssam  (eval "$ac_compile") 2>conftest.err
2417104630Ssam  ac_status=$?
2418104630Ssam  if test -s conftest.err; then
2419104630Ssam    grep -v '^ *+' conftest.err >conftest.er1
2420104630Ssam    cat conftest.er1 >&5
2421104630Ssam    mv -f conftest.er1 conftest.err
2422104630Ssam  fi
2423104630Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2424104630Ssam  test $ac_status = 0; } && {
2425104630Ssam	 test -z "$ac_c_werror_flag" ||
2426104630Ssam	 test ! -s conftest.err
2427104630Ssam       } && test -s conftest.$ac_objext; then :
2428104630Ssam  ac_retval=0
2429104630Ssamelse
2430104630Ssam  $as_echo "$as_me: failed program was:" >&5
2431104630Ssamsed 's/^/| /' conftest.$ac_ext >&5
2432104630Ssam
2433104630Ssam	ac_retval=1
2434104630Ssamfi
2435104630Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2436104630Ssam  as_fn_set_status $ac_retval
2437104630Ssam
2438104630Ssam} # ac_fn_c_try_compile
2439104630Ssam
2440108823Ssam# ac_fn_cxx_try_compile LINENO
2441108823Ssam# ----------------------------
2442108823Ssam# Try to compile conftest.$ac_ext, and return whether this succeeded.
2443108823Ssamac_fn_cxx_try_compile ()
2444104630Ssam{
2445104630Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446104630Ssam  rm -f conftest.$ac_objext
2447104630Ssam  if { { ac_try="$ac_compile"
2448104630Ssamcase "(($ac_try" in
2449104630Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450104630Ssam  *) ac_try_echo=$ac_try;;
2451104630Ssamesac
2452104630Ssameval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453104630Ssam$as_echo "$ac_try_echo"; } >&5
2454104630Ssam  (eval "$ac_compile") 2>conftest.err
2455104630Ssam  ac_status=$?
2456104630Ssam  if test -s conftest.err; then
2457104630Ssam    grep -v '^ *+' conftest.err >conftest.er1
2458104630Ssam    cat conftest.er1 >&5
2459104630Ssam    mv -f conftest.er1 conftest.err
2460104630Ssam  fi
2461104630Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462104630Ssam  test $ac_status = 0; } && {
2463104630Ssam	 test -z "$ac_cxx_werror_flag" ||
2464104630Ssam	 test ! -s conftest.err
2465104630Ssam       } && test -s conftest.$ac_objext; then :
2466104630Ssam  ac_retval=0
2467104630Ssamelse
2468104630Ssam  $as_echo "$as_me: failed program was:" >&5
2469104630Ssamsed 's/^/| /' conftest.$ac_ext >&5
2470104630Ssam
2471104630Ssam	ac_retval=1
2472104630Ssamfi
2473104630Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474104630Ssam  as_fn_set_status $ac_retval
2475104630Ssam
2476104630Ssam} # ac_fn_cxx_try_compile
2477104630Ssam
2478104630Ssam# ac_fn_c_try_cpp LINENO
2479104630Ssam# ----------------------
2480104630Ssam# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2481104630Ssamac_fn_c_try_cpp ()
2482104630Ssam{
2483104630Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484104630Ssam  if { { ac_try="$ac_cpp conftest.$ac_ext"
2485104630Ssamcase "(($ac_try" in
2486104630Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487104630Ssam  *) ac_try_echo=$ac_try;;
2488104630Ssamesac
2489104630Ssameval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490104630Ssam$as_echo "$ac_try_echo"; } >&5
2491104630Ssam  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2492108823Ssam  ac_status=$?
2493108823Ssam  if test -s conftest.err; then
2494108823Ssam    grep -v '^ *+' conftest.err >conftest.er1
2495108823Ssam    cat conftest.er1 >&5
2496104630Ssam    mv -f conftest.er1 conftest.err
2497104630Ssam  fi
2498115747Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499104630Ssam  test $ac_status = 0; } > conftest.i && {
2500104630Ssam	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2501115747Ssam	 test ! -s conftest.err
2502104630Ssam       }; then :
2503104630Ssam  ac_retval=0
2504104630Ssamelse
2505104630Ssam  $as_echo "$as_me: failed program was:" >&5
2506104630Ssamsed 's/^/| /' conftest.$ac_ext >&5
2507267448Sjhb
2508104630Ssam    ac_retval=1
2509267448Sjhbfi
2510104630Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511104630Ssam  as_fn_set_status $ac_retval
2512104630Ssam
2513267448Sjhb} # ac_fn_c_try_cpp
2514104630Ssam
2515104630Ssam# ac_fn_cxx_try_cpp LINENO
2516104630Ssam# ------------------------
2517267448Sjhb# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2518104630Ssamac_fn_cxx_try_cpp ()
2519104630Ssam{
2520104630Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521267448Sjhb  if { { ac_try="$ac_cpp conftest.$ac_ext"
2522104630Ssamcase "(($ac_try" in
2523104630Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2524104630Ssam  *) ac_try_echo=$ac_try;;
2525267448Sjhbesac
2526104630Ssameval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2527104630Ssam$as_echo "$ac_try_echo"; } >&5
2528104630Ssam  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2529104630Ssam  ac_status=$?
2530104630Ssam  if test -s conftest.err; then
2531104630Ssam    grep -v '^ *+' conftest.err >conftest.er1
2532104630Ssam    cat conftest.er1 >&5
2533104630Ssam    mv -f conftest.er1 conftest.err
2534104478Ssam  fi
2535104478Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536104478Ssam  test $ac_status = 0; } > conftest.i && {
2537104478Ssam	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2538104478Ssam	 test ! -s conftest.err
2539104478Ssam       }; then :
2540104478Ssam  ac_retval=0
2541104478Ssamelse
2542104478Ssam  $as_echo "$as_me: failed program was:" >&5
2543104478Ssamsed 's/^/| /' conftest.$ac_ext >&5
2544104478Ssam
2545104478Ssam    ac_retval=1
2546104478Ssamfi
2547104478Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548104478Ssam  as_fn_set_status $ac_retval
2549104478Ssam
2550104478Ssam} # ac_fn_cxx_try_cpp
2551104478Ssam
2552104478Ssam# ac_fn_c_try_link LINENO
2553104478Ssam# -----------------------
2554104478Ssam# Try to link conftest.$ac_ext, and return whether this succeeded.
2555104478Ssamac_fn_c_try_link ()
2556104478Ssam{
2557104478Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558104478Ssam  rm -f conftest.$ac_objext conftest$ac_exeext
2559104478Ssam  if { { ac_try="$ac_link"
2560104478Ssamcase "(($ac_try" in
2561104478Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2562104478Ssam  *) ac_try_echo=$ac_try;;
2563104478Ssamesac
2564104478Ssameval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2565104478Ssam$as_echo "$ac_try_echo"; } >&5
2566104478Ssam  (eval "$ac_link") 2>conftest.err
2567104478Ssam  ac_status=$?
2568104478Ssam  if test -s conftest.err; then
2569104478Ssam    grep -v '^ *+' conftest.err >conftest.er1
2570104478Ssam    cat conftest.er1 >&5
2571104478Ssam    mv -f conftest.er1 conftest.err
2572104478Ssam  fi
2573104478Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2574104478Ssam  test $ac_status = 0; } && {
2575104478Ssam	 test -z "$ac_c_werror_flag" ||
2576104478Ssam	 test ! -s conftest.err
2577104478Ssam       } && test -s conftest$ac_exeext && {
2578104478Ssam	 test "$cross_compiling" = yes ||
2579104478Ssam	 test -x conftest$ac_exeext
2580104478Ssam       }; then :
2581104478Ssam  ac_retval=0
2582104478Ssamelse
2583104478Ssam  $as_echo "$as_me: failed program was:" >&5
2584104478Ssamsed 's/^/| /' conftest.$ac_ext >&5
2585104478Ssam
2586104478Ssam	ac_retval=1
2587104478Ssamfi
2588104478Ssam  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2589104478Ssam  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2590104478Ssam  # interfere with the next link command; also delete a directory that is
2591104478Ssam  # left behind by Apple's compiler.  We do this before executing the actions.
2592104478Ssam  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2593104478Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594104478Ssam  as_fn_set_status $ac_retval
2595104478Ssam
2596104478Ssam} # ac_fn_c_try_link
2597104478Ssam
2598104478Ssam# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2599104478Ssam# ---------------------------------------------------------
2600104478Ssam# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2601104478Ssam# the include files in INCLUDES and setting the cache variable VAR
2602104478Ssam# accordingly.
2603104478Ssamac_fn_cxx_check_header_mongrel ()
2604104478Ssam{
2605104478Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2606104478Ssam  if eval \${$3+:} false; then :
2607104478Ssam  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2608104478Ssam$as_echo_n "checking for $2... " >&6; }
2609104478Ssamif eval \${$3+:} false; then :
2610104478Ssam  $as_echo_n "(cached) " >&6
2611104478Ssamfi
2612104478Ssameval ac_res=\$$3
2613104478Ssam	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614104478Ssam$as_echo "$ac_res" >&6; }
2615104478Ssamelse
2616104478Ssam  # Is the header compilable?
2617104478Ssam{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2618104478Ssam$as_echo_n "checking $2 usability... " >&6; }
2619104478Ssamcat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620104478Ssam/* end confdefs.h.  */
2621104478Ssam$4
2622104478Ssam#include <$2>
2623104478Ssam_ACEOF
2624104478Ssamif ac_fn_cxx_try_compile "$LINENO"; then :
2625104478Ssam  ac_header_compiler=yes
2626104478Ssamelse
2627104478Ssam  ac_header_compiler=no
2628104478Ssamfi
2629104478Ssamrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630104478Ssam{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2631104478Ssam$as_echo "$ac_header_compiler" >&6; }
2632104478Ssam
2633104478Ssam# Is the header present?
2634104478Ssam{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2635104478Ssam$as_echo_n "checking $2 presence... " >&6; }
2636104478Ssamcat confdefs.h - <<_ACEOF >conftest.$ac_ext
2637104478Ssam/* end confdefs.h.  */
2638104478Ssam#include <$2>
2639104478Ssam_ACEOF
2640104478Ssamif ac_fn_cxx_try_cpp "$LINENO"; then :
2641104478Ssam  ac_header_preproc=yes
2642104478Ssamelse
2643104478Ssam  ac_header_preproc=no
2644104478Ssamfi
2645104478Ssamrm -f conftest.err conftest.i conftest.$ac_ext
2646104478Ssam{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2647104478Ssam$as_echo "$ac_header_preproc" >&6; }
2648104478Ssam
2649104478Ssam# So?  What about this header?
2650104478Ssamcase $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2651104478Ssam  yes:no: )
2652104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2653104478Ssam$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2654104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2655104478Ssam$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2656104478Ssam    ;;
2657104478Ssam  no:yes:* )
2658104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2659104478Ssam$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2660104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2661104478Ssam$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2662104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2663104478Ssam$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2664104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2665104478Ssam$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2666104478Ssam    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667104478Ssam$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668106579Sjhb( $as_echo "## ----------------------------------------- ##
2669104478Ssam## Report this to build-dev@openjdk.java.net ##
2670106579Sjhb## ----------------------------------------- ##"
2671104478Ssam     ) | sed "s/^/$as_me: WARNING:     /" >&2
2672104478Ssam    ;;
2673106579Sjhbesac
2674104478Ssam  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2675106579Sjhb$as_echo_n "checking for $2... " >&6; }
2676104478Ssamif eval \${$3+:} false; then :
2677104478Ssam  $as_echo_n "(cached) " >&6
2678104478Ssamelse
2679104478Ssam  eval "$3=\$ac_header_compiler"
2680104478Ssamfi
2681104478Ssameval ac_res=\$$3
2682104478Ssam	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683104478Ssam$as_echo "$ac_res" >&6; }
2684104478Ssamfi
2685104478Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2686104478Ssam
2687104478Ssam} # ac_fn_cxx_check_header_mongrel
2688108823Ssam
2689108823Ssam# ac_fn_cxx_try_run LINENO
2690104478Ssam# ------------------------
2691104478Ssam# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2692115747Ssam# that executables *can* be run.
2693104478Ssamac_fn_cxx_try_run ()
2694104478Ssam{
2695104478Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2696115747Ssam  if { { ac_try="$ac_link"
2697104478Ssamcase "(($ac_try" in
2698104478Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2699104478Ssam  *) ac_try_echo=$ac_try;;
2700104478Ssamesac
2701267448Sjhbeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2702104478Ssam$as_echo "$ac_try_echo"; } >&5
2703267448Sjhb  (eval "$ac_link") 2>&5
2704104478Ssam  ac_status=$?
2705104478Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2706104478Ssam  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2707267448Sjhb  { { case "(($ac_try" in
2708104478Ssam  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709104478Ssam  *) ac_try_echo=$ac_try;;
2710104478Ssamesac
2711104478Ssameval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712104478Ssam$as_echo "$ac_try_echo"; } >&5
2713104478Ssam  (eval "$ac_try") 2>&5
2714104478Ssam  ac_status=$?
2715104478Ssam  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716104478Ssam  test $ac_status = 0; }; }; then :
2717104478Ssam  ac_retval=0
2718104478Ssamelse
2719104478Ssam  $as_echo "$as_me: program exited with status $ac_status" >&5
2720104478Ssam       $as_echo "$as_me: failed program was:" >&5
2721104478Ssamsed 's/^/| /' conftest.$ac_ext >&5
2722104478Ssam
2723104478Ssam       ac_retval=$ac_status
2724104478Ssamfi
2725104478Ssam  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2726104478Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2727104478Ssam  as_fn_set_status $ac_retval
2728104478Ssam
2729104478Ssam} # ac_fn_cxx_try_run
2730104478Ssam
2731104478Ssam# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2732104478Ssam# ---------------------------------------------------------
2733104478Ssam# Tests whether HEADER exists and can be compiled using the include files in
2734104478Ssam# INCLUDES, setting the cache variable VAR accordingly.
2735104478Ssamac_fn_cxx_check_header_compile ()
2736104478Ssam{
2737104478Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738104478Ssam  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739104478Ssam$as_echo_n "checking for $2... " >&6; }
2740104478Ssamif eval \${$3+:} false; then :
2741104478Ssam  $as_echo_n "(cached) " >&6
2742104478Ssamelse
2743104478Ssam  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744104478Ssam/* end confdefs.h.  */
2745104478Ssam$4
2746104478Ssam#include <$2>
2747104478Ssam_ACEOF
2748104478Ssamif ac_fn_cxx_try_compile "$LINENO"; then :
2749104478Ssam  eval "$3=yes"
2750104478Ssamelse
2751104478Ssam  eval "$3=no"
2752104478Ssamfi
2753104478Ssamrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2754104478Ssamfi
2755104478Ssameval ac_res=\$$3
2756104478Ssam	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2757104478Ssam$as_echo "$ac_res" >&6; }
2758104478Ssam  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759104478Ssam
2760104478Ssam} # ac_fn_cxx_check_header_compile
2761104478Ssam
2762104478Ssam# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2763104478Ssam# ----------------------------------------------
2764104478Ssam# Tries to find the compile-time value of EXPR in a program that includes
2765104478Ssam# INCLUDES, setting VAR accordingly. Returns whether the value could be
2766104478Ssam# computed
2767104478Ssamac_fn_cxx_compute_int ()
2768104478Ssam{
2769104478Ssam  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2770104478Ssam  if test "$cross_compiling" = yes; then
2771104478Ssam    # Depending upon the size, compute the lo and hi bounds.
2772104478Ssamcat confdefs.h - <<_ACEOF >conftest.$ac_ext
2773104478Ssam/* end confdefs.h.  */
2774104478Ssam$4
2775104478Ssamint
2776104478Ssammain ()
2777104478Ssam{
2778104478Ssamstatic int test_array [1 - 2 * !(($2) >= 0)];
2779104478Ssamtest_array [0] = 0;
2780104478Ssamreturn test_array [0];
2781104478Ssam
2782104478Ssam  ;
2783104478Ssam  return 0;
2784104478Ssam}
2785104478Ssam_ACEOF
2786104478Ssamif ac_fn_cxx_try_compile "$LINENO"; then :
2787104478Ssam  ac_lo=0 ac_mid=0
2788104478Ssam  while :; do
2789104478Ssam    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790104478Ssam/* end confdefs.h.  */
2791104478Ssam$4
2792104478Ssamint
2793104478Ssammain ()
2794104478Ssam{
2795104478Ssamstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
2796104478Ssamtest_array [0] = 0;
2797104478Ssamreturn test_array [0];
2798104478Ssam
2799104478Ssam  ;
2800104478Ssam  return 0;
2801104478Ssam}
2802104478Ssam_ACEOF
2803104478Ssamif ac_fn_cxx_try_compile "$LINENO"; then :
2804104478Ssam  ac_hi=$ac_mid; break
2805104478Ssamelse
2806104478Ssam  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2807104478Ssam			if test $ac_lo -le $ac_mid; then
2808104478Ssam			  ac_lo= ac_hi=
2809104478Ssam			  break
2810104478Ssam			fi
2811104478Ssam			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2812104478Ssamfi
2813104478Ssamrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2814104478Ssam  done
2815104478Ssamelse
2816104478Ssam  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817104478Ssam/* end confdefs.h.  */
2818104478Ssam$4
2819104478Ssamint
2820104478Ssammain ()
2821104478Ssam{
2822104478Ssamstatic int test_array [1 - 2 * !(($2) < 0)];
2823104478Ssamtest_array [0] = 0;
2824104478Ssamreturn test_array [0];
2825104478Ssam
2826104478Ssam  ;
2827104478Ssam  return 0;
2828104478Ssam}
2829104478Ssam_ACEOF
2830104478Ssamif ac_fn_cxx_try_compile "$LINENO"; then :
2831104478Ssam  ac_hi=-1 ac_mid=-1
2832104478Ssam  while :; do
2833104478Ssam    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2834104478Ssam/* end confdefs.h.  */
2835104478Ssam$4
2836104478Ssamint
2837104478Ssammain ()
2838104478Ssam{
2839104478Ssamstatic int test_array [1 - 2 * !(($2) >= $ac_mid)];
2840104478Ssamtest_array [0] = 0;
2841104478Ssamreturn test_array [0];
2842104478Ssam
2843104478Ssam  ;
2844104478Ssam  return 0;
2845104478Ssam}
2846104478Ssam_ACEOF
2847104478Ssamif ac_fn_cxx_try_compile "$LINENO"; then :
2848104478Ssam  ac_lo=$ac_mid; break
2849104478Ssamelse
2850104478Ssam  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2851104478Ssam			if test $ac_mid -le $ac_hi; then
2852104478Ssam			  ac_lo= ac_hi=
2853104478Ssam			  break
2854104478Ssam			fi
2855104478Ssam			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2856104478Ssamfi
2857104478Ssamrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858104478Ssam  done
2859104478Ssamelse
2860104478Ssam  ac_lo= ac_hi=
2861fi
2862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865# Binary search between lo and hi bounds.
2866while test "x$ac_lo" != "x$ac_hi"; do
2867  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h.  */
2870$4
2871int
2872main ()
2873{
2874static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2875test_array [0] = 0;
2876return test_array [0];
2877
2878  ;
2879  return 0;
2880}
2881_ACEOF
2882if ac_fn_cxx_try_compile "$LINENO"; then :
2883  ac_hi=$ac_mid
2884else
2885  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2886fi
2887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888done
2889case $ac_lo in #((
2890?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2891'') ac_retval=1 ;;
2892esac
2893  else
2894    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2895/* end confdefs.h.  */
2896$4
2897static long int longval () { return $2; }
2898static unsigned long int ulongval () { return $2; }
2899#include <stdio.h>
2900#include <stdlib.h>
2901int
2902main ()
2903{
2904
2905  FILE *f = fopen ("conftest.val", "w");
2906  if (! f)
2907    return 1;
2908  if (($2) < 0)
2909    {
2910      long int i = longval ();
2911      if (i != ($2))
2912	return 1;
2913      fprintf (f, "%ld", i);
2914    }
2915  else
2916    {
2917      unsigned long int i = ulongval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%lu", i);
2921    }
2922  /* Do not output a trailing newline, as this causes \r\n confusion
2923     on some platforms.  */
2924  return ferror (f) || fclose (f) != 0;
2925
2926  ;
2927  return 0;
2928}
2929_ACEOF
2930if ac_fn_cxx_try_run "$LINENO"; then :
2931  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2932else
2933  ac_retval=1
2934fi
2935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2936  conftest.$ac_objext conftest.beam conftest.$ac_ext
2937rm -f conftest.val
2938
2939  fi
2940  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2941  as_fn_set_status $ac_retval
2942
2943} # ac_fn_cxx_compute_int
2944
2945# ac_fn_cxx_try_link LINENO
2946# -------------------------
2947# Try to link conftest.$ac_ext, and return whether this succeeded.
2948ac_fn_cxx_try_link ()
2949{
2950  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2951  rm -f conftest.$ac_objext conftest$ac_exeext
2952  if { { ac_try="$ac_link"
2953case "(($ac_try" in
2954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955  *) ac_try_echo=$ac_try;;
2956esac
2957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2958$as_echo "$ac_try_echo"; } >&5
2959  (eval "$ac_link") 2>conftest.err
2960  ac_status=$?
2961  if test -s conftest.err; then
2962    grep -v '^ *+' conftest.err >conftest.er1
2963    cat conftest.er1 >&5
2964    mv -f conftest.er1 conftest.err
2965  fi
2966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2967  test $ac_status = 0; } && {
2968	 test -z "$ac_cxx_werror_flag" ||
2969	 test ! -s conftest.err
2970       } && test -s conftest$ac_exeext && {
2971	 test "$cross_compiling" = yes ||
2972	 test -x conftest$ac_exeext
2973       }; then :
2974  ac_retval=0
2975else
2976  $as_echo "$as_me: failed program was:" >&5
2977sed 's/^/| /' conftest.$ac_ext >&5
2978
2979	ac_retval=1
2980fi
2981  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2982  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2983  # interfere with the next link command; also delete a directory that is
2984  # left behind by Apple's compiler.  We do this before executing the actions.
2985  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2986  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2987  as_fn_set_status $ac_retval
2988
2989} # ac_fn_cxx_try_link
2990
2991# ac_fn_cxx_check_func LINENO FUNC VAR
2992# ------------------------------------
2993# Tests whether FUNC exists, setting the cache variable VAR accordingly
2994ac_fn_cxx_check_func ()
2995{
2996  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2998$as_echo_n "checking for $2... " >&6; }
2999if eval \${$3+:} false; then :
3000  $as_echo_n "(cached) " >&6
3001else
3002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3003/* end confdefs.h.  */
3004/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3005   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3006#define $2 innocuous_$2
3007
3008/* System header to define __stub macros and hopefully few prototypes,
3009    which can conflict with char $2 (); below.
3010    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3011    <limits.h> exists even on freestanding compilers.  */
3012
3013#ifdef __STDC__
3014# include <limits.h>
3015#else
3016# include <assert.h>
3017#endif
3018
3019#undef $2
3020
3021/* Override any GCC internal prototype to avoid an error.
3022   Use char because int might match the return type of a GCC
3023   builtin and then its argument prototype would still apply.  */
3024#ifdef __cplusplus
3025extern "C"
3026#endif
3027char $2 ();
3028/* The GNU C library defines this for functions which it implements
3029    to always fail with ENOSYS.  Some functions are actually named
3030    something starting with __ and the normal name is an alias.  */
3031#if defined __stub_$2 || defined __stub___$2
3032choke me
3033#endif
3034
3035int
3036main ()
3037{
3038return $2 ();
3039  ;
3040  return 0;
3041}
3042_ACEOF
3043if ac_fn_cxx_try_link "$LINENO"; then :
3044  eval "$3=yes"
3045else
3046  eval "$3=no"
3047fi
3048rm -f core conftest.err conftest.$ac_objext \
3049    conftest$ac_exeext conftest.$ac_ext
3050fi
3051eval ac_res=\$$3
3052	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3053$as_echo "$ac_res" >&6; }
3054  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3055
3056} # ac_fn_cxx_check_func
3057
3058# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3059# -------------------------------------------------------
3060# Tests whether HEADER exists and can be compiled using the include files in
3061# INCLUDES, setting the cache variable VAR accordingly.
3062ac_fn_c_check_header_compile ()
3063{
3064  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3066$as_echo_n "checking for $2... " >&6; }
3067if eval \${$3+:} false; then :
3068  $as_echo_n "(cached) " >&6
3069else
3070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3071/* end confdefs.h.  */
3072$4
3073#include <$2>
3074_ACEOF
3075if ac_fn_c_try_compile "$LINENO"; then :
3076  eval "$3=yes"
3077else
3078  eval "$3=no"
3079fi
3080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3081fi
3082eval ac_res=\$$3
3083	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3084$as_echo "$ac_res" >&6; }
3085  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3086
3087} # ac_fn_c_check_header_compile
3088cat >config.log <<_ACEOF
3089This file contains any messages produced by compilers while
3090running configure, to aid debugging if configure makes a mistake.
3091
3092It was created by OpenJDK $as_me jdk9, which was
3093generated by GNU Autoconf 2.69.  Invocation command line was
3094
3095  $ $0 $@
3096
3097_ACEOF
3098exec 5>>config.log
3099{
3100cat <<_ASUNAME
3101## --------- ##
3102## Platform. ##
3103## --------- ##
3104
3105hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3106uname -m = `(uname -m) 2>/dev/null || echo unknown`
3107uname -r = `(uname -r) 2>/dev/null || echo unknown`
3108uname -s = `(uname -s) 2>/dev/null || echo unknown`
3109uname -v = `(uname -v) 2>/dev/null || echo unknown`
3110
3111/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3112/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3113
3114/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3115/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3116/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3117/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3118/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3119/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3120/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3121
3122_ASUNAME
3123
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127  IFS=$as_save_IFS
3128  test -z "$as_dir" && as_dir=.
3129    $as_echo "PATH: $as_dir"
3130  done
3131IFS=$as_save_IFS
3132
3133} >&5
3134
3135cat >&5 <<_ACEOF
3136
3137
3138## ----------- ##
3139## Core tests. ##
3140## ----------- ##
3141
3142_ACEOF
3143
3144
3145# Keep a trace of the command line.
3146# Strip out --no-create and --no-recursion so they do not pile up.
3147# Strip out --silent because we don't want to record it for future runs.
3148# Also quote any args containing shell meta-characters.
3149# Make two passes to allow for proper duplicate-argument suppression.
3150ac_configure_args=
3151ac_configure_args0=
3152ac_configure_args1=
3153ac_must_keep_next=false
3154for ac_pass in 1 2
3155do
3156  for ac_arg
3157  do
3158    case $ac_arg in
3159    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3160    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3161    | -silent | --silent | --silen | --sile | --sil)
3162      continue ;;
3163    *\'*)
3164      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3165    esac
3166    case $ac_pass in
3167    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3168    2)
3169      as_fn_append ac_configure_args1 " '$ac_arg'"
3170      if test $ac_must_keep_next = true; then
3171	ac_must_keep_next=false # Got value, back to normal.
3172      else
3173	case $ac_arg in
3174	  *=* | --config-cache | -C | -disable-* | --disable-* \
3175	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3176	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3177	  | -with-* | --with-* | -without-* | --without-* | --x)
3178	    case "$ac_configure_args0 " in
3179	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3180	    esac
3181	    ;;
3182	  -* ) ac_must_keep_next=true ;;
3183	esac
3184      fi
3185      as_fn_append ac_configure_args " '$ac_arg'"
3186      ;;
3187    esac
3188  done
3189done
3190{ ac_configure_args0=; unset ac_configure_args0;}
3191{ ac_configure_args1=; unset ac_configure_args1;}
3192
3193# When interrupted or exit'd, cleanup temporary files, and complete
3194# config.log.  We remove comments because anyway the quotes in there
3195# would cause problems or look ugly.
3196# WARNING: Use '\'' to represent an apostrophe within the trap.
3197# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3198trap 'exit_status=$?
3199  # Save into config.log some information that might help in debugging.
3200  {
3201    echo
3202
3203    $as_echo "## ---------------- ##
3204## Cache variables. ##
3205## ---------------- ##"
3206    echo
3207    # The following way of writing the cache mishandles newlines in values,
3208(
3209  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3210    eval ac_val=\$$ac_var
3211    case $ac_val in #(
3212    *${as_nl}*)
3213      case $ac_var in #(
3214      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3215$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3216      esac
3217      case $ac_var in #(
3218      _ | IFS | as_nl) ;; #(
3219      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3220      *) { eval $ac_var=; unset $ac_var;} ;;
3221      esac ;;
3222    esac
3223  done
3224  (set) 2>&1 |
3225    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3226    *${as_nl}ac_space=\ *)
3227      sed -n \
3228	"s/'\''/'\''\\\\'\'''\''/g;
3229	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3230      ;; #(
3231    *)
3232      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3233      ;;
3234    esac |
3235    sort
3236)
3237    echo
3238
3239    $as_echo "## ----------------- ##
3240## Output variables. ##
3241## ----------------- ##"
3242    echo
3243    for ac_var in $ac_subst_vars
3244    do
3245      eval ac_val=\$$ac_var
3246      case $ac_val in
3247      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248      esac
3249      $as_echo "$ac_var='\''$ac_val'\''"
3250    done | sort
3251    echo
3252
3253    if test -n "$ac_subst_files"; then
3254      $as_echo "## ------------------- ##
3255## File substitutions. ##
3256## ------------------- ##"
3257      echo
3258      for ac_var in $ac_subst_files
3259      do
3260	eval ac_val=\$$ac_var
3261	case $ac_val in
3262	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3263	esac
3264	$as_echo "$ac_var='\''$ac_val'\''"
3265      done | sort
3266      echo
3267    fi
3268
3269    if test -s confdefs.h; then
3270      $as_echo "## ----------- ##
3271## confdefs.h. ##
3272## ----------- ##"
3273      echo
3274      cat confdefs.h
3275      echo
3276    fi
3277    test "$ac_signal" != 0 &&
3278      $as_echo "$as_me: caught signal $ac_signal"
3279    $as_echo "$as_me: exit $exit_status"
3280  } >&5
3281  rm -f core *.core core.conftest.* &&
3282    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3283    exit $exit_status
3284' 0
3285for ac_signal in 1 2 13 15; do
3286  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3287done
3288ac_signal=0
3289
3290# confdefs.h avoids OS command line length limits that DEFS can exceed.
3291rm -f -r conftest* confdefs.h
3292
3293$as_echo "/* confdefs.h */" > confdefs.h
3294
3295# Predefined preprocessor variables.
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_NAME "$PACKAGE_NAME"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3303_ACEOF
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_VERSION "$PACKAGE_VERSION"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_STRING "$PACKAGE_STRING"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_URL "$PACKAGE_URL"
3319_ACEOF
3320
3321
3322# Let the site file select an alternate cache file if it wants to.
3323# Prefer an explicitly selected file to automatically selected ones.
3324ac_site_file1=NONE
3325ac_site_file2=NONE
3326if test -n "$CONFIG_SITE"; then
3327  # We do not want a PATH search for config.site.
3328  case $CONFIG_SITE in #((
3329    -*)  ac_site_file1=./$CONFIG_SITE;;
3330    */*) ac_site_file1=$CONFIG_SITE;;
3331    *)   ac_site_file1=./$CONFIG_SITE;;
3332  esac
3333elif test "x$prefix" != xNONE; then
3334  ac_site_file1=$prefix/share/config.site
3335  ac_site_file2=$prefix/etc/config.site
3336else
3337  ac_site_file1=$ac_default_prefix/share/config.site
3338  ac_site_file2=$ac_default_prefix/etc/config.site
3339fi
3340for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3341do
3342  test "x$ac_site_file" = xNONE && continue
3343  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3345$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3346    sed 's/^/| /' "$ac_site_file" >&5
3347    . "$ac_site_file" \
3348      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3350as_fn_error $? "failed to load site script $ac_site_file
3351See \`config.log' for more details" "$LINENO" 5; }
3352  fi
3353done
3354
3355if test -r "$cache_file"; then
3356  # Some versions of bash will fail to source /dev/null (special files
3357  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3358  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3359    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3360$as_echo "$as_me: loading cache $cache_file" >&6;}
3361    case $cache_file in
3362      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3363      *)                      . "./$cache_file";;
3364    esac
3365  fi
3366else
3367  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3368$as_echo "$as_me: creating cache $cache_file" >&6;}
3369  >$cache_file
3370fi
3371
3372# Check that the precious variables saved in the cache have kept the same
3373# value.
3374ac_cache_corrupted=false
3375for ac_var in $ac_precious_vars; do
3376  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3377  eval ac_new_set=\$ac_env_${ac_var}_set
3378  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3379  eval ac_new_val=\$ac_env_${ac_var}_value
3380  case $ac_old_set,$ac_new_set in
3381    set,)
3382      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3383$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3384      ac_cache_corrupted=: ;;
3385    ,set)
3386      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3387$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3388      ac_cache_corrupted=: ;;
3389    ,);;
3390    *)
3391      if test "x$ac_old_val" != "x$ac_new_val"; then
3392	# differences in whitespace do not lead to failure.
3393	ac_old_val_w=`echo x $ac_old_val`
3394	ac_new_val_w=`echo x $ac_new_val`
3395	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3396	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3397$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3398	  ac_cache_corrupted=:
3399	else
3400	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3401$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3402	  eval $ac_var=\$ac_old_val
3403	fi
3404	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3405$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3406	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3407$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3408      fi;;
3409  esac
3410  # Pass precious variables to config.status.
3411  if test "$ac_new_set" = set; then
3412    case $ac_new_val in
3413    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3414    *) ac_arg=$ac_var=$ac_new_val ;;
3415    esac
3416    case " $ac_configure_args " in
3417      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3418      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3419    esac
3420  fi
3421done
3422if $ac_cache_corrupted; then
3423  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3426$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3427  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3428fi
3429## -------------------- ##
3430## Main body of script. ##
3431## -------------------- ##
3432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438
3439
3440
3441ac_aux_dir=
3442for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3443  if test -f "$ac_dir/install-sh"; then
3444    ac_aux_dir=$ac_dir
3445    ac_install_sh="$ac_aux_dir/install-sh -c"
3446    break
3447  elif test -f "$ac_dir/install.sh"; then
3448    ac_aux_dir=$ac_dir
3449    ac_install_sh="$ac_aux_dir/install.sh -c"
3450    break
3451  elif test -f "$ac_dir/shtool"; then
3452    ac_aux_dir=$ac_dir
3453    ac_install_sh="$ac_aux_dir/shtool install -c"
3454    break
3455  fi
3456done
3457if test -z "$ac_aux_dir"; then
3458  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
3459fi
3460
3461# These three variables are undocumented and unsupported,
3462# and are intended to be withdrawn in a future Autoconf release.
3463# They can cause serious problems if a builder's source tree is in a directory
3464# whose full name contains unusual characters.
3465ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3466ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3467ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3468
3469
3470# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3471
3472#
3473# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475#
3476# This code is free software; you can redistribute it and/or modify it
3477# under the terms of the GNU General Public License version 2 only, as
3478# published by the Free Software Foundation.  Oracle designates this
3479# particular file as subject to the "Classpath" exception as provided
3480# by Oracle in the LICENSE file that accompanied this code.
3481#
3482# This code is distributed in the hope that it will be useful, but WITHOUT
3483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485# version 2 for more details (a copy is included in the LICENSE file that
3486# accompanied this code).
3487#
3488# You should have received a copy of the GNU General Public License version
3489# 2 along with this work; if not, write to the Free Software Foundation,
3490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491#
3492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493# or visit www.oracle.com if you need additional information or have any
3494# questions.
3495#
3496
3497#
3498# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3499#
3500# This program is free software; you can redistribute it and/or modify
3501# it under the terms of the GNU General Public License as published by
3502# the Free Software Foundation; either version 2 of the License, or
3503# (at your option) any later version.
3504#
3505# This program is distributed in the hope that it will be useful, but
3506# WITHOUT ANY WARRANTY; without even the implied warranty of
3507# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3508# General Public License for more details.
3509#
3510# You should have received a copy of the GNU General Public License
3511# along with this program; if not, write to the Free Software
3512# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3513#
3514# As a special exception to the GNU General Public License, if you
3515# distribute this file as part of a program that contains a
3516# configuration script generated by Autoconf, you may include it under
3517# the same distribution terms that you use for the rest of that program.
3518
3519# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3520# ----------------------------------
3521# PKG_PROG_PKG_CONFIG
3522
3523# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3524#
3525# Check to see whether a particular set of modules exists.  Similar
3526# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3527#
3528#
3529# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3530# this or PKG_CHECK_MODULES is called, or make sure to call
3531# PKG_CHECK_EXISTS manually
3532# --------------------------------------------------------------
3533
3534
3535
3536# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3537# ---------------------------------------------
3538# _PKG_CONFIG
3539
3540# _PKG_SHORT_ERRORS_SUPPORTED
3541# -----------------------------
3542# _PKG_SHORT_ERRORS_SUPPORTED
3543
3544
3545# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3546# [ACTION-IF-NOT-FOUND])
3547#
3548#
3549# Note that if there is a possibility the first call to
3550# PKG_CHECK_MODULES might not happen, you should be sure to include an
3551# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3552#
3553#
3554# --------------------------------------------------------------
3555# PKG_CHECK_MODULES
3556
3557
3558# Include these first...
3559#
3560# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3562#
3563# This code is free software; you can redistribute it and/or modify it
3564# under the terms of the GNU General Public License version 2 only, as
3565# published by the Free Software Foundation.  Oracle designates this
3566# particular file as subject to the "Classpath" exception as provided
3567# by Oracle in the LICENSE file that accompanied this code.
3568#
3569# This code is distributed in the hope that it will be useful, but WITHOUT
3570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3572# version 2 for more details (a copy is included in the LICENSE file that
3573# accompanied this code).
3574#
3575# You should have received a copy of the GNU General Public License version
3576# 2 along with this work; if not, write to the Free Software Foundation,
3577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3578#
3579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3580# or visit www.oracle.com if you need additional information or have any
3581# questions.
3582#
3583
3584# Create a function/macro that takes a series of named arguments. The call is
3585# similar to AC_DEFUN, but the setup of the function looks like this:
3586# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3587# ... do something
3588#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3589# ])
3590# A star (*) in front of a named argument means that it is required and it's
3591# presence will be verified. To pass e.g. the first value as a normal indexed
3592# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3593# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3594# "ARG_FOO".
3595#
3596# The generated function can be called like this:
3597# MYFUNC(FOO: [foo-val],
3598#     BAR: [
3599#         $ECHO hello world
3600#     ])
3601# Note that the argument value must start on the same line as the argument name.
3602#
3603# Argument 1: Name of the function to define
3604# Argument 2: List of legal named arguments, with a * prefix for required arguments
3605# Argument 3: Argument array to treat as named, typically $@
3606# Argument 4: The main function body
3607
3608
3609# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3610# If so, then append $1 to $2 \
3611# Also set JVM_ARG_OK to true/false depending on outcome.
3612
3613
3614# Appends a string to a path variable, only adding the : when needed.
3615
3616
3617# Prepends a string to a path variable, only adding the : when needed.
3618
3619
3620# This will make sure the given variable points to a full and proper
3621# path. This means:
3622# 1) There will be no spaces in the path. On unix platforms,
3623#    spaces in the path will result in an error. On Windows,
3624#    the path will be rewritten using short-style to be space-free.
3625# 2) The path will be absolute, and it will be in unix-style (on
3626#     cygwin).
3627# $1: The name of the variable to fix
3628
3629
3630# This will make sure the given variable points to a executable
3631# with a full and proper path. This means:
3632# 1) There will be no spaces in the path. On unix platforms,
3633#    spaces in the path will result in an error. On Windows,
3634#    the path will be rewritten using short-style to be space-free.
3635# 2) The path will be absolute, and it will be in unix-style (on
3636#     cygwin).
3637# Any arguments given to the executable is preserved.
3638# If the input variable does not have a directory specification, then
3639# it need to be in the PATH.
3640# $1: The name of the variable to fix
3641
3642
3643
3644
3645# Register a --with argument but mark it as deprecated
3646# $1: The name of the with argument to deprecate, not including --with-
3647
3648
3649# Register a --enable argument but mark it as deprecated
3650# $1: The name of the with argument to deprecate, not including --enable-
3651# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3652# $3: Messages to user.
3653
3654
3655
3656
3657# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3658# $1: variable to check
3659
3660
3661# Check that there are no unprocessed overridden variables left.
3662# If so, they are an incorrect argument and we will exit with an error.
3663
3664
3665# Setup a tool for the given variable. If correctly specified by the user,
3666# use that value, otherwise search for the tool using the supplied code snippet.
3667# $1: variable to set
3668# $2: code snippet to call to look for the tool
3669# $3: code snippet to call if variable was used to find tool
3670
3671
3672# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3673# $1: variable to set
3674# $2: executable name (or list of names) to look for
3675# $3: [path]
3676
3677
3678# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3679# $1: variable to set
3680# $2: executable name (or list of names) to look for
3681
3682
3683# Like BASIC_PATH_PROGS but fails if no tool was found.
3684# $1: variable to set
3685# $2: executable name (or list of names) to look for
3686# $3: [path]
3687
3688
3689# Like BASIC_SETUP_TOOL but fails if no tool was found.
3690# $1: variable to set
3691# $2: autoconf macro to call to look for the special tool
3692
3693
3694# Setup the most fundamental tools that relies on not much else to set up,
3695# but is used by much of the early bootstrap code.
3696
3697
3698# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3699
3700
3701# Evaluates platform specific overrides for devkit variables.
3702# $1: Name of variable
3703
3704
3705
3706
3707
3708
3709#%%% Simple tools %%%
3710
3711# Check if we have found a usable version of make
3712# $1: the path to a potential make binary (or empty)
3713# $2: the description on how we found this
3714
3715
3716
3717
3718# Goes looking for a usable version of GNU make.
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729# Check if build directory is on local disk. If not possible to determine,
3730# we prefer to claim it's local.
3731# Argument 1: directory to test
3732# Argument 2: what to do if it is on local disk
3733# Argument 3: what to do otherwise (remote disk or failure)
3734
3735
3736# Check that source files have basic read permissions set. This might
3737# not be the case in cygwin in certain conditions.
3738
3739
3740
3741
3742# Check for support for specific options in bash
3743
3744
3745################################################################################
3746#
3747# Default make target
3748#
3749
3750
3751# Code to run after AC_OUTPUT
3752
3753
3754#
3755# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3757#
3758# This code is free software; you can redistribute it and/or modify it
3759# under the terms of the GNU General Public License version 2 only, as
3760# published by the Free Software Foundation.  Oracle designates this
3761# particular file as subject to the "Classpath" exception as provided
3762# by Oracle in the LICENSE file that accompanied this code.
3763#
3764# This code is distributed in the hope that it will be useful, but WITHOUT
3765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3767# version 2 for more details (a copy is included in the LICENSE file that
3768# accompanied this code).
3769#
3770# You should have received a copy of the GNU General Public License version
3771# 2 along with this work; if not, write to the Free Software Foundation,
3772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3773#
3774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3775# or visit www.oracle.com if you need additional information or have any
3776# questions.
3777#
3778
3779
3780
3781
3782
3783# Helper function which possibly converts a path using DOS-style short mode.
3784# If so, the updated path is stored in $new_path.
3785# $1: The path to check
3786
3787
3788# Helper function which possibly converts a path using DOS-style short mode.
3789# If so, the updated path is stored in $new_path.
3790# $1: The path to check
3791
3792
3793# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3794# and could probably be heavily simplified. However, all changes in this
3795# area tend to need lot of testing in different scenarios, and in lack of
3796# proper unit testing, cleaning this up has not been deemed worth the effort
3797# at the moment.
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3808
3809
3810
3811
3812# ... then the rest
3813#
3814# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3815# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3816#
3817# This code is free software; you can redistribute it and/or modify it
3818# under the terms of the GNU General Public License version 2 only, as
3819# published by the Free Software Foundation.  Oracle designates this
3820# particular file as subject to the "Classpath" exception as provided
3821# by Oracle in the LICENSE file that accompanied this code.
3822#
3823# This code is distributed in the hope that it will be useful, but WITHOUT
3824# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3825# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3826# version 2 for more details (a copy is included in the LICENSE file that
3827# accompanied this code).
3828#
3829# You should have received a copy of the GNU General Public License version
3830# 2 along with this work; if not, write to the Free Software Foundation,
3831# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3832#
3833# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3834# or visit www.oracle.com if you need additional information or have any
3835# questions.
3836#
3837
3838########################################################################
3839# This file handles detection of the Boot JDK. The Boot JDK detection
3840# process has been developed as a response to solve a complex real-world
3841# problem. Initially, it was simple, but it has grown as platform after
3842# platform, idiosyncracy after idiosyncracy has been supported.
3843#
3844# The basic idea is this:
3845# 1) You need an acceptable *) JDK to use as a Boot JDK
3846# 2) There are several ways to locate a JDK, that are mostly platform
3847#    dependent **)
3848# 3) You can have multiple JDKs installed
3849# 4) If possible, configure should try to dig out an acceptable JDK
3850#    automatically, without having to resort to command-line options
3851#
3852# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3853#     javac) and not a JRE, etc.
3854#
3855# **) On Windows we typically use a well-known path.
3856#     On MacOSX we typically use the tool java_home.
3857#     On Linux we typically find javac in the $PATH, and then follow a
3858#     chain of symlinks that often ends up in a real JDK.
3859#
3860# This leads to the code where we check in different ways to locate a
3861# JDK, and if one is found, check if it is acceptable. If not, we print
3862# our reasons for rejecting it (useful when debugging non-working
3863# configure situations) and continue checking the next one.
3864########################################################################
3865
3866# Execute the check given as argument, and verify the result
3867# If the Boot JDK was previously found, do nothing
3868# $1 A command line (typically autoconf macro) to execute
3869
3870
3871# Test: Is bootjdk explicitly set by command line arguments?
3872
3873
3874# Test: Is $JAVA_HOME set?
3875
3876
3877# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3878
3879
3880# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3881# $1: Argument to the java_home binary (optional)
3882
3883
3884# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3885
3886
3887# Look for a jdk in the given path. If there are multiple, try to select the newest.
3888# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3889# $1 = Path to directory containing jdk installations.
3890# $2 = String to append to the found JDK directory to get the proper JDK home
3891
3892
3893# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3894# environmental variable as base for where to look.
3895# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3896
3897
3898# Test: Is there a JDK installed in default, well-known locations?
3899
3900
3901# Check that a command-line tool in the Boot JDK is correct
3902# $1 = name of variable to assign
3903# $2 = name of binary
3904
3905
3906###############################################################################
3907#
3908# We need a Boot JDK to bootstrap the build.
3909#
3910
3911
3912
3913
3914
3915# BUILD_JDK: the location of the latest JDK that can run
3916#   on the host system and supports the target class file version
3917#   generated in this JDK build.  This variable should only be
3918#   used after the launchers are built.
3919#
3920
3921# Execute the check given as argument, and verify the result.
3922# If the JDK was previously found, do nothing.
3923# $1 A command line (typically autoconf macro) to execute
3924
3925
3926# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3927# is different than the host system doing the build (e.g. cross-compilation),
3928# a special BUILD_JDK is built as part of the build process.  An external
3929# prebuilt BUILD_JDK can also be supplied.
3930
3931
3932#
3933# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973################################################################################
3974#
3975# Runs icecc-create-env once and prints the error if it fails
3976#
3977# $1: arguments to icecc-create-env
3978# $2: log file
3979#
3980
3981
3982################################################################################
3983#
3984# Optionally enable distributed compilation of native code using icecc/icecream
3985#
3986
3987
3988
3989
3990
3991
3992
3993#
3994# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3996#
3997# This code is free software; you can redistribute it and/or modify it
3998# under the terms of the GNU General Public License version 2 only, as
3999# published by the Free Software Foundation.  Oracle designates this
4000# particular file as subject to the "Classpath" exception as provided
4001# by Oracle in the LICENSE file that accompanied this code.
4002#
4003# This code is distributed in the hope that it will be useful, but WITHOUT
4004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4006# version 2 for more details (a copy is included in the LICENSE file that
4007# accompanied this code).
4008#
4009# You should have received a copy of the GNU General Public License version
4010# 2 along with this work; if not, write to the Free Software Foundation,
4011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4012#
4013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4014# or visit www.oracle.com if you need additional information or have any
4015# questions.
4016#
4017
4018################################################################################
4019#
4020# Setup ABI profile (for arm)
4021#
4022
4023
4024# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4025# corresponding configure arguments instead
4026
4027
4028# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4029# that configure can use them while detecting compilers.
4030# TOOLCHAIN_TYPE is available here.
4031# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4032
4033
4034
4035
4036
4037
4038# Documentation on common flags used for solstudio in HIGHEST.
4039#
4040# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4041#          done with care, there are some assumptions below that need to
4042#          be understood about the use of pointers, and IEEE behavior.
4043#
4044# -fns: Use non-standard floating point mode (not IEEE 754)
4045# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4046# -fsingle: Use single precision floating point with 'float'
4047# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4048#   (Source with excessing pointer casting and data access with mixed
4049#    pointer types are not recommended)
4050# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4051#   (If you expect perfect errno behavior, do not use this)
4052# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4053# -xrestrict: Pointer parameters to functions do not overlap
4054#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4055#    If you pass in multiple pointers to the same data, do not use this)
4056# -xlibmil: Inline some library routines
4057#   (If you expect perfect errno behavior, do not use this)
4058# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4059#   (If you expect perfect errno behavior, do not use this)
4060#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4061
4062    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4063    # Bug?
4064    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4065    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4066    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4067    #fi
4068
4069
4070
4071
4072
4073
4074################################################################################
4075# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4076#      conditionals against.
4077# $2 - Optional prefix for each variable defined.
4078
4079
4080# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4081#                                  IF_FALSE: [RUN-IF-FALSE])
4082# ------------------------------------------------------------
4083# Check that the C compiler supports an argument
4084
4085
4086
4087
4088# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4089#                                    IF_FALSE: [RUN-IF-FALSE])
4090# ------------------------------------------------------------
4091# Check that the C++ compiler supports an argument
4092
4093
4094
4095
4096# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C and C++ compilers support an argument
4100
4101
4102
4103
4104# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                   IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the linker support an argument
4108
4109
4110
4111
4112
4113
4114# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4115# Arguments:
4116# $1 - Optional prefix for each variable defined.
4117
4118
4119#
4120# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4121# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122#
4123# This code is free software; you can redistribute it and/or modify it
4124# under the terms of the GNU General Public License version 2 only, as
4125# published by the Free Software Foundation.  Oracle designates this
4126# particular file as subject to the "Classpath" exception as provided
4127# by Oracle in the LICENSE file that accompanied this code.
4128#
4129# This code is distributed in the hope that it will be useful, but WITHOUT
4130# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132# version 2 for more details (a copy is included in the LICENSE file that
4133# accompanied this code).
4134#
4135# You should have received a copy of the GNU General Public License version
4136# 2 along with this work; if not, write to the Free Software Foundation,
4137# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138#
4139# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140# or visit www.oracle.com if you need additional information or have any
4141# questions.
4142#
4143
4144
4145
4146
4147
4148cygwin_help() {
4149  case $1 in
4150    unzip)
4151      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4152      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4153      ;;
4154    zip)
4155      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4156      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4157      ;;
4158    make)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    freetype)
4163      HELP_MSG="
4164The freetype library can now be build during the configure process.
4165Download the freetype sources and unpack them into an arbitrary directory:
4166
4167wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4168tar -xzf freetype-2.5.3.tar.gz
4169
4170Then run configure with '--with-freetype-src=<freetype_src>'. This will
4171automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4172builds or into '<freetype_src>/lib32' for 32-bit builds.
4173Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4174and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4175
4176Alternatively you can unpack the sources like this to use the default directory:
4177
4178tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4179      ;;
4180  esac
4181}
4182
4183msys_help() {
4184  PKGHANDLER_COMMAND=""
4185}
4186
4187apt_help() {
4188  case $1 in
4189    reduced)
4190      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4201    ffi)
4202      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4203    x11)
4204      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4205    ccache)
4206      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4207    dtrace)
4208      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4209    elf)
4210      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4211  esac
4212}
4213
4214yum_help() {
4215  case $1 in
4216    devkit)
4217      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4218    openjdk)
4219      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4220    alsa)
4221      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4222    cups)
4223      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4224    freetype)
4225      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4226    x11)
4227      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4228    ccache)
4229      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4230    elf)
4231      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4232  esac
4233}
4234
4235brew_help() {
4236  case $1 in
4237    openjdk)
4238      PKGHANDLER_COMMAND="brew cask install java" ;;
4239    freetype)
4240      PKGHANDLER_COMMAND="brew install freetype" ;;
4241    ccache)
4242      PKGHANDLER_COMMAND="brew install ccache" ;;
4243  esac
4244}
4245
4246port_help() {
4247  PKGHANDLER_COMMAND=""
4248}
4249
4250pkgutil_help() {
4251  PKGHANDLER_COMMAND=""
4252}
4253
4254pkgadd_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258# This function will check if we're called from the "configure" wrapper while
4259# printing --help. If so, we will print out additional information that can
4260# only be extracted within the autoconf script, and then exit. This must be
4261# called at the very beginning in configure.ac.
4262
4263
4264
4265
4266
4267
4268#
4269# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4270# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4271#
4272# This code is free software; you can redistribute it and/or modify it
4273# under the terms of the GNU General Public License version 2 only, as
4274# published by the Free Software Foundation.  Oracle designates this
4275# particular file as subject to the "Classpath" exception as provided
4276# by Oracle in the LICENSE file that accompanied this code.
4277#
4278# This code is distributed in the hope that it will be useful, but WITHOUT
4279# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4280# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4281# version 2 for more details (a copy is included in the LICENSE file that
4282# accompanied this code).
4283#
4284# You should have received a copy of the GNU General Public License version
4285# 2 along with this work; if not, write to the Free Software Foundation,
4286# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4287#
4288# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4289# or visit www.oracle.com if you need additional information or have any
4290# questions.
4291#
4292
4293# All valid JVM features, regardless of platform
4294VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4295    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4296    static-build link-time-opt aot"
4297
4298# All valid JVM variants
4299VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4300
4301###############################################################################
4302# Check if the specified JVM variant should be built. To be used in shell if
4303# constructs, like this:
4304# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4305#
4306# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4307
4308# Definition kept in one line to allow inlining in if statements.
4309# Additional [] needed to keep m4 from mangling shell constructs.
4310
4311
4312###############################################################################
4313# Check if the specified JVM features are explicitly enabled. To be used in
4314# shell if constructs, like this:
4315# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4316#
4317# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4318
4319# Definition kept in one line to allow inlining in if statements.
4320# Additional [] needed to keep m4 from mangling shell constructs.
4321
4322
4323###############################################################################
4324# Check which variants of the JVM that we want to build. Available variants are:
4325#   server: normal interpreter, and a tiered C1/C2 compiler
4326#   client: normal interpreter, and C1 (no C2 compiler)
4327#   minimal: reduced form of client with optional features stripped out
4328#   core: normal interpreter only, no compiler
4329#   zero: C++ based interpreter only, no compiler
4330#   zeroshark: C++ based interpreter, and a llvm-based compiler
4331#   custom: baseline JVM with no default features
4332#
4333
4334
4335###############################################################################
4336# Check if dtrace should be enabled and has all prerequisites present.
4337#
4338
4339
4340################################################################################
4341# Check if AOT should be enabled
4342#
4343
4344
4345###############################################################################
4346# Set up all JVM features for each JVM variant.
4347#
4348
4349
4350###############################################################################
4351# Validate JVM features once all setup is complete, including custom setup.
4352#
4353
4354
4355################################################################################
4356#
4357# Specify which sources will be used to build the 64-bit ARM port
4358#
4359# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4360# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4361#
4362
4363
4364
4365################################################################################
4366# Check if gtest should be built
4367#
4368
4369
4370#
4371# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395###############################################################################
4396# Check which variant of the JDK that we want to build.
4397# Currently we have:
4398#    normal:   standard edition
4399# but the custom make system may add other variants
4400#
4401# Effectively the JDK variant gives a name to a specific set of
4402# modules to compile into the JDK.
4403
4404
4405###############################################################################
4406# Set the debug level
4407#    release: no debug information, all optimizations, no asserts.
4408#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4409#    fastdebug: debug information (-g), all optimizations, all asserts
4410#    slowdebug: debug information (-g), no optimizations, all asserts
4411
4412
4413###############################################################################
4414#
4415# Should we build only OpenJDK even if closed sources are present?
4416#
4417
4418
4419
4420
4421###############################################################################
4422#
4423# Enable or disable the elliptic curve crypto implementation
4424#
4425
4426
4427
4428
4429################################################################################
4430#
4431# Gcov coverage data for hotspot
4432#
4433
4434
4435################################################################################
4436#
4437# Static build support.  When enabled will generate static
4438# libraries instead of shared libraries for all JDK libs.
4439#
4440
4441
4442################################################################################
4443#
4444# jlink options.
4445# We always keep packaged modules in JDK image.
4446#
4447
4448
4449################################################################################
4450#
4451# Check if building of the jtreg failure handler should be enabled.
4452#
4453
4454
4455################################################################################
4456#
4457# Enable or disable generation of the classlist at build time
4458#
4459
4460
4461#
4462# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4464#
4465# This code is free software; you can redistribute it and/or modify it
4466# under the terms of the GNU General Public License version 2 only, as
4467# published by the Free Software Foundation.  Oracle designates this
4468# particular file as subject to the "Classpath" exception as provided
4469# by Oracle in the LICENSE file that accompanied this code.
4470#
4471# This code is distributed in the hope that it will be useful, but WITHOUT
4472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4474# version 2 for more details (a copy is included in the LICENSE file that
4475# accompanied this code).
4476#
4477# You should have received a copy of the GNU General Public License version
4478# 2 along with this work; if not, write to the Free Software Foundation,
4479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4480#
4481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4482# or visit www.oracle.com if you need additional information or have any
4483# questions.
4484#
4485
4486###############################################################################
4487#
4488# Setup version numbers
4489#
4490
4491# Verify that a given string represents a valid version number, and assign it
4492# to a variable.
4493
4494# Argument 1: the variable to assign to
4495# Argument 2: the value given by the user
4496
4497
4498
4499
4500#
4501# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4502# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503#
4504# This code is free software; you can redistribute it and/or modify it
4505# under the terms of the GNU General Public License version 2 only, as
4506# published by the Free Software Foundation.  Oracle designates this
4507# particular file as subject to the "Classpath" exception as provided
4508# by Oracle in the LICENSE file that accompanied this code.
4509#
4510# This code is distributed in the hope that it will be useful, but WITHOUT
4511# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513# version 2 for more details (a copy is included in the LICENSE file that
4514# accompanied this code).
4515#
4516# You should have received a copy of the GNU General Public License version
4517# 2 along with this work; if not, write to the Free Software Foundation,
4518# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519#
4520# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521# or visit www.oracle.com if you need additional information or have any
4522# questions.
4523#
4524
4525# Major library component reside in separate files.
4526#
4527# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4528# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4529#
4530# This code is free software; you can redistribute it and/or modify it
4531# under the terms of the GNU General Public License version 2 only, as
4532# published by the Free Software Foundation.  Oracle designates this
4533# particular file as subject to the "Classpath" exception as provided
4534# by Oracle in the LICENSE file that accompanied this code.
4535#
4536# This code is distributed in the hope that it will be useful, but WITHOUT
4537# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4538# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4539# version 2 for more details (a copy is included in the LICENSE file that
4540# accompanied this code).
4541#
4542# You should have received a copy of the GNU General Public License version
4543# 2 along with this work; if not, write to the Free Software Foundation,
4544# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4545#
4546# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4547# or visit www.oracle.com if you need additional information or have any
4548# questions.
4549#
4550
4551################################################################################
4552# Setup alsa (Advanced Linux Sound Architecture)
4553################################################################################
4554
4555
4556#
4557# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4559#
4560# This code is free software; you can redistribute it and/or modify it
4561# under the terms of the GNU General Public License version 2 only, as
4562# published by the Free Software Foundation.  Oracle designates this
4563# particular file as subject to the "Classpath" exception as provided
4564# by Oracle in the LICENSE file that accompanied this code.
4565#
4566# This code is distributed in the hope that it will be useful, but WITHOUT
4567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4569# version 2 for more details (a copy is included in the LICENSE file that
4570# accompanied this code).
4571#
4572# You should have received a copy of the GNU General Public License version
4573# 2 along with this work; if not, write to the Free Software Foundation,
4574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4575#
4576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4577# or visit www.oracle.com if you need additional information or have any
4578# questions.
4579#
4580
4581################################################################################
4582# Setup bundled libraries.
4583#
4584# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4585# OpenJDK repository. Default is to use these libraries as bundled, but they
4586# might be replaced by en external version by the user.
4587################################################################################
4588
4589
4590################################################################################
4591# Setup libjpeg
4592################################################################################
4593
4594
4595################################################################################
4596# Setup giflib
4597################################################################################
4598
4599
4600################################################################################
4601# Setup libpng
4602################################################################################
4603
4604
4605################################################################################
4606# Setup zlib
4607################################################################################
4608
4609
4610################################################################################
4611# Setup lcms (Little CMS)
4612################################################################################
4613
4614
4615#
4616# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4618#
4619# This code is free software; you can redistribute it and/or modify it
4620# under the terms of the GNU General Public License version 2 only, as
4621# published by the Free Software Foundation.  Oracle designates this
4622# particular file as subject to the "Classpath" exception as provided
4623# by Oracle in the LICENSE file that accompanied this code.
4624#
4625# This code is distributed in the hope that it will be useful, but WITHOUT
4626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4628# version 2 for more details (a copy is included in the LICENSE file that
4629# accompanied this code).
4630#
4631# You should have received a copy of the GNU General Public License version
4632# 2 along with this work; if not, write to the Free Software Foundation,
4633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4634#
4635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4636# or visit www.oracle.com if you need additional information or have any
4637# questions.
4638#
4639
4640################################################################################
4641# Setup cups (Common Unix Printing System)
4642################################################################################
4643
4644
4645#
4646# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4647# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4648#
4649# This code is free software; you can redistribute it and/or modify it
4650# under the terms of the GNU General Public License version 2 only, as
4651# published by the Free Software Foundation.  Oracle designates this
4652# particular file as subject to the "Classpath" exception as provided
4653# by Oracle in the LICENSE file that accompanied this code.
4654#
4655# This code is distributed in the hope that it will be useful, but WITHOUT
4656# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4657# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4658# version 2 for more details (a copy is included in the LICENSE file that
4659# accompanied this code).
4660#
4661# You should have received a copy of the GNU General Public License version
4662# 2 along with this work; if not, write to the Free Software Foundation,
4663# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4664#
4665# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4666# or visit www.oracle.com if you need additional information or have any
4667# questions.
4668#
4669
4670################################################################################
4671# Setup libffi (Foreign Function Interface)
4672################################################################################
4673
4674
4675#
4676# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4677# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4678#
4679# This code is free software; you can redistribute it and/or modify it
4680# under the terms of the GNU General Public License version 2 only, as
4681# published by the Free Software Foundation.  Oracle designates this
4682# particular file as subject to the "Classpath" exception as provided
4683# by Oracle in the LICENSE file that accompanied this code.
4684#
4685# This code is distributed in the hope that it will be useful, but WITHOUT
4686# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4687# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4688# version 2 for more details (a copy is included in the LICENSE file that
4689# accompanied this code).
4690#
4691# You should have received a copy of the GNU General Public License version
4692# 2 along with this work; if not, write to the Free Software Foundation,
4693# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4694#
4695# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4696# or visit www.oracle.com if you need additional information or have any
4697# questions.
4698#
4699
4700################################################################################
4701# Build the freetype lib from source
4702################################################################################
4703
4704
4705################################################################################
4706# Check if a potential freeype library match is correct and usable
4707################################################################################
4708
4709
4710################################################################################
4711# Setup freetype (The FreeType2 font rendering library)
4712################################################################################
4713
4714
4715#
4716# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4717# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4718#
4719# This code is free software; you can redistribute it and/or modify it
4720# under the terms of the GNU General Public License version 2 only, as
4721# published by the Free Software Foundation.  Oracle designates this
4722# particular file as subject to the "Classpath" exception as provided
4723# by Oracle in the LICENSE file that accompanied this code.
4724#
4725# This code is distributed in the hope that it will be useful, but WITHOUT
4726# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4727# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4728# version 2 for more details (a copy is included in the LICENSE file that
4729# accompanied this code).
4730#
4731# You should have received a copy of the GNU General Public License version
4732# 2 along with this work; if not, write to the Free Software Foundation,
4733# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4734#
4735# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4736# or visit www.oracle.com if you need additional information or have any
4737# questions.
4738#
4739
4740################################################################################
4741# Setup the standard C/C++ runtime libraries.
4742#
4743# Most importantly, determine if stdc++ should be linked statically or
4744# dynamically.
4745################################################################################
4746
4747
4748#
4749# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4750# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4751#
4752# This code is free software; you can redistribute it and/or modify it
4753# under the terms of the GNU General Public License version 2 only, as
4754# published by the Free Software Foundation.  Oracle designates this
4755# particular file as subject to the "Classpath" exception as provided
4756# by Oracle in the LICENSE file that accompanied this code.
4757#
4758# This code is distributed in the hope that it will be useful, but WITHOUT
4759# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4760# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4761# version 2 for more details (a copy is included in the LICENSE file that
4762# accompanied this code).
4763#
4764# You should have received a copy of the GNU General Public License version
4765# 2 along with this work; if not, write to the Free Software Foundation,
4766# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4767#
4768# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4769# or visit www.oracle.com if you need additional information or have any
4770# questions.
4771#
4772
4773################################################################################
4774# Setup X11 Windows system
4775################################################################################
4776
4777
4778
4779################################################################################
4780# Determine which libraries are needed for this configuration
4781################################################################################
4782
4783
4784################################################################################
4785# Parse library options, and setup needed libraries
4786################################################################################
4787
4788
4789################################################################################
4790# Setup llvm (Low-Level VM)
4791################################################################################
4792
4793
4794################################################################################
4795# Setup various libraries, typically small system libraries
4796################################################################################
4797
4798
4799################################################################################
4800# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4801# redistribute it in the test image.
4802################################################################################
4803
4804
4805
4806#
4807# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4809#
4810# This code is free software; you can redistribute it and/or modify it
4811# under the terms of the GNU General Public License version 2 only, as
4812# published by the Free Software Foundation.  Oracle designates this
4813# particular file as subject to the "Classpath" exception as provided
4814# by Oracle in the LICENSE file that accompanied this code.
4815#
4816# This code is distributed in the hope that it will be useful, but WITHOUT
4817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4819# version 2 for more details (a copy is included in the LICENSE file that
4820# accompanied this code).
4821#
4822# You should have received a copy of the GNU General Public License version
4823# 2 along with this work; if not, write to the Free Software Foundation,
4824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4825#
4826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4827# or visit www.oracle.com if you need additional information or have any
4828# questions.
4829#
4830
4831# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4832# Converts autoconf style CPU name to OpenJDK style, into
4833# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4834
4835
4836# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4837# Converts autoconf style OS name to OpenJDK style, into
4838# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4839
4840
4841# Expects $host_os $host_cpu $build_os and $build_cpu
4842# and $with_target_bits to have been setup!
4843#
4844# Translate the standard triplet(quadruplet) definition
4845# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4846# OPENJDK_BUILD_OS, etc.
4847
4848
4849# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4850# accordingly. Must be done after setting up build and target system, but before
4851# doing anything else with these values.
4852
4853
4854# Setup the legacy variables, for controlling the old makefiles.
4855#
4856
4857
4858# $1 - Either TARGET or BUILD to setup the variables for.
4859
4860
4861
4862
4863
4864
4865#%%% Build and target systems %%%
4866
4867
4868
4869
4870# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4871# Add -mX to various FLAGS variables.
4872
4873
4874
4875
4876
4877
4878#
4879# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4880# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4881#
4882# This code is free software; you can redistribute it and/or modify it
4883# under the terms of the GNU General Public License version 2 only, as
4884# published by the Free Software Foundation.  Oracle designates this
4885# particular file as subject to the "Classpath" exception as provided
4886# by Oracle in the LICENSE file that accompanied this code.
4887#
4888# This code is distributed in the hope that it will be useful, but WITHOUT
4889# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4890# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4891# version 2 for more details (a copy is included in the LICENSE file that
4892# accompanied this code).
4893#
4894# You should have received a copy of the GNU General Public License version
4895# 2 along with this work; if not, write to the Free Software Foundation,
4896# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4897#
4898# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4899# or visit www.oracle.com if you need additional information or have any
4900# questions.
4901#
4902
4903
4904
4905
4906
4907
4908
4909################################################################################
4910# Define a mechanism for importing extra prebuilt modules
4911#
4912
4913
4914
4915#
4916# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4918#
4919# This code is free software; you can redistribute it and/or modify it
4920# under the terms of the GNU General Public License version 2 only, as
4921# published by the Free Software Foundation.  Oracle designates this
4922# particular file as subject to the "Classpath" exception as provided
4923# by Oracle in the LICENSE file that accompanied this code.
4924#
4925# This code is distributed in the hope that it will be useful, but WITHOUT
4926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4928# version 2 for more details (a copy is included in the LICENSE file that
4929# accompanied this code).
4930#
4931# You should have received a copy of the GNU General Public License version
4932# 2 along with this work; if not, write to the Free Software Foundation,
4933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4934#
4935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4936# or visit www.oracle.com if you need additional information or have any
4937# questions.
4938#
4939
4940########################################################################
4941# This file is responsible for detecting, verifying and setting up the
4942# toolchain, i.e. the compiler, linker and related utilities. It will setup
4943# proper paths to the binaries, but it will not setup any flags.
4944#
4945# The binaries used is determined by the toolchain type, which is the family of
4946# compilers and related tools that are used.
4947########################################################################
4948
4949
4950# All valid toolchains, regardless of platform (used by help.m4)
4951VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4952
4953# These toolchains are valid on different platforms
4954VALID_TOOLCHAINS_linux="gcc clang"
4955VALID_TOOLCHAINS_solaris="solstudio"
4956VALID_TOOLCHAINS_macosx="gcc clang"
4957VALID_TOOLCHAINS_aix="xlc"
4958VALID_TOOLCHAINS_windows="microsoft"
4959
4960# Toolchain descriptions
4961TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4962TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4963TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4964TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4965TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4966
4967# Minimum supported versions, empty means unspecified
4968TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4969TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4970TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4971TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4972TOOLCHAIN_MINIMUM_VERSION_xlc=""
4973
4974# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4975# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4976# $1 - optional variable prefix for compiler and version variables (BUILD_)
4977# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4978
4979
4980# Check if the configured compiler (C and C++) is of a specific version or
4981# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4982#
4983# Arguments:
4984#   VERSION:   The version string to check against the found version
4985#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4986#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4987#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4988
4989
4990
4991
4992# Setup a number of variables describing how native output files are
4993# named on this platform/toolchain.
4994
4995
4996# Determine which toolchain type to use, and make sure it is valid for this
4997# platform. Setup various information about the selected toolchain.
4998
4999
5000# Before we start detecting the toolchain executables, we might need some
5001# special setup, e.g. additional paths etc.
5002
5003
5004# Restore path, etc
5005
5006
5007# Check if a compiler is of the toolchain type we expect, and save the version
5008# information from it. If the compiler does not match the expected type,
5009# this function will abort using AC_MSG_ERROR. If it matches, the version will
5010# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5011# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5012#
5013# $1 = compiler to test (CC or CXX)
5014# $2 = human readable name of compiler (C or C++)
5015
5016
5017# Try to locate the given C or C++ compiler in the path, or otherwise.
5018#
5019# $1 = compiler to test (CC or CXX)
5020# $2 = human readable name of compiler (C or C++)
5021# $3 = compiler name to search for
5022
5023
5024# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5025# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5026# archiver (AR). Verify that the compilers are correct according to the
5027# toolchain type.
5028
5029
5030# Setup additional tools that is considered a part of the toolchain, but not the
5031# core part. Many of these are highly platform-specific and do not exist,
5032# and/or are not needed on all platforms.
5033
5034
5035# Setup the build tools (i.e, the compiler and linker used to build programs
5036# that should be run on the build platform, not the target platform, as a build
5037# helper). Since the non-cross-compile case uses the normal, target compilers
5038# for this, we can only do this after these have been setup.
5039
5040
5041# Do some additional checks on the detected tools.
5042
5043
5044# Setup the JTReg Regression Test Harness.
5045
5046
5047# Setup the JIB dependency resolver
5048
5049
5050#
5051# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5052# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5053#
5054# This code is free software; you can redistribute it and/or modify it
5055# under the terms of the GNU General Public License version 2 only, as
5056# published by the Free Software Foundation.  Oracle designates this
5057# particular file as subject to the "Classpath" exception as provided
5058# by Oracle in the LICENSE file that accompanied this code.
5059#
5060# This code is distributed in the hope that it will be useful, but WITHOUT
5061# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5062# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5063# version 2 for more details (a copy is included in the LICENSE file that
5064# accompanied this code).
5065#
5066# You should have received a copy of the GNU General Public License version
5067# 2 along with this work; if not, write to the Free Software Foundation,
5068# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5069#
5070# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5071# or visit www.oracle.com if you need additional information or have any
5072# questions.
5073#
5074
5075################################################################################
5076# The order of these defines the priority by which we try to find them.
5077VALID_VS_VERSIONS="2013 2012 2010"
5078
5079VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5080VS_VERSION_INTERNAL_2010=100
5081VS_MSVCR_2010=msvcr100.dll
5082# We don't use msvcp on Visual Studio 2010
5083#VS_MSVCP_2010=msvcp100.dll
5084VS_ENVVAR_2010="VS100COMNTOOLS"
5085VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5086VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5087VS_VS_PLATFORM_NAME_2010="v100"
5088VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5089
5090VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5091VS_VERSION_INTERNAL_2012=110
5092VS_MSVCR_2012=msvcr110.dll
5093VS_MSVCP_2012=msvcp110.dll
5094VS_ENVVAR_2012="VS110COMNTOOLS"
5095VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5096VS_SDK_INSTALLDIR_2012=
5097VS_VS_PLATFORM_NAME_2012="v110"
5098VS_SDK_PLATFORM_NAME_2012=
5099
5100VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5101VS_VERSION_INTERNAL_2013=120
5102VS_MSVCR_2013=msvcr120.dll
5103VS_MSVCP_2013=msvcp120.dll
5104VS_ENVVAR_2013="VS120COMNTOOLS"
5105VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5106VS_SDK_INSTALLDIR_2013=
5107VS_VS_PLATFORM_NAME_2013="v120"
5108VS_SDK_PLATFORM_NAME_2013=
5109
5110################################################################################
5111
5112
5113
5114################################################################################
5115
5116
5117
5118################################################################################
5119# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5120# build environment and assigns it to VS_ENV_CMD
5121
5122
5123################################################################################
5124
5125
5126
5127################################################################################
5128# Check if the VS env variables were setup prior to running configure.
5129# If not, then find vcvarsall.bat and run it automatically, and integrate
5130# the set env variables into the spec file.
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145# This line needs to be here, verbatim, after all includes and the dummy hook
5146# definitions. It is replaced with custom functionality when building
5147# custom sources.
5148#CUSTOM_AUTOCONF_INCLUDE
5149
5150# Do not change or remove the following line, it is needed for consistency checks:
5151DATE_WHEN_GENERATED=1495546238
5152
5153###############################################################################
5154#
5155# Initialization / Boot-strapping
5156#
5157# The bootstrapping process needs to solve the "chicken or the egg" problem,
5158# thus it jumps back and forth, each time gaining something needed later on.
5159#
5160###############################################################################
5161
5162# If we are requested to print additional help, do that and then exit.
5163# This must be the very first call.
5164
5165  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5166
5167    # Print available toolchains
5168    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5169    $PRINTF "Which are valid to use depends on the build platform.\n"
5170    for toolchain in $VALID_TOOLCHAINS_all; do
5171      # Use indirect variable referencing
5172      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5173      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5174      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5175    done
5176    $PRINTF "\n"
5177
5178    # Print available jvm features
5179    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5180    $PRINTF "Which are valid to use depends on the target platform.\n  "
5181    $PRINTF "%s " $VALID_JVM_FEATURES
5182    $PRINTF "\n"
5183
5184    # And now exit directly
5185    exit 0
5186  fi
5187
5188
5189# Basic initialization that must happen first of all in the normal process.
5190
5191  # Save the original command line. This is passed to us by the wrapper configure script.
5192
5193  # Save the path variable before it gets changed
5194  ORIGINAL_PATH="$PATH"
5195
5196  DATE_WHEN_CONFIGURED=`LANG=C date`
5197
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5199$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5201$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5202
5203
5204  # Start with tools that do not need have cross compilation support
5205  # and can be expected to be found in the default PATH. These tools are
5206  # used by configure.
5207
5208  # First are all the simple required tools.
5209
5210
5211
5212  # Publish this variable in the help.
5213
5214
5215  if [ -z "${BASENAME+x}" ]; then
5216    # The variable is not set by user, try to locate tool using the code snippet
5217    for ac_prog in basename
5218do
5219  # Extract the first word of "$ac_prog", so it can be a program name with args.
5220set dummy $ac_prog; ac_word=$2
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5222$as_echo_n "checking for $ac_word... " >&6; }
5223if ${ac_cv_path_BASENAME+:} false; then :
5224  $as_echo_n "(cached) " >&6
5225else
5226  case $BASENAME in
5227  [\\/]* | ?:[\\/]*)
5228  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5229  ;;
5230  *)
5231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232for as_dir in $PATH
5233do
5234  IFS=$as_save_IFS
5235  test -z "$as_dir" && as_dir=.
5236    for ac_exec_ext in '' $ac_executable_extensions; do
5237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5238    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5240    break 2
5241  fi
5242done
5243  done
5244IFS=$as_save_IFS
5245
5246  ;;
5247esac
5248fi
5249BASENAME=$ac_cv_path_BASENAME
5250if test -n "$BASENAME"; then
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5252$as_echo "$BASENAME" >&6; }
5253else
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
5256fi
5257
5258
5259  test -n "$BASENAME" && break
5260done
5261
5262  else
5263    # The variable is set, but is it from the command line or the environment?
5264
5265    # Try to remove the string !BASENAME! from our list.
5266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5268      # If it failed, the variable was not from the command line. Ignore it,
5269      # but warn the user (except for BASH, which is always set by the calling BASH).
5270      if test "xBASENAME" != xBASH; then
5271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5272$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5273      fi
5274      # Try to locate tool using the code snippet
5275      for ac_prog in basename
5276do
5277  # Extract the first word of "$ac_prog", so it can be a program name with args.
5278set dummy $ac_prog; ac_word=$2
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5280$as_echo_n "checking for $ac_word... " >&6; }
5281if ${ac_cv_path_BASENAME+:} false; then :
5282  $as_echo_n "(cached) " >&6
5283else
5284  case $BASENAME in
5285  [\\/]* | ?:[\\/]*)
5286  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5287  ;;
5288  *)
5289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290for as_dir in $PATH
5291do
5292  IFS=$as_save_IFS
5293  test -z "$as_dir" && as_dir=.
5294    for ac_exec_ext in '' $ac_executable_extensions; do
5295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5296    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5298    break 2
5299  fi
5300done
5301  done
5302IFS=$as_save_IFS
5303
5304  ;;
5305esac
5306fi
5307BASENAME=$ac_cv_path_BASENAME
5308if test -n "$BASENAME"; then
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5310$as_echo "$BASENAME" >&6; }
5311else
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
5314fi
5315
5316
5317  test -n "$BASENAME" && break
5318done
5319
5320    else
5321      # If it succeeded, then it was overridden by the user. We will use it
5322      # for the tool.
5323
5324      # First remove it from the list of overridden variables, so we can test
5325      # for unknown variables in the end.
5326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5327
5328      # Check if we try to supply an empty value
5329      if test "x$BASENAME" = x; then
5330        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5331$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5333$as_echo_n "checking for BASENAME... " >&6; }
5334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5335$as_echo "disabled" >&6; }
5336      else
5337        # Check if the provided tool contains a complete path.
5338        tool_specified="$BASENAME"
5339        tool_basename="${tool_specified##*/}"
5340        if test "x$tool_basename" = "x$tool_specified"; then
5341          # A command without a complete path is provided, search $PATH.
5342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5343$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5344          # Extract the first word of "$tool_basename", so it can be a program name with args.
5345set dummy $tool_basename; ac_word=$2
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347$as_echo_n "checking for $ac_word... " >&6; }
5348if ${ac_cv_path_BASENAME+:} false; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  case $BASENAME in
5352  [\\/]* | ?:[\\/]*)
5353  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5354  ;;
5355  *)
5356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357for as_dir in $PATH
5358do
5359  IFS=$as_save_IFS
5360  test -z "$as_dir" && as_dir=.
5361    for ac_exec_ext in '' $ac_executable_extensions; do
5362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5363    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365    break 2
5366  fi
5367done
5368  done
5369IFS=$as_save_IFS
5370
5371  ;;
5372esac
5373fi
5374BASENAME=$ac_cv_path_BASENAME
5375if test -n "$BASENAME"; then
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5377$as_echo "$BASENAME" >&6; }
5378else
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
5382
5383
5384          if test "x$BASENAME" = x; then
5385            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5386          fi
5387        else
5388          # Otherwise we believe it is a complete path. Use it as it is.
5389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5390$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5391          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5392$as_echo_n "checking for BASENAME... " >&6; }
5393          if test ! -x "$tool_specified"; then
5394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5395$as_echo "not found" >&6; }
5396            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5397          fi
5398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5399$as_echo "$tool_specified" >&6; }
5400        fi
5401      fi
5402    fi
5403
5404  fi
5405
5406
5407
5408  if test "x$BASENAME" = x; then
5409    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5410  fi
5411
5412
5413
5414
5415
5416  # Publish this variable in the help.
5417
5418
5419  if [ -z "${BASH+x}" ]; then
5420    # The variable is not set by user, try to locate tool using the code snippet
5421    for ac_prog in bash
5422do
5423  # Extract the first word of "$ac_prog", so it can be a program name with args.
5424set dummy $ac_prog; ac_word=$2
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426$as_echo_n "checking for $ac_word... " >&6; }
5427if ${ac_cv_path_BASH+:} false; then :
5428  $as_echo_n "(cached) " >&6
5429else
5430  case $BASH in
5431  [\\/]* | ?:[\\/]*)
5432  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5433  ;;
5434  *)
5435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH
5437do
5438  IFS=$as_save_IFS
5439  test -z "$as_dir" && as_dir=.
5440    for ac_exec_ext in '' $ac_executable_extensions; do
5441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5444    break 2
5445  fi
5446done
5447  done
5448IFS=$as_save_IFS
5449
5450  ;;
5451esac
5452fi
5453BASH=$ac_cv_path_BASH
5454if test -n "$BASH"; then
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5456$as_echo "$BASH" >&6; }
5457else
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459$as_echo "no" >&6; }
5460fi
5461
5462
5463  test -n "$BASH" && break
5464done
5465
5466  else
5467    # The variable is set, but is it from the command line or the environment?
5468
5469    # Try to remove the string !BASH! from our list.
5470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5472      # If it failed, the variable was not from the command line. Ignore it,
5473      # but warn the user (except for BASH, which is always set by the calling BASH).
5474      if test "xBASH" != xBASH; then
5475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5476$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5477      fi
5478      # Try to locate tool using the code snippet
5479      for ac_prog in bash
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if ${ac_cv_path_BASH+:} false; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $BASH in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5500    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511BASH=$ac_cv_path_BASH
5512if test -n "$BASH"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5514$as_echo "$BASH" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$BASH" && break
5522done
5523
5524    else
5525      # If it succeeded, then it was overridden by the user. We will use it
5526      # for the tool.
5527
5528      # First remove it from the list of overridden variables, so we can test
5529      # for unknown variables in the end.
5530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5531
5532      # Check if we try to supply an empty value
5533      if test "x$BASH" = x; then
5534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5535$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5537$as_echo_n "checking for BASH... " >&6; }
5538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5539$as_echo "disabled" >&6; }
5540      else
5541        # Check if the provided tool contains a complete path.
5542        tool_specified="$BASH"
5543        tool_basename="${tool_specified##*/}"
5544        if test "x$tool_basename" = "x$tool_specified"; then
5545          # A command without a complete path is provided, search $PATH.
5546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5547$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5548          # Extract the first word of "$tool_basename", so it can be a program name with args.
5549set dummy $tool_basename; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_BASH+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $BASH in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578BASH=$ac_cv_path_BASH
5579if test -n "$BASH"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5581$as_echo "$BASH" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588          if test "x$BASH" = x; then
5589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5590          fi
5591        else
5592          # Otherwise we believe it is a complete path. Use it as it is.
5593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5594$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5596$as_echo_n "checking for BASH... " >&6; }
5597          if test ! -x "$tool_specified"; then
5598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5599$as_echo "not found" >&6; }
5600            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5601          fi
5602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5603$as_echo "$tool_specified" >&6; }
5604        fi
5605      fi
5606    fi
5607
5608  fi
5609
5610
5611
5612  if test "x$BASH" = x; then
5613    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5614  fi
5615
5616
5617
5618
5619
5620  # Publish this variable in the help.
5621
5622
5623  if [ -z "${CAT+x}" ]; then
5624    # The variable is not set by user, try to locate tool using the code snippet
5625    for ac_prog in cat
5626do
5627  # Extract the first word of "$ac_prog", so it can be a program name with args.
5628set dummy $ac_prog; ac_word=$2
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
5631if ${ac_cv_path_CAT+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  case $CAT in
5635  [\\/]* | ?:[\\/]*)
5636  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5637  ;;
5638  *)
5639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644    for ac_exec_ext in '' $ac_executable_extensions; do
5645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648    break 2
5649  fi
5650done
5651  done
5652IFS=$as_save_IFS
5653
5654  ;;
5655esac
5656fi
5657CAT=$ac_cv_path_CAT
5658if test -n "$CAT"; then
5659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5660$as_echo "$CAT" >&6; }
5661else
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667  test -n "$CAT" && break
5668done
5669
5670  else
5671    # The variable is set, but is it from the command line or the environment?
5672
5673    # Try to remove the string !CAT! from our list.
5674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5676      # If it failed, the variable was not from the command line. Ignore it,
5677      # but warn the user (except for BASH, which is always set by the calling BASH).
5678      if test "xCAT" != xBASH; then
5679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5680$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5681      fi
5682      # Try to locate tool using the code snippet
5683      for ac_prog in cat
5684do
5685  # Extract the first word of "$ac_prog", so it can be a program name with args.
5686set dummy $ac_prog; ac_word=$2
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688$as_echo_n "checking for $ac_word... " >&6; }
5689if ${ac_cv_path_CAT+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692  case $CAT in
5693  [\\/]* | ?:[\\/]*)
5694  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5695  ;;
5696  *)
5697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700  IFS=$as_save_IFS
5701  test -z "$as_dir" && as_dir=.
5702    for ac_exec_ext in '' $ac_executable_extensions; do
5703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706    break 2
5707  fi
5708done
5709  done
5710IFS=$as_save_IFS
5711
5712  ;;
5713esac
5714fi
5715CAT=$ac_cv_path_CAT
5716if test -n "$CAT"; then
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5718$as_echo "$CAT" >&6; }
5719else
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721$as_echo "no" >&6; }
5722fi
5723
5724
5725  test -n "$CAT" && break
5726done
5727
5728    else
5729      # If it succeeded, then it was overridden by the user. We will use it
5730      # for the tool.
5731
5732      # First remove it from the list of overridden variables, so we can test
5733      # for unknown variables in the end.
5734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5735
5736      # Check if we try to supply an empty value
5737      if test "x$CAT" = x; then
5738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5739$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5741$as_echo_n "checking for CAT... " >&6; }
5742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5743$as_echo "disabled" >&6; }
5744      else
5745        # Check if the provided tool contains a complete path.
5746        tool_specified="$CAT"
5747        tool_basename="${tool_specified##*/}"
5748        if test "x$tool_basename" = "x$tool_specified"; then
5749          # A command without a complete path is provided, search $PATH.
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5751$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5752          # Extract the first word of "$tool_basename", so it can be a program name with args.
5753set dummy $tool_basename; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
5756if ${ac_cv_path_CAT+:} false; then :
5757  $as_echo_n "(cached) " >&6
5758else
5759  case $CAT in
5760  [\\/]* | ?:[\\/]*)
5761  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5762  ;;
5763  *)
5764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5765for as_dir in $PATH
5766do
5767  IFS=$as_save_IFS
5768  test -z "$as_dir" && as_dir=.
5769    for ac_exec_ext in '' $ac_executable_extensions; do
5770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5771    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5773    break 2
5774  fi
5775done
5776  done
5777IFS=$as_save_IFS
5778
5779  ;;
5780esac
5781fi
5782CAT=$ac_cv_path_CAT
5783if test -n "$CAT"; then
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5785$as_echo "$CAT" >&6; }
5786else
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
5789fi
5790
5791
5792          if test "x$CAT" = x; then
5793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5794          fi
5795        else
5796          # Otherwise we believe it is a complete path. Use it as it is.
5797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5798$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5800$as_echo_n "checking for CAT... " >&6; }
5801          if test ! -x "$tool_specified"; then
5802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5803$as_echo "not found" >&6; }
5804            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5805          fi
5806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5807$as_echo "$tool_specified" >&6; }
5808        fi
5809      fi
5810    fi
5811
5812  fi
5813
5814
5815
5816  if test "x$CAT" = x; then
5817    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5818  fi
5819
5820
5821
5822
5823
5824  # Publish this variable in the help.
5825
5826
5827  if [ -z "${CHMOD+x}" ]; then
5828    # The variable is not set by user, try to locate tool using the code snippet
5829    for ac_prog in chmod
5830do
5831  # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_path_CHMOD+:} false; then :
5836  $as_echo_n "(cached) " >&6
5837else
5838  case $CHMOD in
5839  [\\/]* | ?:[\\/]*)
5840  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5841  ;;
5842  *)
5843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844for as_dir in $PATH
5845do
5846  IFS=$as_save_IFS
5847  test -z "$as_dir" && as_dir=.
5848    for ac_exec_ext in '' $ac_executable_extensions; do
5849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5850    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5852    break 2
5853  fi
5854done
5855  done
5856IFS=$as_save_IFS
5857
5858  ;;
5859esac
5860fi
5861CHMOD=$ac_cv_path_CHMOD
5862if test -n "$CHMOD"; then
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5864$as_echo "$CHMOD" >&6; }
5865else
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871  test -n "$CHMOD" && break
5872done
5873
5874  else
5875    # The variable is set, but is it from the command line or the environment?
5876
5877    # Try to remove the string !CHMOD! from our list.
5878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5880      # If it failed, the variable was not from the command line. Ignore it,
5881      # but warn the user (except for BASH, which is always set by the calling BASH).
5882      if test "xCHMOD" != xBASH; then
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5884$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5885      fi
5886      # Try to locate tool using the code snippet
5887      for ac_prog in chmod
5888do
5889  # Extract the first word of "$ac_prog", so it can be a program name with args.
5890set dummy $ac_prog; ac_word=$2
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5892$as_echo_n "checking for $ac_word... " >&6; }
5893if ${ac_cv_path_CHMOD+:} false; then :
5894  $as_echo_n "(cached) " >&6
5895else
5896  case $CHMOD in
5897  [\\/]* | ?:[\\/]*)
5898  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5899  ;;
5900  *)
5901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904  IFS=$as_save_IFS
5905  test -z "$as_dir" && as_dir=.
5906    for ac_exec_ext in '' $ac_executable_extensions; do
5907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5908    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910    break 2
5911  fi
5912done
5913  done
5914IFS=$as_save_IFS
5915
5916  ;;
5917esac
5918fi
5919CHMOD=$ac_cv_path_CHMOD
5920if test -n "$CHMOD"; then
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5922$as_echo "$CHMOD" >&6; }
5923else
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
5926fi
5927
5928
5929  test -n "$CHMOD" && break
5930done
5931
5932    else
5933      # If it succeeded, then it was overridden by the user. We will use it
5934      # for the tool.
5935
5936      # First remove it from the list of overridden variables, so we can test
5937      # for unknown variables in the end.
5938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5939
5940      # Check if we try to supply an empty value
5941      if test "x$CHMOD" = x; then
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5943$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5945$as_echo_n "checking for CHMOD... " >&6; }
5946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5947$as_echo "disabled" >&6; }
5948      else
5949        # Check if the provided tool contains a complete path.
5950        tool_specified="$CHMOD"
5951        tool_basename="${tool_specified##*/}"
5952        if test "x$tool_basename" = "x$tool_specified"; then
5953          # A command without a complete path is provided, search $PATH.
5954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5955$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5956          # Extract the first word of "$tool_basename", so it can be a program name with args.
5957set dummy $tool_basename; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_path_CHMOD+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  case $CHMOD in
5964  [\\/]* | ?:[\\/]*)
5965  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5966  ;;
5967  *)
5968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969for as_dir in $PATH
5970do
5971  IFS=$as_save_IFS
5972  test -z "$as_dir" && as_dir=.
5973    for ac_exec_ext in '' $ac_executable_extensions; do
5974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977    break 2
5978  fi
5979done
5980  done
5981IFS=$as_save_IFS
5982
5983  ;;
5984esac
5985fi
5986CHMOD=$ac_cv_path_CHMOD
5987if test -n "$CHMOD"; then
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5989$as_echo "$CHMOD" >&6; }
5990else
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993fi
5994
5995
5996          if test "x$CHMOD" = x; then
5997            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5998          fi
5999        else
6000          # Otherwise we believe it is a complete path. Use it as it is.
6001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6002$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6004$as_echo_n "checking for CHMOD... " >&6; }
6005          if test ! -x "$tool_specified"; then
6006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6007$as_echo "not found" >&6; }
6008            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6009          fi
6010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6011$as_echo "$tool_specified" >&6; }
6012        fi
6013      fi
6014    fi
6015
6016  fi
6017
6018
6019
6020  if test "x$CHMOD" = x; then
6021    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6022  fi
6023
6024
6025
6026
6027
6028  # Publish this variable in the help.
6029
6030
6031  if [ -z "${CMP+x}" ]; then
6032    # The variable is not set by user, try to locate tool using the code snippet
6033    for ac_prog in cmp
6034do
6035  # Extract the first word of "$ac_prog", so it can be a program name with args.
6036set dummy $ac_prog; ac_word=$2
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
6039if ${ac_cv_path_CMP+:} false; then :
6040  $as_echo_n "(cached) " >&6
6041else
6042  case $CMP in
6043  [\\/]* | ?:[\\/]*)
6044  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6045  ;;
6046  *)
6047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050  IFS=$as_save_IFS
6051  test -z "$as_dir" && as_dir=.
6052    for ac_exec_ext in '' $ac_executable_extensions; do
6053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6054    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056    break 2
6057  fi
6058done
6059  done
6060IFS=$as_save_IFS
6061
6062  ;;
6063esac
6064fi
6065CMP=$ac_cv_path_CMP
6066if test -n "$CMP"; then
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6068$as_echo "$CMP" >&6; }
6069else
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075  test -n "$CMP" && break
6076done
6077
6078  else
6079    # The variable is set, but is it from the command line or the environment?
6080
6081    # Try to remove the string !CMP! from our list.
6082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6084      # If it failed, the variable was not from the command line. Ignore it,
6085      # but warn the user (except for BASH, which is always set by the calling BASH).
6086      if test "xCMP" != xBASH; then
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6088$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6089      fi
6090      # Try to locate tool using the code snippet
6091      for ac_prog in cmp
6092do
6093  # Extract the first word of "$ac_prog", so it can be a program name with args.
6094set dummy $ac_prog; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_path_CMP+:} false; then :
6098  $as_echo_n "(cached) " >&6
6099else
6100  case $CMP in
6101  [\\/]* | ?:[\\/]*)
6102  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6103  ;;
6104  *)
6105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108  IFS=$as_save_IFS
6109  test -z "$as_dir" && as_dir=.
6110    for ac_exec_ext in '' $ac_executable_extensions; do
6111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6112    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114    break 2
6115  fi
6116done
6117  done
6118IFS=$as_save_IFS
6119
6120  ;;
6121esac
6122fi
6123CMP=$ac_cv_path_CMP
6124if test -n "$CMP"; then
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6126$as_echo "$CMP" >&6; }
6127else
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133  test -n "$CMP" && break
6134done
6135
6136    else
6137      # If it succeeded, then it was overridden by the user. We will use it
6138      # for the tool.
6139
6140      # First remove it from the list of overridden variables, so we can test
6141      # for unknown variables in the end.
6142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6143
6144      # Check if we try to supply an empty value
6145      if test "x$CMP" = x; then
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6147$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6149$as_echo_n "checking for CMP... " >&6; }
6150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6151$as_echo "disabled" >&6; }
6152      else
6153        # Check if the provided tool contains a complete path.
6154        tool_specified="$CMP"
6155        tool_basename="${tool_specified##*/}"
6156        if test "x$tool_basename" = "x$tool_specified"; then
6157          # A command without a complete path is provided, search $PATH.
6158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6159$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6160          # Extract the first word of "$tool_basename", so it can be a program name with args.
6161set dummy $tool_basename; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_CMP+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $CMP in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190CMP=$ac_cv_path_CMP
6191if test -n "$CMP"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6193$as_echo "$CMP" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200          if test "x$CMP" = x; then
6201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6202          fi
6203        else
6204          # Otherwise we believe it is a complete path. Use it as it is.
6205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6206$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6208$as_echo_n "checking for CMP... " >&6; }
6209          if test ! -x "$tool_specified"; then
6210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6211$as_echo "not found" >&6; }
6212            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6213          fi
6214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6215$as_echo "$tool_specified" >&6; }
6216        fi
6217      fi
6218    fi
6219
6220  fi
6221
6222
6223
6224  if test "x$CMP" = x; then
6225    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6226  fi
6227
6228
6229
6230
6231
6232  # Publish this variable in the help.
6233
6234
6235  if [ -z "${COMM+x}" ]; then
6236    # The variable is not set by user, try to locate tool using the code snippet
6237    for ac_prog in comm
6238do
6239  # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_path_COMM+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246  case $COMM in
6247  [\\/]* | ?:[\\/]*)
6248  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6249  ;;
6250  *)
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260    break 2
6261  fi
6262done
6263  done
6264IFS=$as_save_IFS
6265
6266  ;;
6267esac
6268fi
6269COMM=$ac_cv_path_COMM
6270if test -n "$COMM"; then
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6272$as_echo "$COMM" >&6; }
6273else
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279  test -n "$COMM" && break
6280done
6281
6282  else
6283    # The variable is set, but is it from the command line or the environment?
6284
6285    # Try to remove the string !COMM! from our list.
6286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288      # If it failed, the variable was not from the command line. Ignore it,
6289      # but warn the user (except for BASH, which is always set by the calling BASH).
6290      if test "xCOMM" != xBASH; then
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6292$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6293      fi
6294      # Try to locate tool using the code snippet
6295      for ac_prog in comm
6296do
6297  # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_path_COMM+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  case $COMM in
6305  [\\/]* | ?:[\\/]*)
6306  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6307  ;;
6308  *)
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_exec_ext in '' $ac_executable_extensions; do
6315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318    break 2
6319  fi
6320done
6321  done
6322IFS=$as_save_IFS
6323
6324  ;;
6325esac
6326fi
6327COMM=$ac_cv_path_COMM
6328if test -n "$COMM"; then
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6330$as_echo "$COMM" >&6; }
6331else
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
6337  test -n "$COMM" && break
6338done
6339
6340    else
6341      # If it succeeded, then it was overridden by the user. We will use it
6342      # for the tool.
6343
6344      # First remove it from the list of overridden variables, so we can test
6345      # for unknown variables in the end.
6346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348      # Check if we try to supply an empty value
6349      if test "x$COMM" = x; then
6350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6351$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6353$as_echo_n "checking for COMM... " >&6; }
6354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6355$as_echo "disabled" >&6; }
6356      else
6357        # Check if the provided tool contains a complete path.
6358        tool_specified="$COMM"
6359        tool_basename="${tool_specified##*/}"
6360        if test "x$tool_basename" = "x$tool_specified"; then
6361          # A command without a complete path is provided, search $PATH.
6362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6363$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6364          # Extract the first word of "$tool_basename", so it can be a program name with args.
6365set dummy $tool_basename; ac_word=$2
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6367$as_echo_n "checking for $ac_word... " >&6; }
6368if ${ac_cv_path_COMM+:} false; then :
6369  $as_echo_n "(cached) " >&6
6370else
6371  case $COMM in
6372  [\\/]* | ?:[\\/]*)
6373  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6374  ;;
6375  *)
6376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379  IFS=$as_save_IFS
6380  test -z "$as_dir" && as_dir=.
6381    for ac_exec_ext in '' $ac_executable_extensions; do
6382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385    break 2
6386  fi
6387done
6388  done
6389IFS=$as_save_IFS
6390
6391  ;;
6392esac
6393fi
6394COMM=$ac_cv_path_COMM
6395if test -n "$COMM"; then
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6397$as_echo "$COMM" >&6; }
6398else
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
6403
6404          if test "x$COMM" = x; then
6405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6406          fi
6407        else
6408          # Otherwise we believe it is a complete path. Use it as it is.
6409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6410$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6412$as_echo_n "checking for COMM... " >&6; }
6413          if test ! -x "$tool_specified"; then
6414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6415$as_echo "not found" >&6; }
6416            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6417          fi
6418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6419$as_echo "$tool_specified" >&6; }
6420        fi
6421      fi
6422    fi
6423
6424  fi
6425
6426
6427
6428  if test "x$COMM" = x; then
6429    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6430  fi
6431
6432
6433
6434
6435
6436  # Publish this variable in the help.
6437
6438
6439  if [ -z "${CP+x}" ]; then
6440    # The variable is not set by user, try to locate tool using the code snippet
6441    for ac_prog in cp
6442do
6443  # Extract the first word of "$ac_prog", so it can be a program name with args.
6444set dummy $ac_prog; ac_word=$2
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446$as_echo_n "checking for $ac_word... " >&6; }
6447if ${ac_cv_path_CP+:} false; then :
6448  $as_echo_n "(cached) " >&6
6449else
6450  case $CP in
6451  [\\/]* | ?:[\\/]*)
6452  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6453  ;;
6454  *)
6455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456for as_dir in $PATH
6457do
6458  IFS=$as_save_IFS
6459  test -z "$as_dir" && as_dir=.
6460    for ac_exec_ext in '' $ac_executable_extensions; do
6461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6462    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464    break 2
6465  fi
6466done
6467  done
6468IFS=$as_save_IFS
6469
6470  ;;
6471esac
6472fi
6473CP=$ac_cv_path_CP
6474if test -n "$CP"; then
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6476$as_echo "$CP" >&6; }
6477else
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
6480fi
6481
6482
6483  test -n "$CP" && break
6484done
6485
6486  else
6487    # The variable is set, but is it from the command line or the environment?
6488
6489    # Try to remove the string !CP! from our list.
6490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6492      # If it failed, the variable was not from the command line. Ignore it,
6493      # but warn the user (except for BASH, which is always set by the calling BASH).
6494      if test "xCP" != xBASH; then
6495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6496$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6497      fi
6498      # Try to locate tool using the code snippet
6499      for ac_prog in cp
6500do
6501  # Extract the first word of "$ac_prog", so it can be a program name with args.
6502set dummy $ac_prog; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if ${ac_cv_path_CP+:} false; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $CP in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6520    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531CP=$ac_cv_path_CP
6532if test -n "$CP"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6534$as_echo "$CP" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541  test -n "$CP" && break
6542done
6543
6544    else
6545      # If it succeeded, then it was overridden by the user. We will use it
6546      # for the tool.
6547
6548      # First remove it from the list of overridden variables, so we can test
6549      # for unknown variables in the end.
6550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6551
6552      # Check if we try to supply an empty value
6553      if test "x$CP" = x; then
6554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6555$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6557$as_echo_n "checking for CP... " >&6; }
6558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6559$as_echo "disabled" >&6; }
6560      else
6561        # Check if the provided tool contains a complete path.
6562        tool_specified="$CP"
6563        tool_basename="${tool_specified##*/}"
6564        if test "x$tool_basename" = "x$tool_specified"; then
6565          # A command without a complete path is provided, search $PATH.
6566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6567$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6568          # Extract the first word of "$tool_basename", so it can be a program name with args.
6569set dummy $tool_basename; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_CP+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  case $CP in
6576  [\\/]* | ?:[\\/]*)
6577  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6578  ;;
6579  *)
6580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583  IFS=$as_save_IFS
6584  test -z "$as_dir" && as_dir=.
6585    for ac_exec_ext in '' $ac_executable_extensions; do
6586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589    break 2
6590  fi
6591done
6592  done
6593IFS=$as_save_IFS
6594
6595  ;;
6596esac
6597fi
6598CP=$ac_cv_path_CP
6599if test -n "$CP"; then
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6601$as_echo "$CP" >&6; }
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608          if test "x$CP" = x; then
6609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6610          fi
6611        else
6612          # Otherwise we believe it is a complete path. Use it as it is.
6613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6614$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6616$as_echo_n "checking for CP... " >&6; }
6617          if test ! -x "$tool_specified"; then
6618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6619$as_echo "not found" >&6; }
6620            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6621          fi
6622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6623$as_echo "$tool_specified" >&6; }
6624        fi
6625      fi
6626    fi
6627
6628  fi
6629
6630
6631
6632  if test "x$CP" = x; then
6633    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6634  fi
6635
6636
6637
6638
6639
6640  # Publish this variable in the help.
6641
6642
6643  if [ -z "${CUT+x}" ]; then
6644    # The variable is not set by user, try to locate tool using the code snippet
6645    for ac_prog in cut
6646do
6647  # Extract the first word of "$ac_prog", so it can be a program name with args.
6648set dummy $ac_prog; ac_word=$2
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6650$as_echo_n "checking for $ac_word... " >&6; }
6651if ${ac_cv_path_CUT+:} false; then :
6652  $as_echo_n "(cached) " >&6
6653else
6654  case $CUT in
6655  [\\/]* | ?:[\\/]*)
6656  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6657  ;;
6658  *)
6659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6660for as_dir in $PATH
6661do
6662  IFS=$as_save_IFS
6663  test -z "$as_dir" && as_dir=.
6664    for ac_exec_ext in '' $ac_executable_extensions; do
6665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6666    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6668    break 2
6669  fi
6670done
6671  done
6672IFS=$as_save_IFS
6673
6674  ;;
6675esac
6676fi
6677CUT=$ac_cv_path_CUT
6678if test -n "$CUT"; then
6679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6680$as_echo "$CUT" >&6; }
6681else
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683$as_echo "no" >&6; }
6684fi
6685
6686
6687  test -n "$CUT" && break
6688done
6689
6690  else
6691    # The variable is set, but is it from the command line or the environment?
6692
6693    # Try to remove the string !CUT! from our list.
6694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6696      # If it failed, the variable was not from the command line. Ignore it,
6697      # but warn the user (except for BASH, which is always set by the calling BASH).
6698      if test "xCUT" != xBASH; then
6699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6700$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6701      fi
6702      # Try to locate tool using the code snippet
6703      for ac_prog in cut
6704do
6705  # Extract the first word of "$ac_prog", so it can be a program name with args.
6706set dummy $ac_prog; ac_word=$2
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6708$as_echo_n "checking for $ac_word... " >&6; }
6709if ${ac_cv_path_CUT+:} false; then :
6710  $as_echo_n "(cached) " >&6
6711else
6712  case $CUT in
6713  [\\/]* | ?:[\\/]*)
6714  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6715  ;;
6716  *)
6717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718for as_dir in $PATH
6719do
6720  IFS=$as_save_IFS
6721  test -z "$as_dir" && as_dir=.
6722    for ac_exec_ext in '' $ac_executable_extensions; do
6723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6724    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6726    break 2
6727  fi
6728done
6729  done
6730IFS=$as_save_IFS
6731
6732  ;;
6733esac
6734fi
6735CUT=$ac_cv_path_CUT
6736if test -n "$CUT"; then
6737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6738$as_echo "$CUT" >&6; }
6739else
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
6742fi
6743
6744
6745  test -n "$CUT" && break
6746done
6747
6748    else
6749      # If it succeeded, then it was overridden by the user. We will use it
6750      # for the tool.
6751
6752      # First remove it from the list of overridden variables, so we can test
6753      # for unknown variables in the end.
6754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6755
6756      # Check if we try to supply an empty value
6757      if test "x$CUT" = x; then
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6759$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6761$as_echo_n "checking for CUT... " >&6; }
6762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6763$as_echo "disabled" >&6; }
6764      else
6765        # Check if the provided tool contains a complete path.
6766        tool_specified="$CUT"
6767        tool_basename="${tool_specified##*/}"
6768        if test "x$tool_basename" = "x$tool_specified"; then
6769          # A command without a complete path is provided, search $PATH.
6770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6771$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6772          # Extract the first word of "$tool_basename", so it can be a program name with args.
6773set dummy $tool_basename; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_CUT+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $CUT in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802CUT=$ac_cv_path_CUT
6803if test -n "$CUT"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6805$as_echo "$CUT" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812          if test "x$CUT" = x; then
6813            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6814          fi
6815        else
6816          # Otherwise we believe it is a complete path. Use it as it is.
6817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6818$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6819          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6820$as_echo_n "checking for CUT... " >&6; }
6821          if test ! -x "$tool_specified"; then
6822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6823$as_echo "not found" >&6; }
6824            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6825          fi
6826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6827$as_echo "$tool_specified" >&6; }
6828        fi
6829      fi
6830    fi
6831
6832  fi
6833
6834
6835
6836  if test "x$CUT" = x; then
6837    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6838  fi
6839
6840
6841
6842
6843
6844  # Publish this variable in the help.
6845
6846
6847  if [ -z "${DATE+x}" ]; then
6848    # The variable is not set by user, try to locate tool using the code snippet
6849    for ac_prog in date
6850do
6851  # Extract the first word of "$ac_prog", so it can be a program name with args.
6852set dummy $ac_prog; ac_word=$2
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6854$as_echo_n "checking for $ac_word... " >&6; }
6855if ${ac_cv_path_DATE+:} false; then :
6856  $as_echo_n "(cached) " >&6
6857else
6858  case $DATE in
6859  [\\/]* | ?:[\\/]*)
6860  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6861  ;;
6862  *)
6863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6864for as_dir in $PATH
6865do
6866  IFS=$as_save_IFS
6867  test -z "$as_dir" && as_dir=.
6868    for ac_exec_ext in '' $ac_executable_extensions; do
6869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6870    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6872    break 2
6873  fi
6874done
6875  done
6876IFS=$as_save_IFS
6877
6878  ;;
6879esac
6880fi
6881DATE=$ac_cv_path_DATE
6882if test -n "$DATE"; then
6883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6884$as_echo "$DATE" >&6; }
6885else
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6887$as_echo "no" >&6; }
6888fi
6889
6890
6891  test -n "$DATE" && break
6892done
6893
6894  else
6895    # The variable is set, but is it from the command line or the environment?
6896
6897    # Try to remove the string !DATE! from our list.
6898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6900      # If it failed, the variable was not from the command line. Ignore it,
6901      # but warn the user (except for BASH, which is always set by the calling BASH).
6902      if test "xDATE" != xBASH; then
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6904$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6905      fi
6906      # Try to locate tool using the code snippet
6907      for ac_prog in date
6908do
6909  # Extract the first word of "$ac_prog", so it can be a program name with args.
6910set dummy $ac_prog; ac_word=$2
6911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6912$as_echo_n "checking for $ac_word... " >&6; }
6913if ${ac_cv_path_DATE+:} false; then :
6914  $as_echo_n "(cached) " >&6
6915else
6916  case $DATE in
6917  [\\/]* | ?:[\\/]*)
6918  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6919  ;;
6920  *)
6921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6922for as_dir in $PATH
6923do
6924  IFS=$as_save_IFS
6925  test -z "$as_dir" && as_dir=.
6926    for ac_exec_ext in '' $ac_executable_extensions; do
6927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6928    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6930    break 2
6931  fi
6932done
6933  done
6934IFS=$as_save_IFS
6935
6936  ;;
6937esac
6938fi
6939DATE=$ac_cv_path_DATE
6940if test -n "$DATE"; then
6941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6942$as_echo "$DATE" >&6; }
6943else
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6945$as_echo "no" >&6; }
6946fi
6947
6948
6949  test -n "$DATE" && break
6950done
6951
6952    else
6953      # If it succeeded, then it was overridden by the user. We will use it
6954      # for the tool.
6955
6956      # First remove it from the list of overridden variables, so we can test
6957      # for unknown variables in the end.
6958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6959
6960      # Check if we try to supply an empty value
6961      if test "x$DATE" = x; then
6962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6963$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6965$as_echo_n "checking for DATE... " >&6; }
6966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6967$as_echo "disabled" >&6; }
6968      else
6969        # Check if the provided tool contains a complete path.
6970        tool_specified="$DATE"
6971        tool_basename="${tool_specified##*/}"
6972        if test "x$tool_basename" = "x$tool_specified"; then
6973          # A command without a complete path is provided, search $PATH.
6974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6975$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6976          # Extract the first word of "$tool_basename", so it can be a program name with args.
6977set dummy $tool_basename; ac_word=$2
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6979$as_echo_n "checking for $ac_word... " >&6; }
6980if ${ac_cv_path_DATE+:} false; then :
6981  $as_echo_n "(cached) " >&6
6982else
6983  case $DATE in
6984  [\\/]* | ?:[\\/]*)
6985  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6986  ;;
6987  *)
6988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6989for as_dir in $PATH
6990do
6991  IFS=$as_save_IFS
6992  test -z "$as_dir" && as_dir=.
6993    for ac_exec_ext in '' $ac_executable_extensions; do
6994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6995    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6997    break 2
6998  fi
6999done
7000  done
7001IFS=$as_save_IFS
7002
7003  ;;
7004esac
7005fi
7006DATE=$ac_cv_path_DATE
7007if test -n "$DATE"; then
7008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7009$as_echo "$DATE" >&6; }
7010else
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7012$as_echo "no" >&6; }
7013fi
7014
7015
7016          if test "x$DATE" = x; then
7017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7018          fi
7019        else
7020          # Otherwise we believe it is a complete path. Use it as it is.
7021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7022$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7024$as_echo_n "checking for DATE... " >&6; }
7025          if test ! -x "$tool_specified"; then
7026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7027$as_echo "not found" >&6; }
7028            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7029          fi
7030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7031$as_echo "$tool_specified" >&6; }
7032        fi
7033      fi
7034    fi
7035
7036  fi
7037
7038
7039
7040  if test "x$DATE" = x; then
7041    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7042  fi
7043
7044
7045
7046
7047
7048  # Publish this variable in the help.
7049
7050
7051  if [ -z "${DIFF+x}" ]; then
7052    # The variable is not set by user, try to locate tool using the code snippet
7053    for ac_prog in gdiff diff
7054do
7055  # Extract the first word of "$ac_prog", so it can be a program name with args.
7056set dummy $ac_prog; ac_word=$2
7057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7058$as_echo_n "checking for $ac_word... " >&6; }
7059if ${ac_cv_path_DIFF+:} false; then :
7060  $as_echo_n "(cached) " >&6
7061else
7062  case $DIFF in
7063  [\\/]* | ?:[\\/]*)
7064  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7065  ;;
7066  *)
7067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068for as_dir in $PATH
7069do
7070  IFS=$as_save_IFS
7071  test -z "$as_dir" && as_dir=.
7072    for ac_exec_ext in '' $ac_executable_extensions; do
7073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7074    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7076    break 2
7077  fi
7078done
7079  done
7080IFS=$as_save_IFS
7081
7082  ;;
7083esac
7084fi
7085DIFF=$ac_cv_path_DIFF
7086if test -n "$DIFF"; then
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7088$as_echo "$DIFF" >&6; }
7089else
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7091$as_echo "no" >&6; }
7092fi
7093
7094
7095  test -n "$DIFF" && break
7096done
7097
7098  else
7099    # The variable is set, but is it from the command line or the environment?
7100
7101    # Try to remove the string !DIFF! from our list.
7102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7104      # If it failed, the variable was not from the command line. Ignore it,
7105      # but warn the user (except for BASH, which is always set by the calling BASH).
7106      if test "xDIFF" != xBASH; then
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7108$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7109      fi
7110      # Try to locate tool using the code snippet
7111      for ac_prog in gdiff diff
7112do
7113  # Extract the first word of "$ac_prog", so it can be a program name with args.
7114set dummy $ac_prog; ac_word=$2
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7116$as_echo_n "checking for $ac_word... " >&6; }
7117if ${ac_cv_path_DIFF+:} false; then :
7118  $as_echo_n "(cached) " >&6
7119else
7120  case $DIFF in
7121  [\\/]* | ?:[\\/]*)
7122  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7123  ;;
7124  *)
7125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126for as_dir in $PATH
7127do
7128  IFS=$as_save_IFS
7129  test -z "$as_dir" && as_dir=.
7130    for ac_exec_ext in '' $ac_executable_extensions; do
7131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7132    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7134    break 2
7135  fi
7136done
7137  done
7138IFS=$as_save_IFS
7139
7140  ;;
7141esac
7142fi
7143DIFF=$ac_cv_path_DIFF
7144if test -n "$DIFF"; then
7145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7146$as_echo "$DIFF" >&6; }
7147else
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7149$as_echo "no" >&6; }
7150fi
7151
7152
7153  test -n "$DIFF" && break
7154done
7155
7156    else
7157      # If it succeeded, then it was overridden by the user. We will use it
7158      # for the tool.
7159
7160      # First remove it from the list of overridden variables, so we can test
7161      # for unknown variables in the end.
7162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7163
7164      # Check if we try to supply an empty value
7165      if test "x$DIFF" = x; then
7166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7167$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7169$as_echo_n "checking for DIFF... " >&6; }
7170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7171$as_echo "disabled" >&6; }
7172      else
7173        # Check if the provided tool contains a complete path.
7174        tool_specified="$DIFF"
7175        tool_basename="${tool_specified##*/}"
7176        if test "x$tool_basename" = "x$tool_specified"; then
7177          # A command without a complete path is provided, search $PATH.
7178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7179$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7180          # Extract the first word of "$tool_basename", so it can be a program name with args.
7181set dummy $tool_basename; ac_word=$2
7182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7183$as_echo_n "checking for $ac_word... " >&6; }
7184if ${ac_cv_path_DIFF+:} false; then :
7185  $as_echo_n "(cached) " >&6
7186else
7187  case $DIFF in
7188  [\\/]* | ?:[\\/]*)
7189  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7190  ;;
7191  *)
7192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193for as_dir in $PATH
7194do
7195  IFS=$as_save_IFS
7196  test -z "$as_dir" && as_dir=.
7197    for ac_exec_ext in '' $ac_executable_extensions; do
7198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7199    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7201    break 2
7202  fi
7203done
7204  done
7205IFS=$as_save_IFS
7206
7207  ;;
7208esac
7209fi
7210DIFF=$ac_cv_path_DIFF
7211if test -n "$DIFF"; then
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7213$as_echo "$DIFF" >&6; }
7214else
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216$as_echo "no" >&6; }
7217fi
7218
7219
7220          if test "x$DIFF" = x; then
7221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7222          fi
7223        else
7224          # Otherwise we believe it is a complete path. Use it as it is.
7225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7226$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7228$as_echo_n "checking for DIFF... " >&6; }
7229          if test ! -x "$tool_specified"; then
7230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7231$as_echo "not found" >&6; }
7232            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7233          fi
7234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7235$as_echo "$tool_specified" >&6; }
7236        fi
7237      fi
7238    fi
7239
7240  fi
7241
7242
7243
7244  if test "x$DIFF" = x; then
7245    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7246  fi
7247
7248
7249
7250
7251
7252  # Publish this variable in the help.
7253
7254
7255  if [ -z "${DIRNAME+x}" ]; then
7256    # The variable is not set by user, try to locate tool using the code snippet
7257    for ac_prog in dirname
7258do
7259  # Extract the first word of "$ac_prog", so it can be a program name with args.
7260set dummy $ac_prog; ac_word=$2
7261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7262$as_echo_n "checking for $ac_word... " >&6; }
7263if ${ac_cv_path_DIRNAME+:} false; then :
7264  $as_echo_n "(cached) " >&6
7265else
7266  case $DIRNAME in
7267  [\\/]* | ?:[\\/]*)
7268  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7269  ;;
7270  *)
7271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7272for as_dir in $PATH
7273do
7274  IFS=$as_save_IFS
7275  test -z "$as_dir" && as_dir=.
7276    for ac_exec_ext in '' $ac_executable_extensions; do
7277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7278    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7280    break 2
7281  fi
7282done
7283  done
7284IFS=$as_save_IFS
7285
7286  ;;
7287esac
7288fi
7289DIRNAME=$ac_cv_path_DIRNAME
7290if test -n "$DIRNAME"; then
7291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7292$as_echo "$DIRNAME" >&6; }
7293else
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295$as_echo "no" >&6; }
7296fi
7297
7298
7299  test -n "$DIRNAME" && break
7300done
7301
7302  else
7303    # The variable is set, but is it from the command line or the environment?
7304
7305    # Try to remove the string !DIRNAME! from our list.
7306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7308      # If it failed, the variable was not from the command line. Ignore it,
7309      # but warn the user (except for BASH, which is always set by the calling BASH).
7310      if test "xDIRNAME" != xBASH; then
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7312$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7313      fi
7314      # Try to locate tool using the code snippet
7315      for ac_prog in dirname
7316do
7317  # Extract the first word of "$ac_prog", so it can be a program name with args.
7318set dummy $ac_prog; ac_word=$2
7319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7320$as_echo_n "checking for $ac_word... " >&6; }
7321if ${ac_cv_path_DIRNAME+:} false; then :
7322  $as_echo_n "(cached) " >&6
7323else
7324  case $DIRNAME in
7325  [\\/]* | ?:[\\/]*)
7326  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7327  ;;
7328  *)
7329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330for as_dir in $PATH
7331do
7332  IFS=$as_save_IFS
7333  test -z "$as_dir" && as_dir=.
7334    for ac_exec_ext in '' $ac_executable_extensions; do
7335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7336    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7338    break 2
7339  fi
7340done
7341  done
7342IFS=$as_save_IFS
7343
7344  ;;
7345esac
7346fi
7347DIRNAME=$ac_cv_path_DIRNAME
7348if test -n "$DIRNAME"; then
7349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7350$as_echo "$DIRNAME" >&6; }
7351else
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7353$as_echo "no" >&6; }
7354fi
7355
7356
7357  test -n "$DIRNAME" && break
7358done
7359
7360    else
7361      # If it succeeded, then it was overridden by the user. We will use it
7362      # for the tool.
7363
7364      # First remove it from the list of overridden variables, so we can test
7365      # for unknown variables in the end.
7366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7367
7368      # Check if we try to supply an empty value
7369      if test "x$DIRNAME" = x; then
7370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7371$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7373$as_echo_n "checking for DIRNAME... " >&6; }
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7375$as_echo "disabled" >&6; }
7376      else
7377        # Check if the provided tool contains a complete path.
7378        tool_specified="$DIRNAME"
7379        tool_basename="${tool_specified##*/}"
7380        if test "x$tool_basename" = "x$tool_specified"; then
7381          # A command without a complete path is provided, search $PATH.
7382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7383$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7384          # Extract the first word of "$tool_basename", so it can be a program name with args.
7385set dummy $tool_basename; ac_word=$2
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
7388if ${ac_cv_path_DIRNAME+:} false; then :
7389  $as_echo_n "(cached) " >&6
7390else
7391  case $DIRNAME in
7392  [\\/]* | ?:[\\/]*)
7393  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7394  ;;
7395  *)
7396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in $PATH
7398do
7399  IFS=$as_save_IFS
7400  test -z "$as_dir" && as_dir=.
7401    for ac_exec_ext in '' $ac_executable_extensions; do
7402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7403    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405    break 2
7406  fi
7407done
7408  done
7409IFS=$as_save_IFS
7410
7411  ;;
7412esac
7413fi
7414DIRNAME=$ac_cv_path_DIRNAME
7415if test -n "$DIRNAME"; then
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7417$as_echo "$DIRNAME" >&6; }
7418else
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420$as_echo "no" >&6; }
7421fi
7422
7423
7424          if test "x$DIRNAME" = x; then
7425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7426          fi
7427        else
7428          # Otherwise we believe it is a complete path. Use it as it is.
7429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7430$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7432$as_echo_n "checking for DIRNAME... " >&6; }
7433          if test ! -x "$tool_specified"; then
7434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7435$as_echo "not found" >&6; }
7436            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7437          fi
7438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7439$as_echo "$tool_specified" >&6; }
7440        fi
7441      fi
7442    fi
7443
7444  fi
7445
7446
7447
7448  if test "x$DIRNAME" = x; then
7449    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7450  fi
7451
7452
7453
7454
7455
7456  # Publish this variable in the help.
7457
7458
7459  if [ -z "${ECHO+x}" ]; then
7460    # The variable is not set by user, try to locate tool using the code snippet
7461    for ac_prog in echo
7462do
7463  # Extract the first word of "$ac_prog", so it can be a program name with args.
7464set dummy $ac_prog; ac_word=$2
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7466$as_echo_n "checking for $ac_word... " >&6; }
7467if ${ac_cv_path_ECHO+:} false; then :
7468  $as_echo_n "(cached) " >&6
7469else
7470  case $ECHO in
7471  [\\/]* | ?:[\\/]*)
7472  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7473  ;;
7474  *)
7475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476for as_dir in $PATH
7477do
7478  IFS=$as_save_IFS
7479  test -z "$as_dir" && as_dir=.
7480    for ac_exec_ext in '' $ac_executable_extensions; do
7481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7482    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484    break 2
7485  fi
7486done
7487  done
7488IFS=$as_save_IFS
7489
7490  ;;
7491esac
7492fi
7493ECHO=$ac_cv_path_ECHO
7494if test -n "$ECHO"; then
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7496$as_echo "$ECHO" >&6; }
7497else
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501
7502
7503  test -n "$ECHO" && break
7504done
7505
7506  else
7507    # The variable is set, but is it from the command line or the environment?
7508
7509    # Try to remove the string !ECHO! from our list.
7510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7512      # If it failed, the variable was not from the command line. Ignore it,
7513      # but warn the user (except for BASH, which is always set by the calling BASH).
7514      if test "xECHO" != xBASH; then
7515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7516$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7517      fi
7518      # Try to locate tool using the code snippet
7519      for ac_prog in echo
7520do
7521  # Extract the first word of "$ac_prog", so it can be a program name with args.
7522set dummy $ac_prog; ac_word=$2
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
7525if ${ac_cv_path_ECHO+:} false; then :
7526  $as_echo_n "(cached) " >&6
7527else
7528  case $ECHO in
7529  [\\/]* | ?:[\\/]*)
7530  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7531  ;;
7532  *)
7533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536  IFS=$as_save_IFS
7537  test -z "$as_dir" && as_dir=.
7538    for ac_exec_ext in '' $ac_executable_extensions; do
7539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7540    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7542    break 2
7543  fi
7544done
7545  done
7546IFS=$as_save_IFS
7547
7548  ;;
7549esac
7550fi
7551ECHO=$ac_cv_path_ECHO
7552if test -n "$ECHO"; then
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7554$as_echo "$ECHO" >&6; }
7555else
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7557$as_echo "no" >&6; }
7558fi
7559
7560
7561  test -n "$ECHO" && break
7562done
7563
7564    else
7565      # If it succeeded, then it was overridden by the user. We will use it
7566      # for the tool.
7567
7568      # First remove it from the list of overridden variables, so we can test
7569      # for unknown variables in the end.
7570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7571
7572      # Check if we try to supply an empty value
7573      if test "x$ECHO" = x; then
7574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7575$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7577$as_echo_n "checking for ECHO... " >&6; }
7578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7579$as_echo "disabled" >&6; }
7580      else
7581        # Check if the provided tool contains a complete path.
7582        tool_specified="$ECHO"
7583        tool_basename="${tool_specified##*/}"
7584        if test "x$tool_basename" = "x$tool_specified"; then
7585          # A command without a complete path is provided, search $PATH.
7586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7587$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7588          # Extract the first word of "$tool_basename", so it can be a program name with args.
7589set dummy $tool_basename; ac_word=$2
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
7592if ${ac_cv_path_ECHO+:} false; then :
7593  $as_echo_n "(cached) " >&6
7594else
7595  case $ECHO in
7596  [\\/]* | ?:[\\/]*)
7597  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7598  ;;
7599  *)
7600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601for as_dir in $PATH
7602do
7603  IFS=$as_save_IFS
7604  test -z "$as_dir" && as_dir=.
7605    for ac_exec_ext in '' $ac_executable_extensions; do
7606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609    break 2
7610  fi
7611done
7612  done
7613IFS=$as_save_IFS
7614
7615  ;;
7616esac
7617fi
7618ECHO=$ac_cv_path_ECHO
7619if test -n "$ECHO"; then
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7621$as_echo "$ECHO" >&6; }
7622else
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
7625fi
7626
7627
7628          if test "x$ECHO" = x; then
7629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7630          fi
7631        else
7632          # Otherwise we believe it is a complete path. Use it as it is.
7633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7634$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7636$as_echo_n "checking for ECHO... " >&6; }
7637          if test ! -x "$tool_specified"; then
7638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7639$as_echo "not found" >&6; }
7640            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7641          fi
7642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7643$as_echo "$tool_specified" >&6; }
7644        fi
7645      fi
7646    fi
7647
7648  fi
7649
7650
7651
7652  if test "x$ECHO" = x; then
7653    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7654  fi
7655
7656
7657
7658
7659
7660  # Publish this variable in the help.
7661
7662
7663  if [ -z "${EXPR+x}" ]; then
7664    # The variable is not set by user, try to locate tool using the code snippet
7665    for ac_prog in expr
7666do
7667  # Extract the first word of "$ac_prog", so it can be a program name with args.
7668set dummy $ac_prog; ac_word=$2
7669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7670$as_echo_n "checking for $ac_word... " >&6; }
7671if ${ac_cv_path_EXPR+:} false; then :
7672  $as_echo_n "(cached) " >&6
7673else
7674  case $EXPR in
7675  [\\/]* | ?:[\\/]*)
7676  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7677  ;;
7678  *)
7679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682  IFS=$as_save_IFS
7683  test -z "$as_dir" && as_dir=.
7684    for ac_exec_ext in '' $ac_executable_extensions; do
7685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7686    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7688    break 2
7689  fi
7690done
7691  done
7692IFS=$as_save_IFS
7693
7694  ;;
7695esac
7696fi
7697EXPR=$ac_cv_path_EXPR
7698if test -n "$EXPR"; then
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7700$as_echo "$EXPR" >&6; }
7701else
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
7704fi
7705
7706
7707  test -n "$EXPR" && break
7708done
7709
7710  else
7711    # The variable is set, but is it from the command line or the environment?
7712
7713    # Try to remove the string !EXPR! from our list.
7714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7716      # If it failed, the variable was not from the command line. Ignore it,
7717      # but warn the user (except for BASH, which is always set by the calling BASH).
7718      if test "xEXPR" != xBASH; then
7719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7720$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7721      fi
7722      # Try to locate tool using the code snippet
7723      for ac_prog in expr
7724do
7725  # Extract the first word of "$ac_prog", so it can be a program name with args.
7726set dummy $ac_prog; ac_word=$2
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7728$as_echo_n "checking for $ac_word... " >&6; }
7729if ${ac_cv_path_EXPR+:} false; then :
7730  $as_echo_n "(cached) " >&6
7731else
7732  case $EXPR in
7733  [\\/]* | ?:[\\/]*)
7734  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7735  ;;
7736  *)
7737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7738for as_dir in $PATH
7739do
7740  IFS=$as_save_IFS
7741  test -z "$as_dir" && as_dir=.
7742    for ac_exec_ext in '' $ac_executable_extensions; do
7743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7744    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7746    break 2
7747  fi
7748done
7749  done
7750IFS=$as_save_IFS
7751
7752  ;;
7753esac
7754fi
7755EXPR=$ac_cv_path_EXPR
7756if test -n "$EXPR"; then
7757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7758$as_echo "$EXPR" >&6; }
7759else
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7761$as_echo "no" >&6; }
7762fi
7763
7764
7765  test -n "$EXPR" && break
7766done
7767
7768    else
7769      # If it succeeded, then it was overridden by the user. We will use it
7770      # for the tool.
7771
7772      # First remove it from the list of overridden variables, so we can test
7773      # for unknown variables in the end.
7774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7775
7776      # Check if we try to supply an empty value
7777      if test "x$EXPR" = x; then
7778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7779$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7781$as_echo_n "checking for EXPR... " >&6; }
7782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7783$as_echo "disabled" >&6; }
7784      else
7785        # Check if the provided tool contains a complete path.
7786        tool_specified="$EXPR"
7787        tool_basename="${tool_specified##*/}"
7788        if test "x$tool_basename" = "x$tool_specified"; then
7789          # A command without a complete path is provided, search $PATH.
7790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7791$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7792          # Extract the first word of "$tool_basename", so it can be a program name with args.
7793set dummy $tool_basename; ac_word=$2
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7795$as_echo_n "checking for $ac_word... " >&6; }
7796if ${ac_cv_path_EXPR+:} false; then :
7797  $as_echo_n "(cached) " >&6
7798else
7799  case $EXPR in
7800  [\\/]* | ?:[\\/]*)
7801  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7802  ;;
7803  *)
7804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7805for as_dir in $PATH
7806do
7807  IFS=$as_save_IFS
7808  test -z "$as_dir" && as_dir=.
7809    for ac_exec_ext in '' $ac_executable_extensions; do
7810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7811    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7813    break 2
7814  fi
7815done
7816  done
7817IFS=$as_save_IFS
7818
7819  ;;
7820esac
7821fi
7822EXPR=$ac_cv_path_EXPR
7823if test -n "$EXPR"; then
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7825$as_echo "$EXPR" >&6; }
7826else
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7828$as_echo "no" >&6; }
7829fi
7830
7831
7832          if test "x$EXPR" = x; then
7833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7834          fi
7835        else
7836          # Otherwise we believe it is a complete path. Use it as it is.
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7838$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7840$as_echo_n "checking for EXPR... " >&6; }
7841          if test ! -x "$tool_specified"; then
7842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7843$as_echo "not found" >&6; }
7844            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7845          fi
7846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7847$as_echo "$tool_specified" >&6; }
7848        fi
7849      fi
7850    fi
7851
7852  fi
7853
7854
7855
7856  if test "x$EXPR" = x; then
7857    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7858  fi
7859
7860
7861
7862
7863
7864  # Publish this variable in the help.
7865
7866
7867  if [ -z "${FILE+x}" ]; then
7868    # The variable is not set by user, try to locate tool using the code snippet
7869    for ac_prog in file
7870do
7871  # Extract the first word of "$ac_prog", so it can be a program name with args.
7872set dummy $ac_prog; ac_word=$2
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7874$as_echo_n "checking for $ac_word... " >&6; }
7875if ${ac_cv_path_FILE+:} false; then :
7876  $as_echo_n "(cached) " >&6
7877else
7878  case $FILE in
7879  [\\/]* | ?:[\\/]*)
7880  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7881  ;;
7882  *)
7883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886  IFS=$as_save_IFS
7887  test -z "$as_dir" && as_dir=.
7888    for ac_exec_ext in '' $ac_executable_extensions; do
7889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7890    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7892    break 2
7893  fi
7894done
7895  done
7896IFS=$as_save_IFS
7897
7898  ;;
7899esac
7900fi
7901FILE=$ac_cv_path_FILE
7902if test -n "$FILE"; then
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7904$as_echo "$FILE" >&6; }
7905else
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
7908fi
7909
7910
7911  test -n "$FILE" && break
7912done
7913
7914  else
7915    # The variable is set, but is it from the command line or the environment?
7916
7917    # Try to remove the string !FILE! from our list.
7918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7920      # If it failed, the variable was not from the command line. Ignore it,
7921      # but warn the user (except for BASH, which is always set by the calling BASH).
7922      if test "xFILE" != xBASH; then
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7924$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7925      fi
7926      # Try to locate tool using the code snippet
7927      for ac_prog in file
7928do
7929  # Extract the first word of "$ac_prog", so it can be a program name with args.
7930set dummy $ac_prog; ac_word=$2
7931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7932$as_echo_n "checking for $ac_word... " >&6; }
7933if ${ac_cv_path_FILE+:} false; then :
7934  $as_echo_n "(cached) " >&6
7935else
7936  case $FILE in
7937  [\\/]* | ?:[\\/]*)
7938  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7939  ;;
7940  *)
7941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942for as_dir in $PATH
7943do
7944  IFS=$as_save_IFS
7945  test -z "$as_dir" && as_dir=.
7946    for ac_exec_ext in '' $ac_executable_extensions; do
7947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7948    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7950    break 2
7951  fi
7952done
7953  done
7954IFS=$as_save_IFS
7955
7956  ;;
7957esac
7958fi
7959FILE=$ac_cv_path_FILE
7960if test -n "$FILE"; then
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7962$as_echo "$FILE" >&6; }
7963else
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7965$as_echo "no" >&6; }
7966fi
7967
7968
7969  test -n "$FILE" && break
7970done
7971
7972    else
7973      # If it succeeded, then it was overridden by the user. We will use it
7974      # for the tool.
7975
7976      # First remove it from the list of overridden variables, so we can test
7977      # for unknown variables in the end.
7978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7979
7980      # Check if we try to supply an empty value
7981      if test "x$FILE" = x; then
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7983$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7985$as_echo_n "checking for FILE... " >&6; }
7986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7987$as_echo "disabled" >&6; }
7988      else
7989        # Check if the provided tool contains a complete path.
7990        tool_specified="$FILE"
7991        tool_basename="${tool_specified##*/}"
7992        if test "x$tool_basename" = "x$tool_specified"; then
7993          # A command without a complete path is provided, search $PATH.
7994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7995$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7996          # Extract the first word of "$tool_basename", so it can be a program name with args.
7997set dummy $tool_basename; ac_word=$2
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999$as_echo_n "checking for $ac_word... " >&6; }
8000if ${ac_cv_path_FILE+:} false; then :
8001  $as_echo_n "(cached) " >&6
8002else
8003  case $FILE in
8004  [\\/]* | ?:[\\/]*)
8005  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8006  ;;
8007  *)
8008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8009for as_dir in $PATH
8010do
8011  IFS=$as_save_IFS
8012  test -z "$as_dir" && as_dir=.
8013    for ac_exec_ext in '' $ac_executable_extensions; do
8014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8015    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8017    break 2
8018  fi
8019done
8020  done
8021IFS=$as_save_IFS
8022
8023  ;;
8024esac
8025fi
8026FILE=$ac_cv_path_FILE
8027if test -n "$FILE"; then
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8029$as_echo "$FILE" >&6; }
8030else
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
8033fi
8034
8035
8036          if test "x$FILE" = x; then
8037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8038          fi
8039        else
8040          # Otherwise we believe it is a complete path. Use it as it is.
8041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8042$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8044$as_echo_n "checking for FILE... " >&6; }
8045          if test ! -x "$tool_specified"; then
8046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8047$as_echo "not found" >&6; }
8048            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8049          fi
8050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8051$as_echo "$tool_specified" >&6; }
8052        fi
8053      fi
8054    fi
8055
8056  fi
8057
8058
8059
8060  if test "x$FILE" = x; then
8061    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8062  fi
8063
8064
8065
8066
8067
8068  # Publish this variable in the help.
8069
8070
8071  if [ -z "${FIND+x}" ]; then
8072    # The variable is not set by user, try to locate tool using the code snippet
8073    for ac_prog in find
8074do
8075  # Extract the first word of "$ac_prog", so it can be a program name with args.
8076set dummy $ac_prog; ac_word=$2
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8078$as_echo_n "checking for $ac_word... " >&6; }
8079if ${ac_cv_path_FIND+:} false; then :
8080  $as_echo_n "(cached) " >&6
8081else
8082  case $FIND in
8083  [\\/]* | ?:[\\/]*)
8084  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8085  ;;
8086  *)
8087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8088for as_dir in $PATH
8089do
8090  IFS=$as_save_IFS
8091  test -z "$as_dir" && as_dir=.
8092    for ac_exec_ext in '' $ac_executable_extensions; do
8093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8094    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8096    break 2
8097  fi
8098done
8099  done
8100IFS=$as_save_IFS
8101
8102  ;;
8103esac
8104fi
8105FIND=$ac_cv_path_FIND
8106if test -n "$FIND"; then
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8108$as_echo "$FIND" >&6; }
8109else
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8111$as_echo "no" >&6; }
8112fi
8113
8114
8115  test -n "$FIND" && break
8116done
8117
8118  else
8119    # The variable is set, but is it from the command line or the environment?
8120
8121    # Try to remove the string !FIND! from our list.
8122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8124      # If it failed, the variable was not from the command line. Ignore it,
8125      # but warn the user (except for BASH, which is always set by the calling BASH).
8126      if test "xFIND" != xBASH; then
8127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8128$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8129      fi
8130      # Try to locate tool using the code snippet
8131      for ac_prog in find
8132do
8133  # Extract the first word of "$ac_prog", so it can be a program name with args.
8134set dummy $ac_prog; ac_word=$2
8135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8136$as_echo_n "checking for $ac_word... " >&6; }
8137if ${ac_cv_path_FIND+:} false; then :
8138  $as_echo_n "(cached) " >&6
8139else
8140  case $FIND in
8141  [\\/]* | ?:[\\/]*)
8142  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8143  ;;
8144  *)
8145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8146for as_dir in $PATH
8147do
8148  IFS=$as_save_IFS
8149  test -z "$as_dir" && as_dir=.
8150    for ac_exec_ext in '' $ac_executable_extensions; do
8151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8152    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8154    break 2
8155  fi
8156done
8157  done
8158IFS=$as_save_IFS
8159
8160  ;;
8161esac
8162fi
8163FIND=$ac_cv_path_FIND
8164if test -n "$FIND"; then
8165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8166$as_echo "$FIND" >&6; }
8167else
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169$as_echo "no" >&6; }
8170fi
8171
8172
8173  test -n "$FIND" && break
8174done
8175
8176    else
8177      # If it succeeded, then it was overridden by the user. We will use it
8178      # for the tool.
8179
8180      # First remove it from the list of overridden variables, so we can test
8181      # for unknown variables in the end.
8182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8183
8184      # Check if we try to supply an empty value
8185      if test "x$FIND" = x; then
8186        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8187$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8189$as_echo_n "checking for FIND... " >&6; }
8190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8191$as_echo "disabled" >&6; }
8192      else
8193        # Check if the provided tool contains a complete path.
8194        tool_specified="$FIND"
8195        tool_basename="${tool_specified##*/}"
8196        if test "x$tool_basename" = "x$tool_specified"; then
8197          # A command without a complete path is provided, search $PATH.
8198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8199$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8200          # Extract the first word of "$tool_basename", so it can be a program name with args.
8201set dummy $tool_basename; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
8204if ${ac_cv_path_FIND+:} false; then :
8205  $as_echo_n "(cached) " >&6
8206else
8207  case $FIND in
8208  [\\/]* | ?:[\\/]*)
8209  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8210  ;;
8211  *)
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  test -z "$as_dir" && as_dir=.
8217    for ac_exec_ext in '' $ac_executable_extensions; do
8218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221    break 2
8222  fi
8223done
8224  done
8225IFS=$as_save_IFS
8226
8227  ;;
8228esac
8229fi
8230FIND=$ac_cv_path_FIND
8231if test -n "$FIND"; then
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8233$as_echo "$FIND" >&6; }
8234else
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
8237fi
8238
8239
8240          if test "x$FIND" = x; then
8241            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8242          fi
8243        else
8244          # Otherwise we believe it is a complete path. Use it as it is.
8245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8246$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8247          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8248$as_echo_n "checking for FIND... " >&6; }
8249          if test ! -x "$tool_specified"; then
8250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8251$as_echo "not found" >&6; }
8252            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8253          fi
8254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8255$as_echo "$tool_specified" >&6; }
8256        fi
8257      fi
8258    fi
8259
8260  fi
8261
8262
8263
8264  if test "x$FIND" = x; then
8265    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8266  fi
8267
8268
8269
8270
8271
8272  # Publish this variable in the help.
8273
8274
8275  if [ -z "${HEAD+x}" ]; then
8276    # The variable is not set by user, try to locate tool using the code snippet
8277    for ac_prog in head
8278do
8279  # Extract the first word of "$ac_prog", so it can be a program name with args.
8280set dummy $ac_prog; ac_word=$2
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8282$as_echo_n "checking for $ac_word... " >&6; }
8283if ${ac_cv_path_HEAD+:} false; then :
8284  $as_echo_n "(cached) " >&6
8285else
8286  case $HEAD in
8287  [\\/]* | ?:[\\/]*)
8288  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8289  ;;
8290  *)
8291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8292for as_dir in $PATH
8293do
8294  IFS=$as_save_IFS
8295  test -z "$as_dir" && as_dir=.
8296    for ac_exec_ext in '' $ac_executable_extensions; do
8297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8298    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8300    break 2
8301  fi
8302done
8303  done
8304IFS=$as_save_IFS
8305
8306  ;;
8307esac
8308fi
8309HEAD=$ac_cv_path_HEAD
8310if test -n "$HEAD"; then
8311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8312$as_echo "$HEAD" >&6; }
8313else
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8315$as_echo "no" >&6; }
8316fi
8317
8318
8319  test -n "$HEAD" && break
8320done
8321
8322  else
8323    # The variable is set, but is it from the command line or the environment?
8324
8325    # Try to remove the string !HEAD! from our list.
8326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8328      # If it failed, the variable was not from the command line. Ignore it,
8329      # but warn the user (except for BASH, which is always set by the calling BASH).
8330      if test "xHEAD" != xBASH; then
8331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8332$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8333      fi
8334      # Try to locate tool using the code snippet
8335      for ac_prog in head
8336do
8337  # Extract the first word of "$ac_prog", so it can be a program name with args.
8338set dummy $ac_prog; ac_word=$2
8339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8340$as_echo_n "checking for $ac_word... " >&6; }
8341if ${ac_cv_path_HEAD+:} false; then :
8342  $as_echo_n "(cached) " >&6
8343else
8344  case $HEAD in
8345  [\\/]* | ?:[\\/]*)
8346  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8347  ;;
8348  *)
8349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8350for as_dir in $PATH
8351do
8352  IFS=$as_save_IFS
8353  test -z "$as_dir" && as_dir=.
8354    for ac_exec_ext in '' $ac_executable_extensions; do
8355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8356    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8358    break 2
8359  fi
8360done
8361  done
8362IFS=$as_save_IFS
8363
8364  ;;
8365esac
8366fi
8367HEAD=$ac_cv_path_HEAD
8368if test -n "$HEAD"; then
8369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8370$as_echo "$HEAD" >&6; }
8371else
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8373$as_echo "no" >&6; }
8374fi
8375
8376
8377  test -n "$HEAD" && break
8378done
8379
8380    else
8381      # If it succeeded, then it was overridden by the user. We will use it
8382      # for the tool.
8383
8384      # First remove it from the list of overridden variables, so we can test
8385      # for unknown variables in the end.
8386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8387
8388      # Check if we try to supply an empty value
8389      if test "x$HEAD" = x; then
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8391$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8393$as_echo_n "checking for HEAD... " >&6; }
8394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8395$as_echo "disabled" >&6; }
8396      else
8397        # Check if the provided tool contains a complete path.
8398        tool_specified="$HEAD"
8399        tool_basename="${tool_specified##*/}"
8400        if test "x$tool_basename" = "x$tool_specified"; then
8401          # A command without a complete path is provided, search $PATH.
8402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8403$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8404          # Extract the first word of "$tool_basename", so it can be a program name with args.
8405set dummy $tool_basename; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_HEAD+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $HEAD in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434HEAD=$ac_cv_path_HEAD
8435if test -n "$HEAD"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8437$as_echo "$HEAD" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444          if test "x$HEAD" = x; then
8445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8446          fi
8447        else
8448          # Otherwise we believe it is a complete path. Use it as it is.
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8450$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8452$as_echo_n "checking for HEAD... " >&6; }
8453          if test ! -x "$tool_specified"; then
8454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8455$as_echo "not found" >&6; }
8456            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8457          fi
8458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8459$as_echo "$tool_specified" >&6; }
8460        fi
8461      fi
8462    fi
8463
8464  fi
8465
8466
8467
8468  if test "x$HEAD" = x; then
8469    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8470  fi
8471
8472
8473
8474
8475
8476  # Publish this variable in the help.
8477
8478
8479  if [ -z "${GUNZIP+x}" ]; then
8480    # The variable is not set by user, try to locate tool using the code snippet
8481    for ac_prog in gunzip
8482do
8483  # Extract the first word of "$ac_prog", so it can be a program name with args.
8484set dummy $ac_prog; ac_word=$2
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
8487if ${ac_cv_path_GUNZIP+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  case $GUNZIP in
8491  [\\/]* | ?:[\\/]*)
8492  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8493  ;;
8494  *)
8495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498  IFS=$as_save_IFS
8499  test -z "$as_dir" && as_dir=.
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510  ;;
8511esac
8512fi
8513GUNZIP=$ac_cv_path_GUNZIP
8514if test -n "$GUNZIP"; then
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8516$as_echo "$GUNZIP" >&6; }
8517else
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
8520fi
8521
8522
8523  test -n "$GUNZIP" && break
8524done
8525
8526  else
8527    # The variable is set, but is it from the command line or the environment?
8528
8529    # Try to remove the string !GUNZIP! from our list.
8530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8532      # If it failed, the variable was not from the command line. Ignore it,
8533      # but warn the user (except for BASH, which is always set by the calling BASH).
8534      if test "xGUNZIP" != xBASH; then
8535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8536$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8537      fi
8538      # Try to locate tool using the code snippet
8539      for ac_prog in gunzip
8540do
8541  # Extract the first word of "$ac_prog", so it can be a program name with args.
8542set dummy $ac_prog; ac_word=$2
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544$as_echo_n "checking for $ac_word... " >&6; }
8545if ${ac_cv_path_GUNZIP+:} false; then :
8546  $as_echo_n "(cached) " >&6
8547else
8548  case $GUNZIP in
8549  [\\/]* | ?:[\\/]*)
8550  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8551  ;;
8552  *)
8553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8554for as_dir in $PATH
8555do
8556  IFS=$as_save_IFS
8557  test -z "$as_dir" && as_dir=.
8558    for ac_exec_ext in '' $ac_executable_extensions; do
8559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8560    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8562    break 2
8563  fi
8564done
8565  done
8566IFS=$as_save_IFS
8567
8568  ;;
8569esac
8570fi
8571GUNZIP=$ac_cv_path_GUNZIP
8572if test -n "$GUNZIP"; then
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8574$as_echo "$GUNZIP" >&6; }
8575else
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578fi
8579
8580
8581  test -n "$GUNZIP" && break
8582done
8583
8584    else
8585      # If it succeeded, then it was overridden by the user. We will use it
8586      # for the tool.
8587
8588      # First remove it from the list of overridden variables, so we can test
8589      # for unknown variables in the end.
8590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8591
8592      # Check if we try to supply an empty value
8593      if test "x$GUNZIP" = x; then
8594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8595$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8597$as_echo_n "checking for GUNZIP... " >&6; }
8598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8599$as_echo "disabled" >&6; }
8600      else
8601        # Check if the provided tool contains a complete path.
8602        tool_specified="$GUNZIP"
8603        tool_basename="${tool_specified##*/}"
8604        if test "x$tool_basename" = "x$tool_specified"; then
8605          # A command without a complete path is provided, search $PATH.
8606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8607$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8608          # Extract the first word of "$tool_basename", so it can be a program name with args.
8609set dummy $tool_basename; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_GUNZIP+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $GUNZIP in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638GUNZIP=$ac_cv_path_GUNZIP
8639if test -n "$GUNZIP"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8641$as_echo "$GUNZIP" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648          if test "x$GUNZIP" = x; then
8649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8650          fi
8651        else
8652          # Otherwise we believe it is a complete path. Use it as it is.
8653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8654$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8656$as_echo_n "checking for GUNZIP... " >&6; }
8657          if test ! -x "$tool_specified"; then
8658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8659$as_echo "not found" >&6; }
8660            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8661          fi
8662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8663$as_echo "$tool_specified" >&6; }
8664        fi
8665      fi
8666    fi
8667
8668  fi
8669
8670
8671
8672  if test "x$GUNZIP" = x; then
8673    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8674  fi
8675
8676
8677
8678
8679
8680  # Publish this variable in the help.
8681
8682
8683  if [ -z "${GZIP+x}" ]; then
8684    # The variable is not set by user, try to locate tool using the code snippet
8685    for ac_prog in pigz gzip
8686do
8687  # Extract the first word of "$ac_prog", so it can be a program name with args.
8688set dummy $ac_prog; ac_word=$2
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8690$as_echo_n "checking for $ac_word... " >&6; }
8691if ${ac_cv_path_GZIP+:} false; then :
8692  $as_echo_n "(cached) " >&6
8693else
8694  case $GZIP in
8695  [\\/]* | ?:[\\/]*)
8696  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8697  ;;
8698  *)
8699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8700for as_dir in $PATH
8701do
8702  IFS=$as_save_IFS
8703  test -z "$as_dir" && as_dir=.
8704    for ac_exec_ext in '' $ac_executable_extensions; do
8705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8706    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8708    break 2
8709  fi
8710done
8711  done
8712IFS=$as_save_IFS
8713
8714  ;;
8715esac
8716fi
8717GZIP=$ac_cv_path_GZIP
8718if test -n "$GZIP"; then
8719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8720$as_echo "$GZIP" >&6; }
8721else
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723$as_echo "no" >&6; }
8724fi
8725
8726
8727  test -n "$GZIP" && break
8728done
8729
8730  else
8731    # The variable is set, but is it from the command line or the environment?
8732
8733    # Try to remove the string !GZIP! from our list.
8734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8736      # If it failed, the variable was not from the command line. Ignore it,
8737      # but warn the user (except for BASH, which is always set by the calling BASH).
8738      if test "xGZIP" != xBASH; then
8739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8740$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8741      fi
8742      # Try to locate tool using the code snippet
8743      for ac_prog in pigz gzip
8744do
8745  # Extract the first word of "$ac_prog", so it can be a program name with args.
8746set dummy $ac_prog; ac_word=$2
8747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8748$as_echo_n "checking for $ac_word... " >&6; }
8749if ${ac_cv_path_GZIP+:} false; then :
8750  $as_echo_n "(cached) " >&6
8751else
8752  case $GZIP in
8753  [\\/]* | ?:[\\/]*)
8754  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8755  ;;
8756  *)
8757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8758for as_dir in $PATH
8759do
8760  IFS=$as_save_IFS
8761  test -z "$as_dir" && as_dir=.
8762    for ac_exec_ext in '' $ac_executable_extensions; do
8763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8764    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8766    break 2
8767  fi
8768done
8769  done
8770IFS=$as_save_IFS
8771
8772  ;;
8773esac
8774fi
8775GZIP=$ac_cv_path_GZIP
8776if test -n "$GZIP"; then
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8778$as_echo "$GZIP" >&6; }
8779else
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781$as_echo "no" >&6; }
8782fi
8783
8784
8785  test -n "$GZIP" && break
8786done
8787
8788    else
8789      # If it succeeded, then it was overridden by the user. We will use it
8790      # for the tool.
8791
8792      # First remove it from the list of overridden variables, so we can test
8793      # for unknown variables in the end.
8794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8795
8796      # Check if we try to supply an empty value
8797      if test "x$GZIP" = x; then
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8799$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8801$as_echo_n "checking for GZIP... " >&6; }
8802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8803$as_echo "disabled" >&6; }
8804      else
8805        # Check if the provided tool contains a complete path.
8806        tool_specified="$GZIP"
8807        tool_basename="${tool_specified##*/}"
8808        if test "x$tool_basename" = "x$tool_specified"; then
8809          # A command without a complete path is provided, search $PATH.
8810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8811$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8812          # Extract the first word of "$tool_basename", so it can be a program name with args.
8813set dummy $tool_basename; ac_word=$2
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815$as_echo_n "checking for $ac_word... " >&6; }
8816if ${ac_cv_path_GZIP+:} false; then :
8817  $as_echo_n "(cached) " >&6
8818else
8819  case $GZIP in
8820  [\\/]* | ?:[\\/]*)
8821  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8822  ;;
8823  *)
8824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827  IFS=$as_save_IFS
8828  test -z "$as_dir" && as_dir=.
8829    for ac_exec_ext in '' $ac_executable_extensions; do
8830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8831    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833    break 2
8834  fi
8835done
8836  done
8837IFS=$as_save_IFS
8838
8839  ;;
8840esac
8841fi
8842GZIP=$ac_cv_path_GZIP
8843if test -n "$GZIP"; then
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8845$as_echo "$GZIP" >&6; }
8846else
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
8849fi
8850
8851
8852          if test "x$GZIP" = x; then
8853            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8854          fi
8855        else
8856          # Otherwise we believe it is a complete path. Use it as it is.
8857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8858$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8860$as_echo_n "checking for GZIP... " >&6; }
8861          if test ! -x "$tool_specified"; then
8862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8863$as_echo "not found" >&6; }
8864            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8865          fi
8866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8867$as_echo "$tool_specified" >&6; }
8868        fi
8869      fi
8870    fi
8871
8872  fi
8873
8874
8875
8876  if test "x$GZIP" = x; then
8877    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8878  fi
8879
8880
8881
8882
8883
8884  # Publish this variable in the help.
8885
8886
8887  if [ -z "${LN+x}" ]; then
8888    # The variable is not set by user, try to locate tool using the code snippet
8889    for ac_prog in ln
8890do
8891  # Extract the first word of "$ac_prog", so it can be a program name with args.
8892set dummy $ac_prog; ac_word=$2
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894$as_echo_n "checking for $ac_word... " >&6; }
8895if ${ac_cv_path_LN+:} false; then :
8896  $as_echo_n "(cached) " >&6
8897else
8898  case $LN in
8899  [\\/]* | ?:[\\/]*)
8900  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8901  ;;
8902  *)
8903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906  IFS=$as_save_IFS
8907  test -z "$as_dir" && as_dir=.
8908    for ac_exec_ext in '' $ac_executable_extensions; do
8909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8910    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8912    break 2
8913  fi
8914done
8915  done
8916IFS=$as_save_IFS
8917
8918  ;;
8919esac
8920fi
8921LN=$ac_cv_path_LN
8922if test -n "$LN"; then
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8924$as_echo "$LN" >&6; }
8925else
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8927$as_echo "no" >&6; }
8928fi
8929
8930
8931  test -n "$LN" && break
8932done
8933
8934  else
8935    # The variable is set, but is it from the command line or the environment?
8936
8937    # Try to remove the string !LN! from our list.
8938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8940      # If it failed, the variable was not from the command line. Ignore it,
8941      # but warn the user (except for BASH, which is always set by the calling BASH).
8942      if test "xLN" != xBASH; then
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8944$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8945      fi
8946      # Try to locate tool using the code snippet
8947      for ac_prog in ln
8948do
8949  # Extract the first word of "$ac_prog", so it can be a program name with args.
8950set dummy $ac_prog; ac_word=$2
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952$as_echo_n "checking for $ac_word... " >&6; }
8953if ${ac_cv_path_LN+:} false; then :
8954  $as_echo_n "(cached) " >&6
8955else
8956  case $LN in
8957  [\\/]* | ?:[\\/]*)
8958  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8959  ;;
8960  *)
8961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  test -z "$as_dir" && as_dir=.
8966    for ac_exec_ext in '' $ac_executable_extensions; do
8967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970    break 2
8971  fi
8972done
8973  done
8974IFS=$as_save_IFS
8975
8976  ;;
8977esac
8978fi
8979LN=$ac_cv_path_LN
8980if test -n "$LN"; then
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8982$as_echo "$LN" >&6; }
8983else
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
8987
8988
8989  test -n "$LN" && break
8990done
8991
8992    else
8993      # If it succeeded, then it was overridden by the user. We will use it
8994      # for the tool.
8995
8996      # First remove it from the list of overridden variables, so we can test
8997      # for unknown variables in the end.
8998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8999
9000      # Check if we try to supply an empty value
9001      if test "x$LN" = x; then
9002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9003$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9005$as_echo_n "checking for LN... " >&6; }
9006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9007$as_echo "disabled" >&6; }
9008      else
9009        # Check if the provided tool contains a complete path.
9010        tool_specified="$LN"
9011        tool_basename="${tool_specified##*/}"
9012        if test "x$tool_basename" = "x$tool_specified"; then
9013          # A command without a complete path is provided, search $PATH.
9014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9015$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9016          # Extract the first word of "$tool_basename", so it can be a program name with args.
9017set dummy $tool_basename; ac_word=$2
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9019$as_echo_n "checking for $ac_word... " >&6; }
9020if ${ac_cv_path_LN+:} false; then :
9021  $as_echo_n "(cached) " >&6
9022else
9023  case $LN in
9024  [\\/]* | ?:[\\/]*)
9025  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9026  ;;
9027  *)
9028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029for as_dir in $PATH
9030do
9031  IFS=$as_save_IFS
9032  test -z "$as_dir" && as_dir=.
9033    for ac_exec_ext in '' $ac_executable_extensions; do
9034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037    break 2
9038  fi
9039done
9040  done
9041IFS=$as_save_IFS
9042
9043  ;;
9044esac
9045fi
9046LN=$ac_cv_path_LN
9047if test -n "$LN"; then
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9049$as_echo "$LN" >&6; }
9050else
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052$as_echo "no" >&6; }
9053fi
9054
9055
9056          if test "x$LN" = x; then
9057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9058          fi
9059        else
9060          # Otherwise we believe it is a complete path. Use it as it is.
9061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9062$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9064$as_echo_n "checking for LN... " >&6; }
9065          if test ! -x "$tool_specified"; then
9066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9067$as_echo "not found" >&6; }
9068            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9069          fi
9070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9071$as_echo "$tool_specified" >&6; }
9072        fi
9073      fi
9074    fi
9075
9076  fi
9077
9078
9079
9080  if test "x$LN" = x; then
9081    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9082  fi
9083
9084
9085
9086
9087
9088  # Publish this variable in the help.
9089
9090
9091  if [ -z "${LS+x}" ]; then
9092    # The variable is not set by user, try to locate tool using the code snippet
9093    for ac_prog in ls
9094do
9095  # Extract the first word of "$ac_prog", so it can be a program name with args.
9096set dummy $ac_prog; ac_word=$2
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9098$as_echo_n "checking for $ac_word... " >&6; }
9099if ${ac_cv_path_LS+:} false; then :
9100  $as_echo_n "(cached) " >&6
9101else
9102  case $LS in
9103  [\\/]* | ?:[\\/]*)
9104  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9105  ;;
9106  *)
9107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9108for as_dir in $PATH
9109do
9110  IFS=$as_save_IFS
9111  test -z "$as_dir" && as_dir=.
9112    for ac_exec_ext in '' $ac_executable_extensions; do
9113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9114    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9116    break 2
9117  fi
9118done
9119  done
9120IFS=$as_save_IFS
9121
9122  ;;
9123esac
9124fi
9125LS=$ac_cv_path_LS
9126if test -n "$LS"; then
9127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9128$as_echo "$LS" >&6; }
9129else
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
9132fi
9133
9134
9135  test -n "$LS" && break
9136done
9137
9138  else
9139    # The variable is set, but is it from the command line or the environment?
9140
9141    # Try to remove the string !LS! from our list.
9142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9144      # If it failed, the variable was not from the command line. Ignore it,
9145      # but warn the user (except for BASH, which is always set by the calling BASH).
9146      if test "xLS" != xBASH; then
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9148$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9149      fi
9150      # Try to locate tool using the code snippet
9151      for ac_prog in ls
9152do
9153  # Extract the first word of "$ac_prog", so it can be a program name with args.
9154set dummy $ac_prog; ac_word=$2
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9156$as_echo_n "checking for $ac_word... " >&6; }
9157if ${ac_cv_path_LS+:} false; then :
9158  $as_echo_n "(cached) " >&6
9159else
9160  case $LS in
9161  [\\/]* | ?:[\\/]*)
9162  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9163  ;;
9164  *)
9165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9166for as_dir in $PATH
9167do
9168  IFS=$as_save_IFS
9169  test -z "$as_dir" && as_dir=.
9170    for ac_exec_ext in '' $ac_executable_extensions; do
9171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9172    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9174    break 2
9175  fi
9176done
9177  done
9178IFS=$as_save_IFS
9179
9180  ;;
9181esac
9182fi
9183LS=$ac_cv_path_LS
9184if test -n "$LS"; then
9185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9186$as_echo "$LS" >&6; }
9187else
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9189$as_echo "no" >&6; }
9190fi
9191
9192
9193  test -n "$LS" && break
9194done
9195
9196    else
9197      # If it succeeded, then it was overridden by the user. We will use it
9198      # for the tool.
9199
9200      # First remove it from the list of overridden variables, so we can test
9201      # for unknown variables in the end.
9202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9203
9204      # Check if we try to supply an empty value
9205      if test "x$LS" = x; then
9206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9207$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9209$as_echo_n "checking for LS... " >&6; }
9210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9211$as_echo "disabled" >&6; }
9212      else
9213        # Check if the provided tool contains a complete path.
9214        tool_specified="$LS"
9215        tool_basename="${tool_specified##*/}"
9216        if test "x$tool_basename" = "x$tool_specified"; then
9217          # A command without a complete path is provided, search $PATH.
9218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9219$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9220          # Extract the first word of "$tool_basename", so it can be a program name with args.
9221set dummy $tool_basename; ac_word=$2
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9223$as_echo_n "checking for $ac_word... " >&6; }
9224if ${ac_cv_path_LS+:} false; then :
9225  $as_echo_n "(cached) " >&6
9226else
9227  case $LS in
9228  [\\/]* | ?:[\\/]*)
9229  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9230  ;;
9231  *)
9232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9233for as_dir in $PATH
9234do
9235  IFS=$as_save_IFS
9236  test -z "$as_dir" && as_dir=.
9237    for ac_exec_ext in '' $ac_executable_extensions; do
9238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9239    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9241    break 2
9242  fi
9243done
9244  done
9245IFS=$as_save_IFS
9246
9247  ;;
9248esac
9249fi
9250LS=$ac_cv_path_LS
9251if test -n "$LS"; then
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9253$as_echo "$LS" >&6; }
9254else
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256$as_echo "no" >&6; }
9257fi
9258
9259
9260          if test "x$LS" = x; then
9261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9262          fi
9263        else
9264          # Otherwise we believe it is a complete path. Use it as it is.
9265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9266$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9268$as_echo_n "checking for LS... " >&6; }
9269          if test ! -x "$tool_specified"; then
9270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9271$as_echo "not found" >&6; }
9272            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9273          fi
9274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9275$as_echo "$tool_specified" >&6; }
9276        fi
9277      fi
9278    fi
9279
9280  fi
9281
9282
9283
9284  if test "x$LS" = x; then
9285    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9286  fi
9287
9288
9289
9290
9291
9292  # Publish this variable in the help.
9293
9294
9295  if [ -z "${MKDIR+x}" ]; then
9296    # The variable is not set by user, try to locate tool using the code snippet
9297    for ac_prog in mkdir
9298do
9299  # Extract the first word of "$ac_prog", so it can be a program name with args.
9300set dummy $ac_prog; ac_word=$2
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9302$as_echo_n "checking for $ac_word... " >&6; }
9303if ${ac_cv_path_MKDIR+:} false; then :
9304  $as_echo_n "(cached) " >&6
9305else
9306  case $MKDIR in
9307  [\\/]* | ?:[\\/]*)
9308  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9309  ;;
9310  *)
9311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312for as_dir in $PATH
9313do
9314  IFS=$as_save_IFS
9315  test -z "$as_dir" && as_dir=.
9316    for ac_exec_ext in '' $ac_executable_extensions; do
9317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9318    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9320    break 2
9321  fi
9322done
9323  done
9324IFS=$as_save_IFS
9325
9326  ;;
9327esac
9328fi
9329MKDIR=$ac_cv_path_MKDIR
9330if test -n "$MKDIR"; then
9331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9332$as_echo "$MKDIR" >&6; }
9333else
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
9336fi
9337
9338
9339  test -n "$MKDIR" && break
9340done
9341
9342  else
9343    # The variable is set, but is it from the command line or the environment?
9344
9345    # Try to remove the string !MKDIR! from our list.
9346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9348      # If it failed, the variable was not from the command line. Ignore it,
9349      # but warn the user (except for BASH, which is always set by the calling BASH).
9350      if test "xMKDIR" != xBASH; then
9351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9352$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9353      fi
9354      # Try to locate tool using the code snippet
9355      for ac_prog in mkdir
9356do
9357  # Extract the first word of "$ac_prog", so it can be a program name with args.
9358set dummy $ac_prog; ac_word=$2
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360$as_echo_n "checking for $ac_word... " >&6; }
9361if ${ac_cv_path_MKDIR+:} false; then :
9362  $as_echo_n "(cached) " >&6
9363else
9364  case $MKDIR in
9365  [\\/]* | ?:[\\/]*)
9366  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9367  ;;
9368  *)
9369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9370for as_dir in $PATH
9371do
9372  IFS=$as_save_IFS
9373  test -z "$as_dir" && as_dir=.
9374    for ac_exec_ext in '' $ac_executable_extensions; do
9375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9376    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9378    break 2
9379  fi
9380done
9381  done
9382IFS=$as_save_IFS
9383
9384  ;;
9385esac
9386fi
9387MKDIR=$ac_cv_path_MKDIR
9388if test -n "$MKDIR"; then
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9390$as_echo "$MKDIR" >&6; }
9391else
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
9394fi
9395
9396
9397  test -n "$MKDIR" && break
9398done
9399
9400    else
9401      # If it succeeded, then it was overridden by the user. We will use it
9402      # for the tool.
9403
9404      # First remove it from the list of overridden variables, so we can test
9405      # for unknown variables in the end.
9406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9407
9408      # Check if we try to supply an empty value
9409      if test "x$MKDIR" = x; then
9410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9411$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9413$as_echo_n "checking for MKDIR... " >&6; }
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9415$as_echo "disabled" >&6; }
9416      else
9417        # Check if the provided tool contains a complete path.
9418        tool_specified="$MKDIR"
9419        tool_basename="${tool_specified##*/}"
9420        if test "x$tool_basename" = "x$tool_specified"; then
9421          # A command without a complete path is provided, search $PATH.
9422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9423$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9424          # Extract the first word of "$tool_basename", so it can be a program name with args.
9425set dummy $tool_basename; ac_word=$2
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427$as_echo_n "checking for $ac_word... " >&6; }
9428if ${ac_cv_path_MKDIR+:} false; then :
9429  $as_echo_n "(cached) " >&6
9430else
9431  case $MKDIR in
9432  [\\/]* | ?:[\\/]*)
9433  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9434  ;;
9435  *)
9436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437for as_dir in $PATH
9438do
9439  IFS=$as_save_IFS
9440  test -z "$as_dir" && as_dir=.
9441    for ac_exec_ext in '' $ac_executable_extensions; do
9442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9443    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445    break 2
9446  fi
9447done
9448  done
9449IFS=$as_save_IFS
9450
9451  ;;
9452esac
9453fi
9454MKDIR=$ac_cv_path_MKDIR
9455if test -n "$MKDIR"; then
9456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9457$as_echo "$MKDIR" >&6; }
9458else
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
9461fi
9462
9463
9464          if test "x$MKDIR" = x; then
9465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9466          fi
9467        else
9468          # Otherwise we believe it is a complete path. Use it as it is.
9469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9470$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9472$as_echo_n "checking for MKDIR... " >&6; }
9473          if test ! -x "$tool_specified"; then
9474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9475$as_echo "not found" >&6; }
9476            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9477          fi
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9479$as_echo "$tool_specified" >&6; }
9480        fi
9481      fi
9482    fi
9483
9484  fi
9485
9486
9487
9488  if test "x$MKDIR" = x; then
9489    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9490  fi
9491
9492
9493
9494
9495
9496  # Publish this variable in the help.
9497
9498
9499  if [ -z "${MKTEMP+x}" ]; then
9500    # The variable is not set by user, try to locate tool using the code snippet
9501    for ac_prog in mktemp
9502do
9503  # Extract the first word of "$ac_prog", so it can be a program name with args.
9504set dummy $ac_prog; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_MKTEMP+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $MKTEMP in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533MKTEMP=$ac_cv_path_MKTEMP
9534if test -n "$MKTEMP"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9536$as_echo "$MKTEMP" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543  test -n "$MKTEMP" && break
9544done
9545
9546  else
9547    # The variable is set, but is it from the command line or the environment?
9548
9549    # Try to remove the string !MKTEMP! from our list.
9550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9552      # If it failed, the variable was not from the command line. Ignore it,
9553      # but warn the user (except for BASH, which is always set by the calling BASH).
9554      if test "xMKTEMP" != xBASH; then
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9556$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9557      fi
9558      # Try to locate tool using the code snippet
9559      for ac_prog in mktemp
9560do
9561  # Extract the first word of "$ac_prog", so it can be a program name with args.
9562set dummy $ac_prog; ac_word=$2
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564$as_echo_n "checking for $ac_word... " >&6; }
9565if ${ac_cv_path_MKTEMP+:} false; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  case $MKTEMP in
9569  [\\/]* | ?:[\\/]*)
9570  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9571  ;;
9572  *)
9573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574for as_dir in $PATH
9575do
9576  IFS=$as_save_IFS
9577  test -z "$as_dir" && as_dir=.
9578    for ac_exec_ext in '' $ac_executable_extensions; do
9579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582    break 2
9583  fi
9584done
9585  done
9586IFS=$as_save_IFS
9587
9588  ;;
9589esac
9590fi
9591MKTEMP=$ac_cv_path_MKTEMP
9592if test -n "$MKTEMP"; then
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9594$as_echo "$MKTEMP" >&6; }
9595else
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
9598fi
9599
9600
9601  test -n "$MKTEMP" && break
9602done
9603
9604    else
9605      # If it succeeded, then it was overridden by the user. We will use it
9606      # for the tool.
9607
9608      # First remove it from the list of overridden variables, so we can test
9609      # for unknown variables in the end.
9610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9611
9612      # Check if we try to supply an empty value
9613      if test "x$MKTEMP" = x; then
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9615$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9617$as_echo_n "checking for MKTEMP... " >&6; }
9618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9619$as_echo "disabled" >&6; }
9620      else
9621        # Check if the provided tool contains a complete path.
9622        tool_specified="$MKTEMP"
9623        tool_basename="${tool_specified##*/}"
9624        if test "x$tool_basename" = "x$tool_specified"; then
9625          # A command without a complete path is provided, search $PATH.
9626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9627$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9628          # Extract the first word of "$tool_basename", so it can be a program name with args.
9629set dummy $tool_basename; ac_word=$2
9630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631$as_echo_n "checking for $ac_word... " >&6; }
9632if ${ac_cv_path_MKTEMP+:} false; then :
9633  $as_echo_n "(cached) " >&6
9634else
9635  case $MKTEMP in
9636  [\\/]* | ?:[\\/]*)
9637  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9638  ;;
9639  *)
9640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641for as_dir in $PATH
9642do
9643  IFS=$as_save_IFS
9644  test -z "$as_dir" && as_dir=.
9645    for ac_exec_ext in '' $ac_executable_extensions; do
9646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9647    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9649    break 2
9650  fi
9651done
9652  done
9653IFS=$as_save_IFS
9654
9655  ;;
9656esac
9657fi
9658MKTEMP=$ac_cv_path_MKTEMP
9659if test -n "$MKTEMP"; then
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9661$as_echo "$MKTEMP" >&6; }
9662else
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
9665fi
9666
9667
9668          if test "x$MKTEMP" = x; then
9669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9670          fi
9671        else
9672          # Otherwise we believe it is a complete path. Use it as it is.
9673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9674$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9676$as_echo_n "checking for MKTEMP... " >&6; }
9677          if test ! -x "$tool_specified"; then
9678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9679$as_echo "not found" >&6; }
9680            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9681          fi
9682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9683$as_echo "$tool_specified" >&6; }
9684        fi
9685      fi
9686    fi
9687
9688  fi
9689
9690
9691
9692  if test "x$MKTEMP" = x; then
9693    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9694  fi
9695
9696
9697
9698
9699
9700  # Publish this variable in the help.
9701
9702
9703  if [ -z "${MV+x}" ]; then
9704    # The variable is not set by user, try to locate tool using the code snippet
9705    for ac_prog in mv
9706do
9707  # Extract the first word of "$ac_prog", so it can be a program name with args.
9708set dummy $ac_prog; ac_word=$2
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9710$as_echo_n "checking for $ac_word... " >&6; }
9711if ${ac_cv_path_MV+:} false; then :
9712  $as_echo_n "(cached) " >&6
9713else
9714  case $MV in
9715  [\\/]* | ?:[\\/]*)
9716  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9717  ;;
9718  *)
9719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9720for as_dir in $PATH
9721do
9722  IFS=$as_save_IFS
9723  test -z "$as_dir" && as_dir=.
9724    for ac_exec_ext in '' $ac_executable_extensions; do
9725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9726    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9728    break 2
9729  fi
9730done
9731  done
9732IFS=$as_save_IFS
9733
9734  ;;
9735esac
9736fi
9737MV=$ac_cv_path_MV
9738if test -n "$MV"; then
9739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9740$as_echo "$MV" >&6; }
9741else
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9743$as_echo "no" >&6; }
9744fi
9745
9746
9747  test -n "$MV" && break
9748done
9749
9750  else
9751    # The variable is set, but is it from the command line or the environment?
9752
9753    # Try to remove the string !MV! from our list.
9754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9756      # If it failed, the variable was not from the command line. Ignore it,
9757      # but warn the user (except for BASH, which is always set by the calling BASH).
9758      if test "xMV" != xBASH; then
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9760$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9761      fi
9762      # Try to locate tool using the code snippet
9763      for ac_prog in mv
9764do
9765  # Extract the first word of "$ac_prog", so it can be a program name with args.
9766set dummy $ac_prog; ac_word=$2
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9768$as_echo_n "checking for $ac_word... " >&6; }
9769if ${ac_cv_path_MV+:} false; then :
9770  $as_echo_n "(cached) " >&6
9771else
9772  case $MV in
9773  [\\/]* | ?:[\\/]*)
9774  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9775  ;;
9776  *)
9777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9778for as_dir in $PATH
9779do
9780  IFS=$as_save_IFS
9781  test -z "$as_dir" && as_dir=.
9782    for ac_exec_ext in '' $ac_executable_extensions; do
9783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9784    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9786    break 2
9787  fi
9788done
9789  done
9790IFS=$as_save_IFS
9791
9792  ;;
9793esac
9794fi
9795MV=$ac_cv_path_MV
9796if test -n "$MV"; then
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9798$as_echo "$MV" >&6; }
9799else
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
9802fi
9803
9804
9805  test -n "$MV" && break
9806done
9807
9808    else
9809      # If it succeeded, then it was overridden by the user. We will use it
9810      # for the tool.
9811
9812      # First remove it from the list of overridden variables, so we can test
9813      # for unknown variables in the end.
9814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9815
9816      # Check if we try to supply an empty value
9817      if test "x$MV" = x; then
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9819$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9821$as_echo_n "checking for MV... " >&6; }
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9823$as_echo "disabled" >&6; }
9824      else
9825        # Check if the provided tool contains a complete path.
9826        tool_specified="$MV"
9827        tool_basename="${tool_specified##*/}"
9828        if test "x$tool_basename" = "x$tool_specified"; then
9829          # A command without a complete path is provided, search $PATH.
9830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9831$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9832          # Extract the first word of "$tool_basename", so it can be a program name with args.
9833set dummy $tool_basename; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_MV+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $MV in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862MV=$ac_cv_path_MV
9863if test -n "$MV"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9865$as_echo "$MV" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872          if test "x$MV" = x; then
9873            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9874          fi
9875        else
9876          # Otherwise we believe it is a complete path. Use it as it is.
9877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9878$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9879          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9880$as_echo_n "checking for MV... " >&6; }
9881          if test ! -x "$tool_specified"; then
9882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9883$as_echo "not found" >&6; }
9884            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9885          fi
9886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9887$as_echo "$tool_specified" >&6; }
9888        fi
9889      fi
9890    fi
9891
9892  fi
9893
9894
9895
9896  if test "x$MV" = x; then
9897    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9898  fi
9899
9900
9901
9902
9903
9904  # Publish this variable in the help.
9905
9906
9907  if [ -z "${NAWK+x}" ]; then
9908    # The variable is not set by user, try to locate tool using the code snippet
9909    for ac_prog in nawk gawk awk
9910do
9911  # Extract the first word of "$ac_prog", so it can be a program name with args.
9912set dummy $ac_prog; ac_word=$2
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914$as_echo_n "checking for $ac_word... " >&6; }
9915if ${ac_cv_path_NAWK+:} false; then :
9916  $as_echo_n "(cached) " >&6
9917else
9918  case $NAWK in
9919  [\\/]* | ?:[\\/]*)
9920  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9921  ;;
9922  *)
9923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924for as_dir in $PATH
9925do
9926  IFS=$as_save_IFS
9927  test -z "$as_dir" && as_dir=.
9928    for ac_exec_ext in '' $ac_executable_extensions; do
9929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932    break 2
9933  fi
9934done
9935  done
9936IFS=$as_save_IFS
9937
9938  ;;
9939esac
9940fi
9941NAWK=$ac_cv_path_NAWK
9942if test -n "$NAWK"; then
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9944$as_echo "$NAWK" >&6; }
9945else
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
9948fi
9949
9950
9951  test -n "$NAWK" && break
9952done
9953
9954  else
9955    # The variable is set, but is it from the command line or the environment?
9956
9957    # Try to remove the string !NAWK! from our list.
9958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9960      # If it failed, the variable was not from the command line. Ignore it,
9961      # but warn the user (except for BASH, which is always set by the calling BASH).
9962      if test "xNAWK" != xBASH; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9964$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9965      fi
9966      # Try to locate tool using the code snippet
9967      for ac_prog in nawk gawk awk
9968do
9969  # Extract the first word of "$ac_prog", so it can be a program name with args.
9970set dummy $ac_prog; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if ${ac_cv_path_NAWK+:} false; then :
9974  $as_echo_n "(cached) " >&6
9975else
9976  case $NAWK in
9977  [\\/]* | ?:[\\/]*)
9978  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9979  ;;
9980  *)
9981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982for as_dir in $PATH
9983do
9984  IFS=$as_save_IFS
9985  test -z "$as_dir" && as_dir=.
9986    for ac_exec_ext in '' $ac_executable_extensions; do
9987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990    break 2
9991  fi
9992done
9993  done
9994IFS=$as_save_IFS
9995
9996  ;;
9997esac
9998fi
9999NAWK=$ac_cv_path_NAWK
10000if test -n "$NAWK"; then
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10002$as_echo "$NAWK" >&6; }
10003else
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
10006fi
10007
10008
10009  test -n "$NAWK" && break
10010done
10011
10012    else
10013      # If it succeeded, then it was overridden by the user. We will use it
10014      # for the tool.
10015
10016      # First remove it from the list of overridden variables, so we can test
10017      # for unknown variables in the end.
10018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10019
10020      # Check if we try to supply an empty value
10021      if test "x$NAWK" = x; then
10022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10023$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10025$as_echo_n "checking for NAWK... " >&6; }
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10027$as_echo "disabled" >&6; }
10028      else
10029        # Check if the provided tool contains a complete path.
10030        tool_specified="$NAWK"
10031        tool_basename="${tool_specified##*/}"
10032        if test "x$tool_basename" = "x$tool_specified"; then
10033          # A command without a complete path is provided, search $PATH.
10034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10035$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10036          # Extract the first word of "$tool_basename", so it can be a program name with args.
10037set dummy $tool_basename; ac_word=$2
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039$as_echo_n "checking for $ac_word... " >&6; }
10040if ${ac_cv_path_NAWK+:} false; then :
10041  $as_echo_n "(cached) " >&6
10042else
10043  case $NAWK in
10044  [\\/]* | ?:[\\/]*)
10045  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10046  ;;
10047  *)
10048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049for as_dir in $PATH
10050do
10051  IFS=$as_save_IFS
10052  test -z "$as_dir" && as_dir=.
10053    for ac_exec_ext in '' $ac_executable_extensions; do
10054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057    break 2
10058  fi
10059done
10060  done
10061IFS=$as_save_IFS
10062
10063  ;;
10064esac
10065fi
10066NAWK=$ac_cv_path_NAWK
10067if test -n "$NAWK"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10069$as_echo "$NAWK" >&6; }
10070else
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076          if test "x$NAWK" = x; then
10077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10078          fi
10079        else
10080          # Otherwise we believe it is a complete path. Use it as it is.
10081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10082$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10084$as_echo_n "checking for NAWK... " >&6; }
10085          if test ! -x "$tool_specified"; then
10086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10087$as_echo "not found" >&6; }
10088            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10089          fi
10090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10091$as_echo "$tool_specified" >&6; }
10092        fi
10093      fi
10094    fi
10095
10096  fi
10097
10098
10099
10100  if test "x$NAWK" = x; then
10101    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10102  fi
10103
10104
10105
10106
10107
10108  # Publish this variable in the help.
10109
10110
10111  if [ -z "${PRINTF+x}" ]; then
10112    # The variable is not set by user, try to locate tool using the code snippet
10113    for ac_prog in printf
10114do
10115  # Extract the first word of "$ac_prog", so it can be a program name with args.
10116set dummy $ac_prog; ac_word=$2
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10118$as_echo_n "checking for $ac_word... " >&6; }
10119if ${ac_cv_path_PRINTF+:} false; then :
10120  $as_echo_n "(cached) " >&6
10121else
10122  case $PRINTF in
10123  [\\/]* | ?:[\\/]*)
10124  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10125  ;;
10126  *)
10127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10128for as_dir in $PATH
10129do
10130  IFS=$as_save_IFS
10131  test -z "$as_dir" && as_dir=.
10132    for ac_exec_ext in '' $ac_executable_extensions; do
10133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10134    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10136    break 2
10137  fi
10138done
10139  done
10140IFS=$as_save_IFS
10141
10142  ;;
10143esac
10144fi
10145PRINTF=$ac_cv_path_PRINTF
10146if test -n "$PRINTF"; then
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10148$as_echo "$PRINTF" >&6; }
10149else
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152fi
10153
10154
10155  test -n "$PRINTF" && break
10156done
10157
10158  else
10159    # The variable is set, but is it from the command line or the environment?
10160
10161    # Try to remove the string !PRINTF! from our list.
10162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10164      # If it failed, the variable was not from the command line. Ignore it,
10165      # but warn the user (except for BASH, which is always set by the calling BASH).
10166      if test "xPRINTF" != xBASH; then
10167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10168$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10169      fi
10170      # Try to locate tool using the code snippet
10171      for ac_prog in printf
10172do
10173  # Extract the first word of "$ac_prog", so it can be a program name with args.
10174set dummy $ac_prog; ac_word=$2
10175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10176$as_echo_n "checking for $ac_word... " >&6; }
10177if ${ac_cv_path_PRINTF+:} false; then :
10178  $as_echo_n "(cached) " >&6
10179else
10180  case $PRINTF in
10181  [\\/]* | ?:[\\/]*)
10182  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10183  ;;
10184  *)
10185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10186for as_dir in $PATH
10187do
10188  IFS=$as_save_IFS
10189  test -z "$as_dir" && as_dir=.
10190    for ac_exec_ext in '' $ac_executable_extensions; do
10191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10192    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10194    break 2
10195  fi
10196done
10197  done
10198IFS=$as_save_IFS
10199
10200  ;;
10201esac
10202fi
10203PRINTF=$ac_cv_path_PRINTF
10204if test -n "$PRINTF"; then
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10206$as_echo "$PRINTF" >&6; }
10207else
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
10210fi
10211
10212
10213  test -n "$PRINTF" && break
10214done
10215
10216    else
10217      # If it succeeded, then it was overridden by the user. We will use it
10218      # for the tool.
10219
10220      # First remove it from the list of overridden variables, so we can test
10221      # for unknown variables in the end.
10222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10223
10224      # Check if we try to supply an empty value
10225      if test "x$PRINTF" = x; then
10226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10227$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10229$as_echo_n "checking for PRINTF... " >&6; }
10230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10231$as_echo "disabled" >&6; }
10232      else
10233        # Check if the provided tool contains a complete path.
10234        tool_specified="$PRINTF"
10235        tool_basename="${tool_specified##*/}"
10236        if test "x$tool_basename" = "x$tool_specified"; then
10237          # A command without a complete path is provided, search $PATH.
10238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10239$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10240          # Extract the first word of "$tool_basename", so it can be a program name with args.
10241set dummy $tool_basename; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if ${ac_cv_path_PRINTF+:} false; then :
10245  $as_echo_n "(cached) " >&6
10246else
10247  case $PRINTF in
10248  [\\/]* | ?:[\\/]*)
10249  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10250  ;;
10251  *)
10252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255  IFS=$as_save_IFS
10256  test -z "$as_dir" && as_dir=.
10257    for ac_exec_ext in '' $ac_executable_extensions; do
10258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261    break 2
10262  fi
10263done
10264  done
10265IFS=$as_save_IFS
10266
10267  ;;
10268esac
10269fi
10270PRINTF=$ac_cv_path_PRINTF
10271if test -n "$PRINTF"; then
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10273$as_echo "$PRINTF" >&6; }
10274else
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280          if test "x$PRINTF" = x; then
10281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10282          fi
10283        else
10284          # Otherwise we believe it is a complete path. Use it as it is.
10285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10286$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10288$as_echo_n "checking for PRINTF... " >&6; }
10289          if test ! -x "$tool_specified"; then
10290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10291$as_echo "not found" >&6; }
10292            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10293          fi
10294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10295$as_echo "$tool_specified" >&6; }
10296        fi
10297      fi
10298    fi
10299
10300  fi
10301
10302
10303
10304  if test "x$PRINTF" = x; then
10305    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10306  fi
10307
10308
10309
10310
10311
10312  # Publish this variable in the help.
10313
10314
10315  if [ -z "${RM+x}" ]; then
10316    # The variable is not set by user, try to locate tool using the code snippet
10317    for ac_prog in rm
10318do
10319  # Extract the first word of "$ac_prog", so it can be a program name with args.
10320set dummy $ac_prog; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if ${ac_cv_path_RM+:} false; then :
10324  $as_echo_n "(cached) " >&6
10325else
10326  case $RM in
10327  [\\/]* | ?:[\\/]*)
10328  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10329  ;;
10330  *)
10331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334  IFS=$as_save_IFS
10335  test -z "$as_dir" && as_dir=.
10336    for ac_exec_ext in '' $ac_executable_extensions; do
10337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340    break 2
10341  fi
10342done
10343  done
10344IFS=$as_save_IFS
10345
10346  ;;
10347esac
10348fi
10349RM=$ac_cv_path_RM
10350if test -n "$RM"; then
10351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10352$as_echo "$RM" >&6; }
10353else
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356fi
10357
10358
10359  test -n "$RM" && break
10360done
10361
10362  else
10363    # The variable is set, but is it from the command line or the environment?
10364
10365    # Try to remove the string !RM! from our list.
10366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10368      # If it failed, the variable was not from the command line. Ignore it,
10369      # but warn the user (except for BASH, which is always set by the calling BASH).
10370      if test "xRM" != xBASH; then
10371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10372$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10373      fi
10374      # Try to locate tool using the code snippet
10375      for ac_prog in rm
10376do
10377  # Extract the first word of "$ac_prog", so it can be a program name with args.
10378set dummy $ac_prog; ac_word=$2
10379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10380$as_echo_n "checking for $ac_word... " >&6; }
10381if ${ac_cv_path_RM+:} false; then :
10382  $as_echo_n "(cached) " >&6
10383else
10384  case $RM in
10385  [\\/]* | ?:[\\/]*)
10386  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10387  ;;
10388  *)
10389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10390for as_dir in $PATH
10391do
10392  IFS=$as_save_IFS
10393  test -z "$as_dir" && as_dir=.
10394    for ac_exec_ext in '' $ac_executable_extensions; do
10395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10396    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10398    break 2
10399  fi
10400done
10401  done
10402IFS=$as_save_IFS
10403
10404  ;;
10405esac
10406fi
10407RM=$ac_cv_path_RM
10408if test -n "$RM"; then
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10410$as_echo "$RM" >&6; }
10411else
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415
10416
10417  test -n "$RM" && break
10418done
10419
10420    else
10421      # If it succeeded, then it was overridden by the user. We will use it
10422      # for the tool.
10423
10424      # First remove it from the list of overridden variables, so we can test
10425      # for unknown variables in the end.
10426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10427
10428      # Check if we try to supply an empty value
10429      if test "x$RM" = x; then
10430        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10431$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10433$as_echo_n "checking for RM... " >&6; }
10434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10435$as_echo "disabled" >&6; }
10436      else
10437        # Check if the provided tool contains a complete path.
10438        tool_specified="$RM"
10439        tool_basename="${tool_specified##*/}"
10440        if test "x$tool_basename" = "x$tool_specified"; then
10441          # A command without a complete path is provided, search $PATH.
10442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10443$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10444          # Extract the first word of "$tool_basename", so it can be a program name with args.
10445set dummy $tool_basename; ac_word=$2
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10447$as_echo_n "checking for $ac_word... " >&6; }
10448if ${ac_cv_path_RM+:} false; then :
10449  $as_echo_n "(cached) " >&6
10450else
10451  case $RM in
10452  [\\/]* | ?:[\\/]*)
10453  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10454  ;;
10455  *)
10456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10457for as_dir in $PATH
10458do
10459  IFS=$as_save_IFS
10460  test -z "$as_dir" && as_dir=.
10461    for ac_exec_ext in '' $ac_executable_extensions; do
10462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10463    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10465    break 2
10466  fi
10467done
10468  done
10469IFS=$as_save_IFS
10470
10471  ;;
10472esac
10473fi
10474RM=$ac_cv_path_RM
10475if test -n "$RM"; then
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10477$as_echo "$RM" >&6; }
10478else
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480$as_echo "no" >&6; }
10481fi
10482
10483
10484          if test "x$RM" = x; then
10485            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10486          fi
10487        else
10488          # Otherwise we believe it is a complete path. Use it as it is.
10489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10490$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10491          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10492$as_echo_n "checking for RM... " >&6; }
10493          if test ! -x "$tool_specified"; then
10494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10495$as_echo "not found" >&6; }
10496            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10497          fi
10498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10499$as_echo "$tool_specified" >&6; }
10500        fi
10501      fi
10502    fi
10503
10504  fi
10505
10506
10507
10508  if test "x$RM" = x; then
10509    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10510  fi
10511
10512
10513
10514
10515
10516  # Publish this variable in the help.
10517
10518
10519  if [ -z "${RMDIR+x}" ]; then
10520    # The variable is not set by user, try to locate tool using the code snippet
10521    for ac_prog in rmdir
10522do
10523  # Extract the first word of "$ac_prog", so it can be a program name with args.
10524set dummy $ac_prog; ac_word=$2
10525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10526$as_echo_n "checking for $ac_word... " >&6; }
10527if ${ac_cv_path_RMDIR+:} false; then :
10528  $as_echo_n "(cached) " >&6
10529else
10530  case $RMDIR in
10531  [\\/]* | ?:[\\/]*)
10532  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10533  ;;
10534  *)
10535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10536for as_dir in $PATH
10537do
10538  IFS=$as_save_IFS
10539  test -z "$as_dir" && as_dir=.
10540    for ac_exec_ext in '' $ac_executable_extensions; do
10541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10542    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10544    break 2
10545  fi
10546done
10547  done
10548IFS=$as_save_IFS
10549
10550  ;;
10551esac
10552fi
10553RMDIR=$ac_cv_path_RMDIR
10554if test -n "$RMDIR"; then
10555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10556$as_echo "$RMDIR" >&6; }
10557else
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10559$as_echo "no" >&6; }
10560fi
10561
10562
10563  test -n "$RMDIR" && break
10564done
10565
10566  else
10567    # The variable is set, but is it from the command line or the environment?
10568
10569    # Try to remove the string !RMDIR! from our list.
10570    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10571    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10572      # If it failed, the variable was not from the command line. Ignore it,
10573      # but warn the user (except for BASH, which is always set by the calling BASH).
10574      if test "xRMDIR" != xBASH; then
10575        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10576$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10577      fi
10578      # Try to locate tool using the code snippet
10579      for ac_prog in rmdir
10580do
10581  # Extract the first word of "$ac_prog", so it can be a program name with args.
10582set dummy $ac_prog; ac_word=$2
10583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10584$as_echo_n "checking for $ac_word... " >&6; }
10585if ${ac_cv_path_RMDIR+:} false; then :
10586  $as_echo_n "(cached) " >&6
10587else
10588  case $RMDIR in
10589  [\\/]* | ?:[\\/]*)
10590  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10591  ;;
10592  *)
10593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10594for as_dir in $PATH
10595do
10596  IFS=$as_save_IFS
10597  test -z "$as_dir" && as_dir=.
10598    for ac_exec_ext in '' $ac_executable_extensions; do
10599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10600    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10602    break 2
10603  fi
10604done
10605  done
10606IFS=$as_save_IFS
10607
10608  ;;
10609esac
10610fi
10611RMDIR=$ac_cv_path_RMDIR
10612if test -n "$RMDIR"; then
10613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10614$as_echo "$RMDIR" >&6; }
10615else
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
10618fi
10619
10620
10621  test -n "$RMDIR" && break
10622done
10623
10624    else
10625      # If it succeeded, then it was overridden by the user. We will use it
10626      # for the tool.
10627
10628      # First remove it from the list of overridden variables, so we can test
10629      # for unknown variables in the end.
10630      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10631
10632      # Check if we try to supply an empty value
10633      if test "x$RMDIR" = x; then
10634        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10635$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10637$as_echo_n "checking for RMDIR... " >&6; }
10638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10639$as_echo "disabled" >&6; }
10640      else
10641        # Check if the provided tool contains a complete path.
10642        tool_specified="$RMDIR"
10643        tool_basename="${tool_specified##*/}"
10644        if test "x$tool_basename" = "x$tool_specified"; then
10645          # A command without a complete path is provided, search $PATH.
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10647$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10648          # Extract the first word of "$tool_basename", so it can be a program name with args.
10649set dummy $tool_basename; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_RMDIR+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $RMDIR in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678RMDIR=$ac_cv_path_RMDIR
10679if test -n "$RMDIR"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10681$as_echo "$RMDIR" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687
10688          if test "x$RMDIR" = x; then
10689            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10690          fi
10691        else
10692          # Otherwise we believe it is a complete path. Use it as it is.
10693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10694$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10695          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10696$as_echo_n "checking for RMDIR... " >&6; }
10697          if test ! -x "$tool_specified"; then
10698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10699$as_echo "not found" >&6; }
10700            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10701          fi
10702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10703$as_echo "$tool_specified" >&6; }
10704        fi
10705      fi
10706    fi
10707
10708  fi
10709
10710
10711
10712  if test "x$RMDIR" = x; then
10713    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10714  fi
10715
10716
10717
10718
10719
10720  # Publish this variable in the help.
10721
10722
10723  if [ -z "${SH+x}" ]; then
10724    # The variable is not set by user, try to locate tool using the code snippet
10725    for ac_prog in sh
10726do
10727  # Extract the first word of "$ac_prog", so it can be a program name with args.
10728set dummy $ac_prog; ac_word=$2
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10730$as_echo_n "checking for $ac_word... " >&6; }
10731if ${ac_cv_path_SH+:} false; then :
10732  $as_echo_n "(cached) " >&6
10733else
10734  case $SH in
10735  [\\/]* | ?:[\\/]*)
10736  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10737  ;;
10738  *)
10739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10740for as_dir in $PATH
10741do
10742  IFS=$as_save_IFS
10743  test -z "$as_dir" && as_dir=.
10744    for ac_exec_ext in '' $ac_executable_extensions; do
10745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10746    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10748    break 2
10749  fi
10750done
10751  done
10752IFS=$as_save_IFS
10753
10754  ;;
10755esac
10756fi
10757SH=$ac_cv_path_SH
10758if test -n "$SH"; then
10759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10760$as_echo "$SH" >&6; }
10761else
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
10764fi
10765
10766
10767  test -n "$SH" && break
10768done
10769
10770  else
10771    # The variable is set, but is it from the command line or the environment?
10772
10773    # Try to remove the string !SH! from our list.
10774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10776      # If it failed, the variable was not from the command line. Ignore it,
10777      # but warn the user (except for BASH, which is always set by the calling BASH).
10778      if test "xSH" != xBASH; then
10779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10780$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10781      fi
10782      # Try to locate tool using the code snippet
10783      for ac_prog in sh
10784do
10785  # Extract the first word of "$ac_prog", so it can be a program name with args.
10786set dummy $ac_prog; ac_word=$2
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10788$as_echo_n "checking for $ac_word... " >&6; }
10789if ${ac_cv_path_SH+:} false; then :
10790  $as_echo_n "(cached) " >&6
10791else
10792  case $SH in
10793  [\\/]* | ?:[\\/]*)
10794  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10795  ;;
10796  *)
10797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10798for as_dir in $PATH
10799do
10800  IFS=$as_save_IFS
10801  test -z "$as_dir" && as_dir=.
10802    for ac_exec_ext in '' $ac_executable_extensions; do
10803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10804    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10806    break 2
10807  fi
10808done
10809  done
10810IFS=$as_save_IFS
10811
10812  ;;
10813esac
10814fi
10815SH=$ac_cv_path_SH
10816if test -n "$SH"; then
10817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10818$as_echo "$SH" >&6; }
10819else
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10821$as_echo "no" >&6; }
10822fi
10823
10824
10825  test -n "$SH" && break
10826done
10827
10828    else
10829      # If it succeeded, then it was overridden by the user. We will use it
10830      # for the tool.
10831
10832      # First remove it from the list of overridden variables, so we can test
10833      # for unknown variables in the end.
10834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10835
10836      # Check if we try to supply an empty value
10837      if test "x$SH" = x; then
10838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10839$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10841$as_echo_n "checking for SH... " >&6; }
10842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10843$as_echo "disabled" >&6; }
10844      else
10845        # Check if the provided tool contains a complete path.
10846        tool_specified="$SH"
10847        tool_basename="${tool_specified##*/}"
10848        if test "x$tool_basename" = "x$tool_specified"; then
10849          # A command without a complete path is provided, search $PATH.
10850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10851$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10852          # Extract the first word of "$tool_basename", so it can be a program name with args.
10853set dummy $tool_basename; ac_word=$2
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10855$as_echo_n "checking for $ac_word... " >&6; }
10856if ${ac_cv_path_SH+:} false; then :
10857  $as_echo_n "(cached) " >&6
10858else
10859  case $SH in
10860  [\\/]* | ?:[\\/]*)
10861  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10862  ;;
10863  *)
10864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865for as_dir in $PATH
10866do
10867  IFS=$as_save_IFS
10868  test -z "$as_dir" && as_dir=.
10869    for ac_exec_ext in '' $ac_executable_extensions; do
10870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873    break 2
10874  fi
10875done
10876  done
10877IFS=$as_save_IFS
10878
10879  ;;
10880esac
10881fi
10882SH=$ac_cv_path_SH
10883if test -n "$SH"; then
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10885$as_echo "$SH" >&6; }
10886else
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
10889fi
10890
10891
10892          if test "x$SH" = x; then
10893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10894          fi
10895        else
10896          # Otherwise we believe it is a complete path. Use it as it is.
10897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10898$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10900$as_echo_n "checking for SH... " >&6; }
10901          if test ! -x "$tool_specified"; then
10902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10903$as_echo "not found" >&6; }
10904            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10905          fi
10906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10907$as_echo "$tool_specified" >&6; }
10908        fi
10909      fi
10910    fi
10911
10912  fi
10913
10914
10915
10916  if test "x$SH" = x; then
10917    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10918  fi
10919
10920
10921
10922
10923
10924  # Publish this variable in the help.
10925
10926
10927  if [ -z "${SORT+x}" ]; then
10928    # The variable is not set by user, try to locate tool using the code snippet
10929    for ac_prog in sort
10930do
10931  # Extract the first word of "$ac_prog", so it can be a program name with args.
10932set dummy $ac_prog; ac_word=$2
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10934$as_echo_n "checking for $ac_word... " >&6; }
10935if ${ac_cv_path_SORT+:} false; then :
10936  $as_echo_n "(cached) " >&6
10937else
10938  case $SORT in
10939  [\\/]* | ?:[\\/]*)
10940  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10941  ;;
10942  *)
10943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946  IFS=$as_save_IFS
10947  test -z "$as_dir" && as_dir=.
10948    for ac_exec_ext in '' $ac_executable_extensions; do
10949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10950    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10952    break 2
10953  fi
10954done
10955  done
10956IFS=$as_save_IFS
10957
10958  ;;
10959esac
10960fi
10961SORT=$ac_cv_path_SORT
10962if test -n "$SORT"; then
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10964$as_echo "$SORT" >&6; }
10965else
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
10968fi
10969
10970
10971  test -n "$SORT" && break
10972done
10973
10974  else
10975    # The variable is set, but is it from the command line or the environment?
10976
10977    # Try to remove the string !SORT! from our list.
10978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10980      # If it failed, the variable was not from the command line. Ignore it,
10981      # but warn the user (except for BASH, which is always set by the calling BASH).
10982      if test "xSORT" != xBASH; then
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10984$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10985      fi
10986      # Try to locate tool using the code snippet
10987      for ac_prog in sort
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_SORT+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $SORT in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019SORT=$ac_cv_path_SORT
11020if test -n "$SORT"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11022$as_echo "$SORT" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$SORT" && break
11030done
11031
11032    else
11033      # If it succeeded, then it was overridden by the user. We will use it
11034      # for the tool.
11035
11036      # First remove it from the list of overridden variables, so we can test
11037      # for unknown variables in the end.
11038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11039
11040      # Check if we try to supply an empty value
11041      if test "x$SORT" = x; then
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11043$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11045$as_echo_n "checking for SORT... " >&6; }
11046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11047$as_echo "disabled" >&6; }
11048      else
11049        # Check if the provided tool contains a complete path.
11050        tool_specified="$SORT"
11051        tool_basename="${tool_specified##*/}"
11052        if test "x$tool_basename" = "x$tool_specified"; then
11053          # A command without a complete path is provided, search $PATH.
11054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11055$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11056          # Extract the first word of "$tool_basename", so it can be a program name with args.
11057set dummy $tool_basename; ac_word=$2
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11059$as_echo_n "checking for $ac_word... " >&6; }
11060if ${ac_cv_path_SORT+:} false; then :
11061  $as_echo_n "(cached) " >&6
11062else
11063  case $SORT in
11064  [\\/]* | ?:[\\/]*)
11065  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11066  ;;
11067  *)
11068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11069for as_dir in $PATH
11070do
11071  IFS=$as_save_IFS
11072  test -z "$as_dir" && as_dir=.
11073    for ac_exec_ext in '' $ac_executable_extensions; do
11074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11075    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11077    break 2
11078  fi
11079done
11080  done
11081IFS=$as_save_IFS
11082
11083  ;;
11084esac
11085fi
11086SORT=$ac_cv_path_SORT
11087if test -n "$SORT"; then
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11089$as_echo "$SORT" >&6; }
11090else
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
11093fi
11094
11095
11096          if test "x$SORT" = x; then
11097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11098          fi
11099        else
11100          # Otherwise we believe it is a complete path. Use it as it is.
11101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11102$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11104$as_echo_n "checking for SORT... " >&6; }
11105          if test ! -x "$tool_specified"; then
11106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11107$as_echo "not found" >&6; }
11108            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11109          fi
11110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11111$as_echo "$tool_specified" >&6; }
11112        fi
11113      fi
11114    fi
11115
11116  fi
11117
11118
11119
11120  if test "x$SORT" = x; then
11121    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11122  fi
11123
11124
11125
11126
11127
11128  # Publish this variable in the help.
11129
11130
11131  if [ -z "${TAIL+x}" ]; then
11132    # The variable is not set by user, try to locate tool using the code snippet
11133    for ac_prog in tail
11134do
11135  # Extract the first word of "$ac_prog", so it can be a program name with args.
11136set dummy $ac_prog; ac_word=$2
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138$as_echo_n "checking for $ac_word... " >&6; }
11139if ${ac_cv_path_TAIL+:} false; then :
11140  $as_echo_n "(cached) " >&6
11141else
11142  case $TAIL in
11143  [\\/]* | ?:[\\/]*)
11144  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11145  ;;
11146  *)
11147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148for as_dir in $PATH
11149do
11150  IFS=$as_save_IFS
11151  test -z "$as_dir" && as_dir=.
11152    for ac_exec_ext in '' $ac_executable_extensions; do
11153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156    break 2
11157  fi
11158done
11159  done
11160IFS=$as_save_IFS
11161
11162  ;;
11163esac
11164fi
11165TAIL=$ac_cv_path_TAIL
11166if test -n "$TAIL"; then
11167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11168$as_echo "$TAIL" >&6; }
11169else
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
11172fi
11173
11174
11175  test -n "$TAIL" && break
11176done
11177
11178  else
11179    # The variable is set, but is it from the command line or the environment?
11180
11181    # Try to remove the string !TAIL! from our list.
11182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11184      # If it failed, the variable was not from the command line. Ignore it,
11185      # but warn the user (except for BASH, which is always set by the calling BASH).
11186      if test "xTAIL" != xBASH; then
11187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11188$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11189      fi
11190      # Try to locate tool using the code snippet
11191      for ac_prog in tail
11192do
11193  # Extract the first word of "$ac_prog", so it can be a program name with args.
11194set dummy $ac_prog; ac_word=$2
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11196$as_echo_n "checking for $ac_word... " >&6; }
11197if ${ac_cv_path_TAIL+:} false; then :
11198  $as_echo_n "(cached) " >&6
11199else
11200  case $TAIL in
11201  [\\/]* | ?:[\\/]*)
11202  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11203  ;;
11204  *)
11205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11206for as_dir in $PATH
11207do
11208  IFS=$as_save_IFS
11209  test -z "$as_dir" && as_dir=.
11210    for ac_exec_ext in '' $ac_executable_extensions; do
11211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11212    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11214    break 2
11215  fi
11216done
11217  done
11218IFS=$as_save_IFS
11219
11220  ;;
11221esac
11222fi
11223TAIL=$ac_cv_path_TAIL
11224if test -n "$TAIL"; then
11225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11226$as_echo "$TAIL" >&6; }
11227else
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
11230fi
11231
11232
11233  test -n "$TAIL" && break
11234done
11235
11236    else
11237      # If it succeeded, then it was overridden by the user. We will use it
11238      # for the tool.
11239
11240      # First remove it from the list of overridden variables, so we can test
11241      # for unknown variables in the end.
11242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11243
11244      # Check if we try to supply an empty value
11245      if test "x$TAIL" = x; then
11246        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11247$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11249$as_echo_n "checking for TAIL... " >&6; }
11250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11251$as_echo "disabled" >&6; }
11252      else
11253        # Check if the provided tool contains a complete path.
11254        tool_specified="$TAIL"
11255        tool_basename="${tool_specified##*/}"
11256        if test "x$tool_basename" = "x$tool_specified"; then
11257          # A command without a complete path is provided, search $PATH.
11258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11259$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11260          # Extract the first word of "$tool_basename", so it can be a program name with args.
11261set dummy $tool_basename; ac_word=$2
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263$as_echo_n "checking for $ac_word... " >&6; }
11264if ${ac_cv_path_TAIL+:} false; then :
11265  $as_echo_n "(cached) " >&6
11266else
11267  case $TAIL in
11268  [\\/]* | ?:[\\/]*)
11269  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11270  ;;
11271  *)
11272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11273for as_dir in $PATH
11274do
11275  IFS=$as_save_IFS
11276  test -z "$as_dir" && as_dir=.
11277    for ac_exec_ext in '' $ac_executable_extensions; do
11278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11279    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11281    break 2
11282  fi
11283done
11284  done
11285IFS=$as_save_IFS
11286
11287  ;;
11288esac
11289fi
11290TAIL=$ac_cv_path_TAIL
11291if test -n "$TAIL"; then
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11293$as_echo "$TAIL" >&6; }
11294else
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
11297fi
11298
11299
11300          if test "x$TAIL" = x; then
11301            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11302          fi
11303        else
11304          # Otherwise we believe it is a complete path. Use it as it is.
11305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11306$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11307          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11308$as_echo_n "checking for TAIL... " >&6; }
11309          if test ! -x "$tool_specified"; then
11310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11311$as_echo "not found" >&6; }
11312            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11313          fi
11314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11315$as_echo "$tool_specified" >&6; }
11316        fi
11317      fi
11318    fi
11319
11320  fi
11321
11322
11323
11324  if test "x$TAIL" = x; then
11325    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11326  fi
11327
11328
11329
11330
11331
11332  # Publish this variable in the help.
11333
11334
11335  if [ -z "${TAR+x}" ]; then
11336    # The variable is not set by user, try to locate tool using the code snippet
11337    for ac_prog in gtar tar
11338do
11339  # Extract the first word of "$ac_prog", so it can be a program name with args.
11340set dummy $ac_prog; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_path_TAR+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  case $TAR in
11347  [\\/]* | ?:[\\/]*)
11348  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11349  ;;
11350  *)
11351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11352for as_dir in $PATH
11353do
11354  IFS=$as_save_IFS
11355  test -z "$as_dir" && as_dir=.
11356    for ac_exec_ext in '' $ac_executable_extensions; do
11357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11358    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11360    break 2
11361  fi
11362done
11363  done
11364IFS=$as_save_IFS
11365
11366  ;;
11367esac
11368fi
11369TAR=$ac_cv_path_TAR
11370if test -n "$TAR"; then
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11372$as_echo "$TAR" >&6; }
11373else
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
11376fi
11377
11378
11379  test -n "$TAR" && break
11380done
11381
11382  else
11383    # The variable is set, but is it from the command line or the environment?
11384
11385    # Try to remove the string !TAR! from our list.
11386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11388      # If it failed, the variable was not from the command line. Ignore it,
11389      # but warn the user (except for BASH, which is always set by the calling BASH).
11390      if test "xTAR" != xBASH; then
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11392$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11393      fi
11394      # Try to locate tool using the code snippet
11395      for ac_prog in gtar tar
11396do
11397  # Extract the first word of "$ac_prog", so it can be a program name with args.
11398set dummy $ac_prog; ac_word=$2
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11400$as_echo_n "checking for $ac_word... " >&6; }
11401if ${ac_cv_path_TAR+:} false; then :
11402  $as_echo_n "(cached) " >&6
11403else
11404  case $TAR in
11405  [\\/]* | ?:[\\/]*)
11406  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11407  ;;
11408  *)
11409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11410for as_dir in $PATH
11411do
11412  IFS=$as_save_IFS
11413  test -z "$as_dir" && as_dir=.
11414    for ac_exec_ext in '' $ac_executable_extensions; do
11415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11416    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11418    break 2
11419  fi
11420done
11421  done
11422IFS=$as_save_IFS
11423
11424  ;;
11425esac
11426fi
11427TAR=$ac_cv_path_TAR
11428if test -n "$TAR"; then
11429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11430$as_echo "$TAR" >&6; }
11431else
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11433$as_echo "no" >&6; }
11434fi
11435
11436
11437  test -n "$TAR" && break
11438done
11439
11440    else
11441      # If it succeeded, then it was overridden by the user. We will use it
11442      # for the tool.
11443
11444      # First remove it from the list of overridden variables, so we can test
11445      # for unknown variables in the end.
11446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11447
11448      # Check if we try to supply an empty value
11449      if test "x$TAR" = x; then
11450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11451$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11453$as_echo_n "checking for TAR... " >&6; }
11454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11455$as_echo "disabled" >&6; }
11456      else
11457        # Check if the provided tool contains a complete path.
11458        tool_specified="$TAR"
11459        tool_basename="${tool_specified##*/}"
11460        if test "x$tool_basename" = "x$tool_specified"; then
11461          # A command without a complete path is provided, search $PATH.
11462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11463$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11464          # Extract the first word of "$tool_basename", so it can be a program name with args.
11465set dummy $tool_basename; ac_word=$2
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11467$as_echo_n "checking for $ac_word... " >&6; }
11468if ${ac_cv_path_TAR+:} false; then :
11469  $as_echo_n "(cached) " >&6
11470else
11471  case $TAR in
11472  [\\/]* | ?:[\\/]*)
11473  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11474  ;;
11475  *)
11476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11477for as_dir in $PATH
11478do
11479  IFS=$as_save_IFS
11480  test -z "$as_dir" && as_dir=.
11481    for ac_exec_ext in '' $ac_executable_extensions; do
11482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11483    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11485    break 2
11486  fi
11487done
11488  done
11489IFS=$as_save_IFS
11490
11491  ;;
11492esac
11493fi
11494TAR=$ac_cv_path_TAR
11495if test -n "$TAR"; then
11496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11497$as_echo "$TAR" >&6; }
11498else
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
11501fi
11502
11503
11504          if test "x$TAR" = x; then
11505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11506          fi
11507        else
11508          # Otherwise we believe it is a complete path. Use it as it is.
11509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11510$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11512$as_echo_n "checking for TAR... " >&6; }
11513          if test ! -x "$tool_specified"; then
11514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11515$as_echo "not found" >&6; }
11516            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11517          fi
11518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11519$as_echo "$tool_specified" >&6; }
11520        fi
11521      fi
11522    fi
11523
11524  fi
11525
11526
11527
11528  if test "x$TAR" = x; then
11529    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11530  fi
11531
11532
11533
11534
11535
11536  # Publish this variable in the help.
11537
11538
11539  if [ -z "${TEE+x}" ]; then
11540    # The variable is not set by user, try to locate tool using the code snippet
11541    for ac_prog in tee
11542do
11543  # Extract the first word of "$ac_prog", so it can be a program name with args.
11544set dummy $ac_prog; ac_word=$2
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11546$as_echo_n "checking for $ac_word... " >&6; }
11547if ${ac_cv_path_TEE+:} false; then :
11548  $as_echo_n "(cached) " >&6
11549else
11550  case $TEE in
11551  [\\/]* | ?:[\\/]*)
11552  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11553  ;;
11554  *)
11555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11556for as_dir in $PATH
11557do
11558  IFS=$as_save_IFS
11559  test -z "$as_dir" && as_dir=.
11560    for ac_exec_ext in '' $ac_executable_extensions; do
11561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11562    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11564    break 2
11565  fi
11566done
11567  done
11568IFS=$as_save_IFS
11569
11570  ;;
11571esac
11572fi
11573TEE=$ac_cv_path_TEE
11574if test -n "$TEE"; then
11575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11576$as_echo "$TEE" >&6; }
11577else
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
11580fi
11581
11582
11583  test -n "$TEE" && break
11584done
11585
11586  else
11587    # The variable is set, but is it from the command line or the environment?
11588
11589    # Try to remove the string !TEE! from our list.
11590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11592      # If it failed, the variable was not from the command line. Ignore it,
11593      # but warn the user (except for BASH, which is always set by the calling BASH).
11594      if test "xTEE" != xBASH; then
11595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11596$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11597      fi
11598      # Try to locate tool using the code snippet
11599      for ac_prog in tee
11600do
11601  # Extract the first word of "$ac_prog", so it can be a program name with args.
11602set dummy $ac_prog; ac_word=$2
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11604$as_echo_n "checking for $ac_word... " >&6; }
11605if ${ac_cv_path_TEE+:} false; then :
11606  $as_echo_n "(cached) " >&6
11607else
11608  case $TEE in
11609  [\\/]* | ?:[\\/]*)
11610  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11611  ;;
11612  *)
11613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11614for as_dir in $PATH
11615do
11616  IFS=$as_save_IFS
11617  test -z "$as_dir" && as_dir=.
11618    for ac_exec_ext in '' $ac_executable_extensions; do
11619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11620    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11622    break 2
11623  fi
11624done
11625  done
11626IFS=$as_save_IFS
11627
11628  ;;
11629esac
11630fi
11631TEE=$ac_cv_path_TEE
11632if test -n "$TEE"; then
11633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11634$as_echo "$TEE" >&6; }
11635else
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11637$as_echo "no" >&6; }
11638fi
11639
11640
11641  test -n "$TEE" && break
11642done
11643
11644    else
11645      # If it succeeded, then it was overridden by the user. We will use it
11646      # for the tool.
11647
11648      # First remove it from the list of overridden variables, so we can test
11649      # for unknown variables in the end.
11650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11651
11652      # Check if we try to supply an empty value
11653      if test "x$TEE" = x; then
11654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11655$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11657$as_echo_n "checking for TEE... " >&6; }
11658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11659$as_echo "disabled" >&6; }
11660      else
11661        # Check if the provided tool contains a complete path.
11662        tool_specified="$TEE"
11663        tool_basename="${tool_specified##*/}"
11664        if test "x$tool_basename" = "x$tool_specified"; then
11665          # A command without a complete path is provided, search $PATH.
11666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11667$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11668          # Extract the first word of "$tool_basename", so it can be a program name with args.
11669set dummy $tool_basename; ac_word=$2
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671$as_echo_n "checking for $ac_word... " >&6; }
11672if ${ac_cv_path_TEE+:} false; then :
11673  $as_echo_n "(cached) " >&6
11674else
11675  case $TEE in
11676  [\\/]* | ?:[\\/]*)
11677  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11678  ;;
11679  *)
11680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683  IFS=$as_save_IFS
11684  test -z "$as_dir" && as_dir=.
11685    for ac_exec_ext in '' $ac_executable_extensions; do
11686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689    break 2
11690  fi
11691done
11692  done
11693IFS=$as_save_IFS
11694
11695  ;;
11696esac
11697fi
11698TEE=$ac_cv_path_TEE
11699if test -n "$TEE"; then
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11701$as_echo "$TEE" >&6; }
11702else
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705fi
11706
11707
11708          if test "x$TEE" = x; then
11709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11710          fi
11711        else
11712          # Otherwise we believe it is a complete path. Use it as it is.
11713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11714$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11716$as_echo_n "checking for TEE... " >&6; }
11717          if test ! -x "$tool_specified"; then
11718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11719$as_echo "not found" >&6; }
11720            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11721          fi
11722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11723$as_echo "$tool_specified" >&6; }
11724        fi
11725      fi
11726    fi
11727
11728  fi
11729
11730
11731
11732  if test "x$TEE" = x; then
11733    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11734  fi
11735
11736
11737
11738
11739
11740  # Publish this variable in the help.
11741
11742
11743  if [ -z "${TOUCH+x}" ]; then
11744    # The variable is not set by user, try to locate tool using the code snippet
11745    for ac_prog in touch
11746do
11747  # Extract the first word of "$ac_prog", so it can be a program name with args.
11748set dummy $ac_prog; ac_word=$2
11749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11750$as_echo_n "checking for $ac_word... " >&6; }
11751if ${ac_cv_path_TOUCH+:} false; then :
11752  $as_echo_n "(cached) " >&6
11753else
11754  case $TOUCH in
11755  [\\/]* | ?:[\\/]*)
11756  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11757  ;;
11758  *)
11759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11760for as_dir in $PATH
11761do
11762  IFS=$as_save_IFS
11763  test -z "$as_dir" && as_dir=.
11764    for ac_exec_ext in '' $ac_executable_extensions; do
11765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11766    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11768    break 2
11769  fi
11770done
11771  done
11772IFS=$as_save_IFS
11773
11774  ;;
11775esac
11776fi
11777TOUCH=$ac_cv_path_TOUCH
11778if test -n "$TOUCH"; then
11779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11780$as_echo "$TOUCH" >&6; }
11781else
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11783$as_echo "no" >&6; }
11784fi
11785
11786
11787  test -n "$TOUCH" && break
11788done
11789
11790  else
11791    # The variable is set, but is it from the command line or the environment?
11792
11793    # Try to remove the string !TOUCH! from our list.
11794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11796      # If it failed, the variable was not from the command line. Ignore it,
11797      # but warn the user (except for BASH, which is always set by the calling BASH).
11798      if test "xTOUCH" != xBASH; then
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11800$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11801      fi
11802      # Try to locate tool using the code snippet
11803      for ac_prog in touch
11804do
11805  # Extract the first word of "$ac_prog", so it can be a program name with args.
11806set dummy $ac_prog; ac_word=$2
11807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11808$as_echo_n "checking for $ac_word... " >&6; }
11809if ${ac_cv_path_TOUCH+:} false; then :
11810  $as_echo_n "(cached) " >&6
11811else
11812  case $TOUCH in
11813  [\\/]* | ?:[\\/]*)
11814  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11815  ;;
11816  *)
11817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11818for as_dir in $PATH
11819do
11820  IFS=$as_save_IFS
11821  test -z "$as_dir" && as_dir=.
11822    for ac_exec_ext in '' $ac_executable_extensions; do
11823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11824    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11826    break 2
11827  fi
11828done
11829  done
11830IFS=$as_save_IFS
11831
11832  ;;
11833esac
11834fi
11835TOUCH=$ac_cv_path_TOUCH
11836if test -n "$TOUCH"; then
11837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11838$as_echo "$TOUCH" >&6; }
11839else
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11841$as_echo "no" >&6; }
11842fi
11843
11844
11845  test -n "$TOUCH" && break
11846done
11847
11848    else
11849      # If it succeeded, then it was overridden by the user. We will use it
11850      # for the tool.
11851
11852      # First remove it from the list of overridden variables, so we can test
11853      # for unknown variables in the end.
11854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11855
11856      # Check if we try to supply an empty value
11857      if test "x$TOUCH" = x; then
11858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11859$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11861$as_echo_n "checking for TOUCH... " >&6; }
11862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11863$as_echo "disabled" >&6; }
11864      else
11865        # Check if the provided tool contains a complete path.
11866        tool_specified="$TOUCH"
11867        tool_basename="${tool_specified##*/}"
11868        if test "x$tool_basename" = "x$tool_specified"; then
11869          # A command without a complete path is provided, search $PATH.
11870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11871$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11872          # Extract the first word of "$tool_basename", so it can be a program name with args.
11873set dummy $tool_basename; ac_word=$2
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11875$as_echo_n "checking for $ac_word... " >&6; }
11876if ${ac_cv_path_TOUCH+:} false; then :
11877  $as_echo_n "(cached) " >&6
11878else
11879  case $TOUCH in
11880  [\\/]* | ?:[\\/]*)
11881  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11882  ;;
11883  *)
11884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11885for as_dir in $PATH
11886do
11887  IFS=$as_save_IFS
11888  test -z "$as_dir" && as_dir=.
11889    for ac_exec_ext in '' $ac_executable_extensions; do
11890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11891    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11893    break 2
11894  fi
11895done
11896  done
11897IFS=$as_save_IFS
11898
11899  ;;
11900esac
11901fi
11902TOUCH=$ac_cv_path_TOUCH
11903if test -n "$TOUCH"; then
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11905$as_echo "$TOUCH" >&6; }
11906else
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11908$as_echo "no" >&6; }
11909fi
11910
11911
11912          if test "x$TOUCH" = x; then
11913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11914          fi
11915        else
11916          # Otherwise we believe it is a complete path. Use it as it is.
11917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11918$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11920$as_echo_n "checking for TOUCH... " >&6; }
11921          if test ! -x "$tool_specified"; then
11922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11923$as_echo "not found" >&6; }
11924            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11925          fi
11926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11927$as_echo "$tool_specified" >&6; }
11928        fi
11929      fi
11930    fi
11931
11932  fi
11933
11934
11935
11936  if test "x$TOUCH" = x; then
11937    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11938  fi
11939
11940
11941
11942
11943
11944  # Publish this variable in the help.
11945
11946
11947  if [ -z "${TR+x}" ]; then
11948    # The variable is not set by user, try to locate tool using the code snippet
11949    for ac_prog in tr
11950do
11951  # Extract the first word of "$ac_prog", so it can be a program name with args.
11952set dummy $ac_prog; ac_word=$2
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11954$as_echo_n "checking for $ac_word... " >&6; }
11955if ${ac_cv_path_TR+:} false; then :
11956  $as_echo_n "(cached) " >&6
11957else
11958  case $TR in
11959  [\\/]* | ?:[\\/]*)
11960  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11961  ;;
11962  *)
11963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11964for as_dir in $PATH
11965do
11966  IFS=$as_save_IFS
11967  test -z "$as_dir" && as_dir=.
11968    for ac_exec_ext in '' $ac_executable_extensions; do
11969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11970    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11972    break 2
11973  fi
11974done
11975  done
11976IFS=$as_save_IFS
11977
11978  ;;
11979esac
11980fi
11981TR=$ac_cv_path_TR
11982if test -n "$TR"; then
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11984$as_echo "$TR" >&6; }
11985else
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11987$as_echo "no" >&6; }
11988fi
11989
11990
11991  test -n "$TR" && break
11992done
11993
11994  else
11995    # The variable is set, but is it from the command line or the environment?
11996
11997    # Try to remove the string !TR! from our list.
11998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12000      # If it failed, the variable was not from the command line. Ignore it,
12001      # but warn the user (except for BASH, which is always set by the calling BASH).
12002      if test "xTR" != xBASH; then
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12004$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12005      fi
12006      # Try to locate tool using the code snippet
12007      for ac_prog in tr
12008do
12009  # Extract the first word of "$ac_prog", so it can be a program name with args.
12010set dummy $ac_prog; ac_word=$2
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12012$as_echo_n "checking for $ac_word... " >&6; }
12013if ${ac_cv_path_TR+:} false; then :
12014  $as_echo_n "(cached) " >&6
12015else
12016  case $TR in
12017  [\\/]* | ?:[\\/]*)
12018  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12019  ;;
12020  *)
12021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12022for as_dir in $PATH
12023do
12024  IFS=$as_save_IFS
12025  test -z "$as_dir" && as_dir=.
12026    for ac_exec_ext in '' $ac_executable_extensions; do
12027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12028    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12030    break 2
12031  fi
12032done
12033  done
12034IFS=$as_save_IFS
12035
12036  ;;
12037esac
12038fi
12039TR=$ac_cv_path_TR
12040if test -n "$TR"; then
12041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12042$as_echo "$TR" >&6; }
12043else
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12045$as_echo "no" >&6; }
12046fi
12047
12048
12049  test -n "$TR" && break
12050done
12051
12052    else
12053      # If it succeeded, then it was overridden by the user. We will use it
12054      # for the tool.
12055
12056      # First remove it from the list of overridden variables, so we can test
12057      # for unknown variables in the end.
12058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12059
12060      # Check if we try to supply an empty value
12061      if test "x$TR" = x; then
12062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12063$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12065$as_echo_n "checking for TR... " >&6; }
12066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12067$as_echo "disabled" >&6; }
12068      else
12069        # Check if the provided tool contains a complete path.
12070        tool_specified="$TR"
12071        tool_basename="${tool_specified##*/}"
12072        if test "x$tool_basename" = "x$tool_specified"; then
12073          # A command without a complete path is provided, search $PATH.
12074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12075$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12076          # Extract the first word of "$tool_basename", so it can be a program name with args.
12077set dummy $tool_basename; ac_word=$2
12078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12079$as_echo_n "checking for $ac_word... " >&6; }
12080if ${ac_cv_path_TR+:} false; then :
12081  $as_echo_n "(cached) " >&6
12082else
12083  case $TR in
12084  [\\/]* | ?:[\\/]*)
12085  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12086  ;;
12087  *)
12088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12089for as_dir in $PATH
12090do
12091  IFS=$as_save_IFS
12092  test -z "$as_dir" && as_dir=.
12093    for ac_exec_ext in '' $ac_executable_extensions; do
12094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12095    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12097    break 2
12098  fi
12099done
12100  done
12101IFS=$as_save_IFS
12102
12103  ;;
12104esac
12105fi
12106TR=$ac_cv_path_TR
12107if test -n "$TR"; then
12108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12109$as_echo "$TR" >&6; }
12110else
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12112$as_echo "no" >&6; }
12113fi
12114
12115
12116          if test "x$TR" = x; then
12117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12118          fi
12119        else
12120          # Otherwise we believe it is a complete path. Use it as it is.
12121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12122$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12124$as_echo_n "checking for TR... " >&6; }
12125          if test ! -x "$tool_specified"; then
12126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12127$as_echo "not found" >&6; }
12128            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12129          fi
12130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12131$as_echo "$tool_specified" >&6; }
12132        fi
12133      fi
12134    fi
12135
12136  fi
12137
12138
12139
12140  if test "x$TR" = x; then
12141    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12142  fi
12143
12144
12145
12146
12147
12148  # Publish this variable in the help.
12149
12150
12151  if [ -z "${UNAME+x}" ]; then
12152    # The variable is not set by user, try to locate tool using the code snippet
12153    for ac_prog in uname
12154do
12155  # Extract the first word of "$ac_prog", so it can be a program name with args.
12156set dummy $ac_prog; ac_word=$2
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12158$as_echo_n "checking for $ac_word... " >&6; }
12159if ${ac_cv_path_UNAME+:} false; then :
12160  $as_echo_n "(cached) " >&6
12161else
12162  case $UNAME in
12163  [\\/]* | ?:[\\/]*)
12164  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12165  ;;
12166  *)
12167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12168for as_dir in $PATH
12169do
12170  IFS=$as_save_IFS
12171  test -z "$as_dir" && as_dir=.
12172    for ac_exec_ext in '' $ac_executable_extensions; do
12173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12174    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12176    break 2
12177  fi
12178done
12179  done
12180IFS=$as_save_IFS
12181
12182  ;;
12183esac
12184fi
12185UNAME=$ac_cv_path_UNAME
12186if test -n "$UNAME"; then
12187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12188$as_echo "$UNAME" >&6; }
12189else
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12191$as_echo "no" >&6; }
12192fi
12193
12194
12195  test -n "$UNAME" && break
12196done
12197
12198  else
12199    # The variable is set, but is it from the command line or the environment?
12200
12201    # Try to remove the string !UNAME! from our list.
12202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12204      # If it failed, the variable was not from the command line. Ignore it,
12205      # but warn the user (except for BASH, which is always set by the calling BASH).
12206      if test "xUNAME" != xBASH; then
12207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12208$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12209      fi
12210      # Try to locate tool using the code snippet
12211      for ac_prog in uname
12212do
12213  # Extract the first word of "$ac_prog", so it can be a program name with args.
12214set dummy $ac_prog; ac_word=$2
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216$as_echo_n "checking for $ac_word... " >&6; }
12217if ${ac_cv_path_UNAME+:} false; then :
12218  $as_echo_n "(cached) " >&6
12219else
12220  case $UNAME in
12221  [\\/]* | ?:[\\/]*)
12222  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12223  ;;
12224  *)
12225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226for as_dir in $PATH
12227do
12228  IFS=$as_save_IFS
12229  test -z "$as_dir" && as_dir=.
12230    for ac_exec_ext in '' $ac_executable_extensions; do
12231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12232    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12234    break 2
12235  fi
12236done
12237  done
12238IFS=$as_save_IFS
12239
12240  ;;
12241esac
12242fi
12243UNAME=$ac_cv_path_UNAME
12244if test -n "$UNAME"; then
12245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12246$as_echo "$UNAME" >&6; }
12247else
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12249$as_echo "no" >&6; }
12250fi
12251
12252
12253  test -n "$UNAME" && break
12254done
12255
12256    else
12257      # If it succeeded, then it was overridden by the user. We will use it
12258      # for the tool.
12259
12260      # First remove it from the list of overridden variables, so we can test
12261      # for unknown variables in the end.
12262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12263
12264      # Check if we try to supply an empty value
12265      if test "x$UNAME" = x; then
12266        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12267$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12269$as_echo_n "checking for UNAME... " >&6; }
12270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12271$as_echo "disabled" >&6; }
12272      else
12273        # Check if the provided tool contains a complete path.
12274        tool_specified="$UNAME"
12275        tool_basename="${tool_specified##*/}"
12276        if test "x$tool_basename" = "x$tool_specified"; then
12277          # A command without a complete path is provided, search $PATH.
12278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12279$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12280          # Extract the first word of "$tool_basename", so it can be a program name with args.
12281set dummy $tool_basename; ac_word=$2
12282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12283$as_echo_n "checking for $ac_word... " >&6; }
12284if ${ac_cv_path_UNAME+:} false; then :
12285  $as_echo_n "(cached) " >&6
12286else
12287  case $UNAME in
12288  [\\/]* | ?:[\\/]*)
12289  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12290  ;;
12291  *)
12292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12293for as_dir in $PATH
12294do
12295  IFS=$as_save_IFS
12296  test -z "$as_dir" && as_dir=.
12297    for ac_exec_ext in '' $ac_executable_extensions; do
12298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12299    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12301    break 2
12302  fi
12303done
12304  done
12305IFS=$as_save_IFS
12306
12307  ;;
12308esac
12309fi
12310UNAME=$ac_cv_path_UNAME
12311if test -n "$UNAME"; then
12312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12313$as_echo "$UNAME" >&6; }
12314else
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12316$as_echo "no" >&6; }
12317fi
12318
12319
12320          if test "x$UNAME" = x; then
12321            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12322          fi
12323        else
12324          # Otherwise we believe it is a complete path. Use it as it is.
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12326$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12328$as_echo_n "checking for UNAME... " >&6; }
12329          if test ! -x "$tool_specified"; then
12330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12331$as_echo "not found" >&6; }
12332            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12333          fi
12334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12335$as_echo "$tool_specified" >&6; }
12336        fi
12337      fi
12338    fi
12339
12340  fi
12341
12342
12343
12344  if test "x$UNAME" = x; then
12345    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12346  fi
12347
12348
12349
12350
12351
12352  # Publish this variable in the help.
12353
12354
12355  if [ -z "${UNIQ+x}" ]; then
12356    # The variable is not set by user, try to locate tool using the code snippet
12357    for ac_prog in uniq
12358do
12359  # Extract the first word of "$ac_prog", so it can be a program name with args.
12360set dummy $ac_prog; ac_word=$2
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12362$as_echo_n "checking for $ac_word... " >&6; }
12363if ${ac_cv_path_UNIQ+:} false; then :
12364  $as_echo_n "(cached) " >&6
12365else
12366  case $UNIQ in
12367  [\\/]* | ?:[\\/]*)
12368  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12369  ;;
12370  *)
12371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12372for as_dir in $PATH
12373do
12374  IFS=$as_save_IFS
12375  test -z "$as_dir" && as_dir=.
12376    for ac_exec_ext in '' $ac_executable_extensions; do
12377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12378    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12380    break 2
12381  fi
12382done
12383  done
12384IFS=$as_save_IFS
12385
12386  ;;
12387esac
12388fi
12389UNIQ=$ac_cv_path_UNIQ
12390if test -n "$UNIQ"; then
12391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12392$as_echo "$UNIQ" >&6; }
12393else
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
12396fi
12397
12398
12399  test -n "$UNIQ" && break
12400done
12401
12402  else
12403    # The variable is set, but is it from the command line or the environment?
12404
12405    # Try to remove the string !UNIQ! from our list.
12406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12408      # If it failed, the variable was not from the command line. Ignore it,
12409      # but warn the user (except for BASH, which is always set by the calling BASH).
12410      if test "xUNIQ" != xBASH; then
12411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12412$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12413      fi
12414      # Try to locate tool using the code snippet
12415      for ac_prog in uniq
12416do
12417  # Extract the first word of "$ac_prog", so it can be a program name with args.
12418set dummy $ac_prog; ac_word=$2
12419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12420$as_echo_n "checking for $ac_word... " >&6; }
12421if ${ac_cv_path_UNIQ+:} false; then :
12422  $as_echo_n "(cached) " >&6
12423else
12424  case $UNIQ in
12425  [\\/]* | ?:[\\/]*)
12426  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12427  ;;
12428  *)
12429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12430for as_dir in $PATH
12431do
12432  IFS=$as_save_IFS
12433  test -z "$as_dir" && as_dir=.
12434    for ac_exec_ext in '' $ac_executable_extensions; do
12435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12436    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12438    break 2
12439  fi
12440done
12441  done
12442IFS=$as_save_IFS
12443
12444  ;;
12445esac
12446fi
12447UNIQ=$ac_cv_path_UNIQ
12448if test -n "$UNIQ"; then
12449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12450$as_echo "$UNIQ" >&6; }
12451else
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12453$as_echo "no" >&6; }
12454fi
12455
12456
12457  test -n "$UNIQ" && break
12458done
12459
12460    else
12461      # If it succeeded, then it was overridden by the user. We will use it
12462      # for the tool.
12463
12464      # First remove it from the list of overridden variables, so we can test
12465      # for unknown variables in the end.
12466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12467
12468      # Check if we try to supply an empty value
12469      if test "x$UNIQ" = x; then
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12471$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12473$as_echo_n "checking for UNIQ... " >&6; }
12474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12475$as_echo "disabled" >&6; }
12476      else
12477        # Check if the provided tool contains a complete path.
12478        tool_specified="$UNIQ"
12479        tool_basename="${tool_specified##*/}"
12480        if test "x$tool_basename" = "x$tool_specified"; then
12481          # A command without a complete path is provided, search $PATH.
12482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12483$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12484          # Extract the first word of "$tool_basename", so it can be a program name with args.
12485set dummy $tool_basename; ac_word=$2
12486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12487$as_echo_n "checking for $ac_word... " >&6; }
12488if ${ac_cv_path_UNIQ+:} false; then :
12489  $as_echo_n "(cached) " >&6
12490else
12491  case $UNIQ in
12492  [\\/]* | ?:[\\/]*)
12493  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12494  ;;
12495  *)
12496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12497for as_dir in $PATH
12498do
12499  IFS=$as_save_IFS
12500  test -z "$as_dir" && as_dir=.
12501    for ac_exec_ext in '' $ac_executable_extensions; do
12502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12503    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12505    break 2
12506  fi
12507done
12508  done
12509IFS=$as_save_IFS
12510
12511  ;;
12512esac
12513fi
12514UNIQ=$ac_cv_path_UNIQ
12515if test -n "$UNIQ"; then
12516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12517$as_echo "$UNIQ" >&6; }
12518else
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520$as_echo "no" >&6; }
12521fi
12522
12523
12524          if test "x$UNIQ" = x; then
12525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12526          fi
12527        else
12528          # Otherwise we believe it is a complete path. Use it as it is.
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12530$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12532$as_echo_n "checking for UNIQ... " >&6; }
12533          if test ! -x "$tool_specified"; then
12534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12535$as_echo "not found" >&6; }
12536            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12537          fi
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12539$as_echo "$tool_specified" >&6; }
12540        fi
12541      fi
12542    fi
12543
12544  fi
12545
12546
12547
12548  if test "x$UNIQ" = x; then
12549    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12550  fi
12551
12552
12553
12554
12555
12556  # Publish this variable in the help.
12557
12558
12559  if [ -z "${WC+x}" ]; then
12560    # The variable is not set by user, try to locate tool using the code snippet
12561    for ac_prog in wc
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_WC+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $WC in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593WC=$ac_cv_path_WC
12594if test -n "$WC"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12596$as_echo "$WC" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$WC" && break
12604done
12605
12606  else
12607    # The variable is set, but is it from the command line or the environment?
12608
12609    # Try to remove the string !WC! from our list.
12610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12612      # If it failed, the variable was not from the command line. Ignore it,
12613      # but warn the user (except for BASH, which is always set by the calling BASH).
12614      if test "xWC" != xBASH; then
12615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12616$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12617      fi
12618      # Try to locate tool using the code snippet
12619      for ac_prog in wc
12620do
12621  # Extract the first word of "$ac_prog", so it can be a program name with args.
12622set dummy $ac_prog; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_WC+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $WC in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651WC=$ac_cv_path_WC
12652if test -n "$WC"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12654$as_echo "$WC" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661  test -n "$WC" && break
12662done
12663
12664    else
12665      # If it succeeded, then it was overridden by the user. We will use it
12666      # for the tool.
12667
12668      # First remove it from the list of overridden variables, so we can test
12669      # for unknown variables in the end.
12670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12671
12672      # Check if we try to supply an empty value
12673      if test "x$WC" = x; then
12674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12675$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12677$as_echo_n "checking for WC... " >&6; }
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12679$as_echo "disabled" >&6; }
12680      else
12681        # Check if the provided tool contains a complete path.
12682        tool_specified="$WC"
12683        tool_basename="${tool_specified##*/}"
12684        if test "x$tool_basename" = "x$tool_specified"; then
12685          # A command without a complete path is provided, search $PATH.
12686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12687$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12688          # Extract the first word of "$tool_basename", so it can be a program name with args.
12689set dummy $tool_basename; ac_word=$2
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12691$as_echo_n "checking for $ac_word... " >&6; }
12692if ${ac_cv_path_WC+:} false; then :
12693  $as_echo_n "(cached) " >&6
12694else
12695  case $WC in
12696  [\\/]* | ?:[\\/]*)
12697  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12698  ;;
12699  *)
12700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715  ;;
12716esac
12717fi
12718WC=$ac_cv_path_WC
12719if test -n "$WC"; then
12720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12721$as_echo "$WC" >&6; }
12722else
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
12725fi
12726
12727
12728          if test "x$WC" = x; then
12729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12730          fi
12731        else
12732          # Otherwise we believe it is a complete path. Use it as it is.
12733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12734$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12736$as_echo_n "checking for WC... " >&6; }
12737          if test ! -x "$tool_specified"; then
12738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12739$as_echo "not found" >&6; }
12740            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12741          fi
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12743$as_echo "$tool_specified" >&6; }
12744        fi
12745      fi
12746    fi
12747
12748  fi
12749
12750
12751
12752  if test "x$WC" = x; then
12753    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12754  fi
12755
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if [ -z "${WHICH+x}" ]; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in which
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_WHICH+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $WHICH in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797WHICH=$ac_cv_path_WHICH
12798if test -n "$WHICH"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12800$as_echo "$WHICH" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$WHICH" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !WHICH! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xWHICH" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in which
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_WHICH+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $WHICH in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855WHICH=$ac_cv_path_WHICH
12856if test -n "$WHICH"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12858$as_echo "$WHICH" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$WHICH" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if we try to supply an empty value
12877      if test "x$WHICH" = x; then
12878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12879$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12881$as_echo_n "checking for WHICH... " >&6; }
12882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12883$as_echo "disabled" >&6; }
12884      else
12885        # Check if the provided tool contains a complete path.
12886        tool_specified="$WHICH"
12887        tool_basename="${tool_specified##*/}"
12888        if test "x$tool_basename" = "x$tool_specified"; then
12889          # A command without a complete path is provided, search $PATH.
12890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12891$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12892          # Extract the first word of "$tool_basename", so it can be a program name with args.
12893set dummy $tool_basename; ac_word=$2
12894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12895$as_echo_n "checking for $ac_word... " >&6; }
12896if ${ac_cv_path_WHICH+:} false; then :
12897  $as_echo_n "(cached) " >&6
12898else
12899  case $WHICH in
12900  [\\/]* | ?:[\\/]*)
12901  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12902  ;;
12903  *)
12904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12905for as_dir in $PATH
12906do
12907  IFS=$as_save_IFS
12908  test -z "$as_dir" && as_dir=.
12909    for ac_exec_ext in '' $ac_executable_extensions; do
12910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12911    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12913    break 2
12914  fi
12915done
12916  done
12917IFS=$as_save_IFS
12918
12919  ;;
12920esac
12921fi
12922WHICH=$ac_cv_path_WHICH
12923if test -n "$WHICH"; then
12924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12925$as_echo "$WHICH" >&6; }
12926else
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12928$as_echo "no" >&6; }
12929fi
12930
12931
12932          if test "x$WHICH" = x; then
12933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12934          fi
12935        else
12936          # Otherwise we believe it is a complete path. Use it as it is.
12937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12938$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12940$as_echo_n "checking for WHICH... " >&6; }
12941          if test ! -x "$tool_specified"; then
12942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12943$as_echo "not found" >&6; }
12944            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12945          fi
12946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12947$as_echo "$tool_specified" >&6; }
12948        fi
12949      fi
12950    fi
12951
12952  fi
12953
12954
12955
12956  if test "x$WHICH" = x; then
12957    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12958  fi
12959
12960
12961
12962
12963
12964  # Publish this variable in the help.
12965
12966
12967  if [ -z "${XARGS+x}" ]; then
12968    # The variable is not set by user, try to locate tool using the code snippet
12969    for ac_prog in xargs
12970do
12971  # Extract the first word of "$ac_prog", so it can be a program name with args.
12972set dummy $ac_prog; ac_word=$2
12973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12974$as_echo_n "checking for $ac_word... " >&6; }
12975if ${ac_cv_path_XARGS+:} false; then :
12976  $as_echo_n "(cached) " >&6
12977else
12978  case $XARGS in
12979  [\\/]* | ?:[\\/]*)
12980  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12981  ;;
12982  *)
12983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12984for as_dir in $PATH
12985do
12986  IFS=$as_save_IFS
12987  test -z "$as_dir" && as_dir=.
12988    for ac_exec_ext in '' $ac_executable_extensions; do
12989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12990    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12992    break 2
12993  fi
12994done
12995  done
12996IFS=$as_save_IFS
12997
12998  ;;
12999esac
13000fi
13001XARGS=$ac_cv_path_XARGS
13002if test -n "$XARGS"; then
13003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13004$as_echo "$XARGS" >&6; }
13005else
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13007$as_echo "no" >&6; }
13008fi
13009
13010
13011  test -n "$XARGS" && break
13012done
13013
13014  else
13015    # The variable is set, but is it from the command line or the environment?
13016
13017    # Try to remove the string !XARGS! from our list.
13018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13020      # If it failed, the variable was not from the command line. Ignore it,
13021      # but warn the user (except for BASH, which is always set by the calling BASH).
13022      if test "xXARGS" != xBASH; then
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13024$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13025      fi
13026      # Try to locate tool using the code snippet
13027      for ac_prog in xargs
13028do
13029  # Extract the first word of "$ac_prog", so it can be a program name with args.
13030set dummy $ac_prog; ac_word=$2
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13032$as_echo_n "checking for $ac_word... " >&6; }
13033if ${ac_cv_path_XARGS+:} false; then :
13034  $as_echo_n "(cached) " >&6
13035else
13036  case $XARGS in
13037  [\\/]* | ?:[\\/]*)
13038  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13039  ;;
13040  *)
13041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13042for as_dir in $PATH
13043do
13044  IFS=$as_save_IFS
13045  test -z "$as_dir" && as_dir=.
13046    for ac_exec_ext in '' $ac_executable_extensions; do
13047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13048    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13050    break 2
13051  fi
13052done
13053  done
13054IFS=$as_save_IFS
13055
13056  ;;
13057esac
13058fi
13059XARGS=$ac_cv_path_XARGS
13060if test -n "$XARGS"; then
13061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13062$as_echo "$XARGS" >&6; }
13063else
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13065$as_echo "no" >&6; }
13066fi
13067
13068
13069  test -n "$XARGS" && break
13070done
13071
13072    else
13073      # If it succeeded, then it was overridden by the user. We will use it
13074      # for the tool.
13075
13076      # First remove it from the list of overridden variables, so we can test
13077      # for unknown variables in the end.
13078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13079
13080      # Check if we try to supply an empty value
13081      if test "x$XARGS" = x; then
13082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13083$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13085$as_echo_n "checking for XARGS... " >&6; }
13086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13087$as_echo "disabled" >&6; }
13088      else
13089        # Check if the provided tool contains a complete path.
13090        tool_specified="$XARGS"
13091        tool_basename="${tool_specified##*/}"
13092        if test "x$tool_basename" = "x$tool_specified"; then
13093          # A command without a complete path is provided, search $PATH.
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13095$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13096          # Extract the first word of "$tool_basename", so it can be a program name with args.
13097set dummy $tool_basename; ac_word=$2
13098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13099$as_echo_n "checking for $ac_word... " >&6; }
13100if ${ac_cv_path_XARGS+:} false; then :
13101  $as_echo_n "(cached) " >&6
13102else
13103  case $XARGS in
13104  [\\/]* | ?:[\\/]*)
13105  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13106  ;;
13107  *)
13108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13109for as_dir in $PATH
13110do
13111  IFS=$as_save_IFS
13112  test -z "$as_dir" && as_dir=.
13113    for ac_exec_ext in '' $ac_executable_extensions; do
13114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13115    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13117    break 2
13118  fi
13119done
13120  done
13121IFS=$as_save_IFS
13122
13123  ;;
13124esac
13125fi
13126XARGS=$ac_cv_path_XARGS
13127if test -n "$XARGS"; then
13128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13129$as_echo "$XARGS" >&6; }
13130else
13131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13132$as_echo "no" >&6; }
13133fi
13134
13135
13136          if test "x$XARGS" = x; then
13137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13138          fi
13139        else
13140          # Otherwise we believe it is a complete path. Use it as it is.
13141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13142$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13144$as_echo_n "checking for XARGS... " >&6; }
13145          if test ! -x "$tool_specified"; then
13146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13147$as_echo "not found" >&6; }
13148            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13149          fi
13150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13151$as_echo "$tool_specified" >&6; }
13152        fi
13153      fi
13154    fi
13155
13156  fi
13157
13158
13159
13160  if test "x$XARGS" = x; then
13161    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13162  fi
13163
13164
13165
13166  # Then required tools that require some special treatment.
13167
13168
13169  # Publish this variable in the help.
13170
13171
13172  if [ -z "${AWK+x}" ]; then
13173    # The variable is not set by user, try to locate tool using the code snippet
13174    for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216  else
13217    # The variable is set, but is it from the command line or the environment?
13218
13219    # Try to remove the string !AWK! from our list.
13220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13222      # If it failed, the variable was not from the command line. Ignore it,
13223      # but warn the user (except for BASH, which is always set by the calling BASH).
13224      if test "xAWK" != xBASH; then
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13226$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13227      fi
13228      # Try to locate tool using the code snippet
13229      for ac_prog in gawk mawk nawk awk
13230do
13231  # Extract the first word of "$ac_prog", so it can be a program name with args.
13232set dummy $ac_prog; ac_word=$2
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13234$as_echo_n "checking for $ac_word... " >&6; }
13235if ${ac_cv_prog_AWK+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  if test -n "$AWK"; then
13239  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13240else
13241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242for as_dir in $PATH
13243do
13244  IFS=$as_save_IFS
13245  test -z "$as_dir" && as_dir=.
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13248    ac_cv_prog_AWK="$ac_prog"
13249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13250    break 2
13251  fi
13252done
13253  done
13254IFS=$as_save_IFS
13255
13256fi
13257fi
13258AWK=$ac_cv_prog_AWK
13259if test -n "$AWK"; then
13260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13261$as_echo "$AWK" >&6; }
13262else
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
13265fi
13266
13267
13268  test -n "$AWK" && break
13269done
13270
13271    else
13272      # If it succeeded, then it was overridden by the user. We will use it
13273      # for the tool.
13274
13275      # First remove it from the list of overridden variables, so we can test
13276      # for unknown variables in the end.
13277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13278
13279      # Check if we try to supply an empty value
13280      if test "x$AWK" = x; then
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13282$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13284$as_echo_n "checking for AWK... " >&6; }
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13286$as_echo "disabled" >&6; }
13287      else
13288        # Check if the provided tool contains a complete path.
13289        tool_specified="$AWK"
13290        tool_basename="${tool_specified##*/}"
13291        if test "x$tool_basename" = "x$tool_specified"; then
13292          # A command without a complete path is provided, search $PATH.
13293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13294$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13295          # Extract the first word of "$tool_basename", so it can be a program name with args.
13296set dummy $tool_basename; ac_word=$2
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13298$as_echo_n "checking for $ac_word... " >&6; }
13299if ${ac_cv_path_AWK+:} false; then :
13300  $as_echo_n "(cached) " >&6
13301else
13302  case $AWK in
13303  [\\/]* | ?:[\\/]*)
13304  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13305  ;;
13306  *)
13307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13308for as_dir in $PATH
13309do
13310  IFS=$as_save_IFS
13311  test -z "$as_dir" && as_dir=.
13312    for ac_exec_ext in '' $ac_executable_extensions; do
13313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13314    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13316    break 2
13317  fi
13318done
13319  done
13320IFS=$as_save_IFS
13321
13322  ;;
13323esac
13324fi
13325AWK=$ac_cv_path_AWK
13326if test -n "$AWK"; then
13327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13328$as_echo "$AWK" >&6; }
13329else
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13331$as_echo "no" >&6; }
13332fi
13333
13334
13335          if test "x$AWK" = x; then
13336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13337          fi
13338        else
13339          # Otherwise we believe it is a complete path. Use it as it is.
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13341$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13343$as_echo_n "checking for AWK... " >&6; }
13344          if test ! -x "$tool_specified"; then
13345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13346$as_echo "not found" >&6; }
13347            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13348          fi
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13350$as_echo "$tool_specified" >&6; }
13351        fi
13352      fi
13353    fi
13354
13355  fi
13356
13357
13358  if test "x$AWK" = x; then
13359    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13360  fi
13361
13362
13363
13364
13365  # Publish this variable in the help.
13366
13367
13368  if [ -z "${GREP+x}" ]; then
13369    # The variable is not set by user, try to locate tool using the code snippet
13370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13371$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13372if ${ac_cv_path_GREP+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  if test -z "$GREP"; then
13376  ac_path_GREP_found=false
13377  # Loop through the user's path and test for each of PROGNAME-LIST
13378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13380do
13381  IFS=$as_save_IFS
13382  test -z "$as_dir" && as_dir=.
13383    for ac_prog in grep ggrep; do
13384    for ac_exec_ext in '' $ac_executable_extensions; do
13385      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13386      as_fn_executable_p "$ac_path_GREP" || continue
13387# Check for GNU ac_path_GREP and select it if it is found.
13388  # Check for GNU $ac_path_GREP
13389case `"$ac_path_GREP" --version 2>&1` in
13390*GNU*)
13391  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13392*)
13393  ac_count=0
13394  $as_echo_n 0123456789 >"conftest.in"
13395  while :
13396  do
13397    cat "conftest.in" "conftest.in" >"conftest.tmp"
13398    mv "conftest.tmp" "conftest.in"
13399    cp "conftest.in" "conftest.nl"
13400    $as_echo 'GREP' >> "conftest.nl"
13401    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13402    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13403    as_fn_arith $ac_count + 1 && ac_count=$as_val
13404    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13405      # Best one so far, save it but keep looking for a better one
13406      ac_cv_path_GREP="$ac_path_GREP"
13407      ac_path_GREP_max=$ac_count
13408    fi
13409    # 10*(2^10) chars as input seems more than enough
13410    test $ac_count -gt 10 && break
13411  done
13412  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13413esac
13414
13415      $ac_path_GREP_found && break 3
13416    done
13417  done
13418  done
13419IFS=$as_save_IFS
13420  if test -z "$ac_cv_path_GREP"; then
13421    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13422  fi
13423else
13424  ac_cv_path_GREP=$GREP
13425fi
13426
13427fi
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13429$as_echo "$ac_cv_path_GREP" >&6; }
13430 GREP="$ac_cv_path_GREP"
13431
13432
13433  else
13434    # The variable is set, but is it from the command line or the environment?
13435
13436    # Try to remove the string !GREP! from our list.
13437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13439      # If it failed, the variable was not from the command line. Ignore it,
13440      # but warn the user (except for BASH, which is always set by the calling BASH).
13441      if test "xGREP" != xBASH; then
13442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13443$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13444      fi
13445      # Try to locate tool using the code snippet
13446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13447$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13448if ${ac_cv_path_GREP+:} false; then :
13449  $as_echo_n "(cached) " >&6
13450else
13451  if test -z "$GREP"; then
13452  ac_path_GREP_found=false
13453  # Loop through the user's path and test for each of PROGNAME-LIST
13454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13455for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13456do
13457  IFS=$as_save_IFS
13458  test -z "$as_dir" && as_dir=.
13459    for ac_prog in grep ggrep; do
13460    for ac_exec_ext in '' $ac_executable_extensions; do
13461      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13462      as_fn_executable_p "$ac_path_GREP" || continue
13463# Check for GNU ac_path_GREP and select it if it is found.
13464  # Check for GNU $ac_path_GREP
13465case `"$ac_path_GREP" --version 2>&1` in
13466*GNU*)
13467  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13468*)
13469  ac_count=0
13470  $as_echo_n 0123456789 >"conftest.in"
13471  while :
13472  do
13473    cat "conftest.in" "conftest.in" >"conftest.tmp"
13474    mv "conftest.tmp" "conftest.in"
13475    cp "conftest.in" "conftest.nl"
13476    $as_echo 'GREP' >> "conftest.nl"
13477    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13478    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13479    as_fn_arith $ac_count + 1 && ac_count=$as_val
13480    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13481      # Best one so far, save it but keep looking for a better one
13482      ac_cv_path_GREP="$ac_path_GREP"
13483      ac_path_GREP_max=$ac_count
13484    fi
13485    # 10*(2^10) chars as input seems more than enough
13486    test $ac_count -gt 10 && break
13487  done
13488  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13489esac
13490
13491      $ac_path_GREP_found && break 3
13492    done
13493  done
13494  done
13495IFS=$as_save_IFS
13496  if test -z "$ac_cv_path_GREP"; then
13497    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13498  fi
13499else
13500  ac_cv_path_GREP=$GREP
13501fi
13502
13503fi
13504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13505$as_echo "$ac_cv_path_GREP" >&6; }
13506 GREP="$ac_cv_path_GREP"
13507
13508
13509    else
13510      # If it succeeded, then it was overridden by the user. We will use it
13511      # for the tool.
13512
13513      # First remove it from the list of overridden variables, so we can test
13514      # for unknown variables in the end.
13515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13516
13517      # Check if we try to supply an empty value
13518      if test "x$GREP" = x; then
13519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13520$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13522$as_echo_n "checking for GREP... " >&6; }
13523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13524$as_echo "disabled" >&6; }
13525      else
13526        # Check if the provided tool contains a complete path.
13527        tool_specified="$GREP"
13528        tool_basename="${tool_specified##*/}"
13529        if test "x$tool_basename" = "x$tool_specified"; then
13530          # A command without a complete path is provided, search $PATH.
13531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13532$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13533          # Extract the first word of "$tool_basename", so it can be a program name with args.
13534set dummy $tool_basename; ac_word=$2
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13536$as_echo_n "checking for $ac_word... " >&6; }
13537if ${ac_cv_path_GREP+:} false; then :
13538  $as_echo_n "(cached) " >&6
13539else
13540  case $GREP in
13541  [\\/]* | ?:[\\/]*)
13542  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13543  ;;
13544  *)
13545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13546for as_dir in $PATH
13547do
13548  IFS=$as_save_IFS
13549  test -z "$as_dir" && as_dir=.
13550    for ac_exec_ext in '' $ac_executable_extensions; do
13551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13552    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13554    break 2
13555  fi
13556done
13557  done
13558IFS=$as_save_IFS
13559
13560  ;;
13561esac
13562fi
13563GREP=$ac_cv_path_GREP
13564if test -n "$GREP"; then
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13566$as_echo "$GREP" >&6; }
13567else
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
13570fi
13571
13572
13573          if test "x$GREP" = x; then
13574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13575          fi
13576        else
13577          # Otherwise we believe it is a complete path. Use it as it is.
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13579$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13581$as_echo_n "checking for GREP... " >&6; }
13582          if test ! -x "$tool_specified"; then
13583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13584$as_echo "not found" >&6; }
13585            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13586          fi
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13588$as_echo "$tool_specified" >&6; }
13589        fi
13590      fi
13591    fi
13592
13593  fi
13594
13595
13596  if test "x$GREP" = x; then
13597    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13598  fi
13599
13600
13601
13602
13603  # Publish this variable in the help.
13604
13605
13606  if [ -z "${EGREP+x}" ]; then
13607    # The variable is not set by user, try to locate tool using the code snippet
13608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13609$as_echo_n "checking for egrep... " >&6; }
13610if ${ac_cv_path_EGREP+:} false; then :
13611  $as_echo_n "(cached) " >&6
13612else
13613  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13614   then ac_cv_path_EGREP="$GREP -E"
13615   else
13616     if test -z "$EGREP"; then
13617  ac_path_EGREP_found=false
13618  # Loop through the user's path and test for each of PROGNAME-LIST
13619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13620for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13621do
13622  IFS=$as_save_IFS
13623  test -z "$as_dir" && as_dir=.
13624    for ac_prog in egrep; do
13625    for ac_exec_ext in '' $ac_executable_extensions; do
13626      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13627      as_fn_executable_p "$ac_path_EGREP" || continue
13628# Check for GNU ac_path_EGREP and select it if it is found.
13629  # Check for GNU $ac_path_EGREP
13630case `"$ac_path_EGREP" --version 2>&1` in
13631*GNU*)
13632  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13633*)
13634  ac_count=0
13635  $as_echo_n 0123456789 >"conftest.in"
13636  while :
13637  do
13638    cat "conftest.in" "conftest.in" >"conftest.tmp"
13639    mv "conftest.tmp" "conftest.in"
13640    cp "conftest.in" "conftest.nl"
13641    $as_echo 'EGREP' >> "conftest.nl"
13642    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13643    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13644    as_fn_arith $ac_count + 1 && ac_count=$as_val
13645    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13646      # Best one so far, save it but keep looking for a better one
13647      ac_cv_path_EGREP="$ac_path_EGREP"
13648      ac_path_EGREP_max=$ac_count
13649    fi
13650    # 10*(2^10) chars as input seems more than enough
13651    test $ac_count -gt 10 && break
13652  done
13653  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13654esac
13655
13656      $ac_path_EGREP_found && break 3
13657    done
13658  done
13659  done
13660IFS=$as_save_IFS
13661  if test -z "$ac_cv_path_EGREP"; then
13662    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13663  fi
13664else
13665  ac_cv_path_EGREP=$EGREP
13666fi
13667
13668   fi
13669fi
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13671$as_echo "$ac_cv_path_EGREP" >&6; }
13672 EGREP="$ac_cv_path_EGREP"
13673
13674
13675  else
13676    # The variable is set, but is it from the command line or the environment?
13677
13678    # Try to remove the string !EGREP! from our list.
13679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13681      # If it failed, the variable was not from the command line. Ignore it,
13682      # but warn the user (except for BASH, which is always set by the calling BASH).
13683      if test "xEGREP" != xBASH; then
13684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13685$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13686      fi
13687      # Try to locate tool using the code snippet
13688      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13689$as_echo_n "checking for egrep... " >&6; }
13690if ${ac_cv_path_EGREP+:} false; then :
13691  $as_echo_n "(cached) " >&6
13692else
13693  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13694   then ac_cv_path_EGREP="$GREP -E"
13695   else
13696     if test -z "$EGREP"; then
13697  ac_path_EGREP_found=false
13698  # Loop through the user's path and test for each of PROGNAME-LIST
13699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13700for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13701do
13702  IFS=$as_save_IFS
13703  test -z "$as_dir" && as_dir=.
13704    for ac_prog in egrep; do
13705    for ac_exec_ext in '' $ac_executable_extensions; do
13706      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13707      as_fn_executable_p "$ac_path_EGREP" || continue
13708# Check for GNU ac_path_EGREP and select it if it is found.
13709  # Check for GNU $ac_path_EGREP
13710case `"$ac_path_EGREP" --version 2>&1` in
13711*GNU*)
13712  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13713*)
13714  ac_count=0
13715  $as_echo_n 0123456789 >"conftest.in"
13716  while :
13717  do
13718    cat "conftest.in" "conftest.in" >"conftest.tmp"
13719    mv "conftest.tmp" "conftest.in"
13720    cp "conftest.in" "conftest.nl"
13721    $as_echo 'EGREP' >> "conftest.nl"
13722    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13723    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13724    as_fn_arith $ac_count + 1 && ac_count=$as_val
13725    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13726      # Best one so far, save it but keep looking for a better one
13727      ac_cv_path_EGREP="$ac_path_EGREP"
13728      ac_path_EGREP_max=$ac_count
13729    fi
13730    # 10*(2^10) chars as input seems more than enough
13731    test $ac_count -gt 10 && break
13732  done
13733  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13734esac
13735
13736      $ac_path_EGREP_found && break 3
13737    done
13738  done
13739  done
13740IFS=$as_save_IFS
13741  if test -z "$ac_cv_path_EGREP"; then
13742    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13743  fi
13744else
13745  ac_cv_path_EGREP=$EGREP
13746fi
13747
13748   fi
13749fi
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13751$as_echo "$ac_cv_path_EGREP" >&6; }
13752 EGREP="$ac_cv_path_EGREP"
13753
13754
13755    else
13756      # If it succeeded, then it was overridden by the user. We will use it
13757      # for the tool.
13758
13759      # First remove it from the list of overridden variables, so we can test
13760      # for unknown variables in the end.
13761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13762
13763      # Check if we try to supply an empty value
13764      if test "x$EGREP" = x; then
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13766$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13768$as_echo_n "checking for EGREP... " >&6; }
13769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13770$as_echo "disabled" >&6; }
13771      else
13772        # Check if the provided tool contains a complete path.
13773        tool_specified="$EGREP"
13774        tool_basename="${tool_specified##*/}"
13775        if test "x$tool_basename" = "x$tool_specified"; then
13776          # A command without a complete path is provided, search $PATH.
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13778$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13779          # Extract the first word of "$tool_basename", so it can be a program name with args.
13780set dummy $tool_basename; ac_word=$2
13781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13782$as_echo_n "checking for $ac_word... " >&6; }
13783if ${ac_cv_path_EGREP+:} false; then :
13784  $as_echo_n "(cached) " >&6
13785else
13786  case $EGREP in
13787  [\\/]* | ?:[\\/]*)
13788  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13789  ;;
13790  *)
13791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13792for as_dir in $PATH
13793do
13794  IFS=$as_save_IFS
13795  test -z "$as_dir" && as_dir=.
13796    for ac_exec_ext in '' $ac_executable_extensions; do
13797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13798    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13800    break 2
13801  fi
13802done
13803  done
13804IFS=$as_save_IFS
13805
13806  ;;
13807esac
13808fi
13809EGREP=$ac_cv_path_EGREP
13810if test -n "$EGREP"; then
13811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13812$as_echo "$EGREP" >&6; }
13813else
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13815$as_echo "no" >&6; }
13816fi
13817
13818
13819          if test "x$EGREP" = x; then
13820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13821          fi
13822        else
13823          # Otherwise we believe it is a complete path. Use it as it is.
13824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13825$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13827$as_echo_n "checking for EGREP... " >&6; }
13828          if test ! -x "$tool_specified"; then
13829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13830$as_echo "not found" >&6; }
13831            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13832          fi
13833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13834$as_echo "$tool_specified" >&6; }
13835        fi
13836      fi
13837    fi
13838
13839  fi
13840
13841
13842  if test "x$EGREP" = x; then
13843    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13844  fi
13845
13846
13847
13848
13849  # Publish this variable in the help.
13850
13851
13852  if [ -z "${FGREP+x}" ]; then
13853    # The variable is not set by user, try to locate tool using the code snippet
13854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13855$as_echo_n "checking for fgrep... " >&6; }
13856if ${ac_cv_path_FGREP+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13860   then ac_cv_path_FGREP="$GREP -F"
13861   else
13862     if test -z "$FGREP"; then
13863  ac_path_FGREP_found=false
13864  # Loop through the user's path and test for each of PROGNAME-LIST
13865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13866for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13867do
13868  IFS=$as_save_IFS
13869  test -z "$as_dir" && as_dir=.
13870    for ac_prog in fgrep; do
13871    for ac_exec_ext in '' $ac_executable_extensions; do
13872      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13873      as_fn_executable_p "$ac_path_FGREP" || continue
13874# Check for GNU ac_path_FGREP and select it if it is found.
13875  # Check for GNU $ac_path_FGREP
13876case `"$ac_path_FGREP" --version 2>&1` in
13877*GNU*)
13878  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13879*)
13880  ac_count=0
13881  $as_echo_n 0123456789 >"conftest.in"
13882  while :
13883  do
13884    cat "conftest.in" "conftest.in" >"conftest.tmp"
13885    mv "conftest.tmp" "conftest.in"
13886    cp "conftest.in" "conftest.nl"
13887    $as_echo 'FGREP' >> "conftest.nl"
13888    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13889    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13890    as_fn_arith $ac_count + 1 && ac_count=$as_val
13891    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13892      # Best one so far, save it but keep looking for a better one
13893      ac_cv_path_FGREP="$ac_path_FGREP"
13894      ac_path_FGREP_max=$ac_count
13895    fi
13896    # 10*(2^10) chars as input seems more than enough
13897    test $ac_count -gt 10 && break
13898  done
13899  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13900esac
13901
13902      $ac_path_FGREP_found && break 3
13903    done
13904  done
13905  done
13906IFS=$as_save_IFS
13907  if test -z "$ac_cv_path_FGREP"; then
13908    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13909  fi
13910else
13911  ac_cv_path_FGREP=$FGREP
13912fi
13913
13914   fi
13915fi
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13917$as_echo "$ac_cv_path_FGREP" >&6; }
13918 FGREP="$ac_cv_path_FGREP"
13919
13920
13921  else
13922    # The variable is set, but is it from the command line or the environment?
13923
13924    # Try to remove the string !FGREP! from our list.
13925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13927      # If it failed, the variable was not from the command line. Ignore it,
13928      # but warn the user (except for BASH, which is always set by the calling BASH).
13929      if test "xFGREP" != xBASH; then
13930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13931$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13932      fi
13933      # Try to locate tool using the code snippet
13934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13935$as_echo_n "checking for fgrep... " >&6; }
13936if ${ac_cv_path_FGREP+:} false; then :
13937  $as_echo_n "(cached) " >&6
13938else
13939  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13940   then ac_cv_path_FGREP="$GREP -F"
13941   else
13942     if test -z "$FGREP"; then
13943  ac_path_FGREP_found=false
13944  # Loop through the user's path and test for each of PROGNAME-LIST
13945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13946for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13947do
13948  IFS=$as_save_IFS
13949  test -z "$as_dir" && as_dir=.
13950    for ac_prog in fgrep; do
13951    for ac_exec_ext in '' $ac_executable_extensions; do
13952      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13953      as_fn_executable_p "$ac_path_FGREP" || continue
13954# Check for GNU ac_path_FGREP and select it if it is found.
13955  # Check for GNU $ac_path_FGREP
13956case `"$ac_path_FGREP" --version 2>&1` in
13957*GNU*)
13958  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13959*)
13960  ac_count=0
13961  $as_echo_n 0123456789 >"conftest.in"
13962  while :
13963  do
13964    cat "conftest.in" "conftest.in" >"conftest.tmp"
13965    mv "conftest.tmp" "conftest.in"
13966    cp "conftest.in" "conftest.nl"
13967    $as_echo 'FGREP' >> "conftest.nl"
13968    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13969    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13970    as_fn_arith $ac_count + 1 && ac_count=$as_val
13971    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13972      # Best one so far, save it but keep looking for a better one
13973      ac_cv_path_FGREP="$ac_path_FGREP"
13974      ac_path_FGREP_max=$ac_count
13975    fi
13976    # 10*(2^10) chars as input seems more than enough
13977    test $ac_count -gt 10 && break
13978  done
13979  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13980esac
13981
13982      $ac_path_FGREP_found && break 3
13983    done
13984  done
13985  done
13986IFS=$as_save_IFS
13987  if test -z "$ac_cv_path_FGREP"; then
13988    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13989  fi
13990else
13991  ac_cv_path_FGREP=$FGREP
13992fi
13993
13994   fi
13995fi
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13997$as_echo "$ac_cv_path_FGREP" >&6; }
13998 FGREP="$ac_cv_path_FGREP"
13999
14000
14001    else
14002      # If it succeeded, then it was overridden by the user. We will use it
14003      # for the tool.
14004
14005      # First remove it from the list of overridden variables, so we can test
14006      # for unknown variables in the end.
14007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14008
14009      # Check if we try to supply an empty value
14010      if test "x$FGREP" = x; then
14011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14012$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14014$as_echo_n "checking for FGREP... " >&6; }
14015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14016$as_echo "disabled" >&6; }
14017      else
14018        # Check if the provided tool contains a complete path.
14019        tool_specified="$FGREP"
14020        tool_basename="${tool_specified##*/}"
14021        if test "x$tool_basename" = "x$tool_specified"; then
14022          # A command without a complete path is provided, search $PATH.
14023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14024$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14025          # Extract the first word of "$tool_basename", so it can be a program name with args.
14026set dummy $tool_basename; ac_word=$2
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14028$as_echo_n "checking for $ac_word... " >&6; }
14029if ${ac_cv_path_FGREP+:} false; then :
14030  $as_echo_n "(cached) " >&6
14031else
14032  case $FGREP in
14033  [\\/]* | ?:[\\/]*)
14034  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14035  ;;
14036  *)
14037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14038for as_dir in $PATH
14039do
14040  IFS=$as_save_IFS
14041  test -z "$as_dir" && as_dir=.
14042    for ac_exec_ext in '' $ac_executable_extensions; do
14043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14044    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14046    break 2
14047  fi
14048done
14049  done
14050IFS=$as_save_IFS
14051
14052  ;;
14053esac
14054fi
14055FGREP=$ac_cv_path_FGREP
14056if test -n "$FGREP"; then
14057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14058$as_echo "$FGREP" >&6; }
14059else
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061$as_echo "no" >&6; }
14062fi
14063
14064
14065          if test "x$FGREP" = x; then
14066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14067          fi
14068        else
14069          # Otherwise we believe it is a complete path. Use it as it is.
14070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14071$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14073$as_echo_n "checking for FGREP... " >&6; }
14074          if test ! -x "$tool_specified"; then
14075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14076$as_echo "not found" >&6; }
14077            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14078          fi
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14080$as_echo "$tool_specified" >&6; }
14081        fi
14082      fi
14083    fi
14084
14085  fi
14086
14087
14088  if test "x$FGREP" = x; then
14089    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14090  fi
14091
14092
14093
14094
14095  # Publish this variable in the help.
14096
14097
14098  if [ -z "${SED+x}" ]; then
14099    # The variable is not set by user, try to locate tool using the code snippet
14100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14101$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14102if ${ac_cv_path_SED+:} false; then :
14103  $as_echo_n "(cached) " >&6
14104else
14105            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14106     for ac_i in 1 2 3 4 5 6 7; do
14107       ac_script="$ac_script$as_nl$ac_script"
14108     done
14109     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14110     { ac_script=; unset ac_script;}
14111     if test -z "$SED"; then
14112  ac_path_SED_found=false
14113  # Loop through the user's path and test for each of PROGNAME-LIST
14114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14115for as_dir in $PATH
14116do
14117  IFS=$as_save_IFS
14118  test -z "$as_dir" && as_dir=.
14119    for ac_prog in sed gsed; do
14120    for ac_exec_ext in '' $ac_executable_extensions; do
14121      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14122      as_fn_executable_p "$ac_path_SED" || continue
14123# Check for GNU ac_path_SED and select it if it is found.
14124  # Check for GNU $ac_path_SED
14125case `"$ac_path_SED" --version 2>&1` in
14126*GNU*)
14127  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14128*)
14129  ac_count=0
14130  $as_echo_n 0123456789 >"conftest.in"
14131  while :
14132  do
14133    cat "conftest.in" "conftest.in" >"conftest.tmp"
14134    mv "conftest.tmp" "conftest.in"
14135    cp "conftest.in" "conftest.nl"
14136    $as_echo '' >> "conftest.nl"
14137    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14138    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14139    as_fn_arith $ac_count + 1 && ac_count=$as_val
14140    if test $ac_count -gt ${ac_path_SED_max-0}; then
14141      # Best one so far, save it but keep looking for a better one
14142      ac_cv_path_SED="$ac_path_SED"
14143      ac_path_SED_max=$ac_count
14144    fi
14145    # 10*(2^10) chars as input seems more than enough
14146    test $ac_count -gt 10 && break
14147  done
14148  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14149esac
14150
14151      $ac_path_SED_found && break 3
14152    done
14153  done
14154  done
14155IFS=$as_save_IFS
14156  if test -z "$ac_cv_path_SED"; then
14157    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14158  fi
14159else
14160  ac_cv_path_SED=$SED
14161fi
14162
14163fi
14164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14165$as_echo "$ac_cv_path_SED" >&6; }
14166 SED="$ac_cv_path_SED"
14167  rm -f conftest.sed
14168
14169  else
14170    # The variable is set, but is it from the command line or the environment?
14171
14172    # Try to remove the string !SED! from our list.
14173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14175      # If it failed, the variable was not from the command line. Ignore it,
14176      # but warn the user (except for BASH, which is always set by the calling BASH).
14177      if test "xSED" != xBASH; then
14178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14179$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14180      fi
14181      # Try to locate tool using the code snippet
14182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14183$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14184if ${ac_cv_path_SED+:} false; then :
14185  $as_echo_n "(cached) " >&6
14186else
14187            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14188     for ac_i in 1 2 3 4 5 6 7; do
14189       ac_script="$ac_script$as_nl$ac_script"
14190     done
14191     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14192     { ac_script=; unset ac_script;}
14193     if test -z "$SED"; then
14194  ac_path_SED_found=false
14195  # Loop through the user's path and test for each of PROGNAME-LIST
14196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14197for as_dir in $PATH
14198do
14199  IFS=$as_save_IFS
14200  test -z "$as_dir" && as_dir=.
14201    for ac_prog in sed gsed; do
14202    for ac_exec_ext in '' $ac_executable_extensions; do
14203      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14204      as_fn_executable_p "$ac_path_SED" || continue
14205# Check for GNU ac_path_SED and select it if it is found.
14206  # Check for GNU $ac_path_SED
14207case `"$ac_path_SED" --version 2>&1` in
14208*GNU*)
14209  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14210*)
14211  ac_count=0
14212  $as_echo_n 0123456789 >"conftest.in"
14213  while :
14214  do
14215    cat "conftest.in" "conftest.in" >"conftest.tmp"
14216    mv "conftest.tmp" "conftest.in"
14217    cp "conftest.in" "conftest.nl"
14218    $as_echo '' >> "conftest.nl"
14219    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14220    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14221    as_fn_arith $ac_count + 1 && ac_count=$as_val
14222    if test $ac_count -gt ${ac_path_SED_max-0}; then
14223      # Best one so far, save it but keep looking for a better one
14224      ac_cv_path_SED="$ac_path_SED"
14225      ac_path_SED_max=$ac_count
14226    fi
14227    # 10*(2^10) chars as input seems more than enough
14228    test $ac_count -gt 10 && break
14229  done
14230  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14231esac
14232
14233      $ac_path_SED_found && break 3
14234    done
14235  done
14236  done
14237IFS=$as_save_IFS
14238  if test -z "$ac_cv_path_SED"; then
14239    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14240  fi
14241else
14242  ac_cv_path_SED=$SED
14243fi
14244
14245fi
14246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14247$as_echo "$ac_cv_path_SED" >&6; }
14248 SED="$ac_cv_path_SED"
14249  rm -f conftest.sed
14250
14251    else
14252      # If it succeeded, then it was overridden by the user. We will use it
14253      # for the tool.
14254
14255      # First remove it from the list of overridden variables, so we can test
14256      # for unknown variables in the end.
14257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14258
14259      # Check if we try to supply an empty value
14260      if test "x$SED" = x; then
14261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14262$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14264$as_echo_n "checking for SED... " >&6; }
14265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14266$as_echo "disabled" >&6; }
14267      else
14268        # Check if the provided tool contains a complete path.
14269        tool_specified="$SED"
14270        tool_basename="${tool_specified##*/}"
14271        if test "x$tool_basename" = "x$tool_specified"; then
14272          # A command without a complete path is provided, search $PATH.
14273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14274$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14275          # Extract the first word of "$tool_basename", so it can be a program name with args.
14276set dummy $tool_basename; ac_word=$2
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14278$as_echo_n "checking for $ac_word... " >&6; }
14279if ${ac_cv_path_SED+:} false; then :
14280  $as_echo_n "(cached) " >&6
14281else
14282  case $SED in
14283  [\\/]* | ?:[\\/]*)
14284  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14285  ;;
14286  *)
14287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14288for as_dir in $PATH
14289do
14290  IFS=$as_save_IFS
14291  test -z "$as_dir" && as_dir=.
14292    for ac_exec_ext in '' $ac_executable_extensions; do
14293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14294    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14296    break 2
14297  fi
14298done
14299  done
14300IFS=$as_save_IFS
14301
14302  ;;
14303esac
14304fi
14305SED=$ac_cv_path_SED
14306if test -n "$SED"; then
14307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14308$as_echo "$SED" >&6; }
14309else
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14311$as_echo "no" >&6; }
14312fi
14313
14314
14315          if test "x$SED" = x; then
14316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14317          fi
14318        else
14319          # Otherwise we believe it is a complete path. Use it as it is.
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14321$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14323$as_echo_n "checking for SED... " >&6; }
14324          if test ! -x "$tool_specified"; then
14325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14326$as_echo "not found" >&6; }
14327            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14328          fi
14329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14330$as_echo "$tool_specified" >&6; }
14331        fi
14332      fi
14333    fi
14334
14335  fi
14336
14337
14338  if test "x$SED" = x; then
14339    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14340  fi
14341
14342
14343
14344  # Always force rm.
14345  RM="$RM -f"
14346
14347  # pwd behaves differently on various platforms and some don't support the -L flag.
14348  # Always use the bash builtin pwd to get uniform behavior.
14349  THEPWDCMD=pwd
14350
14351  # These are not required on all platforms
14352
14353
14354  # Publish this variable in the help.
14355
14356
14357  if [ -z "${CYGPATH+x}" ]; then
14358    # The variable is not set by user, try to locate tool using the code snippet
14359    for ac_prog in cygpath
14360do
14361  # Extract the first word of "$ac_prog", so it can be a program name with args.
14362set dummy $ac_prog; ac_word=$2
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14364$as_echo_n "checking for $ac_word... " >&6; }
14365if ${ac_cv_path_CYGPATH+:} false; then :
14366  $as_echo_n "(cached) " >&6
14367else
14368  case $CYGPATH in
14369  [\\/]* | ?:[\\/]*)
14370  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14371  ;;
14372  *)
14373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14374for as_dir in $PATH
14375do
14376  IFS=$as_save_IFS
14377  test -z "$as_dir" && as_dir=.
14378    for ac_exec_ext in '' $ac_executable_extensions; do
14379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14380    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14382    break 2
14383  fi
14384done
14385  done
14386IFS=$as_save_IFS
14387
14388  ;;
14389esac
14390fi
14391CYGPATH=$ac_cv_path_CYGPATH
14392if test -n "$CYGPATH"; then
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14394$as_echo "$CYGPATH" >&6; }
14395else
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397$as_echo "no" >&6; }
14398fi
14399
14400
14401  test -n "$CYGPATH" && break
14402done
14403
14404  else
14405    # The variable is set, but is it from the command line or the environment?
14406
14407    # Try to remove the string !CYGPATH! from our list.
14408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14410      # If it failed, the variable was not from the command line. Ignore it,
14411      # but warn the user (except for BASH, which is always set by the calling BASH).
14412      if test "xCYGPATH" != xBASH; then
14413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14414$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14415      fi
14416      # Try to locate tool using the code snippet
14417      for ac_prog in cygpath
14418do
14419  # Extract the first word of "$ac_prog", so it can be a program name with args.
14420set dummy $ac_prog; ac_word=$2
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14422$as_echo_n "checking for $ac_word... " >&6; }
14423if ${ac_cv_path_CYGPATH+:} false; then :
14424  $as_echo_n "(cached) " >&6
14425else
14426  case $CYGPATH in
14427  [\\/]* | ?:[\\/]*)
14428  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14429  ;;
14430  *)
14431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14432for as_dir in $PATH
14433do
14434  IFS=$as_save_IFS
14435  test -z "$as_dir" && as_dir=.
14436    for ac_exec_ext in '' $ac_executable_extensions; do
14437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14438    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14440    break 2
14441  fi
14442done
14443  done
14444IFS=$as_save_IFS
14445
14446  ;;
14447esac
14448fi
14449CYGPATH=$ac_cv_path_CYGPATH
14450if test -n "$CYGPATH"; then
14451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14452$as_echo "$CYGPATH" >&6; }
14453else
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14455$as_echo "no" >&6; }
14456fi
14457
14458
14459  test -n "$CYGPATH" && break
14460done
14461
14462    else
14463      # If it succeeded, then it was overridden by the user. We will use it
14464      # for the tool.
14465
14466      # First remove it from the list of overridden variables, so we can test
14467      # for unknown variables in the end.
14468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14469
14470      # Check if we try to supply an empty value
14471      if test "x$CYGPATH" = x; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14473$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14475$as_echo_n "checking for CYGPATH... " >&6; }
14476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14477$as_echo "disabled" >&6; }
14478      else
14479        # Check if the provided tool contains a complete path.
14480        tool_specified="$CYGPATH"
14481        tool_basename="${tool_specified##*/}"
14482        if test "x$tool_basename" = "x$tool_specified"; then
14483          # A command without a complete path is provided, search $PATH.
14484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14485$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14486          # Extract the first word of "$tool_basename", so it can be a program name with args.
14487set dummy $tool_basename; ac_word=$2
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14489$as_echo_n "checking for $ac_word... " >&6; }
14490if ${ac_cv_path_CYGPATH+:} false; then :
14491  $as_echo_n "(cached) " >&6
14492else
14493  case $CYGPATH in
14494  [\\/]* | ?:[\\/]*)
14495  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14496  ;;
14497  *)
14498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14499for as_dir in $PATH
14500do
14501  IFS=$as_save_IFS
14502  test -z "$as_dir" && as_dir=.
14503    for ac_exec_ext in '' $ac_executable_extensions; do
14504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14505    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14507    break 2
14508  fi
14509done
14510  done
14511IFS=$as_save_IFS
14512
14513  ;;
14514esac
14515fi
14516CYGPATH=$ac_cv_path_CYGPATH
14517if test -n "$CYGPATH"; then
14518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14519$as_echo "$CYGPATH" >&6; }
14520else
14521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14522$as_echo "no" >&6; }
14523fi
14524
14525
14526          if test "x$CYGPATH" = x; then
14527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14528          fi
14529        else
14530          # Otherwise we believe it is a complete path. Use it as it is.
14531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14532$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14534$as_echo_n "checking for CYGPATH... " >&6; }
14535          if test ! -x "$tool_specified"; then
14536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14537$as_echo "not found" >&6; }
14538            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14539          fi
14540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14541$as_echo "$tool_specified" >&6; }
14542        fi
14543      fi
14544    fi
14545
14546  fi
14547
14548
14549
14550
14551  # Publish this variable in the help.
14552
14553
14554  if [ -z "${READLINK+x}" ]; then
14555    # The variable is not set by user, try to locate tool using the code snippet
14556    for ac_prog in greadlink readlink
14557do
14558  # Extract the first word of "$ac_prog", so it can be a program name with args.
14559set dummy $ac_prog; ac_word=$2
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14561$as_echo_n "checking for $ac_word... " >&6; }
14562if ${ac_cv_path_READLINK+:} false; then :
14563  $as_echo_n "(cached) " >&6
14564else
14565  case $READLINK in
14566  [\\/]* | ?:[\\/]*)
14567  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14568  ;;
14569  *)
14570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14571for as_dir in $PATH
14572do
14573  IFS=$as_save_IFS
14574  test -z "$as_dir" && as_dir=.
14575    for ac_exec_ext in '' $ac_executable_extensions; do
14576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14577    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14579    break 2
14580  fi
14581done
14582  done
14583IFS=$as_save_IFS
14584
14585  ;;
14586esac
14587fi
14588READLINK=$ac_cv_path_READLINK
14589if test -n "$READLINK"; then
14590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14591$as_echo "$READLINK" >&6; }
14592else
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14594$as_echo "no" >&6; }
14595fi
14596
14597
14598  test -n "$READLINK" && break
14599done
14600
14601  else
14602    # The variable is set, but is it from the command line or the environment?
14603
14604    # Try to remove the string !READLINK! from our list.
14605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14607      # If it failed, the variable was not from the command line. Ignore it,
14608      # but warn the user (except for BASH, which is always set by the calling BASH).
14609      if test "xREADLINK" != xBASH; then
14610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14611$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14612      fi
14613      # Try to locate tool using the code snippet
14614      for ac_prog in greadlink readlink
14615do
14616  # Extract the first word of "$ac_prog", so it can be a program name with args.
14617set dummy $ac_prog; ac_word=$2
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14619$as_echo_n "checking for $ac_word... " >&6; }
14620if ${ac_cv_path_READLINK+:} false; then :
14621  $as_echo_n "(cached) " >&6
14622else
14623  case $READLINK in
14624  [\\/]* | ?:[\\/]*)
14625  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14626  ;;
14627  *)
14628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14629for as_dir in $PATH
14630do
14631  IFS=$as_save_IFS
14632  test -z "$as_dir" && as_dir=.
14633    for ac_exec_ext in '' $ac_executable_extensions; do
14634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14635    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14637    break 2
14638  fi
14639done
14640  done
14641IFS=$as_save_IFS
14642
14643  ;;
14644esac
14645fi
14646READLINK=$ac_cv_path_READLINK
14647if test -n "$READLINK"; then
14648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14649$as_echo "$READLINK" >&6; }
14650else
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14652$as_echo "no" >&6; }
14653fi
14654
14655
14656  test -n "$READLINK" && break
14657done
14658
14659    else
14660      # If it succeeded, then it was overridden by the user. We will use it
14661      # for the tool.
14662
14663      # First remove it from the list of overridden variables, so we can test
14664      # for unknown variables in the end.
14665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14666
14667      # Check if we try to supply an empty value
14668      if test "x$READLINK" = x; then
14669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14670$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14672$as_echo_n "checking for READLINK... " >&6; }
14673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14674$as_echo "disabled" >&6; }
14675      else
14676        # Check if the provided tool contains a complete path.
14677        tool_specified="$READLINK"
14678        tool_basename="${tool_specified##*/}"
14679        if test "x$tool_basename" = "x$tool_specified"; then
14680          # A command without a complete path is provided, search $PATH.
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14682$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14683          # Extract the first word of "$tool_basename", so it can be a program name with args.
14684set dummy $tool_basename; ac_word=$2
14685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14686$as_echo_n "checking for $ac_word... " >&6; }
14687if ${ac_cv_path_READLINK+:} false; then :
14688  $as_echo_n "(cached) " >&6
14689else
14690  case $READLINK in
14691  [\\/]* | ?:[\\/]*)
14692  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14693  ;;
14694  *)
14695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14696for as_dir in $PATH
14697do
14698  IFS=$as_save_IFS
14699  test -z "$as_dir" && as_dir=.
14700    for ac_exec_ext in '' $ac_executable_extensions; do
14701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14702    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14704    break 2
14705  fi
14706done
14707  done
14708IFS=$as_save_IFS
14709
14710  ;;
14711esac
14712fi
14713READLINK=$ac_cv_path_READLINK
14714if test -n "$READLINK"; then
14715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14716$as_echo "$READLINK" >&6; }
14717else
14718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14719$as_echo "no" >&6; }
14720fi
14721
14722
14723          if test "x$READLINK" = x; then
14724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14725          fi
14726        else
14727          # Otherwise we believe it is a complete path. Use it as it is.
14728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14729$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14731$as_echo_n "checking for READLINK... " >&6; }
14732          if test ! -x "$tool_specified"; then
14733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14734$as_echo "not found" >&6; }
14735            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14736          fi
14737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14738$as_echo "$tool_specified" >&6; }
14739        fi
14740      fi
14741    fi
14742
14743  fi
14744
14745
14746
14747
14748  # Publish this variable in the help.
14749
14750
14751  if [ -z "${DF+x}" ]; then
14752    # The variable is not set by user, try to locate tool using the code snippet
14753    for ac_prog in df
14754do
14755  # Extract the first word of "$ac_prog", so it can be a program name with args.
14756set dummy $ac_prog; ac_word=$2
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14758$as_echo_n "checking for $ac_word... " >&6; }
14759if ${ac_cv_path_DF+:} false; then :
14760  $as_echo_n "(cached) " >&6
14761else
14762  case $DF in
14763  [\\/]* | ?:[\\/]*)
14764  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14765  ;;
14766  *)
14767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14768for as_dir in $PATH
14769do
14770  IFS=$as_save_IFS
14771  test -z "$as_dir" && as_dir=.
14772    for ac_exec_ext in '' $ac_executable_extensions; do
14773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14774    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14776    break 2
14777  fi
14778done
14779  done
14780IFS=$as_save_IFS
14781
14782  ;;
14783esac
14784fi
14785DF=$ac_cv_path_DF
14786if test -n "$DF"; then
14787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14788$as_echo "$DF" >&6; }
14789else
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14791$as_echo "no" >&6; }
14792fi
14793
14794
14795  test -n "$DF" && break
14796done
14797
14798  else
14799    # The variable is set, but is it from the command line or the environment?
14800
14801    # Try to remove the string !DF! from our list.
14802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14804      # If it failed, the variable was not from the command line. Ignore it,
14805      # but warn the user (except for BASH, which is always set by the calling BASH).
14806      if test "xDF" != xBASH; then
14807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14808$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14809      fi
14810      # Try to locate tool using the code snippet
14811      for ac_prog in df
14812do
14813  # Extract the first word of "$ac_prog", so it can be a program name with args.
14814set dummy $ac_prog; ac_word=$2
14815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14816$as_echo_n "checking for $ac_word... " >&6; }
14817if ${ac_cv_path_DF+:} false; then :
14818  $as_echo_n "(cached) " >&6
14819else
14820  case $DF in
14821  [\\/]* | ?:[\\/]*)
14822  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14823  ;;
14824  *)
14825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14826for as_dir in $PATH
14827do
14828  IFS=$as_save_IFS
14829  test -z "$as_dir" && as_dir=.
14830    for ac_exec_ext in '' $ac_executable_extensions; do
14831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14832    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14834    break 2
14835  fi
14836done
14837  done
14838IFS=$as_save_IFS
14839
14840  ;;
14841esac
14842fi
14843DF=$ac_cv_path_DF
14844if test -n "$DF"; then
14845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14846$as_echo "$DF" >&6; }
14847else
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14849$as_echo "no" >&6; }
14850fi
14851
14852
14853  test -n "$DF" && break
14854done
14855
14856    else
14857      # If it succeeded, then it was overridden by the user. We will use it
14858      # for the tool.
14859
14860      # First remove it from the list of overridden variables, so we can test
14861      # for unknown variables in the end.
14862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14863
14864      # Check if we try to supply an empty value
14865      if test "x$DF" = x; then
14866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14867$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14869$as_echo_n "checking for DF... " >&6; }
14870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14871$as_echo "disabled" >&6; }
14872      else
14873        # Check if the provided tool contains a complete path.
14874        tool_specified="$DF"
14875        tool_basename="${tool_specified##*/}"
14876        if test "x$tool_basename" = "x$tool_specified"; then
14877          # A command without a complete path is provided, search $PATH.
14878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14879$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14880          # Extract the first word of "$tool_basename", so it can be a program name with args.
14881set dummy $tool_basename; ac_word=$2
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14883$as_echo_n "checking for $ac_word... " >&6; }
14884if ${ac_cv_path_DF+:} false; then :
14885  $as_echo_n "(cached) " >&6
14886else
14887  case $DF in
14888  [\\/]* | ?:[\\/]*)
14889  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14890  ;;
14891  *)
14892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14893for as_dir in $PATH
14894do
14895  IFS=$as_save_IFS
14896  test -z "$as_dir" && as_dir=.
14897    for ac_exec_ext in '' $ac_executable_extensions; do
14898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14899    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14901    break 2
14902  fi
14903done
14904  done
14905IFS=$as_save_IFS
14906
14907  ;;
14908esac
14909fi
14910DF=$ac_cv_path_DF
14911if test -n "$DF"; then
14912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14913$as_echo "$DF" >&6; }
14914else
14915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14916$as_echo "no" >&6; }
14917fi
14918
14919
14920          if test "x$DF" = x; then
14921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14922          fi
14923        else
14924          # Otherwise we believe it is a complete path. Use it as it is.
14925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14926$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14928$as_echo_n "checking for DF... " >&6; }
14929          if test ! -x "$tool_specified"; then
14930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14931$as_echo "not found" >&6; }
14932            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14933          fi
14934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14935$as_echo "$tool_specified" >&6; }
14936        fi
14937      fi
14938    fi
14939
14940  fi
14941
14942
14943
14944
14945  # Publish this variable in the help.
14946
14947
14948  if [ -z "${CPIO+x}" ]; then
14949    # The variable is not set by user, try to locate tool using the code snippet
14950    for ac_prog in cpio bsdcpio
14951do
14952  # Extract the first word of "$ac_prog", so it can be a program name with args.
14953set dummy $ac_prog; ac_word=$2
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14955$as_echo_n "checking for $ac_word... " >&6; }
14956if ${ac_cv_path_CPIO+:} false; then :
14957  $as_echo_n "(cached) " >&6
14958else
14959  case $CPIO in
14960  [\\/]* | ?:[\\/]*)
14961  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14962  ;;
14963  *)
14964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14965for as_dir in $PATH
14966do
14967  IFS=$as_save_IFS
14968  test -z "$as_dir" && as_dir=.
14969    for ac_exec_ext in '' $ac_executable_extensions; do
14970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14971    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14973    break 2
14974  fi
14975done
14976  done
14977IFS=$as_save_IFS
14978
14979  ;;
14980esac
14981fi
14982CPIO=$ac_cv_path_CPIO
14983if test -n "$CPIO"; then
14984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14985$as_echo "$CPIO" >&6; }
14986else
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14988$as_echo "no" >&6; }
14989fi
14990
14991
14992  test -n "$CPIO" && break
14993done
14994
14995  else
14996    # The variable is set, but is it from the command line or the environment?
14997
14998    # Try to remove the string !CPIO! from our list.
14999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15001      # If it failed, the variable was not from the command line. Ignore it,
15002      # but warn the user (except for BASH, which is always set by the calling BASH).
15003      if test "xCPIO" != xBASH; then
15004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15005$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15006      fi
15007      # Try to locate tool using the code snippet
15008      for ac_prog in cpio bsdcpio
15009do
15010  # Extract the first word of "$ac_prog", so it can be a program name with args.
15011set dummy $ac_prog; ac_word=$2
15012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15013$as_echo_n "checking for $ac_word... " >&6; }
15014if ${ac_cv_path_CPIO+:} false; then :
15015  $as_echo_n "(cached) " >&6
15016else
15017  case $CPIO in
15018  [\\/]* | ?:[\\/]*)
15019  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15020  ;;
15021  *)
15022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15023for as_dir in $PATH
15024do
15025  IFS=$as_save_IFS
15026  test -z "$as_dir" && as_dir=.
15027    for ac_exec_ext in '' $ac_executable_extensions; do
15028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15029    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15031    break 2
15032  fi
15033done
15034  done
15035IFS=$as_save_IFS
15036
15037  ;;
15038esac
15039fi
15040CPIO=$ac_cv_path_CPIO
15041if test -n "$CPIO"; then
15042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15043$as_echo "$CPIO" >&6; }
15044else
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15046$as_echo "no" >&6; }
15047fi
15048
15049
15050  test -n "$CPIO" && break
15051done
15052
15053    else
15054      # If it succeeded, then it was overridden by the user. We will use it
15055      # for the tool.
15056
15057      # First remove it from the list of overridden variables, so we can test
15058      # for unknown variables in the end.
15059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15060
15061      # Check if we try to supply an empty value
15062      if test "x$CPIO" = x; then
15063        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15064$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15066$as_echo_n "checking for CPIO... " >&6; }
15067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15068$as_echo "disabled" >&6; }
15069      else
15070        # Check if the provided tool contains a complete path.
15071        tool_specified="$CPIO"
15072        tool_basename="${tool_specified##*/}"
15073        if test "x$tool_basename" = "x$tool_specified"; then
15074          # A command without a complete path is provided, search $PATH.
15075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15076$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15077          # Extract the first word of "$tool_basename", so it can be a program name with args.
15078set dummy $tool_basename; ac_word=$2
15079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15080$as_echo_n "checking for $ac_word... " >&6; }
15081if ${ac_cv_path_CPIO+:} false; then :
15082  $as_echo_n "(cached) " >&6
15083else
15084  case $CPIO in
15085  [\\/]* | ?:[\\/]*)
15086  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15087  ;;
15088  *)
15089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15090for as_dir in $PATH
15091do
15092  IFS=$as_save_IFS
15093  test -z "$as_dir" && as_dir=.
15094    for ac_exec_ext in '' $ac_executable_extensions; do
15095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15096    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15098    break 2
15099  fi
15100done
15101  done
15102IFS=$as_save_IFS
15103
15104  ;;
15105esac
15106fi
15107CPIO=$ac_cv_path_CPIO
15108if test -n "$CPIO"; then
15109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15110$as_echo "$CPIO" >&6; }
15111else
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15113$as_echo "no" >&6; }
15114fi
15115
15116
15117          if test "x$CPIO" = x; then
15118            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15119          fi
15120        else
15121          # Otherwise we believe it is a complete path. Use it as it is.
15122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15123$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15124          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15125$as_echo_n "checking for CPIO... " >&6; }
15126          if test ! -x "$tool_specified"; then
15127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15128$as_echo "not found" >&6; }
15129            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15130          fi
15131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15132$as_echo "$tool_specified" >&6; }
15133        fi
15134      fi
15135    fi
15136
15137  fi
15138
15139
15140
15141
15142  # Publish this variable in the help.
15143
15144
15145  if [ -z "${NICE+x}" ]; then
15146    # The variable is not set by user, try to locate tool using the code snippet
15147    for ac_prog in nice
15148do
15149  # Extract the first word of "$ac_prog", so it can be a program name with args.
15150set dummy $ac_prog; ac_word=$2
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15152$as_echo_n "checking for $ac_word... " >&6; }
15153if ${ac_cv_path_NICE+:} false; then :
15154  $as_echo_n "(cached) " >&6
15155else
15156  case $NICE in
15157  [\\/]* | ?:[\\/]*)
15158  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15159  ;;
15160  *)
15161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15162for as_dir in $PATH
15163do
15164  IFS=$as_save_IFS
15165  test -z "$as_dir" && as_dir=.
15166    for ac_exec_ext in '' $ac_executable_extensions; do
15167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15168    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15170    break 2
15171  fi
15172done
15173  done
15174IFS=$as_save_IFS
15175
15176  ;;
15177esac
15178fi
15179NICE=$ac_cv_path_NICE
15180if test -n "$NICE"; then
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15182$as_echo "$NICE" >&6; }
15183else
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15185$as_echo "no" >&6; }
15186fi
15187
15188
15189  test -n "$NICE" && break
15190done
15191
15192  else
15193    # The variable is set, but is it from the command line or the environment?
15194
15195    # Try to remove the string !NICE! from our list.
15196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15198      # If it failed, the variable was not from the command line. Ignore it,
15199      # but warn the user (except for BASH, which is always set by the calling BASH).
15200      if test "xNICE" != xBASH; then
15201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15202$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15203      fi
15204      # Try to locate tool using the code snippet
15205      for ac_prog in nice
15206do
15207  # Extract the first word of "$ac_prog", so it can be a program name with args.
15208set dummy $ac_prog; ac_word=$2
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15210$as_echo_n "checking for $ac_word... " >&6; }
15211if ${ac_cv_path_NICE+:} false; then :
15212  $as_echo_n "(cached) " >&6
15213else
15214  case $NICE in
15215  [\\/]* | ?:[\\/]*)
15216  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15217  ;;
15218  *)
15219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15220for as_dir in $PATH
15221do
15222  IFS=$as_save_IFS
15223  test -z "$as_dir" && as_dir=.
15224    for ac_exec_ext in '' $ac_executable_extensions; do
15225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15226    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15228    break 2
15229  fi
15230done
15231  done
15232IFS=$as_save_IFS
15233
15234  ;;
15235esac
15236fi
15237NICE=$ac_cv_path_NICE
15238if test -n "$NICE"; then
15239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15240$as_echo "$NICE" >&6; }
15241else
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15243$as_echo "no" >&6; }
15244fi
15245
15246
15247  test -n "$NICE" && break
15248done
15249
15250    else
15251      # If it succeeded, then it was overridden by the user. We will use it
15252      # for the tool.
15253
15254      # First remove it from the list of overridden variables, so we can test
15255      # for unknown variables in the end.
15256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15257
15258      # Check if we try to supply an empty value
15259      if test "x$NICE" = x; then
15260        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15261$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15263$as_echo_n "checking for NICE... " >&6; }
15264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15265$as_echo "disabled" >&6; }
15266      else
15267        # Check if the provided tool contains a complete path.
15268        tool_specified="$NICE"
15269        tool_basename="${tool_specified##*/}"
15270        if test "x$tool_basename" = "x$tool_specified"; then
15271          # A command without a complete path is provided, search $PATH.
15272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15273$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15274          # Extract the first word of "$tool_basename", so it can be a program name with args.
15275set dummy $tool_basename; ac_word=$2
15276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15277$as_echo_n "checking for $ac_word... " >&6; }
15278if ${ac_cv_path_NICE+:} false; then :
15279  $as_echo_n "(cached) " >&6
15280else
15281  case $NICE in
15282  [\\/]* | ?:[\\/]*)
15283  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15284  ;;
15285  *)
15286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15287for as_dir in $PATH
15288do
15289  IFS=$as_save_IFS
15290  test -z "$as_dir" && as_dir=.
15291    for ac_exec_ext in '' $ac_executable_extensions; do
15292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15293    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15295    break 2
15296  fi
15297done
15298  done
15299IFS=$as_save_IFS
15300
15301  ;;
15302esac
15303fi
15304NICE=$ac_cv_path_NICE
15305if test -n "$NICE"; then
15306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15307$as_echo "$NICE" >&6; }
15308else
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15310$as_echo "no" >&6; }
15311fi
15312
15313
15314          if test "x$NICE" = x; then
15315            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15316          fi
15317        else
15318          # Otherwise we believe it is a complete path. Use it as it is.
15319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15320$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15321          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15322$as_echo_n "checking for NICE... " >&6; }
15323          if test ! -x "$tool_specified"; then
15324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15325$as_echo "not found" >&6; }
15326            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15327          fi
15328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15329$as_echo "$tool_specified" >&6; }
15330        fi
15331      fi
15332    fi
15333
15334  fi
15335
15336
15337
15338
15339  # Publish this variable in the help.
15340
15341
15342  if [ -z "${PANDOC+x}" ]; then
15343    # The variable is not set by user, try to locate tool using the code snippet
15344    for ac_prog in pandoc
15345do
15346  # Extract the first word of "$ac_prog", so it can be a program name with args.
15347set dummy $ac_prog; ac_word=$2
15348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15349$as_echo_n "checking for $ac_word... " >&6; }
15350if ${ac_cv_path_PANDOC+:} false; then :
15351  $as_echo_n "(cached) " >&6
15352else
15353  case $PANDOC in
15354  [\\/]* | ?:[\\/]*)
15355  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15356  ;;
15357  *)
15358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15359for as_dir in $PATH
15360do
15361  IFS=$as_save_IFS
15362  test -z "$as_dir" && as_dir=.
15363    for ac_exec_ext in '' $ac_executable_extensions; do
15364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15365    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15367    break 2
15368  fi
15369done
15370  done
15371IFS=$as_save_IFS
15372
15373  ;;
15374esac
15375fi
15376PANDOC=$ac_cv_path_PANDOC
15377if test -n "$PANDOC"; then
15378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15379$as_echo "$PANDOC" >&6; }
15380else
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15382$as_echo "no" >&6; }
15383fi
15384
15385
15386  test -n "$PANDOC" && break
15387done
15388
15389  else
15390    # The variable is set, but is it from the command line or the environment?
15391
15392    # Try to remove the string !PANDOC! from our list.
15393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15395      # If it failed, the variable was not from the command line. Ignore it,
15396      # but warn the user (except for BASH, which is always set by the calling BASH).
15397      if test "xPANDOC" != xBASH; then
15398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15399$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15400      fi
15401      # Try to locate tool using the code snippet
15402      for ac_prog in pandoc
15403do
15404  # Extract the first word of "$ac_prog", so it can be a program name with args.
15405set dummy $ac_prog; ac_word=$2
15406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15407$as_echo_n "checking for $ac_word... " >&6; }
15408if ${ac_cv_path_PANDOC+:} false; then :
15409  $as_echo_n "(cached) " >&6
15410else
15411  case $PANDOC in
15412  [\\/]* | ?:[\\/]*)
15413  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15414  ;;
15415  *)
15416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15417for as_dir in $PATH
15418do
15419  IFS=$as_save_IFS
15420  test -z "$as_dir" && as_dir=.
15421    for ac_exec_ext in '' $ac_executable_extensions; do
15422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15423    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15425    break 2
15426  fi
15427done
15428  done
15429IFS=$as_save_IFS
15430
15431  ;;
15432esac
15433fi
15434PANDOC=$ac_cv_path_PANDOC
15435if test -n "$PANDOC"; then
15436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15437$as_echo "$PANDOC" >&6; }
15438else
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15440$as_echo "no" >&6; }
15441fi
15442
15443
15444  test -n "$PANDOC" && break
15445done
15446
15447    else
15448      # If it succeeded, then it was overridden by the user. We will use it
15449      # for the tool.
15450
15451      # First remove it from the list of overridden variables, so we can test
15452      # for unknown variables in the end.
15453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15454
15455      # Check if we try to supply an empty value
15456      if test "x$PANDOC" = x; then
15457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15458$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15460$as_echo_n "checking for PANDOC... " >&6; }
15461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15462$as_echo "disabled" >&6; }
15463      else
15464        # Check if the provided tool contains a complete path.
15465        tool_specified="$PANDOC"
15466        tool_basename="${tool_specified##*/}"
15467        if test "x$tool_basename" = "x$tool_specified"; then
15468          # A command without a complete path is provided, search $PATH.
15469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15470$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15471          # Extract the first word of "$tool_basename", so it can be a program name with args.
15472set dummy $tool_basename; ac_word=$2
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15474$as_echo_n "checking for $ac_word... " >&6; }
15475if ${ac_cv_path_PANDOC+:} false; then :
15476  $as_echo_n "(cached) " >&6
15477else
15478  case $PANDOC in
15479  [\\/]* | ?:[\\/]*)
15480  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15481  ;;
15482  *)
15483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15484for as_dir in $PATH
15485do
15486  IFS=$as_save_IFS
15487  test -z "$as_dir" && as_dir=.
15488    for ac_exec_ext in '' $ac_executable_extensions; do
15489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15490    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15492    break 2
15493  fi
15494done
15495  done
15496IFS=$as_save_IFS
15497
15498  ;;
15499esac
15500fi
15501PANDOC=$ac_cv_path_PANDOC
15502if test -n "$PANDOC"; then
15503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15504$as_echo "$PANDOC" >&6; }
15505else
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15507$as_echo "no" >&6; }
15508fi
15509
15510
15511          if test "x$PANDOC" = x; then
15512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15513          fi
15514        else
15515          # Otherwise we believe it is a complete path. Use it as it is.
15516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15517$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15519$as_echo_n "checking for PANDOC... " >&6; }
15520          if test ! -x "$tool_specified"; then
15521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15522$as_echo "not found" >&6; }
15523            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15524          fi
15525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15526$as_echo "$tool_specified" >&6; }
15527        fi
15528      fi
15529    fi
15530
15531  fi
15532
15533
15534
15535
15536# Now we can determine OpenJDK build and target platforms. This is required to
15537# have early on.
15538# Make sure we can run config.sub.
15539$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15540  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15541
15542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15543$as_echo_n "checking build system type... " >&6; }
15544if ${ac_cv_build+:} false; then :
15545  $as_echo_n "(cached) " >&6
15546else
15547  ac_build_alias=$build_alias
15548test "x$ac_build_alias" = x &&
15549  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15550test "x$ac_build_alias" = x &&
15551  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15552ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15553  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15554
15555fi
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15557$as_echo "$ac_cv_build" >&6; }
15558case $ac_cv_build in
15559*-*-*) ;;
15560*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15561esac
15562build=$ac_cv_build
15563ac_save_IFS=$IFS; IFS='-'
15564set x $ac_cv_build
15565shift
15566build_cpu=$1
15567build_vendor=$2
15568shift; shift
15569# Remember, the first character of IFS is used to create $*,
15570# except with old shells:
15571build_os=$*
15572IFS=$ac_save_IFS
15573case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15574
15575
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15577$as_echo_n "checking host system type... " >&6; }
15578if ${ac_cv_host+:} false; then :
15579  $as_echo_n "(cached) " >&6
15580else
15581  if test "x$host_alias" = x; then
15582  ac_cv_host=$ac_cv_build
15583else
15584  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15585    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15586fi
15587
15588fi
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15590$as_echo "$ac_cv_host" >&6; }
15591case $ac_cv_host in
15592*-*-*) ;;
15593*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15594esac
15595host=$ac_cv_host
15596ac_save_IFS=$IFS; IFS='-'
15597set x $ac_cv_host
15598shift
15599host_cpu=$1
15600host_vendor=$2
15601shift; shift
15602# Remember, the first character of IFS is used to create $*,
15603# except with old shells:
15604host_os=$*
15605IFS=$ac_save_IFS
15606case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15607
15608
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15610$as_echo_n "checking target system type... " >&6; }
15611if ${ac_cv_target+:} false; then :
15612  $as_echo_n "(cached) " >&6
15613else
15614  if test "x$target_alias" = x; then
15615  ac_cv_target=$ac_cv_host
15616else
15617  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15618    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15619fi
15620
15621fi
15622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15623$as_echo "$ac_cv_target" >&6; }
15624case $ac_cv_target in
15625*-*-*) ;;
15626*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15627esac
15628target=$ac_cv_target
15629ac_save_IFS=$IFS; IFS='-'
15630set x $ac_cv_target
15631shift
15632target_cpu=$1
15633target_vendor=$2
15634shift; shift
15635# Remember, the first character of IFS is used to create $*,
15636# except with old shells:
15637target_os=$*
15638IFS=$ac_save_IFS
15639case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15640
15641
15642# The aliases save the names the user supplied, while $host etc.
15643# will get canonicalized.
15644test -n "$target_alias" &&
15645  test "$program_prefix$program_suffix$program_transform_name" = \
15646    NONENONEs,x,x, &&
15647  program_prefix=${target_alias}-
15648
15649  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15650  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15651  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15652  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15653  # to use the configure naming style.
15654
15655
15656
15657
15658
15659  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15660  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15661  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15662  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15663  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15664  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15665
15666
15667
15668  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15669
15670  case "$build_os" in
15671    *linux*)
15672      VAR_OS=linux
15673      VAR_OS_TYPE=unix
15674      ;;
15675    *solaris*)
15676      VAR_OS=solaris
15677      VAR_OS_TYPE=unix
15678      ;;
15679    *darwin*)
15680      VAR_OS=macosx
15681      VAR_OS_TYPE=unix
15682      ;;
15683    *bsd*)
15684      VAR_OS=bsd
15685      VAR_OS_TYPE=unix
15686      ;;
15687    *cygwin*)
15688      VAR_OS=windows
15689      VAR_OS_ENV=windows.cygwin
15690      ;;
15691    *mingw*)
15692      VAR_OS=windows
15693      VAR_OS_ENV=windows.msys
15694      ;;
15695    *aix*)
15696      VAR_OS=aix
15697      VAR_OS_TYPE=unix
15698      ;;
15699    *)
15700      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15701      ;;
15702  esac
15703
15704
15705  # First argument is the cpu name from the trip/quad
15706  case "$build_cpu" in
15707    x86_64)
15708      VAR_CPU=x86_64
15709      VAR_CPU_ARCH=x86
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    i?86)
15714      VAR_CPU=x86
15715      VAR_CPU_ARCH=x86
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=little
15718      ;;
15719    arm*)
15720      VAR_CPU=arm
15721      VAR_CPU_ARCH=arm
15722      VAR_CPU_BITS=32
15723      VAR_CPU_ENDIAN=little
15724      ;;
15725    aarch64)
15726      VAR_CPU=aarch64
15727      VAR_CPU_ARCH=aarch64
15728      VAR_CPU_BITS=64
15729      VAR_CPU_ENDIAN=little
15730      ;;
15731    powerpc)
15732      VAR_CPU=ppc
15733      VAR_CPU_ARCH=ppc
15734      VAR_CPU_BITS=32
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    powerpc64)
15738      VAR_CPU=ppc64
15739      VAR_CPU_ARCH=ppc
15740      VAR_CPU_BITS=64
15741      VAR_CPU_ENDIAN=big
15742      ;;
15743    powerpc64le)
15744      VAR_CPU=ppc64le
15745      VAR_CPU_ARCH=ppc
15746      VAR_CPU_BITS=64
15747      VAR_CPU_ENDIAN=little
15748      ;;
15749    s390)
15750      VAR_CPU=s390
15751      VAR_CPU_ARCH=s390
15752      VAR_CPU_BITS=32
15753      VAR_CPU_ENDIAN=big
15754      ;;
15755    s390x)
15756      VAR_CPU=s390x
15757      VAR_CPU_ARCH=s390
15758      VAR_CPU_BITS=64
15759      VAR_CPU_ENDIAN=big
15760      ;;
15761    sparc)
15762      VAR_CPU=sparc
15763      VAR_CPU_ARCH=sparc
15764      VAR_CPU_BITS=32
15765      VAR_CPU_ENDIAN=big
15766      ;;
15767    sparcv9|sparc64)
15768      VAR_CPU=sparcv9
15769      VAR_CPU_ARCH=sparc
15770      VAR_CPU_BITS=64
15771      VAR_CPU_ENDIAN=big
15772      ;;
15773    *)
15774      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15775      ;;
15776  esac
15777
15778  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15779  OPENJDK_BUILD_OS="$VAR_OS"
15780  if test "x$VAR_OS_TYPE" != x; then
15781    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15782  else
15783    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15784  fi
15785  if test "x$VAR_OS_ENV" != x; then
15786    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15787  else
15788    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15789  fi
15790  OPENJDK_BUILD_CPU="$VAR_CPU"
15791  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15792  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15793  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15794
15795
15796
15797
15798
15799
15800
15801
15802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15803$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15805$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15806
15807  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15808
15809  case "$host_os" in
15810    *linux*)
15811      VAR_OS=linux
15812      VAR_OS_TYPE=unix
15813      ;;
15814    *solaris*)
15815      VAR_OS=solaris
15816      VAR_OS_TYPE=unix
15817      ;;
15818    *darwin*)
15819      VAR_OS=macosx
15820      VAR_OS_TYPE=unix
15821      ;;
15822    *bsd*)
15823      VAR_OS=bsd
15824      VAR_OS_TYPE=unix
15825      ;;
15826    *cygwin*)
15827      VAR_OS=windows
15828      VAR_OS_ENV=windows.cygwin
15829      ;;
15830    *mingw*)
15831      VAR_OS=windows
15832      VAR_OS_ENV=windows.msys
15833      ;;
15834    *aix*)
15835      VAR_OS=aix
15836      VAR_OS_TYPE=unix
15837      ;;
15838    *)
15839      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15840      ;;
15841  esac
15842
15843
15844  # First argument is the cpu name from the trip/quad
15845  case "$host_cpu" in
15846    x86_64)
15847      VAR_CPU=x86_64
15848      VAR_CPU_ARCH=x86
15849      VAR_CPU_BITS=64
15850      VAR_CPU_ENDIAN=little
15851      ;;
15852    i?86)
15853      VAR_CPU=x86
15854      VAR_CPU_ARCH=x86
15855      VAR_CPU_BITS=32
15856      VAR_CPU_ENDIAN=little
15857      ;;
15858    arm*)
15859      VAR_CPU=arm
15860      VAR_CPU_ARCH=arm
15861      VAR_CPU_BITS=32
15862      VAR_CPU_ENDIAN=little
15863      ;;
15864    aarch64)
15865      VAR_CPU=aarch64
15866      VAR_CPU_ARCH=aarch64
15867      VAR_CPU_BITS=64
15868      VAR_CPU_ENDIAN=little
15869      ;;
15870    powerpc)
15871      VAR_CPU=ppc
15872      VAR_CPU_ARCH=ppc
15873      VAR_CPU_BITS=32
15874      VAR_CPU_ENDIAN=big
15875      ;;
15876    powerpc64)
15877      VAR_CPU=ppc64
15878      VAR_CPU_ARCH=ppc
15879      VAR_CPU_BITS=64
15880      VAR_CPU_ENDIAN=big
15881      ;;
15882    powerpc64le)
15883      VAR_CPU=ppc64le
15884      VAR_CPU_ARCH=ppc
15885      VAR_CPU_BITS=64
15886      VAR_CPU_ENDIAN=little
15887      ;;
15888    s390)
15889      VAR_CPU=s390
15890      VAR_CPU_ARCH=s390
15891      VAR_CPU_BITS=32
15892      VAR_CPU_ENDIAN=big
15893      ;;
15894    s390x)
15895      VAR_CPU=s390x
15896      VAR_CPU_ARCH=s390
15897      VAR_CPU_BITS=64
15898      VAR_CPU_ENDIAN=big
15899      ;;
15900    sparc)
15901      VAR_CPU=sparc
15902      VAR_CPU_ARCH=sparc
15903      VAR_CPU_BITS=32
15904      VAR_CPU_ENDIAN=big
15905      ;;
15906    sparcv9|sparc64)
15907      VAR_CPU=sparcv9
15908      VAR_CPU_ARCH=sparc
15909      VAR_CPU_BITS=64
15910      VAR_CPU_ENDIAN=big
15911      ;;
15912    *)
15913      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15914      ;;
15915  esac
15916
15917  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15918  OPENJDK_TARGET_OS="$VAR_OS"
15919  if test "x$VAR_OS_TYPE" != x; then
15920    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15921  else
15922    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15923  fi
15924  if test "x$VAR_OS_ENV" != x; then
15925    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15926  else
15927    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15928  fi
15929  OPENJDK_TARGET_CPU="$VAR_CPU"
15930  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15931  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15932  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15933
15934
15935
15936
15937
15938
15939
15940
15941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15942$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15944$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15945
15946
15947
15948# Check whether --with-target-bits was given.
15949if test "${with_target_bits+set}" = set; then :
15950  withval=$with_target_bits;
15951fi
15952
15953
15954  # We have three types of compiles:
15955  # native  == normal compilation, target system == build system
15956  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15957  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15958  #
15959  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15960    # We're doing a proper cross-compilation
15961    COMPILE_TYPE="cross"
15962  else
15963    COMPILE_TYPE="native"
15964  fi
15965
15966  if test "x$with_target_bits" != x; then
15967    if test "x$COMPILE_TYPE" = "xcross"; then
15968      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15969    fi
15970
15971    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15972      # A reduced build is requested
15973      COMPILE_TYPE="reduced"
15974      OPENJDK_TARGET_CPU_BITS=32
15975      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15976        OPENJDK_TARGET_CPU=x86
15977      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15978        OPENJDK_TARGET_CPU=sparc
15979      else
15980        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15981      fi
15982    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15983      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
15984    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15985      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15986$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15987    else
15988      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15989    fi
15990  fi
15991
15992
15993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15994$as_echo_n "checking compilation type... " >&6; }
15995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15996$as_echo "$COMPILE_TYPE" >&6; }
15997
15998
15999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16000    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16001  else
16002    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16003  fi
16004
16005  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16006    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16007  else
16008    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16009  fi
16010
16011  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16012
16013
16014
16015  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16016    RELEASE_FILE_OS_NAME=SunOS
16017  fi
16018  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16019    RELEASE_FILE_OS_NAME=Linux
16020  fi
16021  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16022    RELEASE_FILE_OS_NAME=Windows
16023  fi
16024  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16025    RELEASE_FILE_OS_NAME="Darwin"
16026  fi
16027  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16028    RELEASE_FILE_OS_NAME="AIX"
16029  fi
16030  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16031
16032
16033
16034
16035
16036
16037  # Also store the legacy naming of the cpu.
16038  # Ie i586 and amd64 instead of x86 and x86_64
16039  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16040  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16041    OPENJDK_TARGET_CPU_LEGACY="i586"
16042  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16043    # On all platforms except MacOSX replace x86_64 with amd64.
16044    OPENJDK_TARGET_CPU_LEGACY="amd64"
16045  fi
16046
16047
16048  # And the second legacy naming of the cpu.
16049  # Ie i386 and amd64 instead of x86 and x86_64.
16050  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16051  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16052    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16053  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16054    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16055  fi
16056
16057
16058  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16059  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16060  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16061  OPENJDK_TARGET_CPU_ISADIR=""
16062  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16063    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16064      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16065    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16066      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16067    fi
16068  fi
16069
16070
16071  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16072  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16073  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16074    # On linux only, we replace x86 with i386.
16075    OPENJDK_TARGET_CPU_OSARCH="i386"
16076  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16077    # On all platforms except macosx, we replace x86_64 with amd64.
16078    OPENJDK_TARGET_CPU_OSARCH="amd64"
16079  fi
16080
16081
16082  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16083  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16084    OPENJDK_TARGET_CPU_JLI="i386"
16085  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16086    # On all platforms except macosx, we replace x86_64 with amd64.
16087    OPENJDK_TARGET_CPU_JLI="amd64"
16088  fi
16089
16090  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16091      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16092  else
16093      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16094  fi
16095
16096
16097  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16098  # Macosx is osx and x86_64 is x64
16099  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16100    OPENJDK_TARGET_OS_BUNDLE="osx"
16101  else
16102    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16103  fi
16104  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16105    OPENJDK_TARGET_CPU_BUNDLE="x64"
16106  else
16107    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16108  fi
16109  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16110
16111
16112  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16113    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16114    # unpack200.exe. This variable is used in
16115    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16116    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16117      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16118    fi
16119  fi
16120
16121  if test "x$COMPILE_TYPE" = "xcross"; then
16122    # FIXME: ... or should this include reduced builds..?
16123    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16124  else
16125    DEFINE_CROSS_COMPILE_ARCH=""
16126  fi
16127
16128
16129  # Convert openjdk platform names to hotspot names
16130
16131  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16132  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16133    HOTSPOT_TARGET_OS=bsd
16134  fi
16135
16136
16137  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16138  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16139    HOTSPOT_TARGET_OS_TYPE=posix
16140  fi
16141
16142
16143  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16144  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16145    HOTSPOT_TARGET_CPU=x86_32
16146  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16147    HOTSPOT_TARGET_CPU=sparc
16148  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16149    HOTSPOT_TARGET_CPU=ppc_64
16150  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16151    HOTSPOT_TARGET_CPU=ppc_64
16152  fi
16153
16154
16155  # This is identical with OPENJDK_*, but define anyway for consistency.
16156  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16157
16158
16159  # Setup HOTSPOT_TARGET_CPU_DEFINE
16160  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16161    HOTSPOT_TARGET_CPU_DEFINE=IA32
16162  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16163    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16164  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16165    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16166  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16167    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16168  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16169    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16170  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16171    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16172
16173  # The cpu defines below are for zero, we don't support them directly.
16174  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16175    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16176  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16177    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16178  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16179    HOTSPOT_TARGET_CPU_DEFINE=S390
16180  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16181    HOTSPOT_TARGET_CPU_DEFINE=S390
16182  elif test "x$OPENJDK_TARGET_CPU" != x; then
16183    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16184  fi
16185
16186
16187
16188
16189  # Also store the legacy naming of the cpu.
16190  # Ie i586 and amd64 instead of x86 and x86_64
16191  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16192  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16193    OPENJDK_BUILD_CPU_LEGACY="i586"
16194  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16195    # On all platforms except MacOSX replace x86_64 with amd64.
16196    OPENJDK_BUILD_CPU_LEGACY="amd64"
16197  fi
16198
16199
16200  # And the second legacy naming of the cpu.
16201  # Ie i386 and amd64 instead of x86 and x86_64.
16202  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16203  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16204    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16205  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16206    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16207  fi
16208
16209
16210  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16211  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16212  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16213  OPENJDK_BUILD_CPU_ISADIR=""
16214  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16215    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16216      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16217    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16218      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16219    fi
16220  fi
16221
16222
16223  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16224  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16225  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16226    # On linux only, we replace x86 with i386.
16227    OPENJDK_BUILD_CPU_OSARCH="i386"
16228  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16229    # On all platforms except macosx, we replace x86_64 with amd64.
16230    OPENJDK_BUILD_CPU_OSARCH="amd64"
16231  fi
16232
16233
16234  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16235  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16236    OPENJDK_BUILD_CPU_JLI="i386"
16237  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16238    # On all platforms except macosx, we replace x86_64 with amd64.
16239    OPENJDK_BUILD_CPU_JLI="amd64"
16240  fi
16241
16242  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16243      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16244  else
16245      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16246  fi
16247
16248
16249  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16250  # Macosx is osx and x86_64 is x64
16251  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16252    OPENJDK_BUILD_OS_BUNDLE="osx"
16253  else
16254    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16255  fi
16256  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16257    OPENJDK_BUILD_CPU_BUNDLE="x64"
16258  else
16259    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16260  fi
16261  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16262
16263
16264  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16265    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16266    # unpack200.exe. This variable is used in
16267    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16268    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16269      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16270    fi
16271  fi
16272
16273  if test "x$COMPILE_TYPE" = "xcross"; then
16274    # FIXME: ... or should this include reduced builds..?
16275    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16276  else
16277    DEFINE_CROSS_COMPILE_ARCH=""
16278  fi
16279
16280
16281  # Convert openjdk platform names to hotspot names
16282
16283  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16284  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16285    HOTSPOT_BUILD_OS=bsd
16286  fi
16287
16288
16289  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16290  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16291    HOTSPOT_BUILD_OS_TYPE=posix
16292  fi
16293
16294
16295  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16296  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16297    HOTSPOT_BUILD_CPU=x86_32
16298  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16299    HOTSPOT_BUILD_CPU=sparc
16300  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16301    HOTSPOT_BUILD_CPU=ppc_64
16302  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16303    HOTSPOT_BUILD_CPU=ppc_64
16304  fi
16305
16306
16307  # This is identical with OPENJDK_*, but define anyway for consistency.
16308  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16309
16310
16311  # Setup HOTSPOT_BUILD_CPU_DEFINE
16312  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16313    HOTSPOT_BUILD_CPU_DEFINE=IA32
16314  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16315    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16316  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16317    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16318  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16319    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16320  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16321    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16322  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16323    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16324
16325  # The cpu defines below are for zero, we don't support them directly.
16326  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16327    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16328  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16329    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16330  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16331    HOTSPOT_BUILD_CPU_DEFINE=S390
16332  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16333    HOTSPOT_BUILD_CPU_DEFINE=S390
16334  elif test "x$OPENJDK_BUILD_CPU" != x; then
16335    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16336  fi
16337
16338
16339
16340
16341
16342
16343# Continue setting up basic stuff. Most remaining code require fundamental tools.
16344
16345  # Save the current directory this script was started from
16346  CURDIR="$PWD"
16347
16348  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16349  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16350  # was not available at that time.
16351  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16352  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16353    ORIGINAL_PATH="$REWRITTEN_PATH"
16354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16355$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16356  fi
16357
16358  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16359    PATH_SEP=";"
16360
16361  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16362  if test $SRC_ROOT_LENGTH -gt 100; then
16363    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16364  fi
16365
16366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16368$as_echo_n "checking cygwin release... " >&6; }
16369    CYGWIN_VERSION=`$UNAME -r`
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16371$as_echo "$CYGWIN_VERSION" >&6; }
16372    WINDOWS_ENV_VENDOR='cygwin'
16373    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16374
16375    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16376    if test "x$CYGWIN_VERSION_OLD" != x; then
16377      { $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
16378$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;}
16379      as_fn_error $? "Cannot continue" "$LINENO" 5
16380    fi
16381    if test "x$CYGPATH" = x; then
16382      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16383    fi
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16385$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16386    # The cmd output ends with Windows line endings (CR/LF)
16387    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16388    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16389    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16391$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16392    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16393    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16394    if test "x$test_cygdrive_prefix" = x; then
16395      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16396    fi
16397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16399$as_echo_n "checking msys release... " >&6; }
16400    MSYS_VERSION=`$UNAME -r`
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16402$as_echo "$MSYS_VERSION" >&6; }
16403
16404    WINDOWS_ENV_VENDOR='msys'
16405    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16406
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16408$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16409    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16410    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16411
16412  windows_path="$MSYS_ROOT_PATH"
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414    unix_path=`$CYGPATH -u "$windows_path"`
16415    MSYS_ROOT_PATH="$unix_path"
16416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16418    MSYS_ROOT_PATH="$unix_path"
16419  fi
16420
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16422$as_echo "$MSYS_ROOT_PATH" >&6; }
16423    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16424  else
16425    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16426  fi
16427
16428  # Test if windows or unix (cygwin/msys) find is first in path.
16429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16430$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16431  FIND_BINARY_OUTPUT=`find --version 2>&1`
16432  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16434$as_echo "unix style" >&6; }
16435  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16437$as_echo "Windows" >&6; }
16438    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16439$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16440    { $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
16441$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16442    as_fn_error $? "Cannot continue" "$LINENO" 5
16443  else
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16445$as_echo "unknown" >&6; }
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16447$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16448  fi
16449
16450  else
16451    PATH_SEP=":"
16452  fi
16453
16454
16455  # We get the top-level directory from the supporting wrappers.
16456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16457$as_echo_n "checking for top-level directory... " >&6; }
16458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16459$as_echo "$TOPDIR" >&6; }
16460
16461
16462  # Save the original version of TOPDIR for string comparisons
16463  ORIGINAL_TOPDIR="$TOPDIR"
16464
16465
16466  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16467
16468  # Only process if variable expands to non-empty
16469
16470  if test "x$CURDIR" != x; then
16471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16472
16473  # Input might be given as Windows format, start by converting to
16474  # unix format.
16475  path="$CURDIR"
16476  new_path=`$CYGPATH -u "$path"`
16477
16478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16481  # "foo.exe" is OK but "foo" is an error.
16482  #
16483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16484  # It is also a way to make sure we got the proper file name for the real test later on.
16485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16486  if test "x$test_shortpath" = x; then
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16488$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16489    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16490  fi
16491
16492  # Call helper function which possibly converts this using DOS-style short mode.
16493  # If so, the updated path is stored in $new_path.
16494
16495  input_path="$new_path"
16496  # Check if we need to convert this using DOS-style short mode. If the path
16497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16498  # take no chances and rewrite it.
16499  # Note: m4 eats our [], so we need to use [ and ] instead.
16500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16501  if test "x$has_forbidden_chars" != x; then
16502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16506      # Going to short mode and back again did indeed matter. Since short mode is
16507      # case insensitive, let's make it lowercase to improve readability.
16508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16509      # Now convert it back to Unix-style (cygpath)
16510      input_path=`$CYGPATH -u "$shortmode_path"`
16511      new_path="$input_path"
16512    fi
16513  fi
16514
16515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16516  if test "x$test_cygdrive_prefix" = x; then
16517    # As a simple fix, exclude /usr/bin since it's not a real path.
16518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16520      # a path prefixed by /cygdrive for fixpath to work.
16521      new_path="$CYGWIN_ROOT_PATH$input_path"
16522    fi
16523  fi
16524
16525
16526  if test "x$path" != "x$new_path"; then
16527    CURDIR="$new_path"
16528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16529$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16530  fi
16531
16532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16533
16534  path="$CURDIR"
16535  has_colon=`$ECHO $path | $GREP ^.:`
16536  new_path="$path"
16537  if test "x$has_colon" = x; then
16538    # Not in mixed or Windows style, start by that.
16539    new_path=`cmd //c echo $path`
16540  fi
16541
16542
16543  input_path="$new_path"
16544  # Check if we need to convert this using DOS-style short mode. If the path
16545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16546  # take no chances and rewrite it.
16547  # Note: m4 eats our [], so we need to use [ and ] instead.
16548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16549  if test "x$has_forbidden_chars" != x; then
16550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16552  fi
16553
16554
16555  windows_path="$new_path"
16556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16557    unix_path=`$CYGPATH -u "$windows_path"`
16558    new_path="$unix_path"
16559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16561    new_path="$unix_path"
16562  fi
16563
16564  if test "x$path" != "x$new_path"; then
16565    CURDIR="$new_path"
16566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16567$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16568  fi
16569
16570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16572
16573    else
16574      # We're on a unix platform. Hooray! :)
16575      path="$CURDIR"
16576      has_space=`$ECHO "$path" | $GREP " "`
16577      if test "x$has_space" != x; then
16578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16579$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16581      fi
16582
16583      # Use eval to expand a potential ~
16584      eval path="$path"
16585      if test ! -f "$path" && test ! -d "$path"; then
16586        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16587      fi
16588
16589      if test -d "$path"; then
16590        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16591      else
16592        dir="`$DIRNAME "$path"`"
16593        base="`$BASENAME "$path"`"
16594        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16595      fi
16596    fi
16597  fi
16598
16599
16600  # Only process if variable expands to non-empty
16601
16602  if test "x$TOPDIR" != x; then
16603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16604
16605  # Input might be given as Windows format, start by converting to
16606  # unix format.
16607  path="$TOPDIR"
16608  new_path=`$CYGPATH -u "$path"`
16609
16610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16613  # "foo.exe" is OK but "foo" is an error.
16614  #
16615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16616  # It is also a way to make sure we got the proper file name for the real test later on.
16617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16618  if test "x$test_shortpath" = x; then
16619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16620$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16621    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16622  fi
16623
16624  # Call helper function which possibly converts this using DOS-style short mode.
16625  # If so, the updated path is stored in $new_path.
16626
16627  input_path="$new_path"
16628  # Check if we need to convert this using DOS-style short mode. If the path
16629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16630  # take no chances and rewrite it.
16631  # Note: m4 eats our [], so we need to use [ and ] instead.
16632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16633  if test "x$has_forbidden_chars" != x; then
16634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16638      # Going to short mode and back again did indeed matter. Since short mode is
16639      # case insensitive, let's make it lowercase to improve readability.
16640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16641      # Now convert it back to Unix-style (cygpath)
16642      input_path=`$CYGPATH -u "$shortmode_path"`
16643      new_path="$input_path"
16644    fi
16645  fi
16646
16647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16648  if test "x$test_cygdrive_prefix" = x; then
16649    # As a simple fix, exclude /usr/bin since it's not a real path.
16650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16652      # a path prefixed by /cygdrive for fixpath to work.
16653      new_path="$CYGWIN_ROOT_PATH$input_path"
16654    fi
16655  fi
16656
16657
16658  if test "x$path" != "x$new_path"; then
16659    TOPDIR="$new_path"
16660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16661$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16662  fi
16663
16664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665
16666  path="$TOPDIR"
16667  has_colon=`$ECHO $path | $GREP ^.:`
16668  new_path="$path"
16669  if test "x$has_colon" = x; then
16670    # Not in mixed or Windows style, start by that.
16671    new_path=`cmd //c echo $path`
16672  fi
16673
16674
16675  input_path="$new_path"
16676  # Check if we need to convert this using DOS-style short mode. If the path
16677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16678  # take no chances and rewrite it.
16679  # Note: m4 eats our [], so we need to use [ and ] instead.
16680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16681  if test "x$has_forbidden_chars" != x; then
16682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16684  fi
16685
16686
16687  windows_path="$new_path"
16688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16689    unix_path=`$CYGPATH -u "$windows_path"`
16690    new_path="$unix_path"
16691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16693    new_path="$unix_path"
16694  fi
16695
16696  if test "x$path" != "x$new_path"; then
16697    TOPDIR="$new_path"
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16699$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16700  fi
16701
16702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16704
16705    else
16706      # We're on a unix platform. Hooray! :)
16707      path="$TOPDIR"
16708      has_space=`$ECHO "$path" | $GREP " "`
16709      if test "x$has_space" != x; then
16710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16711$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16713      fi
16714
16715      # Use eval to expand a potential ~
16716      eval path="$path"
16717      if test ! -f "$path" && test ! -d "$path"; then
16718        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16719      fi
16720
16721      if test -d "$path"; then
16722        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16723      else
16724        dir="`$DIRNAME "$path"`"
16725        base="`$BASENAME "$path"`"
16726        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16727      fi
16728    fi
16729  fi
16730
16731  # SRC_ROOT is a traditional alias for TOPDIR.
16732  SRC_ROOT=$TOPDIR
16733
16734  # Calculate a canonical version of TOPDIR for string comparisons
16735  CANONICAL_TOPDIR=$TOPDIR
16736
16737  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16738    # Follow a chain of symbolic links. Use readlink
16739    # where it exists, else fall back to horribly
16740    # complicated shell code.
16741    if test "x$READLINK_TESTED" != yes; then
16742      # On MacOSX there is a readlink tool with a different
16743      # purpose than the GNU readlink tool. Check the found readlink.
16744      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16745      if test "x$ISGNU" = x; then
16746        # A readlink that we do not know how to use.
16747        # Are there other non-GNU readlinks out there?
16748        READLINK_TESTED=yes
16749        READLINK=
16750      fi
16751    fi
16752
16753    if test "x$READLINK" != x; then
16754      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16755    else
16756      # Save the current directory for restoring afterwards
16757      STARTDIR=$PWD
16758      COUNTER=0
16759      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16760      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16761      cd $sym_link_dir
16762      # Use -P flag to resolve symlinks in directories.
16763      cd `$THEPWDCMD -P`
16764      sym_link_dir=`$THEPWDCMD -P`
16765      # Resolve file symlinks
16766      while test $COUNTER -lt 20; do
16767        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16768        if test "x$ISLINK" == x; then
16769          # This is not a symbolic link! We are done!
16770          break
16771        fi
16772        # Again resolve directory symlinks since the target of the just found
16773        # link could be in a different directory
16774        cd `$DIRNAME $ISLINK`
16775        sym_link_dir=`$THEPWDCMD -P`
16776        sym_link_file=`$BASENAME $ISLINK`
16777        let COUNTER=COUNTER+1
16778      done
16779      cd $STARTDIR
16780      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16781    fi
16782  fi
16783
16784
16785
16786  # Locate the directory of this script.
16787  AUTOCONF_DIR=$TOPDIR/common/autoconf
16788
16789  # Setup username (for use in adhoc version strings etc)
16790  # Outer [ ] to quote m4.
16791   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16792
16793
16794
16795# Check if it's a pure open build or if custom sources are to be used.
16796
16797  # Check whether --enable-openjdk-only was given.
16798if test "${enable_openjdk_only+set}" = set; then :
16799  enableval=$enable_openjdk_only;
16800else
16801  enable_openjdk_only="no"
16802fi
16803
16804
16805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16806$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16808$as_echo "$enable_openjdk_only" >&6; }
16809  if test "x$enable_openjdk_only" = "xyes"; then
16810    SUPPRESS_CUSTOM_EXTENSIONS="true"
16811  elif test "x$enable_openjdk_only" = "xno"; then
16812    SUPPRESS_CUSTOM_EXTENSIONS="false"
16813  else
16814    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16815  fi
16816
16817  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16818  # the IncludeCustomExtension macro.
16819
16820
16821# Check whether --with-custom-make-dir was given.
16822if test "${with_custom_make_dir+set}" = set; then :
16823  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
16824$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16825fi
16826
16827
16828
16829
16830# These are needed to be able to create a configuration name (and thus the output directory)
16831
16832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16833$as_echo_n "checking which variant of the JDK to build... " >&6; }
16834
16835# Check whether --with-jdk-variant was given.
16836if test "${with_jdk_variant+set}" = set; then :
16837  withval=$with_jdk_variant;
16838fi
16839
16840
16841  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16842    JDK_VARIANT="normal"
16843  else
16844    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16845  fi
16846
16847
16848
16849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16850$as_echo "$JDK_VARIANT" >&6; }
16851
16852
16853  DEBUG_LEVEL="release"
16854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16855$as_echo_n "checking which debug level to use... " >&6; }
16856  # Check whether --enable-debug was given.
16857if test "${enable_debug+set}" = set; then :
16858  enableval=$enable_debug;
16859        ENABLE_DEBUG="${enableval}"
16860        DEBUG_LEVEL="fastdebug"
16861
16862else
16863  ENABLE_DEBUG="no"
16864fi
16865
16866
16867
16868# Check whether --with-debug-level was given.
16869if test "${with_debug_level+set}" = set; then :
16870  withval=$with_debug_level;
16871        DEBUG_LEVEL="${withval}"
16872        if test "x$ENABLE_DEBUG" = xyes; then
16873          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16874        fi
16875
16876fi
16877
16878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16879$as_echo "$DEBUG_LEVEL" >&6; }
16880
16881  if test "x$DEBUG_LEVEL" != xrelease && \
16882      test "x$DEBUG_LEVEL" != xoptimized && \
16883      test "x$DEBUG_LEVEL" != xfastdebug && \
16884      test "x$DEBUG_LEVEL" != xslowdebug; then
16885    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16886  fi
16887
16888  # Translate DEBUG_LEVEL to debug level used by Hotspot
16889  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16890  if test "x$DEBUG_LEVEL" = xrelease; then
16891    HOTSPOT_DEBUG_LEVEL="product"
16892  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16893    HOTSPOT_DEBUG_LEVEL="debug"
16894  fi
16895
16896  if test "x$DEBUG_LEVEL" = xoptimized; then
16897    # The debug level 'optimized' is a little special because it is currently only
16898    # applicable to the HotSpot build where it means to build a completely
16899    # optimized version of the VM without any debugging code (like for the
16900    # 'release' debug level which is called 'product' in the HotSpot build) but
16901    # with the exception that it can contain additional code which is otherwise
16902    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16903    # test new and/or experimental features which are not intended for customer
16904    # shipment. Because these new features need to be tested and benchmarked in
16905    # real world scenarios, we want to build the containing JDK at the 'release'
16906    # debug level.
16907    DEBUG_LEVEL="release"
16908  fi
16909
16910
16911
16912
16913
16914
16915# Check whether --with-jvm-variants was given.
16916if test "${with_jvm_variants+set}" = set; then :
16917  withval=$with_jvm_variants;
16918fi
16919
16920
16921
16922
16923# Check whether --with-cpu-port was given.
16924if test "${with_cpu_port+set}" = set; then :
16925  withval=$with_cpu_port;
16926fi
16927
16928
16929  if test "x$with_cpu_port" != x; then
16930    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16931      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16932    fi
16933    if test "x$with_cpu_port" != xarm64 && \
16934        test "x$with_cpu_port" != xaarch64; then
16935      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16936    fi
16937    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16938  fi
16939
16940
16941  if test "x$with_jvm_variants" = x; then
16942    with_jvm_variants="server"
16943  fi
16944  JVM_VARIANTS_OPT="$with_jvm_variants"
16945
16946  # Has the user listed more than one variant?
16947  # Additional [] needed to keep m4 from mangling shell constructs.
16948  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16949    BUILDING_MULTIPLE_JVM_VARIANTS=true
16950  else
16951    BUILDING_MULTIPLE_JVM_VARIANTS=false
16952  fi
16953  # Replace the commas with AND for use in the build directory name.
16954  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16955
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16957$as_echo_n "checking which variants of the JVM to build... " >&6; }
16958  # JVM_VARIANTS is a space-separated list.
16959  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16960  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16962$as_echo "$JVM_VARIANTS" >&6; }
16963
16964  # Check that the selected variants are valid
16965
16966  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16967  # Notice that the original variant failes on SLES 10 and 11
16968  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16969  STACK=${JVM_VARIANTS// /$'\n'}
16970  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16971  if test "x$INVALID_VARIANTS" != x; then
16972    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16973$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16974    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16975  fi
16976
16977  # All "special" variants share the same output directory ("server")
16978  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16979  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16980  STACK=${JVM_VARIANTS// /$'\n'}
16981  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16982  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16983    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16984  fi
16985
16986  # The "main" variant is the one used by other libs to link against during the
16987  # build.
16988  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16989    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16990    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16991      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16992        JVM_VARIANT_MAIN="$variant"
16993        break
16994      fi
16995    done
16996  else
16997    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16998  fi
16999
17000
17001
17002
17003
17004  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17005    # zero behaves as a platform and rewrites these values. This is really weird. :(
17006    # We are guaranteed that we do not build any other variants when building zero.
17007    HOTSPOT_TARGET_CPU=zero
17008    HOTSPOT_TARGET_CPU_ARCH=zero
17009  fi
17010
17011
17012# With basic setup done, call the custom early hook.
17013
17014
17015# Check if we have devkits, extra paths or sysroot set.
17016
17017
17018# Check whether --with-devkit was given.
17019if test "${with_devkit+set}" = set; then :
17020  withval=$with_devkit;
17021
17022  # Only process if variable expands to non-empty
17023
17024  if test "x$with_devkit" != x; then
17025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17026
17027  # Input might be given as Windows format, start by converting to
17028  # unix format.
17029  path="$with_devkit"
17030  new_path=`$CYGPATH -u "$path"`
17031
17032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17035  # "foo.exe" is OK but "foo" is an error.
17036  #
17037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17038  # It is also a way to make sure we got the proper file name for the real test later on.
17039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17040  if test "x$test_shortpath" = x; then
17041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17042$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17043    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17044  fi
17045
17046  # Call helper function which possibly converts this using DOS-style short mode.
17047  # If so, the updated path is stored in $new_path.
17048
17049  input_path="$new_path"
17050  # Check if we need to convert this using DOS-style short mode. If the path
17051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17052  # take no chances and rewrite it.
17053  # Note: m4 eats our [], so we need to use [ and ] instead.
17054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17055  if test "x$has_forbidden_chars" != x; then
17056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17060      # Going to short mode and back again did indeed matter. Since short mode is
17061      # case insensitive, let's make it lowercase to improve readability.
17062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17063      # Now convert it back to Unix-style (cygpath)
17064      input_path=`$CYGPATH -u "$shortmode_path"`
17065      new_path="$input_path"
17066    fi
17067  fi
17068
17069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17070  if test "x$test_cygdrive_prefix" = x; then
17071    # As a simple fix, exclude /usr/bin since it's not a real path.
17072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17074      # a path prefixed by /cygdrive for fixpath to work.
17075      new_path="$CYGWIN_ROOT_PATH$input_path"
17076    fi
17077  fi
17078
17079
17080  if test "x$path" != "x$new_path"; then
17081    with_devkit="$new_path"
17082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17083$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17084  fi
17085
17086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17087
17088  path="$with_devkit"
17089  has_colon=`$ECHO $path | $GREP ^.:`
17090  new_path="$path"
17091  if test "x$has_colon" = x; then
17092    # Not in mixed or Windows style, start by that.
17093    new_path=`cmd //c echo $path`
17094  fi
17095
17096
17097  input_path="$new_path"
17098  # Check if we need to convert this using DOS-style short mode. If the path
17099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17100  # take no chances and rewrite it.
17101  # Note: m4 eats our [], so we need to use [ and ] instead.
17102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17103  if test "x$has_forbidden_chars" != x; then
17104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17106  fi
17107
17108
17109  windows_path="$new_path"
17110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17111    unix_path=`$CYGPATH -u "$windows_path"`
17112    new_path="$unix_path"
17113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17115    new_path="$unix_path"
17116  fi
17117
17118  if test "x$path" != "x$new_path"; then
17119    with_devkit="$new_path"
17120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17121$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17122  fi
17123
17124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17126
17127    else
17128      # We're on a unix platform. Hooray! :)
17129      path="$with_devkit"
17130      has_space=`$ECHO "$path" | $GREP " "`
17131      if test "x$has_space" != x; then
17132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17133$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17135      fi
17136
17137      # Use eval to expand a potential ~
17138      eval path="$path"
17139      if test ! -f "$path" && test ! -d "$path"; then
17140        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17141      fi
17142
17143      if test -d "$path"; then
17144        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17145      else
17146        dir="`$DIRNAME "$path"`"
17147        base="`$BASENAME "$path"`"
17148        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17149      fi
17150    fi
17151  fi
17152
17153        DEVKIT_ROOT="$with_devkit"
17154        # Check for a meta data info file in the root of the devkit
17155        if test -f "$DEVKIT_ROOT/devkit.info"; then
17156          . $DEVKIT_ROOT/devkit.info
17157          # This potentially sets the following:
17158          # A descriptive name of the devkit
17159
17160  if test "x$DEVKIT_NAME" = x; then
17161    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17162  fi
17163
17164          # Corresponds to --with-extra-path
17165
17166  if test "x$DEVKIT_EXTRA_PATH" = x; then
17167    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17168  fi
17169
17170          # Corresponds to --with-toolchain-path
17171
17172  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17173    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17174  fi
17175
17176          # Corresponds to --with-sysroot
17177
17178  if test "x$DEVKIT_SYSROOT" = x; then
17179    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17180  fi
17181
17182
17183          # Identifies the Visual Studio version in the devkit
17184
17185  if test "x$DEVKIT_VS_VERSION" = x; then
17186    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17187  fi
17188
17189          # The Visual Studio include environment variable
17190
17191  if test "x$DEVKIT_VS_INCLUDE" = x; then
17192    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17193  fi
17194
17195          # The Visual Studio lib environment variable
17196
17197  if test "x$DEVKIT_VS_LIB" = x; then
17198    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17199  fi
17200
17201          # Corresponds to --with-msvcr-dll
17202
17203  if test "x$DEVKIT_MSVCR_DLL" = x; then
17204    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17205  fi
17206
17207          # Corresponds to --with-msvcp-dll
17208
17209  if test "x$DEVKIT_MSVCP_DLL" = x; then
17210    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17211  fi
17212
17213        fi
17214
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17216$as_echo_n "checking for devkit... " >&6; }
17217        if test "x$DEVKIT_NAME" != x; then
17218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17219$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17220        else
17221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17222$as_echo "$DEVKIT_ROOT" >&6; }
17223        fi
17224
17225
17226  if test "x$DEVKIT_EXTRA_PATH" != x; then
17227    if test "x$EXTRA_PATH" = x; then
17228      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17229    else
17230      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17231    fi
17232  fi
17233
17234
17235        # Fallback default of just /bin if DEVKIT_PATH is not defined
17236        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17237          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17238        fi
17239
17240  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17241    if test "x$TOOLCHAIN_PATH" = x; then
17242      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17243    else
17244      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17245    fi
17246  fi
17247
17248
17249        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17250        # places for backwards compatiblity.
17251        if test "x$DEVKIT_SYSROOT" != x; then
17252          SYSROOT="$DEVKIT_SYSROOT"
17253        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17254          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17255        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17256          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17257        fi
17258
17259
17260fi
17261
17262
17263  # You can force the sysroot if the sysroot encoded into the compiler tools
17264  # is not correct.
17265
17266# Check whether --with-sys-root was given.
17267if test "${with_sys_root+set}" = set; then :
17268  withval=$with_sys_root; SYSROOT=$with_sys_root
17269
17270fi
17271
17272
17273
17274# Check whether --with-sysroot was given.
17275if test "${with_sysroot+set}" = set; then :
17276  withval=$with_sysroot; SYSROOT=$with_sysroot
17277
17278fi
17279
17280
17281
17282# Check whether --with-tools-dir was given.
17283if test "${with_tools_dir+set}" = set; then :
17284  withval=$with_tools_dir;
17285  if test "x$with_tools_dir" != x; then
17286    if test "x$TOOLCHAIN_PATH" = x; then
17287      TOOLCHAIN_PATH="$with_tools_dir"
17288    else
17289      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17290    fi
17291  fi
17292
17293
17294fi
17295
17296
17297
17298# Check whether --with-toolchain-path was given.
17299if test "${with_toolchain_path+set}" = set; then :
17300  withval=$with_toolchain_path;
17301  if test "x$with_toolchain_path" != x; then
17302    if test "x$TOOLCHAIN_PATH" = x; then
17303      TOOLCHAIN_PATH="$with_toolchain_path"
17304    else
17305      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17306    fi
17307  fi
17308
17309
17310fi
17311
17312
17313
17314# Check whether --with-extra-path was given.
17315if test "${with_extra_path+set}" = set; then :
17316  withval=$with_extra_path;
17317  if test "x$with_extra_path" != x; then
17318    if test "x$EXTRA_PATH" = x; then
17319      EXTRA_PATH="$with_extra_path"
17320    else
17321      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17322    fi
17323  fi
17324
17325
17326fi
17327
17328
17329  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17330    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17331    # If not, detect if Xcode is installed by running xcodebuild -version
17332    # if no Xcode installed, xcodebuild exits with 1
17333    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17334    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17335      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17336      # fall back on the stub binary in /usr/bin/xcodebuild
17337      # Extract the first word of "xcodebuild", so it can be a program name with args.
17338set dummy xcodebuild; ac_word=$2
17339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17340$as_echo_n "checking for $ac_word... " >&6; }
17341if ${ac_cv_path_XCODEBUILD+:} false; then :
17342  $as_echo_n "(cached) " >&6
17343else
17344  case $XCODEBUILD in
17345  [\\/]* | ?:[\\/]*)
17346  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17347  ;;
17348  *)
17349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17350for as_dir in $TOOLCHAIN_PATH
17351do
17352  IFS=$as_save_IFS
17353  test -z "$as_dir" && as_dir=.
17354    for ac_exec_ext in '' $ac_executable_extensions; do
17355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17356    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17358    break 2
17359  fi
17360done
17361  done
17362IFS=$as_save_IFS
17363
17364  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17365  ;;
17366esac
17367fi
17368XCODEBUILD=$ac_cv_path_XCODEBUILD
17369if test -n "$XCODEBUILD"; then
17370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17371$as_echo "$XCODEBUILD" >&6; }
17372else
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17374$as_echo "no" >&6; }
17375fi
17376
17377
17378    else
17379      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17380      # when only the command line tools are installed there are no SDKs, so headers
17381      # are copied into the system frameworks
17382      XCODEBUILD=
17383
17384    fi
17385
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17387$as_echo_n "checking for sdk name... " >&6; }
17388
17389# Check whether --with-sdk-name was given.
17390if test "${with_sdk_name+set}" = set; then :
17391  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17392
17393fi
17394
17395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17396$as_echo "$SDKNAME" >&6; }
17397
17398    # if toolchain path is specified then don't rely on system headers, they may not compile
17399    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17400    test -z "$TOOLCHAIN_PATH" && \
17401      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17402
17403    if test -z "$SYSROOT"; then
17404      if test -n "$XCODEBUILD"; then
17405        # if we don't have system headers, use default SDK name (last resort)
17406        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17407          SDKNAME=${SDKNAME:-macosx}
17408        fi
17409
17410        if test -n "$SDKNAME"; then
17411          # Call xcodebuild to determine SYSROOT
17412          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17413        fi
17414      else
17415        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17416          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
17417        fi
17418      fi
17419    else
17420      # warn user if --with-sdk-name was also set
17421      if test -n "$with_sdk_name"; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17423$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17424      fi
17425    fi
17426
17427    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17428      # If no system framework headers, then SYSROOT must be set, or we won't build
17429      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
17430    fi
17431
17432    # Perform a basic sanity test
17433    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17434      if test -z "$SYSROOT"; then
17435        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
17436      else
17437        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17438      fi
17439    fi
17440
17441    # set SDKROOT too, Xcode tools will pick it up
17442    SDKROOT="$SYSROOT"
17443
17444  fi
17445
17446  # Prepend the extra path to the global path
17447
17448  if test "x$EXTRA_PATH" != x; then
17449    if test "x$PATH" = x; then
17450      PATH="$EXTRA_PATH"
17451    else
17452      PATH="$EXTRA_PATH:$PATH"
17453    fi
17454  fi
17455
17456
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17458$as_echo_n "checking for sysroot... " >&6; }
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17460$as_echo "$SYSROOT" >&6; }
17461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17462$as_echo_n "checking for toolchain path... " >&6; }
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17464$as_echo "$TOOLCHAIN_PATH" >&6; }
17465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17466$as_echo_n "checking for extra path... " >&6; }
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17468$as_echo "$EXTRA_PATH" >&6; }
17469
17470
17471# To properly create a configuration name, we need to have the OpenJDK target
17472# and options (variants and debug level) parsed.
17473
17474
17475
17476# Check whether --with-conf-name was given.
17477if test "${with_conf_name+set}" = set; then :
17478  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17479fi
17480
17481
17482  # Test from where we are running configure, in or outside of src root.
17483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17484$as_echo_n "checking where to store configuration... " >&6; }
17485  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17486      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17487      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17488    # We are running configure from the src root.
17489    # Create a default ./build/target-variant-debuglevel output root.
17490    if test "x${CONF_NAME}" = x; then
17491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17492$as_echo "in default location" >&6; }
17493      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17494    else
17495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17496$as_echo "in build directory with custom name" >&6; }
17497    fi
17498    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17499    $MKDIR -p "$OUTPUT_ROOT"
17500    if test ! -d "$OUTPUT_ROOT"; then
17501      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17502    fi
17503  else
17504    # We are running configure from outside of the src dir.
17505    # Then use the current directory as output dir!
17506    # If configuration is situated in normal build directory, just use the build
17507    # directory name as configuration name, otherwise use the complete path.
17508    if test "x${CONF_NAME}" = x; then
17509      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17510    fi
17511    OUTPUT_ROOT="$CURDIR"
17512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17513$as_echo "in current directory" >&6; }
17514
17515    # WARNING: This might be a bad thing to do. You need to be sure you want to
17516    # have a configuration in this directory. Do some sanity checks!
17517
17518    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17519      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17520      # other files
17521      files_present=`$LS $OUTPUT_ROOT`
17522      # Configure has already touched config.log and confdefs.h in the current dir when this check
17523      # is performed.
17524      filtered_files=`$ECHO "$files_present" \
17525          | $SED -e 's/config.log//g' \
17526              -e 's/configure.log//g' \
17527              -e 's/confdefs.h//g' \
17528              -e 's/ //g' \
17529          | $TR -d '\n'`
17530      if test "x$filtered_files" != x; then
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17532$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17533        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17534$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17535        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17536$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17537        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17538$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17540$as_echo "$as_me: seriously mess up just about everything." >&6;}
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17542$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17544$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17545        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17546      fi
17547    fi
17548  fi
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17550$as_echo_n "checking what configuration name to use... " >&6; }
17551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17552$as_echo "$CONF_NAME" >&6; }
17553
17554
17555  # Only process if variable expands to non-empty
17556
17557  if test "x$OUTPUT_ROOT" != x; then
17558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17559
17560  # Input might be given as Windows format, start by converting to
17561  # unix format.
17562  path="$OUTPUT_ROOT"
17563  new_path=`$CYGPATH -u "$path"`
17564
17565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17568  # "foo.exe" is OK but "foo" is an error.
17569  #
17570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17571  # It is also a way to make sure we got the proper file name for the real test later on.
17572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17573  if test "x$test_shortpath" = x; then
17574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17575$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17576    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17577  fi
17578
17579  # Call helper function which possibly converts this using DOS-style short mode.
17580  # If so, the updated path is stored in $new_path.
17581
17582  input_path="$new_path"
17583  # Check if we need to convert this using DOS-style short mode. If the path
17584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17585  # take no chances and rewrite it.
17586  # Note: m4 eats our [], so we need to use [ and ] instead.
17587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17588  if test "x$has_forbidden_chars" != x; then
17589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17593      # Going to short mode and back again did indeed matter. Since short mode is
17594      # case insensitive, let's make it lowercase to improve readability.
17595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17596      # Now convert it back to Unix-style (cygpath)
17597      input_path=`$CYGPATH -u "$shortmode_path"`
17598      new_path="$input_path"
17599    fi
17600  fi
17601
17602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17603  if test "x$test_cygdrive_prefix" = x; then
17604    # As a simple fix, exclude /usr/bin since it's not a real path.
17605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17607      # a path prefixed by /cygdrive for fixpath to work.
17608      new_path="$CYGWIN_ROOT_PATH$input_path"
17609    fi
17610  fi
17611
17612
17613  if test "x$path" != "x$new_path"; then
17614    OUTPUT_ROOT="$new_path"
17615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17616$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17617  fi
17618
17619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17620
17621  path="$OUTPUT_ROOT"
17622  has_colon=`$ECHO $path | $GREP ^.:`
17623  new_path="$path"
17624  if test "x$has_colon" = x; then
17625    # Not in mixed or Windows style, start by that.
17626    new_path=`cmd //c echo $path`
17627  fi
17628
17629
17630  input_path="$new_path"
17631  # Check if we need to convert this using DOS-style short mode. If the path
17632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17633  # take no chances and rewrite it.
17634  # Note: m4 eats our [], so we need to use [ and ] instead.
17635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17636  if test "x$has_forbidden_chars" != x; then
17637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17639  fi
17640
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  if test "x$path" != "x$new_path"; then
17652    OUTPUT_ROOT="$new_path"
17653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17654$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17655  fi
17656
17657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17659
17660    else
17661      # We're on a unix platform. Hooray! :)
17662      path="$OUTPUT_ROOT"
17663      has_space=`$ECHO "$path" | $GREP " "`
17664      if test "x$has_space" != x; then
17665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17666$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17668      fi
17669
17670      # Use eval to expand a potential ~
17671      eval path="$path"
17672      if test ! -f "$path" && test ! -d "$path"; then
17673        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17674      fi
17675
17676      if test -d "$path"; then
17677        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17678      else
17679        dir="`$DIRNAME "$path"`"
17680        base="`$BASENAME "$path"`"
17681        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17682      fi
17683    fi
17684  fi
17685
17686
17687  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17688  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17689
17690  SPEC="$OUTPUT_ROOT/spec.gmk"
17691
17692
17693
17694
17695
17696  # The spec.gmk file contains all variables for the make system.
17697  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17698
17699  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17700  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17701
17702  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17703  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17704
17705  # The compare.sh is used to compare the build output to other builds.
17706  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17707
17708  # The generated Makefile knows where the spec.gmk is and where the source is.
17709  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17710  # which will look for generated configurations
17711  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17712
17713
17714
17715# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17716
17717  for ac_prog in apt-get yum brew port pkgutil pkgadd
17718do
17719  # Extract the first word of "$ac_prog", so it can be a program name with args.
17720set dummy $ac_prog; ac_word=$2
17721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17722$as_echo_n "checking for $ac_word... " >&6; }
17723if ${ac_cv_prog_PKGHANDLER+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726  if test -n "$PKGHANDLER"; then
17727  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17728else
17729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17730for as_dir in $PATH
17731do
17732  IFS=$as_save_IFS
17733  test -z "$as_dir" && as_dir=.
17734    for ac_exec_ext in '' $ac_executable_extensions; do
17735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17736    ac_cv_prog_PKGHANDLER="$ac_prog"
17737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17738    break 2
17739  fi
17740done
17741  done
17742IFS=$as_save_IFS
17743
17744fi
17745fi
17746PKGHANDLER=$ac_cv_prog_PKGHANDLER
17747if test -n "$PKGHANDLER"; then
17748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17749$as_echo "$PKGHANDLER" >&6; }
17750else
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17752$as_echo "no" >&6; }
17753fi
17754
17755
17756  test -n "$PKGHANDLER" && break
17757done
17758
17759
17760
17761# Setup tools that requires more complex handling, or that is not needed by the configure script.
17762
17763
17764
17765  # Publish this variable in the help.
17766
17767
17768  if [ -z "${MAKE+x}" ]; then
17769    # The variable is not set by user, try to locate tool using the code snippet
17770
17771    # Try our hardest to locate a correct version of GNU make
17772    for ac_prog in gmake
17773do
17774  # Extract the first word of "$ac_prog", so it can be a program name with args.
17775set dummy $ac_prog; ac_word=$2
17776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17777$as_echo_n "checking for $ac_word... " >&6; }
17778if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17779  $as_echo_n "(cached) " >&6
17780else
17781  case $CHECK_GMAKE in
17782  [\\/]* | ?:[\\/]*)
17783  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17784  ;;
17785  *)
17786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17787for as_dir in $PATH
17788do
17789  IFS=$as_save_IFS
17790  test -z "$as_dir" && as_dir=.
17791    for ac_exec_ext in '' $ac_executable_extensions; do
17792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17793    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17795    break 2
17796  fi
17797done
17798  done
17799IFS=$as_save_IFS
17800
17801  ;;
17802esac
17803fi
17804CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17805if test -n "$CHECK_GMAKE"; then
17806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17807$as_echo "$CHECK_GMAKE" >&6; }
17808else
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17810$as_echo "no" >&6; }
17811fi
17812
17813
17814  test -n "$CHECK_GMAKE" && break
17815done
17816
17817
17818  MAKE_CANDIDATE=""$CHECK_GMAKE""
17819  DESCRIPTION="gmake in PATH"
17820
17821  # On Cygwin, we require a newer version of make than on other platforms
17822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823    MAKE_VERSION_EXPR="-e 4\."
17824    MAKE_REQUIRED_VERSION="4.0"
17825   else
17826    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17827    MAKE_REQUIRED_VERSION="3.81"
17828  fi
17829
17830  if test "x$MAKE_CANDIDATE" != x; then
17831    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17832$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17833    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17834    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17835    if test "x$IS_GNU_MAKE" = x; then
17836      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17837$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17838    else
17839      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17840      if test "x$IS_MODERN_MAKE" = x; then
17841        { $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
17842$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;}
17843      else
17844        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17845          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17846            MAKE_EXPECTED_ENV='cygwin'
17847          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848            MAKE_EXPECTED_ENV='msys'
17849          else
17850            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17851          fi
17852          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17853          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17854        else
17855          # Not relevant for non-Windows
17856          IS_MAKE_CORRECT_ENV=true
17857        fi
17858        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17859          { $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
17860$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;}
17861        else
17862          FOUND_MAKE=$MAKE_CANDIDATE
17863
17864  # Only process if variable expands to non-empty
17865
17866  if test "x$FOUND_MAKE" != x; then
17867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17868
17869  # First separate the path from the arguments. This will split at the first
17870  # space.
17871  complete="$FOUND_MAKE"
17872  path="${complete%% *}"
17873  tmp="$complete EOL"
17874  arguments="${tmp#* }"
17875
17876  # Input might be given as Windows format, start by converting to
17877  # unix format.
17878  new_path=`$CYGPATH -u "$path"`
17879
17880  # Now try to locate executable using which
17881  new_path=`$WHICH "$new_path" 2> /dev/null`
17882  # bat and cmd files are not always considered executable in cygwin causing which
17883  # to not find them
17884  if test "x$new_path" = x \
17885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17887    new_path=`$CYGPATH -u "$path"`
17888  fi
17889  if test "x$new_path" = x; then
17890    # Oops. Which didn't find the executable.
17891    # The splitting of arguments from the executable at a space might have been incorrect,
17892    # since paths with space are more likely in Windows. Give it another try with the whole
17893    # argument.
17894    path="$complete"
17895    arguments="EOL"
17896    new_path=`$CYGPATH -u "$path"`
17897    new_path=`$WHICH "$new_path" 2> /dev/null`
17898    # bat and cmd files are not always considered executable in cygwin causing which
17899    # to not find them
17900    if test "x$new_path" = x \
17901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17903      new_path=`$CYGPATH -u "$path"`
17904    fi
17905    if test "x$new_path" = x; then
17906      # It's still not found. Now this is an unrecoverable error.
17907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17909      has_space=`$ECHO "$complete" | $GREP " "`
17910      if test "x$has_space" != x; then
17911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17913      fi
17914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17915    fi
17916  fi
17917
17918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17921  # "foo.exe" is OK but "foo" is an error.
17922  #
17923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17924  # It is also a way to make sure we got the proper file name for the real test later on.
17925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17926  if test "x$test_shortpath" = x; then
17927    # Short path failed, file does not exist as specified.
17928    # Try adding .exe or .cmd
17929    if test -f "${new_path}.exe"; then
17930      input_to_shortpath="${new_path}.exe"
17931    elif test -f "${new_path}.cmd"; then
17932      input_to_shortpath="${new_path}.cmd"
17933    else
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17939    fi
17940  else
17941    input_to_shortpath="$new_path"
17942  fi
17943
17944  # Call helper function which possibly converts this using DOS-style short mode.
17945  # If so, the updated path is stored in $new_path.
17946  new_path="$input_to_shortpath"
17947
17948  input_path="$input_to_shortpath"
17949  # Check if we need to convert this using DOS-style short mode. If the path
17950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17951  # take no chances and rewrite it.
17952  # Note: m4 eats our [], so we need to use [ and ] instead.
17953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17954  if test "x$has_forbidden_chars" != x; then
17955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17959      # Going to short mode and back again did indeed matter. Since short mode is
17960      # case insensitive, let's make it lowercase to improve readability.
17961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17962      # Now convert it back to Unix-style (cygpath)
17963      input_path=`$CYGPATH -u "$shortmode_path"`
17964      new_path="$input_path"
17965    fi
17966  fi
17967
17968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17969  if test "x$test_cygdrive_prefix" = x; then
17970    # As a simple fix, exclude /usr/bin since it's not a real path.
17971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17973      # a path prefixed by /cygdrive for fixpath to work.
17974      new_path="$CYGWIN_ROOT_PATH$input_path"
17975    fi
17976  fi
17977
17978  # remove trailing .exe if any
17979  new_path="${new_path/%.exe/}"
17980
17981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17982
17983  # First separate the path from the arguments. This will split at the first
17984  # space.
17985  complete="$FOUND_MAKE"
17986  path="${complete%% *}"
17987  tmp="$complete EOL"
17988  arguments="${tmp#* }"
17989
17990  # Input might be given as Windows format, start by converting to
17991  # unix format.
17992  new_path="$path"
17993
17994  windows_path="$new_path"
17995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17996    unix_path=`$CYGPATH -u "$windows_path"`
17997    new_path="$unix_path"
17998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18000    new_path="$unix_path"
18001  fi
18002
18003
18004  # Now try to locate executable using which
18005  new_path=`$WHICH "$new_path" 2> /dev/null`
18006
18007  if test "x$new_path" = x; then
18008    # Oops. Which didn't find the executable.
18009    # The splitting of arguments from the executable at a space might have been incorrect,
18010    # since paths with space are more likely in Windows. Give it another try with the whole
18011    # argument.
18012    path="$complete"
18013    arguments="EOL"
18014    new_path="$path"
18015
18016  windows_path="$new_path"
18017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018    unix_path=`$CYGPATH -u "$windows_path"`
18019    new_path="$unix_path"
18020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18022    new_path="$unix_path"
18023  fi
18024
18025
18026    new_path=`$WHICH "$new_path" 2> /dev/null`
18027    # bat and cmd files are not always considered executable in MSYS causing which
18028    # to not find them
18029    if test "x$new_path" = x \
18030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18032      new_path="$path"
18033
18034  windows_path="$new_path"
18035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18036    unix_path=`$CYGPATH -u "$windows_path"`
18037    new_path="$unix_path"
18038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18040    new_path="$unix_path"
18041  fi
18042
18043    fi
18044
18045    if test "x$new_path" = x; then
18046      # It's still not found. Now this is an unrecoverable error.
18047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18048$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18049      has_space=`$ECHO "$complete" | $GREP " "`
18050      if test "x$has_space" != x; then
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18053      fi
18054      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18055    fi
18056  fi
18057
18058  # Now new_path has a complete unix path to the binary
18059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18060    # Keep paths in /bin as-is, but remove trailing .exe if any
18061    new_path="${new_path/%.exe/}"
18062    # Do not save /bin paths to all_fixpath_prefixes!
18063  else
18064    # Not in mixed or Windows style, start by that.
18065    new_path=`cmd //c echo $new_path`
18066
18067  input_path="$new_path"
18068  # Check if we need to convert this using DOS-style short mode. If the path
18069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18070  # take no chances and rewrite it.
18071  # Note: m4 eats our [], so we need to use [ and ] instead.
18072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18073  if test "x$has_forbidden_chars" != x; then
18074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18076  fi
18077
18078    # Output is in $new_path
18079
18080  windows_path="$new_path"
18081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18082    unix_path=`$CYGPATH -u "$windows_path"`
18083    new_path="$unix_path"
18084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18086    new_path="$unix_path"
18087  fi
18088
18089    # remove trailing .exe if any
18090    new_path="${new_path/%.exe/}"
18091
18092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18094  fi
18095
18096    else
18097      # We're on a unix platform. Hooray! :)
18098      # First separate the path from the arguments. This will split at the first
18099      # space.
18100      complete="$FOUND_MAKE"
18101      path="${complete%% *}"
18102      tmp="$complete EOL"
18103      arguments="${tmp#* }"
18104
18105      # Cannot rely on the command "which" here since it doesn't always work.
18106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18107      if test -z "$is_absolute_path"; then
18108        # Path to executable is not absolute. Find it.
18109        IFS_save="$IFS"
18110        IFS=:
18111        for p in $PATH; do
18112          if test -f "$p/$path" && test -x "$p/$path"; then
18113            new_path="$p/$path"
18114            break
18115          fi
18116        done
18117        IFS="$IFS_save"
18118      else
18119        # This is an absolute path, we can use it without further modifications.
18120        new_path="$path"
18121      fi
18122
18123      if test "x$new_path" = x; then
18124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18125$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18126        has_space=`$ECHO "$complete" | $GREP " "`
18127        if test "x$has_space" != x; then
18128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18130        fi
18131        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18132      fi
18133    fi
18134
18135    # Now join together the path and the arguments once again
18136    if test "x$arguments" != xEOL; then
18137      new_complete="$new_path ${arguments% *}"
18138    else
18139      new_complete="$new_path"
18140    fi
18141
18142    if test "x$complete" != "x$new_complete"; then
18143      FOUND_MAKE="$new_complete"
18144      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18145$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18146    fi
18147  fi
18148
18149        fi
18150      fi
18151    fi
18152  fi
18153
18154
18155    if test "x$FOUND_MAKE" = x; then
18156      for ac_prog in make
18157do
18158  # Extract the first word of "$ac_prog", so it can be a program name with args.
18159set dummy $ac_prog; ac_word=$2
18160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18161$as_echo_n "checking for $ac_word... " >&6; }
18162if ${ac_cv_path_CHECK_MAKE+:} false; then :
18163  $as_echo_n "(cached) " >&6
18164else
18165  case $CHECK_MAKE in
18166  [\\/]* | ?:[\\/]*)
18167  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18168  ;;
18169  *)
18170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171for as_dir in $PATH
18172do
18173  IFS=$as_save_IFS
18174  test -z "$as_dir" && as_dir=.
18175    for ac_exec_ext in '' $ac_executable_extensions; do
18176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18177    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179    break 2
18180  fi
18181done
18182  done
18183IFS=$as_save_IFS
18184
18185  ;;
18186esac
18187fi
18188CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18189if test -n "$CHECK_MAKE"; then
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18191$as_echo "$CHECK_MAKE" >&6; }
18192else
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18194$as_echo "no" >&6; }
18195fi
18196
18197
18198  test -n "$CHECK_MAKE" && break
18199done
18200
18201
18202  MAKE_CANDIDATE=""$CHECK_MAKE""
18203  DESCRIPTION="make in PATH"
18204
18205  # On Cygwin, we require a newer version of make than on other platforms
18206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18207    MAKE_VERSION_EXPR="-e 4\."
18208    MAKE_REQUIRED_VERSION="4.0"
18209   else
18210    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18211    MAKE_REQUIRED_VERSION="3.81"
18212  fi
18213
18214  if test "x$MAKE_CANDIDATE" != x; then
18215    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18216$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18217    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18218    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18219    if test "x$IS_GNU_MAKE" = x; then
18220      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18221$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18222    else
18223      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18224      if test "x$IS_MODERN_MAKE" = x; then
18225        { $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
18226$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;}
18227      else
18228        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18229          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18230            MAKE_EXPECTED_ENV='cygwin'
18231          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18232            MAKE_EXPECTED_ENV='msys'
18233          else
18234            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18235          fi
18236          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18237          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18238        else
18239          # Not relevant for non-Windows
18240          IS_MAKE_CORRECT_ENV=true
18241        fi
18242        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18243          { $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
18244$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;}
18245        else
18246          FOUND_MAKE=$MAKE_CANDIDATE
18247
18248  # Only process if variable expands to non-empty
18249
18250  if test "x$FOUND_MAKE" != x; then
18251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18252
18253  # First separate the path from the arguments. This will split at the first
18254  # space.
18255  complete="$FOUND_MAKE"
18256  path="${complete%% *}"
18257  tmp="$complete EOL"
18258  arguments="${tmp#* }"
18259
18260  # Input might be given as Windows format, start by converting to
18261  # unix format.
18262  new_path=`$CYGPATH -u "$path"`
18263
18264  # Now try to locate executable using which
18265  new_path=`$WHICH "$new_path" 2> /dev/null`
18266  # bat and cmd files are not always considered executable in cygwin causing which
18267  # to not find them
18268  if test "x$new_path" = x \
18269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18271    new_path=`$CYGPATH -u "$path"`
18272  fi
18273  if test "x$new_path" = x; then
18274    # Oops. Which didn't find the executable.
18275    # The splitting of arguments from the executable at a space might have been incorrect,
18276    # since paths with space are more likely in Windows. Give it another try with the whole
18277    # argument.
18278    path="$complete"
18279    arguments="EOL"
18280    new_path=`$CYGPATH -u "$path"`
18281    new_path=`$WHICH "$new_path" 2> /dev/null`
18282    # bat and cmd files are not always considered executable in cygwin causing which
18283    # to not find them
18284    if test "x$new_path" = x \
18285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18287      new_path=`$CYGPATH -u "$path"`
18288    fi
18289    if test "x$new_path" = x; then
18290      # It's still not found. Now this is an unrecoverable error.
18291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18293      has_space=`$ECHO "$complete" | $GREP " "`
18294      if test "x$has_space" != x; then
18295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18297      fi
18298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18299    fi
18300  fi
18301
18302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18305  # "foo.exe" is OK but "foo" is an error.
18306  #
18307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18308  # It is also a way to make sure we got the proper file name for the real test later on.
18309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18310  if test "x$test_shortpath" = x; then
18311    # Short path failed, file does not exist as specified.
18312    # Try adding .exe or .cmd
18313    if test -f "${new_path}.exe"; then
18314      input_to_shortpath="${new_path}.exe"
18315    elif test -f "${new_path}.cmd"; then
18316      input_to_shortpath="${new_path}.cmd"
18317    else
18318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18323    fi
18324  else
18325    input_to_shortpath="$new_path"
18326  fi
18327
18328  # Call helper function which possibly converts this using DOS-style short mode.
18329  # If so, the updated path is stored in $new_path.
18330  new_path="$input_to_shortpath"
18331
18332  input_path="$input_to_shortpath"
18333  # Check if we need to convert this using DOS-style short mode. If the path
18334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18335  # take no chances and rewrite it.
18336  # Note: m4 eats our [], so we need to use [ and ] instead.
18337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18338  if test "x$has_forbidden_chars" != x; then
18339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18343      # Going to short mode and back again did indeed matter. Since short mode is
18344      # case insensitive, let's make it lowercase to improve readability.
18345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18346      # Now convert it back to Unix-style (cygpath)
18347      input_path=`$CYGPATH -u "$shortmode_path"`
18348      new_path="$input_path"
18349    fi
18350  fi
18351
18352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18353  if test "x$test_cygdrive_prefix" = x; then
18354    # As a simple fix, exclude /usr/bin since it's not a real path.
18355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18357      # a path prefixed by /cygdrive for fixpath to work.
18358      new_path="$CYGWIN_ROOT_PATH$input_path"
18359    fi
18360  fi
18361
18362  # remove trailing .exe if any
18363  new_path="${new_path/%.exe/}"
18364
18365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366
18367  # First separate the path from the arguments. This will split at the first
18368  # space.
18369  complete="$FOUND_MAKE"
18370  path="${complete%% *}"
18371  tmp="$complete EOL"
18372  arguments="${tmp#* }"
18373
18374  # Input might be given as Windows format, start by converting to
18375  # unix format.
18376  new_path="$path"
18377
18378  windows_path="$new_path"
18379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380    unix_path=`$CYGPATH -u "$windows_path"`
18381    new_path="$unix_path"
18382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18384    new_path="$unix_path"
18385  fi
18386
18387
18388  # Now try to locate executable using which
18389  new_path=`$WHICH "$new_path" 2> /dev/null`
18390
18391  if test "x$new_path" = x; then
18392    # Oops. Which didn't find the executable.
18393    # The splitting of arguments from the executable at a space might have been incorrect,
18394    # since paths with space are more likely in Windows. Give it another try with the whole
18395    # argument.
18396    path="$complete"
18397    arguments="EOL"
18398    new_path="$path"
18399
18400  windows_path="$new_path"
18401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402    unix_path=`$CYGPATH -u "$windows_path"`
18403    new_path="$unix_path"
18404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18406    new_path="$unix_path"
18407  fi
18408
18409
18410    new_path=`$WHICH "$new_path" 2> /dev/null`
18411    # bat and cmd files are not always considered executable in MSYS causing which
18412    # to not find them
18413    if test "x$new_path" = x \
18414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18416      new_path="$path"
18417
18418  windows_path="$new_path"
18419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18420    unix_path=`$CYGPATH -u "$windows_path"`
18421    new_path="$unix_path"
18422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18424    new_path="$unix_path"
18425  fi
18426
18427    fi
18428
18429    if test "x$new_path" = x; then
18430      # It's still not found. Now this is an unrecoverable error.
18431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18432$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18433      has_space=`$ECHO "$complete" | $GREP " "`
18434      if test "x$has_space" != x; then
18435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18437      fi
18438      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18439    fi
18440  fi
18441
18442  # Now new_path has a complete unix path to the binary
18443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18444    # Keep paths in /bin as-is, but remove trailing .exe if any
18445    new_path="${new_path/%.exe/}"
18446    # Do not save /bin paths to all_fixpath_prefixes!
18447  else
18448    # Not in mixed or Windows style, start by that.
18449    new_path=`cmd //c echo $new_path`
18450
18451  input_path="$new_path"
18452  # Check if we need to convert this using DOS-style short mode. If the path
18453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18454  # take no chances and rewrite it.
18455  # Note: m4 eats our [], so we need to use [ and ] instead.
18456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18457  if test "x$has_forbidden_chars" != x; then
18458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18460  fi
18461
18462    # Output is in $new_path
18463
18464  windows_path="$new_path"
18465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18466    unix_path=`$CYGPATH -u "$windows_path"`
18467    new_path="$unix_path"
18468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18470    new_path="$unix_path"
18471  fi
18472
18473    # remove trailing .exe if any
18474    new_path="${new_path/%.exe/}"
18475
18476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18478  fi
18479
18480    else
18481      # We're on a unix platform. Hooray! :)
18482      # First separate the path from the arguments. This will split at the first
18483      # space.
18484      complete="$FOUND_MAKE"
18485      path="${complete%% *}"
18486      tmp="$complete EOL"
18487      arguments="${tmp#* }"
18488
18489      # Cannot rely on the command "which" here since it doesn't always work.
18490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18491      if test -z "$is_absolute_path"; then
18492        # Path to executable is not absolute. Find it.
18493        IFS_save="$IFS"
18494        IFS=:
18495        for p in $PATH; do
18496          if test -f "$p/$path" && test -x "$p/$path"; then
18497            new_path="$p/$path"
18498            break
18499          fi
18500        done
18501        IFS="$IFS_save"
18502      else
18503        # This is an absolute path, we can use it without further modifications.
18504        new_path="$path"
18505      fi
18506
18507      if test "x$new_path" = x; then
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18509$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18510        has_space=`$ECHO "$complete" | $GREP " "`
18511        if test "x$has_space" != x; then
18512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18514        fi
18515        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18516      fi
18517    fi
18518
18519    # Now join together the path and the arguments once again
18520    if test "x$arguments" != xEOL; then
18521      new_complete="$new_path ${arguments% *}"
18522    else
18523      new_complete="$new_path"
18524    fi
18525
18526    if test "x$complete" != "x$new_complete"; then
18527      FOUND_MAKE="$new_complete"
18528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18529$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18530    fi
18531  fi
18532
18533        fi
18534      fi
18535    fi
18536  fi
18537
18538    fi
18539
18540    if test "x$FOUND_MAKE" = x; then
18541      if test "x$TOOLCHAIN_PATH" != x; then
18542        # We have a toolchain path, check that as well before giving up.
18543        OLD_PATH=$PATH
18544        PATH=$TOOLCHAIN_PATH:$PATH
18545        for ac_prog in gmake
18546do
18547  # Extract the first word of "$ac_prog", so it can be a program name with args.
18548set dummy $ac_prog; ac_word=$2
18549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18550$as_echo_n "checking for $ac_word... " >&6; }
18551if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18552  $as_echo_n "(cached) " >&6
18553else
18554  case $CHECK_TOOLSDIR_GMAKE in
18555  [\\/]* | ?:[\\/]*)
18556  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18557  ;;
18558  *)
18559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18560for as_dir in $PATH
18561do
18562  IFS=$as_save_IFS
18563  test -z "$as_dir" && as_dir=.
18564    for ac_exec_ext in '' $ac_executable_extensions; do
18565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18566    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18568    break 2
18569  fi
18570done
18571  done
18572IFS=$as_save_IFS
18573
18574  ;;
18575esac
18576fi
18577CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18578if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18580$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18581else
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18583$as_echo "no" >&6; }
18584fi
18585
18586
18587  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18588done
18589
18590
18591  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18592  DESCRIPTION="gmake in tools-dir"
18593
18594  # On Cygwin, we require a newer version of make than on other platforms
18595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18596    MAKE_VERSION_EXPR="-e 4\."
18597    MAKE_REQUIRED_VERSION="4.0"
18598   else
18599    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18600    MAKE_REQUIRED_VERSION="3.81"
18601  fi
18602
18603  if test "x$MAKE_CANDIDATE" != x; then
18604    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18605$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18606    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18607    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18608    if test "x$IS_GNU_MAKE" = x; then
18609      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18610$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18611    else
18612      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18613      if test "x$IS_MODERN_MAKE" = x; then
18614        { $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
18615$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;}
18616      else
18617        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18618          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18619            MAKE_EXPECTED_ENV='cygwin'
18620          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18621            MAKE_EXPECTED_ENV='msys'
18622          else
18623            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18624          fi
18625          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18626          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18627        else
18628          # Not relevant for non-Windows
18629          IS_MAKE_CORRECT_ENV=true
18630        fi
18631        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18632          { $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
18633$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;}
18634        else
18635          FOUND_MAKE=$MAKE_CANDIDATE
18636
18637  # Only process if variable expands to non-empty
18638
18639  if test "x$FOUND_MAKE" != x; then
18640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18641
18642  # First separate the path from the arguments. This will split at the first
18643  # space.
18644  complete="$FOUND_MAKE"
18645  path="${complete%% *}"
18646  tmp="$complete EOL"
18647  arguments="${tmp#* }"
18648
18649  # Input might be given as Windows format, start by converting to
18650  # unix format.
18651  new_path=`$CYGPATH -u "$path"`
18652
18653  # Now try to locate executable using which
18654  new_path=`$WHICH "$new_path" 2> /dev/null`
18655  # bat and cmd files are not always considered executable in cygwin causing which
18656  # to not find them
18657  if test "x$new_path" = x \
18658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18660    new_path=`$CYGPATH -u "$path"`
18661  fi
18662  if test "x$new_path" = x; then
18663    # Oops. Which didn't find the executable.
18664    # The splitting of arguments from the executable at a space might have been incorrect,
18665    # since paths with space are more likely in Windows. Give it another try with the whole
18666    # argument.
18667    path="$complete"
18668    arguments="EOL"
18669    new_path=`$CYGPATH -u "$path"`
18670    new_path=`$WHICH "$new_path" 2> /dev/null`
18671    # bat and cmd files are not always considered executable in cygwin causing which
18672    # to not find them
18673    if test "x$new_path" = x \
18674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18676      new_path=`$CYGPATH -u "$path"`
18677    fi
18678    if test "x$new_path" = x; then
18679      # It's still not found. Now this is an unrecoverable error.
18680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18681$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18682      has_space=`$ECHO "$complete" | $GREP " "`
18683      if test "x$has_space" != x; then
18684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18686      fi
18687      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18688    fi
18689  fi
18690
18691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18694  # "foo.exe" is OK but "foo" is an error.
18695  #
18696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18697  # It is also a way to make sure we got the proper file name for the real test later on.
18698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18699  if test "x$test_shortpath" = x; then
18700    # Short path failed, file does not exist as specified.
18701    # Try adding .exe or .cmd
18702    if test -f "${new_path}.exe"; then
18703      input_to_shortpath="${new_path}.exe"
18704    elif test -f "${new_path}.cmd"; then
18705      input_to_shortpath="${new_path}.cmd"
18706    else
18707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18711      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18712    fi
18713  else
18714    input_to_shortpath="$new_path"
18715  fi
18716
18717  # Call helper function which possibly converts this using DOS-style short mode.
18718  # If so, the updated path is stored in $new_path.
18719  new_path="$input_to_shortpath"
18720
18721  input_path="$input_to_shortpath"
18722  # Check if we need to convert this using DOS-style short mode. If the path
18723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18724  # take no chances and rewrite it.
18725  # Note: m4 eats our [], so we need to use [ and ] instead.
18726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18727  if test "x$has_forbidden_chars" != x; then
18728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18732      # Going to short mode and back again did indeed matter. Since short mode is
18733      # case insensitive, let's make it lowercase to improve readability.
18734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18735      # Now convert it back to Unix-style (cygpath)
18736      input_path=`$CYGPATH -u "$shortmode_path"`
18737      new_path="$input_path"
18738    fi
18739  fi
18740
18741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18742  if test "x$test_cygdrive_prefix" = x; then
18743    # As a simple fix, exclude /usr/bin since it's not a real path.
18744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18746      # a path prefixed by /cygdrive for fixpath to work.
18747      new_path="$CYGWIN_ROOT_PATH$input_path"
18748    fi
18749  fi
18750
18751  # remove trailing .exe if any
18752  new_path="${new_path/%.exe/}"
18753
18754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18755
18756  # First separate the path from the arguments. This will split at the first
18757  # space.
18758  complete="$FOUND_MAKE"
18759  path="${complete%% *}"
18760  tmp="$complete EOL"
18761  arguments="${tmp#* }"
18762
18763  # Input might be given as Windows format, start by converting to
18764  # unix format.
18765  new_path="$path"
18766
18767  windows_path="$new_path"
18768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769    unix_path=`$CYGPATH -u "$windows_path"`
18770    new_path="$unix_path"
18771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18773    new_path="$unix_path"
18774  fi
18775
18776
18777  # Now try to locate executable using which
18778  new_path=`$WHICH "$new_path" 2> /dev/null`
18779
18780  if test "x$new_path" = x; then
18781    # Oops. Which didn't find the executable.
18782    # The splitting of arguments from the executable at a space might have been incorrect,
18783    # since paths with space are more likely in Windows. Give it another try with the whole
18784    # argument.
18785    path="$complete"
18786    arguments="EOL"
18787    new_path="$path"
18788
18789  windows_path="$new_path"
18790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791    unix_path=`$CYGPATH -u "$windows_path"`
18792    new_path="$unix_path"
18793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18795    new_path="$unix_path"
18796  fi
18797
18798
18799    new_path=`$WHICH "$new_path" 2> /dev/null`
18800    # bat and cmd files are not always considered executable in MSYS causing which
18801    # to not find them
18802    if test "x$new_path" = x \
18803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18805      new_path="$path"
18806
18807  windows_path="$new_path"
18808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809    unix_path=`$CYGPATH -u "$windows_path"`
18810    new_path="$unix_path"
18811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18813    new_path="$unix_path"
18814  fi
18815
18816    fi
18817
18818    if test "x$new_path" = x; then
18819      # It's still not found. Now this is an unrecoverable error.
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18822      has_space=`$ECHO "$complete" | $GREP " "`
18823      if test "x$has_space" != x; then
18824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18826      fi
18827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18828    fi
18829  fi
18830
18831  # Now new_path has a complete unix path to the binary
18832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18833    # Keep paths in /bin as-is, but remove trailing .exe if any
18834    new_path="${new_path/%.exe/}"
18835    # Do not save /bin paths to all_fixpath_prefixes!
18836  else
18837    # Not in mixed or Windows style, start by that.
18838    new_path=`cmd //c echo $new_path`
18839
18840  input_path="$new_path"
18841  # Check if we need to convert this using DOS-style short mode. If the path
18842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18843  # take no chances and rewrite it.
18844  # Note: m4 eats our [], so we need to use [ and ] instead.
18845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18846  if test "x$has_forbidden_chars" != x; then
18847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18849  fi
18850
18851    # Output is in $new_path
18852
18853  windows_path="$new_path"
18854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18855    unix_path=`$CYGPATH -u "$windows_path"`
18856    new_path="$unix_path"
18857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18859    new_path="$unix_path"
18860  fi
18861
18862    # remove trailing .exe if any
18863    new_path="${new_path/%.exe/}"
18864
18865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18867  fi
18868
18869    else
18870      # We're on a unix platform. Hooray! :)
18871      # First separate the path from the arguments. This will split at the first
18872      # space.
18873      complete="$FOUND_MAKE"
18874      path="${complete%% *}"
18875      tmp="$complete EOL"
18876      arguments="${tmp#* }"
18877
18878      # Cannot rely on the command "which" here since it doesn't always work.
18879      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18880      if test -z "$is_absolute_path"; then
18881        # Path to executable is not absolute. Find it.
18882        IFS_save="$IFS"
18883        IFS=:
18884        for p in $PATH; do
18885          if test -f "$p/$path" && test -x "$p/$path"; then
18886            new_path="$p/$path"
18887            break
18888          fi
18889        done
18890        IFS="$IFS_save"
18891      else
18892        # This is an absolute path, we can use it without further modifications.
18893        new_path="$path"
18894      fi
18895
18896      if test "x$new_path" = x; then
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18899        has_space=`$ECHO "$complete" | $GREP " "`
18900        if test "x$has_space" != x; then
18901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18903        fi
18904        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18905      fi
18906    fi
18907
18908    # Now join together the path and the arguments once again
18909    if test "x$arguments" != xEOL; then
18910      new_complete="$new_path ${arguments% *}"
18911    else
18912      new_complete="$new_path"
18913    fi
18914
18915    if test "x$complete" != "x$new_complete"; then
18916      FOUND_MAKE="$new_complete"
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18918$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18919    fi
18920  fi
18921
18922        fi
18923      fi
18924    fi
18925  fi
18926
18927        if test "x$FOUND_MAKE" = x; then
18928          for ac_prog in make
18929do
18930  # Extract the first word of "$ac_prog", so it can be a program name with args.
18931set dummy $ac_prog; ac_word=$2
18932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18933$as_echo_n "checking for $ac_word... " >&6; }
18934if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18935  $as_echo_n "(cached) " >&6
18936else
18937  case $CHECK_TOOLSDIR_MAKE in
18938  [\\/]* | ?:[\\/]*)
18939  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18940  ;;
18941  *)
18942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18943for as_dir in $PATH
18944do
18945  IFS=$as_save_IFS
18946  test -z "$as_dir" && as_dir=.
18947    for ac_exec_ext in '' $ac_executable_extensions; do
18948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18949    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18951    break 2
18952  fi
18953done
18954  done
18955IFS=$as_save_IFS
18956
18957  ;;
18958esac
18959fi
18960CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18961if test -n "$CHECK_TOOLSDIR_MAKE"; then
18962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18963$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18964else
18965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966$as_echo "no" >&6; }
18967fi
18968
18969
18970  test -n "$CHECK_TOOLSDIR_MAKE" && break
18971done
18972
18973
18974  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18975  DESCRIPTION="make in tools-dir"
18976
18977  # On Cygwin, we require a newer version of make than on other platforms
18978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18979    MAKE_VERSION_EXPR="-e 4\."
18980    MAKE_REQUIRED_VERSION="4.0"
18981   else
18982    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18983    MAKE_REQUIRED_VERSION="3.81"
18984  fi
18985
18986  if test "x$MAKE_CANDIDATE" != x; then
18987    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18988$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18989    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18990    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18991    if test "x$IS_GNU_MAKE" = x; then
18992      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18993$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18994    else
18995      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18996      if test "x$IS_MODERN_MAKE" = x; then
18997        { $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
18998$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;}
18999      else
19000        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19001          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19002            MAKE_EXPECTED_ENV='cygwin'
19003          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19004            MAKE_EXPECTED_ENV='msys'
19005          else
19006            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19007          fi
19008          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19009          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19010        else
19011          # Not relevant for non-Windows
19012          IS_MAKE_CORRECT_ENV=true
19013        fi
19014        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19015          { $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
19016$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;}
19017        else
19018          FOUND_MAKE=$MAKE_CANDIDATE
19019
19020  # Only process if variable expands to non-empty
19021
19022  if test "x$FOUND_MAKE" != x; then
19023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19024
19025  # First separate the path from the arguments. This will split at the first
19026  # space.
19027  complete="$FOUND_MAKE"
19028  path="${complete%% *}"
19029  tmp="$complete EOL"
19030  arguments="${tmp#* }"
19031
19032  # Input might be given as Windows format, start by converting to
19033  # unix format.
19034  new_path=`$CYGPATH -u "$path"`
19035
19036  # Now try to locate executable using which
19037  new_path=`$WHICH "$new_path" 2> /dev/null`
19038  # bat and cmd files are not always considered executable in cygwin causing which
19039  # to not find them
19040  if test "x$new_path" = x \
19041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19043    new_path=`$CYGPATH -u "$path"`
19044  fi
19045  if test "x$new_path" = x; then
19046    # Oops. Which didn't find the executable.
19047    # The splitting of arguments from the executable at a space might have been incorrect,
19048    # since paths with space are more likely in Windows. Give it another try with the whole
19049    # argument.
19050    path="$complete"
19051    arguments="EOL"
19052    new_path=`$CYGPATH -u "$path"`
19053    new_path=`$WHICH "$new_path" 2> /dev/null`
19054    # bat and cmd files are not always considered executable in cygwin causing which
19055    # to not find them
19056    if test "x$new_path" = x \
19057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19059      new_path=`$CYGPATH -u "$path"`
19060    fi
19061    if test "x$new_path" = x; then
19062      # It's still not found. Now this is an unrecoverable error.
19063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19065      has_space=`$ECHO "$complete" | $GREP " "`
19066      if test "x$has_space" != x; then
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19069      fi
19070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19071    fi
19072  fi
19073
19074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19077  # "foo.exe" is OK but "foo" is an error.
19078  #
19079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19080  # It is also a way to make sure we got the proper file name for the real test later on.
19081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19082  if test "x$test_shortpath" = x; then
19083    # Short path failed, file does not exist as specified.
19084    # Try adding .exe or .cmd
19085    if test -f "${new_path}.exe"; then
19086      input_to_shortpath="${new_path}.exe"
19087    elif test -f "${new_path}.cmd"; then
19088      input_to_shortpath="${new_path}.cmd"
19089    else
19090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19095    fi
19096  else
19097    input_to_shortpath="$new_path"
19098  fi
19099
19100  # Call helper function which possibly converts this using DOS-style short mode.
19101  # If so, the updated path is stored in $new_path.
19102  new_path="$input_to_shortpath"
19103
19104  input_path="$input_to_shortpath"
19105  # Check if we need to convert this using DOS-style short mode. If the path
19106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19107  # take no chances and rewrite it.
19108  # Note: m4 eats our [], so we need to use [ and ] instead.
19109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19110  if test "x$has_forbidden_chars" != x; then
19111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19115      # Going to short mode and back again did indeed matter. Since short mode is
19116      # case insensitive, let's make it lowercase to improve readability.
19117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19118      # Now convert it back to Unix-style (cygpath)
19119      input_path=`$CYGPATH -u "$shortmode_path"`
19120      new_path="$input_path"
19121    fi
19122  fi
19123
19124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19125  if test "x$test_cygdrive_prefix" = x; then
19126    # As a simple fix, exclude /usr/bin since it's not a real path.
19127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19129      # a path prefixed by /cygdrive for fixpath to work.
19130      new_path="$CYGWIN_ROOT_PATH$input_path"
19131    fi
19132  fi
19133
19134  # remove trailing .exe if any
19135  new_path="${new_path/%.exe/}"
19136
19137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19138
19139  # First separate the path from the arguments. This will split at the first
19140  # space.
19141  complete="$FOUND_MAKE"
19142  path="${complete%% *}"
19143  tmp="$complete EOL"
19144  arguments="${tmp#* }"
19145
19146  # Input might be given as Windows format, start by converting to
19147  # unix format.
19148  new_path="$path"
19149
19150  windows_path="$new_path"
19151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152    unix_path=`$CYGPATH -u "$windows_path"`
19153    new_path="$unix_path"
19154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19156    new_path="$unix_path"
19157  fi
19158
19159
19160  # Now try to locate executable using which
19161  new_path=`$WHICH "$new_path" 2> /dev/null`
19162
19163  if test "x$new_path" = x; then
19164    # Oops. Which didn't find the executable.
19165    # The splitting of arguments from the executable at a space might have been incorrect,
19166    # since paths with space are more likely in Windows. Give it another try with the whole
19167    # argument.
19168    path="$complete"
19169    arguments="EOL"
19170    new_path="$path"
19171
19172  windows_path="$new_path"
19173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19174    unix_path=`$CYGPATH -u "$windows_path"`
19175    new_path="$unix_path"
19176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19178    new_path="$unix_path"
19179  fi
19180
19181
19182    new_path=`$WHICH "$new_path" 2> /dev/null`
19183    # bat and cmd files are not always considered executable in MSYS causing which
19184    # to not find them
19185    if test "x$new_path" = x \
19186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19188      new_path="$path"
19189
19190  windows_path="$new_path"
19191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19192    unix_path=`$CYGPATH -u "$windows_path"`
19193    new_path="$unix_path"
19194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19196    new_path="$unix_path"
19197  fi
19198
19199    fi
19200
19201    if test "x$new_path" = x; then
19202      # It's still not found. Now this is an unrecoverable error.
19203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19205      has_space=`$ECHO "$complete" | $GREP " "`
19206      if test "x$has_space" != x; then
19207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19209      fi
19210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19211    fi
19212  fi
19213
19214  # Now new_path has a complete unix path to the binary
19215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19216    # Keep paths in /bin as-is, but remove trailing .exe if any
19217    new_path="${new_path/%.exe/}"
19218    # Do not save /bin paths to all_fixpath_prefixes!
19219  else
19220    # Not in mixed or Windows style, start by that.
19221    new_path=`cmd //c echo $new_path`
19222
19223  input_path="$new_path"
19224  # Check if we need to convert this using DOS-style short mode. If the path
19225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19226  # take no chances and rewrite it.
19227  # Note: m4 eats our [], so we need to use [ and ] instead.
19228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19229  if test "x$has_forbidden_chars" != x; then
19230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19232  fi
19233
19234    # Output is in $new_path
19235
19236  windows_path="$new_path"
19237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19238    unix_path=`$CYGPATH -u "$windows_path"`
19239    new_path="$unix_path"
19240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19242    new_path="$unix_path"
19243  fi
19244
19245    # remove trailing .exe if any
19246    new_path="${new_path/%.exe/}"
19247
19248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19250  fi
19251
19252    else
19253      # We're on a unix platform. Hooray! :)
19254      # First separate the path from the arguments. This will split at the first
19255      # space.
19256      complete="$FOUND_MAKE"
19257      path="${complete%% *}"
19258      tmp="$complete EOL"
19259      arguments="${tmp#* }"
19260
19261      # Cannot rely on the command "which" here since it doesn't always work.
19262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19263      if test -z "$is_absolute_path"; then
19264        # Path to executable is not absolute. Find it.
19265        IFS_save="$IFS"
19266        IFS=:
19267        for p in $PATH; do
19268          if test -f "$p/$path" && test -x "$p/$path"; then
19269            new_path="$p/$path"
19270            break
19271          fi
19272        done
19273        IFS="$IFS_save"
19274      else
19275        # This is an absolute path, we can use it without further modifications.
19276        new_path="$path"
19277      fi
19278
19279      if test "x$new_path" = x; then
19280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19282        has_space=`$ECHO "$complete" | $GREP " "`
19283        if test "x$has_space" != x; then
19284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19286        fi
19287        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19288      fi
19289    fi
19290
19291    # Now join together the path and the arguments once again
19292    if test "x$arguments" != xEOL; then
19293      new_complete="$new_path ${arguments% *}"
19294    else
19295      new_complete="$new_path"
19296    fi
19297
19298    if test "x$complete" != "x$new_complete"; then
19299      FOUND_MAKE="$new_complete"
19300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19301$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19302    fi
19303  fi
19304
19305        fi
19306      fi
19307    fi
19308  fi
19309
19310        fi
19311        PATH=$OLD_PATH
19312      fi
19313    fi
19314
19315    if test "x$FOUND_MAKE" = x; then
19316      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
19317    fi
19318
19319  else
19320    # The variable is set, but is it from the command line or the environment?
19321
19322    # Try to remove the string !MAKE! from our list.
19323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19325      # If it failed, the variable was not from the command line. Ignore it,
19326      # but warn the user (except for BASH, which is always set by the calling BASH).
19327      if test "xMAKE" != xBASH; then
19328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19329$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19330      fi
19331      # Try to locate tool using the code snippet
19332
19333    # Try our hardest to locate a correct version of GNU make
19334    for ac_prog in gmake
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  case $CHECK_GMAKE in
19344  [\\/]* | ?:[\\/]*)
19345  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19346  ;;
19347  *)
19348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349for as_dir in $PATH
19350do
19351  IFS=$as_save_IFS
19352  test -z "$as_dir" && as_dir=.
19353    for ac_exec_ext in '' $ac_executable_extensions; do
19354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357    break 2
19358  fi
19359done
19360  done
19361IFS=$as_save_IFS
19362
19363  ;;
19364esac
19365fi
19366CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19367if test -n "$CHECK_GMAKE"; then
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19369$as_echo "$CHECK_GMAKE" >&6; }
19370else
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372$as_echo "no" >&6; }
19373fi
19374
19375
19376  test -n "$CHECK_GMAKE" && break
19377done
19378
19379
19380  MAKE_CANDIDATE=""$CHECK_GMAKE""
19381  DESCRIPTION="gmake in PATH"
19382
19383  # On Cygwin, we require a newer version of make than on other platforms
19384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19385    MAKE_VERSION_EXPR="-e 4\."
19386    MAKE_REQUIRED_VERSION="4.0"
19387   else
19388    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19389    MAKE_REQUIRED_VERSION="3.81"
19390  fi
19391
19392  if test "x$MAKE_CANDIDATE" != x; then
19393    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19394$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19395    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19396    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19397    if test "x$IS_GNU_MAKE" = x; then
19398      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19399$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19400    else
19401      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19402      if test "x$IS_MODERN_MAKE" = x; then
19403        { $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
19404$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;}
19405      else
19406        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19407          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19408            MAKE_EXPECTED_ENV='cygwin'
19409          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19410            MAKE_EXPECTED_ENV='msys'
19411          else
19412            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19413          fi
19414          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19415          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19416        else
19417          # Not relevant for non-Windows
19418          IS_MAKE_CORRECT_ENV=true
19419        fi
19420        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19421          { $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
19422$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;}
19423        else
19424          FOUND_MAKE=$MAKE_CANDIDATE
19425
19426  # Only process if variable expands to non-empty
19427
19428  if test "x$FOUND_MAKE" != x; then
19429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19430
19431  # First separate the path from the arguments. This will split at the first
19432  # space.
19433  complete="$FOUND_MAKE"
19434  path="${complete%% *}"
19435  tmp="$complete EOL"
19436  arguments="${tmp#* }"
19437
19438  # Input might be given as Windows format, start by converting to
19439  # unix format.
19440  new_path=`$CYGPATH -u "$path"`
19441
19442  # Now try to locate executable using which
19443  new_path=`$WHICH "$new_path" 2> /dev/null`
19444  # bat and cmd files are not always considered executable in cygwin causing which
19445  # to not find them
19446  if test "x$new_path" = x \
19447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19449    new_path=`$CYGPATH -u "$path"`
19450  fi
19451  if test "x$new_path" = x; then
19452    # Oops. Which didn't find the executable.
19453    # The splitting of arguments from the executable at a space might have been incorrect,
19454    # since paths with space are more likely in Windows. Give it another try with the whole
19455    # argument.
19456    path="$complete"
19457    arguments="EOL"
19458    new_path=`$CYGPATH -u "$path"`
19459    new_path=`$WHICH "$new_path" 2> /dev/null`
19460    # bat and cmd files are not always considered executable in cygwin causing which
19461    # to not find them
19462    if test "x$new_path" = x \
19463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19465      new_path=`$CYGPATH -u "$path"`
19466    fi
19467    if test "x$new_path" = x; then
19468      # It's still not found. Now this is an unrecoverable error.
19469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19471      has_space=`$ECHO "$complete" | $GREP " "`
19472      if test "x$has_space" != x; then
19473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19475      fi
19476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19477    fi
19478  fi
19479
19480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19483  # "foo.exe" is OK but "foo" is an error.
19484  #
19485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19486  # It is also a way to make sure we got the proper file name for the real test later on.
19487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19488  if test "x$test_shortpath" = x; then
19489    # Short path failed, file does not exist as specified.
19490    # Try adding .exe or .cmd
19491    if test -f "${new_path}.exe"; then
19492      input_to_shortpath="${new_path}.exe"
19493    elif test -f "${new_path}.cmd"; then
19494      input_to_shortpath="${new_path}.cmd"
19495    else
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19500      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19501    fi
19502  else
19503    input_to_shortpath="$new_path"
19504  fi
19505
19506  # Call helper function which possibly converts this using DOS-style short mode.
19507  # If so, the updated path is stored in $new_path.
19508  new_path="$input_to_shortpath"
19509
19510  input_path="$input_to_shortpath"
19511  # Check if we need to convert this using DOS-style short mode. If the path
19512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19513  # take no chances and rewrite it.
19514  # Note: m4 eats our [], so we need to use [ and ] instead.
19515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19516  if test "x$has_forbidden_chars" != x; then
19517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19521      # Going to short mode and back again did indeed matter. Since short mode is
19522      # case insensitive, let's make it lowercase to improve readability.
19523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19524      # Now convert it back to Unix-style (cygpath)
19525      input_path=`$CYGPATH -u "$shortmode_path"`
19526      new_path="$input_path"
19527    fi
19528  fi
19529
19530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19531  if test "x$test_cygdrive_prefix" = x; then
19532    # As a simple fix, exclude /usr/bin since it's not a real path.
19533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19535      # a path prefixed by /cygdrive for fixpath to work.
19536      new_path="$CYGWIN_ROOT_PATH$input_path"
19537    fi
19538  fi
19539
19540  # remove trailing .exe if any
19541  new_path="${new_path/%.exe/}"
19542
19543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19544
19545  # First separate the path from the arguments. This will split at the first
19546  # space.
19547  complete="$FOUND_MAKE"
19548  path="${complete%% *}"
19549  tmp="$complete EOL"
19550  arguments="${tmp#* }"
19551
19552  # Input might be given as Windows format, start by converting to
19553  # unix format.
19554  new_path="$path"
19555
19556  windows_path="$new_path"
19557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19558    unix_path=`$CYGPATH -u "$windows_path"`
19559    new_path="$unix_path"
19560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19562    new_path="$unix_path"
19563  fi
19564
19565
19566  # Now try to locate executable using which
19567  new_path=`$WHICH "$new_path" 2> /dev/null`
19568
19569  if test "x$new_path" = x; then
19570    # Oops. Which didn't find the executable.
19571    # The splitting of arguments from the executable at a space might have been incorrect,
19572    # since paths with space are more likely in Windows. Give it another try with the whole
19573    # argument.
19574    path="$complete"
19575    arguments="EOL"
19576    new_path="$path"
19577
19578  windows_path="$new_path"
19579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580    unix_path=`$CYGPATH -u "$windows_path"`
19581    new_path="$unix_path"
19582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19584    new_path="$unix_path"
19585  fi
19586
19587
19588    new_path=`$WHICH "$new_path" 2> /dev/null`
19589    # bat and cmd files are not always considered executable in MSYS causing which
19590    # to not find them
19591    if test "x$new_path" = x \
19592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19594      new_path="$path"
19595
19596  windows_path="$new_path"
19597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19598    unix_path=`$CYGPATH -u "$windows_path"`
19599    new_path="$unix_path"
19600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19602    new_path="$unix_path"
19603  fi
19604
19605    fi
19606
19607    if test "x$new_path" = x; then
19608      # It's still not found. Now this is an unrecoverable error.
19609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19611      has_space=`$ECHO "$complete" | $GREP " "`
19612      if test "x$has_space" != x; then
19613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19615      fi
19616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19617    fi
19618  fi
19619
19620  # Now new_path has a complete unix path to the binary
19621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19622    # Keep paths in /bin as-is, but remove trailing .exe if any
19623    new_path="${new_path/%.exe/}"
19624    # Do not save /bin paths to all_fixpath_prefixes!
19625  else
19626    # Not in mixed or Windows style, start by that.
19627    new_path=`cmd //c echo $new_path`
19628
19629  input_path="$new_path"
19630  # Check if we need to convert this using DOS-style short mode. If the path
19631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19632  # take no chances and rewrite it.
19633  # Note: m4 eats our [], so we need to use [ and ] instead.
19634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19635  if test "x$has_forbidden_chars" != x; then
19636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638  fi
19639
19640    # Output is in $new_path
19641
19642  windows_path="$new_path"
19643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19644    unix_path=`$CYGPATH -u "$windows_path"`
19645    new_path="$unix_path"
19646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19648    new_path="$unix_path"
19649  fi
19650
19651    # remove trailing .exe if any
19652    new_path="${new_path/%.exe/}"
19653
19654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19656  fi
19657
19658    else
19659      # We're on a unix platform. Hooray! :)
19660      # First separate the path from the arguments. This will split at the first
19661      # space.
19662      complete="$FOUND_MAKE"
19663      path="${complete%% *}"
19664      tmp="$complete EOL"
19665      arguments="${tmp#* }"
19666
19667      # Cannot rely on the command "which" here since it doesn't always work.
19668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19669      if test -z "$is_absolute_path"; then
19670        # Path to executable is not absolute. Find it.
19671        IFS_save="$IFS"
19672        IFS=:
19673        for p in $PATH; do
19674          if test -f "$p/$path" && test -x "$p/$path"; then
19675            new_path="$p/$path"
19676            break
19677          fi
19678        done
19679        IFS="$IFS_save"
19680      else
19681        # This is an absolute path, we can use it without further modifications.
19682        new_path="$path"
19683      fi
19684
19685      if test "x$new_path" = x; then
19686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19688        has_space=`$ECHO "$complete" | $GREP " "`
19689        if test "x$has_space" != x; then
19690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19692        fi
19693        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19694      fi
19695    fi
19696
19697    # Now join together the path and the arguments once again
19698    if test "x$arguments" != xEOL; then
19699      new_complete="$new_path ${arguments% *}"
19700    else
19701      new_complete="$new_path"
19702    fi
19703
19704    if test "x$complete" != "x$new_complete"; then
19705      FOUND_MAKE="$new_complete"
19706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19707$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19708    fi
19709  fi
19710
19711        fi
19712      fi
19713    fi
19714  fi
19715
19716
19717    if test "x$FOUND_MAKE" = x; then
19718      for ac_prog in make
19719do
19720  # Extract the first word of "$ac_prog", so it can be a program name with args.
19721set dummy $ac_prog; ac_word=$2
19722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19723$as_echo_n "checking for $ac_word... " >&6; }
19724if ${ac_cv_path_CHECK_MAKE+:} false; then :
19725  $as_echo_n "(cached) " >&6
19726else
19727  case $CHECK_MAKE in
19728  [\\/]* | ?:[\\/]*)
19729  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19730  ;;
19731  *)
19732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19733for as_dir in $PATH
19734do
19735  IFS=$as_save_IFS
19736  test -z "$as_dir" && as_dir=.
19737    for ac_exec_ext in '' $ac_executable_extensions; do
19738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19739    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19741    break 2
19742  fi
19743done
19744  done
19745IFS=$as_save_IFS
19746
19747  ;;
19748esac
19749fi
19750CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19751if test -n "$CHECK_MAKE"; then
19752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19753$as_echo "$CHECK_MAKE" >&6; }
19754else
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756$as_echo "no" >&6; }
19757fi
19758
19759
19760  test -n "$CHECK_MAKE" && break
19761done
19762
19763
19764  MAKE_CANDIDATE=""$CHECK_MAKE""
19765  DESCRIPTION="make in PATH"
19766
19767  # On Cygwin, we require a newer version of make than on other platforms
19768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19769    MAKE_VERSION_EXPR="-e 4\."
19770    MAKE_REQUIRED_VERSION="4.0"
19771   else
19772    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19773    MAKE_REQUIRED_VERSION="3.81"
19774  fi
19775
19776  if test "x$MAKE_CANDIDATE" != x; then
19777    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19778$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19779    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19780    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19781    if test "x$IS_GNU_MAKE" = x; then
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19783$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19784    else
19785      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19786      if test "x$IS_MODERN_MAKE" = x; then
19787        { $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
19788$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;}
19789      else
19790        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19791          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19792            MAKE_EXPECTED_ENV='cygwin'
19793          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19794            MAKE_EXPECTED_ENV='msys'
19795          else
19796            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19797          fi
19798          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19799          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19800        else
19801          # Not relevant for non-Windows
19802          IS_MAKE_CORRECT_ENV=true
19803        fi
19804        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19805          { $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
19806$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;}
19807        else
19808          FOUND_MAKE=$MAKE_CANDIDATE
19809
19810  # Only process if variable expands to non-empty
19811
19812  if test "x$FOUND_MAKE" != x; then
19813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19814
19815  # First separate the path from the arguments. This will split at the first
19816  # space.
19817  complete="$FOUND_MAKE"
19818  path="${complete%% *}"
19819  tmp="$complete EOL"
19820  arguments="${tmp#* }"
19821
19822  # Input might be given as Windows format, start by converting to
19823  # unix format.
19824  new_path=`$CYGPATH -u "$path"`
19825
19826  # Now try to locate executable using which
19827  new_path=`$WHICH "$new_path" 2> /dev/null`
19828  # bat and cmd files are not always considered executable in cygwin causing which
19829  # to not find them
19830  if test "x$new_path" = x \
19831      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19832      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19833    new_path=`$CYGPATH -u "$path"`
19834  fi
19835  if test "x$new_path" = x; then
19836    # Oops. Which didn't find the executable.
19837    # The splitting of arguments from the executable at a space might have been incorrect,
19838    # since paths with space are more likely in Windows. Give it another try with the whole
19839    # argument.
19840    path="$complete"
19841    arguments="EOL"
19842    new_path=`$CYGPATH -u "$path"`
19843    new_path=`$WHICH "$new_path" 2> /dev/null`
19844    # bat and cmd files are not always considered executable in cygwin causing which
19845    # to not find them
19846    if test "x$new_path" = x \
19847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19849      new_path=`$CYGPATH -u "$path"`
19850    fi
19851    if test "x$new_path" = x; then
19852      # It's still not found. Now this is an unrecoverable error.
19853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19855      has_space=`$ECHO "$complete" | $GREP " "`
19856      if test "x$has_space" != x; then
19857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19859      fi
19860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19861    fi
19862  fi
19863
19864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19867  # "foo.exe" is OK but "foo" is an error.
19868  #
19869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19870  # It is also a way to make sure we got the proper file name for the real test later on.
19871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19872  if test "x$test_shortpath" = x; then
19873    # Short path failed, file does not exist as specified.
19874    # Try adding .exe or .cmd
19875    if test -f "${new_path}.exe"; then
19876      input_to_shortpath="${new_path}.exe"
19877    elif test -f "${new_path}.cmd"; then
19878      input_to_shortpath="${new_path}.cmd"
19879    else
19880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19884      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19885    fi
19886  else
19887    input_to_shortpath="$new_path"
19888  fi
19889
19890  # Call helper function which possibly converts this using DOS-style short mode.
19891  # If so, the updated path is stored in $new_path.
19892  new_path="$input_to_shortpath"
19893
19894  input_path="$input_to_shortpath"
19895  # Check if we need to convert this using DOS-style short mode. If the path
19896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19897  # take no chances and rewrite it.
19898  # Note: m4 eats our [], so we need to use [ and ] instead.
19899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19900  if test "x$has_forbidden_chars" != x; then
19901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19905      # Going to short mode and back again did indeed matter. Since short mode is
19906      # case insensitive, let's make it lowercase to improve readability.
19907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19908      # Now convert it back to Unix-style (cygpath)
19909      input_path=`$CYGPATH -u "$shortmode_path"`
19910      new_path="$input_path"
19911    fi
19912  fi
19913
19914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19915  if test "x$test_cygdrive_prefix" = x; then
19916    # As a simple fix, exclude /usr/bin since it's not a real path.
19917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19919      # a path prefixed by /cygdrive for fixpath to work.
19920      new_path="$CYGWIN_ROOT_PATH$input_path"
19921    fi
19922  fi
19923
19924  # remove trailing .exe if any
19925  new_path="${new_path/%.exe/}"
19926
19927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19928
19929  # First separate the path from the arguments. This will split at the first
19930  # space.
19931  complete="$FOUND_MAKE"
19932  path="${complete%% *}"
19933  tmp="$complete EOL"
19934  arguments="${tmp#* }"
19935
19936  # Input might be given as Windows format, start by converting to
19937  # unix format.
19938  new_path="$path"
19939
19940  windows_path="$new_path"
19941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942    unix_path=`$CYGPATH -u "$windows_path"`
19943    new_path="$unix_path"
19944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19946    new_path="$unix_path"
19947  fi
19948
19949
19950  # Now try to locate executable using which
19951  new_path=`$WHICH "$new_path" 2> /dev/null`
19952
19953  if test "x$new_path" = x; then
19954    # Oops. Which didn't find the executable.
19955    # The splitting of arguments from the executable at a space might have been incorrect,
19956    # since paths with space are more likely in Windows. Give it another try with the whole
19957    # argument.
19958    path="$complete"
19959    arguments="EOL"
19960    new_path="$path"
19961
19962  windows_path="$new_path"
19963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964    unix_path=`$CYGPATH -u "$windows_path"`
19965    new_path="$unix_path"
19966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19968    new_path="$unix_path"
19969  fi
19970
19971
19972    new_path=`$WHICH "$new_path" 2> /dev/null`
19973    # bat and cmd files are not always considered executable in MSYS causing which
19974    # to not find them
19975    if test "x$new_path" = x \
19976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19978      new_path="$path"
19979
19980  windows_path="$new_path"
19981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982    unix_path=`$CYGPATH -u "$windows_path"`
19983    new_path="$unix_path"
19984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19986    new_path="$unix_path"
19987  fi
19988
19989    fi
19990
19991    if test "x$new_path" = x; then
19992      # It's still not found. Now this is an unrecoverable error.
19993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19994$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19995      has_space=`$ECHO "$complete" | $GREP " "`
19996      if test "x$has_space" != x; then
19997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19999      fi
20000      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20001    fi
20002  fi
20003
20004  # Now new_path has a complete unix path to the binary
20005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20006    # Keep paths in /bin as-is, but remove trailing .exe if any
20007    new_path="${new_path/%.exe/}"
20008    # Do not save /bin paths to all_fixpath_prefixes!
20009  else
20010    # Not in mixed or Windows style, start by that.
20011    new_path=`cmd //c echo $new_path`
20012
20013  input_path="$new_path"
20014  # Check if we need to convert this using DOS-style short mode. If the path
20015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20016  # take no chances and rewrite it.
20017  # Note: m4 eats our [], so we need to use [ and ] instead.
20018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20019  if test "x$has_forbidden_chars" != x; then
20020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20022  fi
20023
20024    # Output is in $new_path
20025
20026  windows_path="$new_path"
20027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20028    unix_path=`$CYGPATH -u "$windows_path"`
20029    new_path="$unix_path"
20030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20032    new_path="$unix_path"
20033  fi
20034
20035    # remove trailing .exe if any
20036    new_path="${new_path/%.exe/}"
20037
20038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20040  fi
20041
20042    else
20043      # We're on a unix platform. Hooray! :)
20044      # First separate the path from the arguments. This will split at the first
20045      # space.
20046      complete="$FOUND_MAKE"
20047      path="${complete%% *}"
20048      tmp="$complete EOL"
20049      arguments="${tmp#* }"
20050
20051      # Cannot rely on the command "which" here since it doesn't always work.
20052      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20053      if test -z "$is_absolute_path"; then
20054        # Path to executable is not absolute. Find it.
20055        IFS_save="$IFS"
20056        IFS=:
20057        for p in $PATH; do
20058          if test -f "$p/$path" && test -x "$p/$path"; then
20059            new_path="$p/$path"
20060            break
20061          fi
20062        done
20063        IFS="$IFS_save"
20064      else
20065        # This is an absolute path, we can use it without further modifications.
20066        new_path="$path"
20067      fi
20068
20069      if test "x$new_path" = x; then
20070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20072        has_space=`$ECHO "$complete" | $GREP " "`
20073        if test "x$has_space" != x; then
20074          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20076        fi
20077        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20078      fi
20079    fi
20080
20081    # Now join together the path and the arguments once again
20082    if test "x$arguments" != xEOL; then
20083      new_complete="$new_path ${arguments% *}"
20084    else
20085      new_complete="$new_path"
20086    fi
20087
20088    if test "x$complete" != "x$new_complete"; then
20089      FOUND_MAKE="$new_complete"
20090      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20091$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20092    fi
20093  fi
20094
20095        fi
20096      fi
20097    fi
20098  fi
20099
20100    fi
20101
20102    if test "x$FOUND_MAKE" = x; then
20103      if test "x$TOOLCHAIN_PATH" != x; then
20104        # We have a toolchain path, check that as well before giving up.
20105        OLD_PATH=$PATH
20106        PATH=$TOOLCHAIN_PATH:$PATH
20107        for ac_prog in gmake
20108do
20109  # Extract the first word of "$ac_prog", so it can be a program name with args.
20110set dummy $ac_prog; ac_word=$2
20111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20112$as_echo_n "checking for $ac_word... " >&6; }
20113if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20114  $as_echo_n "(cached) " >&6
20115else
20116  case $CHECK_TOOLSDIR_GMAKE in
20117  [\\/]* | ?:[\\/]*)
20118  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20119  ;;
20120  *)
20121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20122for as_dir in $PATH
20123do
20124  IFS=$as_save_IFS
20125  test -z "$as_dir" && as_dir=.
20126    for ac_exec_ext in '' $ac_executable_extensions; do
20127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20128    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20130    break 2
20131  fi
20132done
20133  done
20134IFS=$as_save_IFS
20135
20136  ;;
20137esac
20138fi
20139CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20140if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20142$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20143else
20144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20145$as_echo "no" >&6; }
20146fi
20147
20148
20149  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20150done
20151
20152
20153  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20154  DESCRIPTION="gmake in tools-dir"
20155
20156  # On Cygwin, we require a newer version of make than on other platforms
20157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20158    MAKE_VERSION_EXPR="-e 4\."
20159    MAKE_REQUIRED_VERSION="4.0"
20160   else
20161    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20162    MAKE_REQUIRED_VERSION="3.81"
20163  fi
20164
20165  if test "x$MAKE_CANDIDATE" != x; then
20166    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20167$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20168    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20169    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20170    if test "x$IS_GNU_MAKE" = x; then
20171      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20172$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20173    else
20174      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20175      if test "x$IS_MODERN_MAKE" = x; then
20176        { $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
20177$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;}
20178      else
20179        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20180          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20181            MAKE_EXPECTED_ENV='cygwin'
20182          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20183            MAKE_EXPECTED_ENV='msys'
20184          else
20185            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20186          fi
20187          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20188          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20189        else
20190          # Not relevant for non-Windows
20191          IS_MAKE_CORRECT_ENV=true
20192        fi
20193        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20194          { $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
20195$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;}
20196        else
20197          FOUND_MAKE=$MAKE_CANDIDATE
20198
20199  # Only process if variable expands to non-empty
20200
20201  if test "x$FOUND_MAKE" != x; then
20202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20203
20204  # First separate the path from the arguments. This will split at the first
20205  # space.
20206  complete="$FOUND_MAKE"
20207  path="${complete%% *}"
20208  tmp="$complete EOL"
20209  arguments="${tmp#* }"
20210
20211  # Input might be given as Windows format, start by converting to
20212  # unix format.
20213  new_path=`$CYGPATH -u "$path"`
20214
20215  # Now try to locate executable using which
20216  new_path=`$WHICH "$new_path" 2> /dev/null`
20217  # bat and cmd files are not always considered executable in cygwin causing which
20218  # to not find them
20219  if test "x$new_path" = x \
20220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20222    new_path=`$CYGPATH -u "$path"`
20223  fi
20224  if test "x$new_path" = x; then
20225    # Oops. Which didn't find the executable.
20226    # The splitting of arguments from the executable at a space might have been incorrect,
20227    # since paths with space are more likely in Windows. Give it another try with the whole
20228    # argument.
20229    path="$complete"
20230    arguments="EOL"
20231    new_path=`$CYGPATH -u "$path"`
20232    new_path=`$WHICH "$new_path" 2> /dev/null`
20233    # bat and cmd files are not always considered executable in cygwin causing which
20234    # to not find them
20235    if test "x$new_path" = x \
20236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20238      new_path=`$CYGPATH -u "$path"`
20239    fi
20240    if test "x$new_path" = x; then
20241      # It's still not found. Now this is an unrecoverable error.
20242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20244      has_space=`$ECHO "$complete" | $GREP " "`
20245      if test "x$has_space" != x; then
20246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20248      fi
20249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20250    fi
20251  fi
20252
20253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20256  # "foo.exe" is OK but "foo" is an error.
20257  #
20258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20259  # It is also a way to make sure we got the proper file name for the real test later on.
20260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20261  if test "x$test_shortpath" = x; then
20262    # Short path failed, file does not exist as specified.
20263    # Try adding .exe or .cmd
20264    if test -f "${new_path}.exe"; then
20265      input_to_shortpath="${new_path}.exe"
20266    elif test -f "${new_path}.cmd"; then
20267      input_to_shortpath="${new_path}.cmd"
20268    else
20269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20273      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20274    fi
20275  else
20276    input_to_shortpath="$new_path"
20277  fi
20278
20279  # Call helper function which possibly converts this using DOS-style short mode.
20280  # If so, the updated path is stored in $new_path.
20281  new_path="$input_to_shortpath"
20282
20283  input_path="$input_to_shortpath"
20284  # Check if we need to convert this using DOS-style short mode. If the path
20285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20286  # take no chances and rewrite it.
20287  # Note: m4 eats our [], so we need to use [ and ] instead.
20288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20289  if test "x$has_forbidden_chars" != x; then
20290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20294      # Going to short mode and back again did indeed matter. Since short mode is
20295      # case insensitive, let's make it lowercase to improve readability.
20296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20297      # Now convert it back to Unix-style (cygpath)
20298      input_path=`$CYGPATH -u "$shortmode_path"`
20299      new_path="$input_path"
20300    fi
20301  fi
20302
20303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20304  if test "x$test_cygdrive_prefix" = x; then
20305    # As a simple fix, exclude /usr/bin since it's not a real path.
20306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20308      # a path prefixed by /cygdrive for fixpath to work.
20309      new_path="$CYGWIN_ROOT_PATH$input_path"
20310    fi
20311  fi
20312
20313  # remove trailing .exe if any
20314  new_path="${new_path/%.exe/}"
20315
20316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20317
20318  # First separate the path from the arguments. This will split at the first
20319  # space.
20320  complete="$FOUND_MAKE"
20321  path="${complete%% *}"
20322  tmp="$complete EOL"
20323  arguments="${tmp#* }"
20324
20325  # Input might be given as Windows format, start by converting to
20326  # unix format.
20327  new_path="$path"
20328
20329  windows_path="$new_path"
20330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20331    unix_path=`$CYGPATH -u "$windows_path"`
20332    new_path="$unix_path"
20333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20335    new_path="$unix_path"
20336  fi
20337
20338
20339  # Now try to locate executable using which
20340  new_path=`$WHICH "$new_path" 2> /dev/null`
20341
20342  if test "x$new_path" = x; then
20343    # Oops. Which didn't find the executable.
20344    # The splitting of arguments from the executable at a space might have been incorrect,
20345    # since paths with space are more likely in Windows. Give it another try with the whole
20346    # argument.
20347    path="$complete"
20348    arguments="EOL"
20349    new_path="$path"
20350
20351  windows_path="$new_path"
20352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353    unix_path=`$CYGPATH -u "$windows_path"`
20354    new_path="$unix_path"
20355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20357    new_path="$unix_path"
20358  fi
20359
20360
20361    new_path=`$WHICH "$new_path" 2> /dev/null`
20362    # bat and cmd files are not always considered executable in MSYS causing which
20363    # to not find them
20364    if test "x$new_path" = x \
20365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20367      new_path="$path"
20368
20369  windows_path="$new_path"
20370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371    unix_path=`$CYGPATH -u "$windows_path"`
20372    new_path="$unix_path"
20373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20375    new_path="$unix_path"
20376  fi
20377
20378    fi
20379
20380    if test "x$new_path" = x; then
20381      # It's still not found. Now this is an unrecoverable error.
20382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20384      has_space=`$ECHO "$complete" | $GREP " "`
20385      if test "x$has_space" != x; then
20386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20388      fi
20389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20390    fi
20391  fi
20392
20393  # Now new_path has a complete unix path to the binary
20394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20395    # Keep paths in /bin as-is, but remove trailing .exe if any
20396    new_path="${new_path/%.exe/}"
20397    # Do not save /bin paths to all_fixpath_prefixes!
20398  else
20399    # Not in mixed or Windows style, start by that.
20400    new_path=`cmd //c echo $new_path`
20401
20402  input_path="$new_path"
20403  # Check if we need to convert this using DOS-style short mode. If the path
20404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20405  # take no chances and rewrite it.
20406  # Note: m4 eats our [], so we need to use [ and ] instead.
20407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20408  if test "x$has_forbidden_chars" != x; then
20409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20411  fi
20412
20413    # Output is in $new_path
20414
20415  windows_path="$new_path"
20416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20417    unix_path=`$CYGPATH -u "$windows_path"`
20418    new_path="$unix_path"
20419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20421    new_path="$unix_path"
20422  fi
20423
20424    # remove trailing .exe if any
20425    new_path="${new_path/%.exe/}"
20426
20427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20429  fi
20430
20431    else
20432      # We're on a unix platform. Hooray! :)
20433      # First separate the path from the arguments. This will split at the first
20434      # space.
20435      complete="$FOUND_MAKE"
20436      path="${complete%% *}"
20437      tmp="$complete EOL"
20438      arguments="${tmp#* }"
20439
20440      # Cannot rely on the command "which" here since it doesn't always work.
20441      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20442      if test -z "$is_absolute_path"; then
20443        # Path to executable is not absolute. Find it.
20444        IFS_save="$IFS"
20445        IFS=:
20446        for p in $PATH; do
20447          if test -f "$p/$path" && test -x "$p/$path"; then
20448            new_path="$p/$path"
20449            break
20450          fi
20451        done
20452        IFS="$IFS_save"
20453      else
20454        # This is an absolute path, we can use it without further modifications.
20455        new_path="$path"
20456      fi
20457
20458      if test "x$new_path" = x; then
20459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20461        has_space=`$ECHO "$complete" | $GREP " "`
20462        if test "x$has_space" != x; then
20463          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20464$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20465        fi
20466        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20467      fi
20468    fi
20469
20470    # Now join together the path and the arguments once again
20471    if test "x$arguments" != xEOL; then
20472      new_complete="$new_path ${arguments% *}"
20473    else
20474      new_complete="$new_path"
20475    fi
20476
20477    if test "x$complete" != "x$new_complete"; then
20478      FOUND_MAKE="$new_complete"
20479      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20480$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20481    fi
20482  fi
20483
20484        fi
20485      fi
20486    fi
20487  fi
20488
20489        if test "x$FOUND_MAKE" = x; then
20490          for ac_prog in make
20491do
20492  # Extract the first word of "$ac_prog", so it can be a program name with args.
20493set dummy $ac_prog; ac_word=$2
20494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20495$as_echo_n "checking for $ac_word... " >&6; }
20496if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20497  $as_echo_n "(cached) " >&6
20498else
20499  case $CHECK_TOOLSDIR_MAKE in
20500  [\\/]* | ?:[\\/]*)
20501  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20502  ;;
20503  *)
20504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20505for as_dir in $PATH
20506do
20507  IFS=$as_save_IFS
20508  test -z "$as_dir" && as_dir=.
20509    for ac_exec_ext in '' $ac_executable_extensions; do
20510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20511    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20513    break 2
20514  fi
20515done
20516  done
20517IFS=$as_save_IFS
20518
20519  ;;
20520esac
20521fi
20522CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20523if test -n "$CHECK_TOOLSDIR_MAKE"; then
20524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20525$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20526else
20527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20528$as_echo "no" >&6; }
20529fi
20530
20531
20532  test -n "$CHECK_TOOLSDIR_MAKE" && break
20533done
20534
20535
20536  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20537  DESCRIPTION="make in tools-dir"
20538
20539  # On Cygwin, we require a newer version of make than on other platforms
20540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20541    MAKE_VERSION_EXPR="-e 4\."
20542    MAKE_REQUIRED_VERSION="4.0"
20543   else
20544    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20545    MAKE_REQUIRED_VERSION="3.81"
20546  fi
20547
20548  if test "x$MAKE_CANDIDATE" != x; then
20549    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20550$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20551    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20552    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20553    if test "x$IS_GNU_MAKE" = x; then
20554      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20555$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20556    else
20557      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20558      if test "x$IS_MODERN_MAKE" = x; then
20559        { $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
20560$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;}
20561      else
20562        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20563          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20564            MAKE_EXPECTED_ENV='cygwin'
20565          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20566            MAKE_EXPECTED_ENV='msys'
20567          else
20568            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20569          fi
20570          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20571          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20572        else
20573          # Not relevant for non-Windows
20574          IS_MAKE_CORRECT_ENV=true
20575        fi
20576        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20577          { $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
20578$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;}
20579        else
20580          FOUND_MAKE=$MAKE_CANDIDATE
20581
20582  # Only process if variable expands to non-empty
20583
20584  if test "x$FOUND_MAKE" != x; then
20585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20586
20587  # First separate the path from the arguments. This will split at the first
20588  # space.
20589  complete="$FOUND_MAKE"
20590  path="${complete%% *}"
20591  tmp="$complete EOL"
20592  arguments="${tmp#* }"
20593
20594  # Input might be given as Windows format, start by converting to
20595  # unix format.
20596  new_path=`$CYGPATH -u "$path"`
20597
20598  # Now try to locate executable using which
20599  new_path=`$WHICH "$new_path" 2> /dev/null`
20600  # bat and cmd files are not always considered executable in cygwin causing which
20601  # to not find them
20602  if test "x$new_path" = x \
20603      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20604      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20605    new_path=`$CYGPATH -u "$path"`
20606  fi
20607  if test "x$new_path" = x; then
20608    # Oops. Which didn't find the executable.
20609    # The splitting of arguments from the executable at a space might have been incorrect,
20610    # since paths with space are more likely in Windows. Give it another try with the whole
20611    # argument.
20612    path="$complete"
20613    arguments="EOL"
20614    new_path=`$CYGPATH -u "$path"`
20615    new_path=`$WHICH "$new_path" 2> /dev/null`
20616    # bat and cmd files are not always considered executable in cygwin causing which
20617    # to not find them
20618    if test "x$new_path" = x \
20619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20621      new_path=`$CYGPATH -u "$path"`
20622    fi
20623    if test "x$new_path" = x; then
20624      # It's still not found. Now this is an unrecoverable error.
20625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20626$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20627      has_space=`$ECHO "$complete" | $GREP " "`
20628      if test "x$has_space" != x; then
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20631      fi
20632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20633    fi
20634  fi
20635
20636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20639  # "foo.exe" is OK but "foo" is an error.
20640  #
20641  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20642  # It is also a way to make sure we got the proper file name for the real test later on.
20643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20644  if test "x$test_shortpath" = x; then
20645    # Short path failed, file does not exist as specified.
20646    # Try adding .exe or .cmd
20647    if test -f "${new_path}.exe"; then
20648      input_to_shortpath="${new_path}.exe"
20649    elif test -f "${new_path}.cmd"; then
20650      input_to_shortpath="${new_path}.cmd"
20651    else
20652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20653$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20656      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20657    fi
20658  else
20659    input_to_shortpath="$new_path"
20660  fi
20661
20662  # Call helper function which possibly converts this using DOS-style short mode.
20663  # If so, the updated path is stored in $new_path.
20664  new_path="$input_to_shortpath"
20665
20666  input_path="$input_to_shortpath"
20667  # Check if we need to convert this using DOS-style short mode. If the path
20668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20669  # take no chances and rewrite it.
20670  # Note: m4 eats our [], so we need to use [ and ] instead.
20671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20672  if test "x$has_forbidden_chars" != x; then
20673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20677      # Going to short mode and back again did indeed matter. Since short mode is
20678      # case insensitive, let's make it lowercase to improve readability.
20679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20680      # Now convert it back to Unix-style (cygpath)
20681      input_path=`$CYGPATH -u "$shortmode_path"`
20682      new_path="$input_path"
20683    fi
20684  fi
20685
20686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20687  if test "x$test_cygdrive_prefix" = x; then
20688    # As a simple fix, exclude /usr/bin since it's not a real path.
20689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20691      # a path prefixed by /cygdrive for fixpath to work.
20692      new_path="$CYGWIN_ROOT_PATH$input_path"
20693    fi
20694  fi
20695
20696  # remove trailing .exe if any
20697  new_path="${new_path/%.exe/}"
20698
20699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20700
20701  # First separate the path from the arguments. This will split at the first
20702  # space.
20703  complete="$FOUND_MAKE"
20704  path="${complete%% *}"
20705  tmp="$complete EOL"
20706  arguments="${tmp#* }"
20707
20708  # Input might be given as Windows format, start by converting to
20709  # unix format.
20710  new_path="$path"
20711
20712  windows_path="$new_path"
20713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20714    unix_path=`$CYGPATH -u "$windows_path"`
20715    new_path="$unix_path"
20716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20718    new_path="$unix_path"
20719  fi
20720
20721
20722  # Now try to locate executable using which
20723  new_path=`$WHICH "$new_path" 2> /dev/null`
20724
20725  if test "x$new_path" = x; then
20726    # Oops. Which didn't find the executable.
20727    # The splitting of arguments from the executable at a space might have been incorrect,
20728    # since paths with space are more likely in Windows. Give it another try with the whole
20729    # argument.
20730    path="$complete"
20731    arguments="EOL"
20732    new_path="$path"
20733
20734  windows_path="$new_path"
20735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20736    unix_path=`$CYGPATH -u "$windows_path"`
20737    new_path="$unix_path"
20738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20740    new_path="$unix_path"
20741  fi
20742
20743
20744    new_path=`$WHICH "$new_path" 2> /dev/null`
20745    # bat and cmd files are not always considered executable in MSYS causing which
20746    # to not find them
20747    if test "x$new_path" = x \
20748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20750      new_path="$path"
20751
20752  windows_path="$new_path"
20753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754    unix_path=`$CYGPATH -u "$windows_path"`
20755    new_path="$unix_path"
20756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20758    new_path="$unix_path"
20759  fi
20760
20761    fi
20762
20763    if test "x$new_path" = x; then
20764      # It's still not found. Now this is an unrecoverable error.
20765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20766$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20767      has_space=`$ECHO "$complete" | $GREP " "`
20768      if test "x$has_space" != x; then
20769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20771      fi
20772      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20773    fi
20774  fi
20775
20776  # Now new_path has a complete unix path to the binary
20777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20778    # Keep paths in /bin as-is, but remove trailing .exe if any
20779    new_path="${new_path/%.exe/}"
20780    # Do not save /bin paths to all_fixpath_prefixes!
20781  else
20782    # Not in mixed or Windows style, start by that.
20783    new_path=`cmd //c echo $new_path`
20784
20785  input_path="$new_path"
20786  # Check if we need to convert this using DOS-style short mode. If the path
20787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20788  # take no chances and rewrite it.
20789  # Note: m4 eats our [], so we need to use [ and ] instead.
20790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20791  if test "x$has_forbidden_chars" != x; then
20792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20794  fi
20795
20796    # Output is in $new_path
20797
20798  windows_path="$new_path"
20799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20800    unix_path=`$CYGPATH -u "$windows_path"`
20801    new_path="$unix_path"
20802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20804    new_path="$unix_path"
20805  fi
20806
20807    # remove trailing .exe if any
20808    new_path="${new_path/%.exe/}"
20809
20810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20812  fi
20813
20814    else
20815      # We're on a unix platform. Hooray! :)
20816      # First separate the path from the arguments. This will split at the first
20817      # space.
20818      complete="$FOUND_MAKE"
20819      path="${complete%% *}"
20820      tmp="$complete EOL"
20821      arguments="${tmp#* }"
20822
20823      # Cannot rely on the command "which" here since it doesn't always work.
20824      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20825      if test -z "$is_absolute_path"; then
20826        # Path to executable is not absolute. Find it.
20827        IFS_save="$IFS"
20828        IFS=:
20829        for p in $PATH; do
20830          if test -f "$p/$path" && test -x "$p/$path"; then
20831            new_path="$p/$path"
20832            break
20833          fi
20834        done
20835        IFS="$IFS_save"
20836      else
20837        # This is an absolute path, we can use it without further modifications.
20838        new_path="$path"
20839      fi
20840
20841      if test "x$new_path" = x; then
20842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20844        has_space=`$ECHO "$complete" | $GREP " "`
20845        if test "x$has_space" != x; then
20846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20848        fi
20849        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20850      fi
20851    fi
20852
20853    # Now join together the path and the arguments once again
20854    if test "x$arguments" != xEOL; then
20855      new_complete="$new_path ${arguments% *}"
20856    else
20857      new_complete="$new_path"
20858    fi
20859
20860    if test "x$complete" != "x$new_complete"; then
20861      FOUND_MAKE="$new_complete"
20862      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20863$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20864    fi
20865  fi
20866
20867        fi
20868      fi
20869    fi
20870  fi
20871
20872        fi
20873        PATH=$OLD_PATH
20874      fi
20875    fi
20876
20877    if test "x$FOUND_MAKE" = x; then
20878      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
20879    fi
20880
20881    else
20882      # If it succeeded, then it was overridden by the user. We will use it
20883      # for the tool.
20884
20885      # First remove it from the list of overridden variables, so we can test
20886      # for unknown variables in the end.
20887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20888
20889      # Check if we try to supply an empty value
20890      if test "x$MAKE" = x; then
20891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20892$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20894$as_echo_n "checking for MAKE... " >&6; }
20895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20896$as_echo "disabled" >&6; }
20897      else
20898        # Check if the provided tool contains a complete path.
20899        tool_specified="$MAKE"
20900        tool_basename="${tool_specified##*/}"
20901        if test "x$tool_basename" = "x$tool_specified"; then
20902          # A command without a complete path is provided, search $PATH.
20903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20904$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20905          # Extract the first word of "$tool_basename", so it can be a program name with args.
20906set dummy $tool_basename; ac_word=$2
20907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20908$as_echo_n "checking for $ac_word... " >&6; }
20909if ${ac_cv_path_MAKE+:} false; then :
20910  $as_echo_n "(cached) " >&6
20911else
20912  case $MAKE in
20913  [\\/]* | ?:[\\/]*)
20914  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20915  ;;
20916  *)
20917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20918for as_dir in $PATH
20919do
20920  IFS=$as_save_IFS
20921  test -z "$as_dir" && as_dir=.
20922    for ac_exec_ext in '' $ac_executable_extensions; do
20923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20924    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20926    break 2
20927  fi
20928done
20929  done
20930IFS=$as_save_IFS
20931
20932  ;;
20933esac
20934fi
20935MAKE=$ac_cv_path_MAKE
20936if test -n "$MAKE"; then
20937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20938$as_echo "$MAKE" >&6; }
20939else
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20941$as_echo "no" >&6; }
20942fi
20943
20944
20945          if test "x$MAKE" = x; then
20946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20947          fi
20948        else
20949          # Otherwise we believe it is a complete path. Use it as it is.
20950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20951$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20953$as_echo_n "checking for MAKE... " >&6; }
20954          if test ! -x "$tool_specified"; then
20955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20956$as_echo "not found" >&6; }
20957            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20958          fi
20959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20960$as_echo "$tool_specified" >&6; }
20961        fi
20962      fi
20963    fi
20964
20965    # If MAKE was set by user, verify the version
20966
20967  MAKE_CANDIDATE=""$MAKE""
20968  DESCRIPTION="user supplied MAKE=$MAKE"
20969
20970  # On Cygwin, we require a newer version of make than on other platforms
20971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20972    MAKE_VERSION_EXPR="-e 4\."
20973    MAKE_REQUIRED_VERSION="4.0"
20974   else
20975    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20976    MAKE_REQUIRED_VERSION="3.81"
20977  fi
20978
20979  if test "x$MAKE_CANDIDATE" != x; then
20980    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20981$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20982    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20983    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20984    if test "x$IS_GNU_MAKE" = x; then
20985      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20986$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20987    else
20988      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20989      if test "x$IS_MODERN_MAKE" = x; then
20990        { $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
20991$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;}
20992      else
20993        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20994          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20995            MAKE_EXPECTED_ENV='cygwin'
20996          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20997            MAKE_EXPECTED_ENV='msys'
20998          else
20999            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21000          fi
21001          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21002          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21003        else
21004          # Not relevant for non-Windows
21005          IS_MAKE_CORRECT_ENV=true
21006        fi
21007        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21008          { $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
21009$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;}
21010        else
21011          FOUND_MAKE=$MAKE_CANDIDATE
21012
21013  # Only process if variable expands to non-empty
21014
21015  if test "x$FOUND_MAKE" != x; then
21016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21017
21018  # First separate the path from the arguments. This will split at the first
21019  # space.
21020  complete="$FOUND_MAKE"
21021  path="${complete%% *}"
21022  tmp="$complete EOL"
21023  arguments="${tmp#* }"
21024
21025  # Input might be given as Windows format, start by converting to
21026  # unix format.
21027  new_path=`$CYGPATH -u "$path"`
21028
21029  # Now try to locate executable using which
21030  new_path=`$WHICH "$new_path" 2> /dev/null`
21031  # bat and cmd files are not always considered executable in cygwin causing which
21032  # to not find them
21033  if test "x$new_path" = x \
21034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21036    new_path=`$CYGPATH -u "$path"`
21037  fi
21038  if test "x$new_path" = x; then
21039    # Oops. Which didn't find the executable.
21040    # The splitting of arguments from the executable at a space might have been incorrect,
21041    # since paths with space are more likely in Windows. Give it another try with the whole
21042    # argument.
21043    path="$complete"
21044    arguments="EOL"
21045    new_path=`$CYGPATH -u "$path"`
21046    new_path=`$WHICH "$new_path" 2> /dev/null`
21047    # bat and cmd files are not always considered executable in cygwin causing which
21048    # to not find them
21049    if test "x$new_path" = x \
21050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21052      new_path=`$CYGPATH -u "$path"`
21053    fi
21054    if test "x$new_path" = x; then
21055      # It's still not found. Now this is an unrecoverable error.
21056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21058      has_space=`$ECHO "$complete" | $GREP " "`
21059      if test "x$has_space" != x; then
21060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21062      fi
21063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21064    fi
21065  fi
21066
21067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21070  # "foo.exe" is OK but "foo" is an error.
21071  #
21072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21073  # It is also a way to make sure we got the proper file name for the real test later on.
21074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21075  if test "x$test_shortpath" = x; then
21076    # Short path failed, file does not exist as specified.
21077    # Try adding .exe or .cmd
21078    if test -f "${new_path}.exe"; then
21079      input_to_shortpath="${new_path}.exe"
21080    elif test -f "${new_path}.cmd"; then
21081      input_to_shortpath="${new_path}.cmd"
21082    else
21083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21088    fi
21089  else
21090    input_to_shortpath="$new_path"
21091  fi
21092
21093  # Call helper function which possibly converts this using DOS-style short mode.
21094  # If so, the updated path is stored in $new_path.
21095  new_path="$input_to_shortpath"
21096
21097  input_path="$input_to_shortpath"
21098  # Check if we need to convert this using DOS-style short mode. If the path
21099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21100  # take no chances and rewrite it.
21101  # Note: m4 eats our [], so we need to use [ and ] instead.
21102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21103  if test "x$has_forbidden_chars" != x; then
21104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21108      # Going to short mode and back again did indeed matter. Since short mode is
21109      # case insensitive, let's make it lowercase to improve readability.
21110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21111      # Now convert it back to Unix-style (cygpath)
21112      input_path=`$CYGPATH -u "$shortmode_path"`
21113      new_path="$input_path"
21114    fi
21115  fi
21116
21117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21118  if test "x$test_cygdrive_prefix" = x; then
21119    # As a simple fix, exclude /usr/bin since it's not a real path.
21120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21122      # a path prefixed by /cygdrive for fixpath to work.
21123      new_path="$CYGWIN_ROOT_PATH$input_path"
21124    fi
21125  fi
21126
21127  # remove trailing .exe if any
21128  new_path="${new_path/%.exe/}"
21129
21130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21131
21132  # First separate the path from the arguments. This will split at the first
21133  # space.
21134  complete="$FOUND_MAKE"
21135  path="${complete%% *}"
21136  tmp="$complete EOL"
21137  arguments="${tmp#* }"
21138
21139  # Input might be given as Windows format, start by converting to
21140  # unix format.
21141  new_path="$path"
21142
21143  windows_path="$new_path"
21144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21145    unix_path=`$CYGPATH -u "$windows_path"`
21146    new_path="$unix_path"
21147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21149    new_path="$unix_path"
21150  fi
21151
21152
21153  # Now try to locate executable using which
21154  new_path=`$WHICH "$new_path" 2> /dev/null`
21155
21156  if test "x$new_path" = x; then
21157    # Oops. Which didn't find the executable.
21158    # The splitting of arguments from the executable at a space might have been incorrect,
21159    # since paths with space are more likely in Windows. Give it another try with the whole
21160    # argument.
21161    path="$complete"
21162    arguments="EOL"
21163    new_path="$path"
21164
21165  windows_path="$new_path"
21166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21167    unix_path=`$CYGPATH -u "$windows_path"`
21168    new_path="$unix_path"
21169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21171    new_path="$unix_path"
21172  fi
21173
21174
21175    new_path=`$WHICH "$new_path" 2> /dev/null`
21176    # bat and cmd files are not always considered executable in MSYS causing which
21177    # to not find them
21178    if test "x$new_path" = x \
21179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21181      new_path="$path"
21182
21183  windows_path="$new_path"
21184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21185    unix_path=`$CYGPATH -u "$windows_path"`
21186    new_path="$unix_path"
21187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21189    new_path="$unix_path"
21190  fi
21191
21192    fi
21193
21194    if test "x$new_path" = x; then
21195      # It's still not found. Now this is an unrecoverable error.
21196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21198      has_space=`$ECHO "$complete" | $GREP " "`
21199      if test "x$has_space" != x; then
21200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21202      fi
21203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21204    fi
21205  fi
21206
21207  # Now new_path has a complete unix path to the binary
21208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21209    # Keep paths in /bin as-is, but remove trailing .exe if any
21210    new_path="${new_path/%.exe/}"
21211    # Do not save /bin paths to all_fixpath_prefixes!
21212  else
21213    # Not in mixed or Windows style, start by that.
21214    new_path=`cmd //c echo $new_path`
21215
21216  input_path="$new_path"
21217  # Check if we need to convert this using DOS-style short mode. If the path
21218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21219  # take no chances and rewrite it.
21220  # Note: m4 eats our [], so we need to use [ and ] instead.
21221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21222  if test "x$has_forbidden_chars" != x; then
21223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21225  fi
21226
21227    # Output is in $new_path
21228
21229  windows_path="$new_path"
21230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21231    unix_path=`$CYGPATH -u "$windows_path"`
21232    new_path="$unix_path"
21233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21235    new_path="$unix_path"
21236  fi
21237
21238    # remove trailing .exe if any
21239    new_path="${new_path/%.exe/}"
21240
21241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21243  fi
21244
21245    else
21246      # We're on a unix platform. Hooray! :)
21247      # First separate the path from the arguments. This will split at the first
21248      # space.
21249      complete="$FOUND_MAKE"
21250      path="${complete%% *}"
21251      tmp="$complete EOL"
21252      arguments="${tmp#* }"
21253
21254      # Cannot rely on the command "which" here since it doesn't always work.
21255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21256      if test -z "$is_absolute_path"; then
21257        # Path to executable is not absolute. Find it.
21258        IFS_save="$IFS"
21259        IFS=:
21260        for p in $PATH; do
21261          if test -f "$p/$path" && test -x "$p/$path"; then
21262            new_path="$p/$path"
21263            break
21264          fi
21265        done
21266        IFS="$IFS_save"
21267      else
21268        # This is an absolute path, we can use it without further modifications.
21269        new_path="$path"
21270      fi
21271
21272      if test "x$new_path" = x; then
21273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21275        has_space=`$ECHO "$complete" | $GREP " "`
21276        if test "x$has_space" != x; then
21277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21279        fi
21280        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21281      fi
21282    fi
21283
21284    # Now join together the path and the arguments once again
21285    if test "x$arguments" != xEOL; then
21286      new_complete="$new_path ${arguments% *}"
21287    else
21288      new_complete="$new_path"
21289    fi
21290
21291    if test "x$complete" != "x$new_complete"; then
21292      FOUND_MAKE="$new_complete"
21293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21294$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21295    fi
21296  fi
21297
21298        fi
21299      fi
21300    fi
21301  fi
21302
21303    if test "x$FOUND_MAKE" = x; then
21304      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21305    fi
21306
21307  fi
21308
21309
21310  MAKE=$FOUND_MAKE
21311
21312  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21313$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21314
21315
21316  # Check if make supports the output sync option and if so, setup using it.
21317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21318$as_echo_n "checking if make --output-sync is supported... " >&6; }
21319  if $MAKE --version -O > /dev/null 2>&1; then
21320    OUTPUT_SYNC_SUPPORTED=true
21321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21322$as_echo "yes" >&6; }
21323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21324$as_echo_n "checking for output-sync value... " >&6; }
21325
21326# Check whether --with-output-sync was given.
21327if test "${with_output_sync+set}" = set; then :
21328  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21329fi
21330
21331    if test "x$OUTPUT_SYNC" = "x"; then
21332      OUTPUT_SYNC=none
21333    fi
21334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21335$as_echo "$OUTPUT_SYNC" >&6; }
21336    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21337      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21338    fi
21339  else
21340    OUTPUT_SYNC_SUPPORTED=false
21341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21342$as_echo "no" >&6; }
21343  fi
21344
21345
21346
21347
21348
21349
21350  # Test if find supports -delete
21351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21352$as_echo_n "checking if find supports -delete... " >&6; }
21353  FIND_DELETE="-delete"
21354
21355  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21356
21357  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21358
21359  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21360  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21361    # No, it does not.
21362    $RM $DELETEDIR/TestIfFindSupportsDelete
21363    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21364      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21365      FIND_DELETE="-print | $XARGS $RM"
21366    else
21367      FIND_DELETE="-exec $RM \{\} \+"
21368    fi
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21370$as_echo "no" >&6; }
21371  else
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21373$as_echo "yes" >&6; }
21374  fi
21375  $RMDIR $DELETEDIR
21376
21377
21378
21379  # Test which kind of tar was found
21380  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21381    TAR_TYPE="gnu"
21382  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21383    TAR_TYPE="bsd"
21384  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21385    TAR_TYPE="bsd"
21386  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21387    TAR_TYPE="solaris"
21388  fi
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21390$as_echo_n "checking what type of tar was found... " >&6; }
21391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21392$as_echo "$TAR_TYPE" >&6; }
21393
21394  TAR_CREATE_FILE_PARAM=""
21395
21396  if test "x$TAR_TYPE" = "xgnu"; then
21397    TAR_INCLUDE_PARAM="T"
21398    TAR_SUPPORTS_TRANSFORM="true"
21399    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21400      # When using gnu tar for Solaris targets, need to use compatibility mode
21401      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21402    fi
21403  else
21404    TAR_INCLUDE_PARAM="I"
21405    TAR_SUPPORTS_TRANSFORM="false"
21406  fi
21407
21408
21409
21410
21411
21412
21413  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21414  # This is a problem for the grep resident on AIX.
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21416$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21417  # Multiple subsequent spaces..
21418  STACK_SPACES='aaa   bbb   ccc'
21419  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21420  # patterns in it.
21421  STACK_LIST=${STACK_SPACES// /$'\n'}
21422  NEEDLE_SPACES='ccc bbb aaa'
21423  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21424  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21425  if test "x$RESULT" == "x"; then
21426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21427$as_echo "yes" >&6; }
21428  else
21429    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21430      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21431    fi
21432    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21433  fi
21434
21435
21436  # These tools might not be installed by default,
21437  # need hint on how to install them.
21438
21439
21440
21441  # Publish this variable in the help.
21442
21443
21444  if [ -z "${UNZIP+x}" ]; then
21445    # The variable is not set by user, try to locate tool using the code snippet
21446    for ac_prog in unzip
21447do
21448  # Extract the first word of "$ac_prog", so it can be a program name with args.
21449set dummy $ac_prog; ac_word=$2
21450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21451$as_echo_n "checking for $ac_word... " >&6; }
21452if ${ac_cv_path_UNZIP+:} false; then :
21453  $as_echo_n "(cached) " >&6
21454else
21455  case $UNZIP in
21456  [\\/]* | ?:[\\/]*)
21457  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21458  ;;
21459  *)
21460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21461for as_dir in $PATH
21462do
21463  IFS=$as_save_IFS
21464  test -z "$as_dir" && as_dir=.
21465    for ac_exec_ext in '' $ac_executable_extensions; do
21466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21467    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21469    break 2
21470  fi
21471done
21472  done
21473IFS=$as_save_IFS
21474
21475  ;;
21476esac
21477fi
21478UNZIP=$ac_cv_path_UNZIP
21479if test -n "$UNZIP"; then
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21481$as_echo "$UNZIP" >&6; }
21482else
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21484$as_echo "no" >&6; }
21485fi
21486
21487
21488  test -n "$UNZIP" && break
21489done
21490
21491  else
21492    # The variable is set, but is it from the command line or the environment?
21493
21494    # Try to remove the string !UNZIP! from our list.
21495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21497      # If it failed, the variable was not from the command line. Ignore it,
21498      # but warn the user (except for BASH, which is always set by the calling BASH).
21499      if test "xUNZIP" != xBASH; then
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21501$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21502      fi
21503      # Try to locate tool using the code snippet
21504      for ac_prog in unzip
21505do
21506  # Extract the first word of "$ac_prog", so it can be a program name with args.
21507set dummy $ac_prog; ac_word=$2
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509$as_echo_n "checking for $ac_word... " >&6; }
21510if ${ac_cv_path_UNZIP+:} false; then :
21511  $as_echo_n "(cached) " >&6
21512else
21513  case $UNZIP in
21514  [\\/]* | ?:[\\/]*)
21515  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21516  ;;
21517  *)
21518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21519for as_dir in $PATH
21520do
21521  IFS=$as_save_IFS
21522  test -z "$as_dir" && as_dir=.
21523    for ac_exec_ext in '' $ac_executable_extensions; do
21524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21525    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21527    break 2
21528  fi
21529done
21530  done
21531IFS=$as_save_IFS
21532
21533  ;;
21534esac
21535fi
21536UNZIP=$ac_cv_path_UNZIP
21537if test -n "$UNZIP"; then
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21539$as_echo "$UNZIP" >&6; }
21540else
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21542$as_echo "no" >&6; }
21543fi
21544
21545
21546  test -n "$UNZIP" && break
21547done
21548
21549    else
21550      # If it succeeded, then it was overridden by the user. We will use it
21551      # for the tool.
21552
21553      # First remove it from the list of overridden variables, so we can test
21554      # for unknown variables in the end.
21555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21556
21557      # Check if we try to supply an empty value
21558      if test "x$UNZIP" = x; then
21559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21560$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21562$as_echo_n "checking for UNZIP... " >&6; }
21563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21564$as_echo "disabled" >&6; }
21565      else
21566        # Check if the provided tool contains a complete path.
21567        tool_specified="$UNZIP"
21568        tool_basename="${tool_specified##*/}"
21569        if test "x$tool_basename" = "x$tool_specified"; then
21570          # A command without a complete path is provided, search $PATH.
21571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21572$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21573          # Extract the first word of "$tool_basename", so it can be a program name with args.
21574set dummy $tool_basename; ac_word=$2
21575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21576$as_echo_n "checking for $ac_word... " >&6; }
21577if ${ac_cv_path_UNZIP+:} false; then :
21578  $as_echo_n "(cached) " >&6
21579else
21580  case $UNZIP in
21581  [\\/]* | ?:[\\/]*)
21582  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21583  ;;
21584  *)
21585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21586for as_dir in $PATH
21587do
21588  IFS=$as_save_IFS
21589  test -z "$as_dir" && as_dir=.
21590    for ac_exec_ext in '' $ac_executable_extensions; do
21591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21592    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21594    break 2
21595  fi
21596done
21597  done
21598IFS=$as_save_IFS
21599
21600  ;;
21601esac
21602fi
21603UNZIP=$ac_cv_path_UNZIP
21604if test -n "$UNZIP"; then
21605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21606$as_echo "$UNZIP" >&6; }
21607else
21608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21609$as_echo "no" >&6; }
21610fi
21611
21612
21613          if test "x$UNZIP" = x; then
21614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21615          fi
21616        else
21617          # Otherwise we believe it is a complete path. Use it as it is.
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21619$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21621$as_echo_n "checking for UNZIP... " >&6; }
21622          if test ! -x "$tool_specified"; then
21623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21624$as_echo "not found" >&6; }
21625            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21626          fi
21627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21628$as_echo "$tool_specified" >&6; }
21629        fi
21630      fi
21631    fi
21632
21633  fi
21634
21635
21636
21637  if test "x$UNZIP" = x; then
21638    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21639  fi
21640
21641
21642  # Since zip uses "ZIP" as a environment variable for passing options, we need
21643  # to name our variable differently, hence ZIPEXE.
21644
21645
21646
21647  # Publish this variable in the help.
21648
21649
21650  if [ -z "${ZIPEXE+x}" ]; then
21651    # The variable is not set by user, try to locate tool using the code snippet
21652    for ac_prog in zip
21653do
21654  # Extract the first word of "$ac_prog", so it can be a program name with args.
21655set dummy $ac_prog; ac_word=$2
21656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21657$as_echo_n "checking for $ac_word... " >&6; }
21658if ${ac_cv_path_ZIPEXE+:} false; then :
21659  $as_echo_n "(cached) " >&6
21660else
21661  case $ZIPEXE in
21662  [\\/]* | ?:[\\/]*)
21663  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21664  ;;
21665  *)
21666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21667for as_dir in $PATH
21668do
21669  IFS=$as_save_IFS
21670  test -z "$as_dir" && as_dir=.
21671    for ac_exec_ext in '' $ac_executable_extensions; do
21672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21673    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21675    break 2
21676  fi
21677done
21678  done
21679IFS=$as_save_IFS
21680
21681  ;;
21682esac
21683fi
21684ZIPEXE=$ac_cv_path_ZIPEXE
21685if test -n "$ZIPEXE"; then
21686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21687$as_echo "$ZIPEXE" >&6; }
21688else
21689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21690$as_echo "no" >&6; }
21691fi
21692
21693
21694  test -n "$ZIPEXE" && break
21695done
21696
21697  else
21698    # The variable is set, but is it from the command line or the environment?
21699
21700    # Try to remove the string !ZIPEXE! from our list.
21701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21703      # If it failed, the variable was not from the command line. Ignore it,
21704      # but warn the user (except for BASH, which is always set by the calling BASH).
21705      if test "xZIPEXE" != xBASH; then
21706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21707$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21708      fi
21709      # Try to locate tool using the code snippet
21710      for ac_prog in zip
21711do
21712  # Extract the first word of "$ac_prog", so it can be a program name with args.
21713set dummy $ac_prog; ac_word=$2
21714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21715$as_echo_n "checking for $ac_word... " >&6; }
21716if ${ac_cv_path_ZIPEXE+:} false; then :
21717  $as_echo_n "(cached) " >&6
21718else
21719  case $ZIPEXE in
21720  [\\/]* | ?:[\\/]*)
21721  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21722  ;;
21723  *)
21724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21725for as_dir in $PATH
21726do
21727  IFS=$as_save_IFS
21728  test -z "$as_dir" && as_dir=.
21729    for ac_exec_ext in '' $ac_executable_extensions; do
21730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21731    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21733    break 2
21734  fi
21735done
21736  done
21737IFS=$as_save_IFS
21738
21739  ;;
21740esac
21741fi
21742ZIPEXE=$ac_cv_path_ZIPEXE
21743if test -n "$ZIPEXE"; then
21744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21745$as_echo "$ZIPEXE" >&6; }
21746else
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21748$as_echo "no" >&6; }
21749fi
21750
21751
21752  test -n "$ZIPEXE" && break
21753done
21754
21755    else
21756      # If it succeeded, then it was overridden by the user. We will use it
21757      # for the tool.
21758
21759      # First remove it from the list of overridden variables, so we can test
21760      # for unknown variables in the end.
21761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21762
21763      # Check if we try to supply an empty value
21764      if test "x$ZIPEXE" = x; then
21765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21766$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21768$as_echo_n "checking for ZIPEXE... " >&6; }
21769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21770$as_echo "disabled" >&6; }
21771      else
21772        # Check if the provided tool contains a complete path.
21773        tool_specified="$ZIPEXE"
21774        tool_basename="${tool_specified##*/}"
21775        if test "x$tool_basename" = "x$tool_specified"; then
21776          # A command without a complete path is provided, search $PATH.
21777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21778$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21779          # Extract the first word of "$tool_basename", so it can be a program name with args.
21780set dummy $tool_basename; ac_word=$2
21781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21782$as_echo_n "checking for $ac_word... " >&6; }
21783if ${ac_cv_path_ZIPEXE+:} false; then :
21784  $as_echo_n "(cached) " >&6
21785else
21786  case $ZIPEXE in
21787  [\\/]* | ?:[\\/]*)
21788  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21789  ;;
21790  *)
21791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21792for as_dir in $PATH
21793do
21794  IFS=$as_save_IFS
21795  test -z "$as_dir" && as_dir=.
21796    for ac_exec_ext in '' $ac_executable_extensions; do
21797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21798    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21800    break 2
21801  fi
21802done
21803  done
21804IFS=$as_save_IFS
21805
21806  ;;
21807esac
21808fi
21809ZIPEXE=$ac_cv_path_ZIPEXE
21810if test -n "$ZIPEXE"; then
21811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21812$as_echo "$ZIPEXE" >&6; }
21813else
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21815$as_echo "no" >&6; }
21816fi
21817
21818
21819          if test "x$ZIPEXE" = x; then
21820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21821          fi
21822        else
21823          # Otherwise we believe it is a complete path. Use it as it is.
21824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21825$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21827$as_echo_n "checking for ZIPEXE... " >&6; }
21828          if test ! -x "$tool_specified"; then
21829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21830$as_echo "not found" >&6; }
21831            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21832          fi
21833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21834$as_echo "$tool_specified" >&6; }
21835        fi
21836      fi
21837    fi
21838
21839  fi
21840
21841
21842
21843  if test "x$ZIPEXE" = x; then
21844    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21845  fi
21846
21847
21848
21849  # Non-required basic tools
21850
21851
21852
21853  # Publish this variable in the help.
21854
21855
21856  if [ -z "${LDD+x}" ]; then
21857    # The variable is not set by user, try to locate tool using the code snippet
21858    for ac_prog in ldd
21859do
21860  # Extract the first word of "$ac_prog", so it can be a program name with args.
21861set dummy $ac_prog; ac_word=$2
21862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21863$as_echo_n "checking for $ac_word... " >&6; }
21864if ${ac_cv_path_LDD+:} false; then :
21865  $as_echo_n "(cached) " >&6
21866else
21867  case $LDD in
21868  [\\/]* | ?:[\\/]*)
21869  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21870  ;;
21871  *)
21872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21873for as_dir in $PATH
21874do
21875  IFS=$as_save_IFS
21876  test -z "$as_dir" && as_dir=.
21877    for ac_exec_ext in '' $ac_executable_extensions; do
21878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21879    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21881    break 2
21882  fi
21883done
21884  done
21885IFS=$as_save_IFS
21886
21887  ;;
21888esac
21889fi
21890LDD=$ac_cv_path_LDD
21891if test -n "$LDD"; then
21892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21893$as_echo "$LDD" >&6; }
21894else
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21896$as_echo "no" >&6; }
21897fi
21898
21899
21900  test -n "$LDD" && break
21901done
21902
21903  else
21904    # The variable is set, but is it from the command line or the environment?
21905
21906    # Try to remove the string !LDD! from our list.
21907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21909      # If it failed, the variable was not from the command line. Ignore it,
21910      # but warn the user (except for BASH, which is always set by the calling BASH).
21911      if test "xLDD" != xBASH; then
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21913$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21914      fi
21915      # Try to locate tool using the code snippet
21916      for ac_prog in ldd
21917do
21918  # Extract the first word of "$ac_prog", so it can be a program name with args.
21919set dummy $ac_prog; ac_word=$2
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21921$as_echo_n "checking for $ac_word... " >&6; }
21922if ${ac_cv_path_LDD+:} false; then :
21923  $as_echo_n "(cached) " >&6
21924else
21925  case $LDD in
21926  [\\/]* | ?:[\\/]*)
21927  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21928  ;;
21929  *)
21930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931for as_dir in $PATH
21932do
21933  IFS=$as_save_IFS
21934  test -z "$as_dir" && as_dir=.
21935    for ac_exec_ext in '' $ac_executable_extensions; do
21936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21937    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939    break 2
21940  fi
21941done
21942  done
21943IFS=$as_save_IFS
21944
21945  ;;
21946esac
21947fi
21948LDD=$ac_cv_path_LDD
21949if test -n "$LDD"; then
21950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21951$as_echo "$LDD" >&6; }
21952else
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21954$as_echo "no" >&6; }
21955fi
21956
21957
21958  test -n "$LDD" && break
21959done
21960
21961    else
21962      # If it succeeded, then it was overridden by the user. We will use it
21963      # for the tool.
21964
21965      # First remove it from the list of overridden variables, so we can test
21966      # for unknown variables in the end.
21967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21968
21969      # Check if we try to supply an empty value
21970      if test "x$LDD" = x; then
21971        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21972$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21974$as_echo_n "checking for LDD... " >&6; }
21975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21976$as_echo "disabled" >&6; }
21977      else
21978        # Check if the provided tool contains a complete path.
21979        tool_specified="$LDD"
21980        tool_basename="${tool_specified##*/}"
21981        if test "x$tool_basename" = "x$tool_specified"; then
21982          # A command without a complete path is provided, search $PATH.
21983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21984$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21985          # Extract the first word of "$tool_basename", so it can be a program name with args.
21986set dummy $tool_basename; ac_word=$2
21987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21988$as_echo_n "checking for $ac_word... " >&6; }
21989if ${ac_cv_path_LDD+:} false; then :
21990  $as_echo_n "(cached) " >&6
21991else
21992  case $LDD in
21993  [\\/]* | ?:[\\/]*)
21994  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21995  ;;
21996  *)
21997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21998for as_dir in $PATH
21999do
22000  IFS=$as_save_IFS
22001  test -z "$as_dir" && as_dir=.
22002    for ac_exec_ext in '' $ac_executable_extensions; do
22003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22004    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22006    break 2
22007  fi
22008done
22009  done
22010IFS=$as_save_IFS
22011
22012  ;;
22013esac
22014fi
22015LDD=$ac_cv_path_LDD
22016if test -n "$LDD"; then
22017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22018$as_echo "$LDD" >&6; }
22019else
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22021$as_echo "no" >&6; }
22022fi
22023
22024
22025          if test "x$LDD" = x; then
22026            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22027          fi
22028        else
22029          # Otherwise we believe it is a complete path. Use it as it is.
22030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22031$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22032          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22033$as_echo_n "checking for LDD... " >&6; }
22034          if test ! -x "$tool_specified"; then
22035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22036$as_echo "not found" >&6; }
22037            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22038          fi
22039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22040$as_echo "$tool_specified" >&6; }
22041        fi
22042      fi
22043    fi
22044
22045  fi
22046
22047
22048  if test "x$LDD" = "x"; then
22049    # List shared lib dependencies is used for
22050    # debug output and checking for forbidden dependencies.
22051    # We can build without it.
22052    LDD="true"
22053  fi
22054
22055
22056  # Publish this variable in the help.
22057
22058
22059  if [ -z "${OTOOL+x}" ]; then
22060    # The variable is not set by user, try to locate tool using the code snippet
22061    for ac_prog in otool
22062do
22063  # Extract the first word of "$ac_prog", so it can be a program name with args.
22064set dummy $ac_prog; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_path_OTOOL+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  case $OTOOL in
22071  [\\/]* | ?:[\\/]*)
22072  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22073  ;;
22074  *)
22075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22076for as_dir in $PATH
22077do
22078  IFS=$as_save_IFS
22079  test -z "$as_dir" && as_dir=.
22080    for ac_exec_ext in '' $ac_executable_extensions; do
22081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22082    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22084    break 2
22085  fi
22086done
22087  done
22088IFS=$as_save_IFS
22089
22090  ;;
22091esac
22092fi
22093OTOOL=$ac_cv_path_OTOOL
22094if test -n "$OTOOL"; then
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22096$as_echo "$OTOOL" >&6; }
22097else
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22099$as_echo "no" >&6; }
22100fi
22101
22102
22103  test -n "$OTOOL" && break
22104done
22105
22106  else
22107    # The variable is set, but is it from the command line or the environment?
22108
22109    # Try to remove the string !OTOOL! from our list.
22110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22112      # If it failed, the variable was not from the command line. Ignore it,
22113      # but warn the user (except for BASH, which is always set by the calling BASH).
22114      if test "xOTOOL" != xBASH; then
22115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22116$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22117      fi
22118      # Try to locate tool using the code snippet
22119      for ac_prog in otool
22120do
22121  # Extract the first word of "$ac_prog", so it can be a program name with args.
22122set dummy $ac_prog; ac_word=$2
22123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22124$as_echo_n "checking for $ac_word... " >&6; }
22125if ${ac_cv_path_OTOOL+:} false; then :
22126  $as_echo_n "(cached) " >&6
22127else
22128  case $OTOOL in
22129  [\\/]* | ?:[\\/]*)
22130  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22131  ;;
22132  *)
22133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22134for as_dir in $PATH
22135do
22136  IFS=$as_save_IFS
22137  test -z "$as_dir" && as_dir=.
22138    for ac_exec_ext in '' $ac_executable_extensions; do
22139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22140    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22142    break 2
22143  fi
22144done
22145  done
22146IFS=$as_save_IFS
22147
22148  ;;
22149esac
22150fi
22151OTOOL=$ac_cv_path_OTOOL
22152if test -n "$OTOOL"; then
22153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22154$as_echo "$OTOOL" >&6; }
22155else
22156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22157$as_echo "no" >&6; }
22158fi
22159
22160
22161  test -n "$OTOOL" && break
22162done
22163
22164    else
22165      # If it succeeded, then it was overridden by the user. We will use it
22166      # for the tool.
22167
22168      # First remove it from the list of overridden variables, so we can test
22169      # for unknown variables in the end.
22170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22171
22172      # Check if we try to supply an empty value
22173      if test "x$OTOOL" = x; then
22174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22175$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22177$as_echo_n "checking for OTOOL... " >&6; }
22178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22179$as_echo "disabled" >&6; }
22180      else
22181        # Check if the provided tool contains a complete path.
22182        tool_specified="$OTOOL"
22183        tool_basename="${tool_specified##*/}"
22184        if test "x$tool_basename" = "x$tool_specified"; then
22185          # A command without a complete path is provided, search $PATH.
22186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22187$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22188          # Extract the first word of "$tool_basename", so it can be a program name with args.
22189set dummy $tool_basename; ac_word=$2
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22191$as_echo_n "checking for $ac_word... " >&6; }
22192if ${ac_cv_path_OTOOL+:} false; then :
22193  $as_echo_n "(cached) " >&6
22194else
22195  case $OTOOL in
22196  [\\/]* | ?:[\\/]*)
22197  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22198  ;;
22199  *)
22200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22201for as_dir in $PATH
22202do
22203  IFS=$as_save_IFS
22204  test -z "$as_dir" && as_dir=.
22205    for ac_exec_ext in '' $ac_executable_extensions; do
22206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22207    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22209    break 2
22210  fi
22211done
22212  done
22213IFS=$as_save_IFS
22214
22215  ;;
22216esac
22217fi
22218OTOOL=$ac_cv_path_OTOOL
22219if test -n "$OTOOL"; then
22220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22221$as_echo "$OTOOL" >&6; }
22222else
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22224$as_echo "no" >&6; }
22225fi
22226
22227
22228          if test "x$OTOOL" = x; then
22229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22230          fi
22231        else
22232          # Otherwise we believe it is a complete path. Use it as it is.
22233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22234$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22236$as_echo_n "checking for OTOOL... " >&6; }
22237          if test ! -x "$tool_specified"; then
22238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22239$as_echo "not found" >&6; }
22240            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22241          fi
22242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22243$as_echo "$tool_specified" >&6; }
22244        fi
22245      fi
22246    fi
22247
22248  fi
22249
22250
22251  if test "x$OTOOL" = "x"; then
22252    OTOOL="true"
22253  fi
22254
22255
22256  # Publish this variable in the help.
22257
22258
22259  if [ -z "${READELF+x}" ]; then
22260    # The variable is not set by user, try to locate tool using the code snippet
22261    for ac_prog in greadelf readelf
22262do
22263  # Extract the first word of "$ac_prog", so it can be a program name with args.
22264set dummy $ac_prog; ac_word=$2
22265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22266$as_echo_n "checking for $ac_word... " >&6; }
22267if ${ac_cv_path_READELF+:} false; then :
22268  $as_echo_n "(cached) " >&6
22269else
22270  case $READELF in
22271  [\\/]* | ?:[\\/]*)
22272  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22273  ;;
22274  *)
22275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22276for as_dir in $PATH
22277do
22278  IFS=$as_save_IFS
22279  test -z "$as_dir" && as_dir=.
22280    for ac_exec_ext in '' $ac_executable_extensions; do
22281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22282    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22284    break 2
22285  fi
22286done
22287  done
22288IFS=$as_save_IFS
22289
22290  ;;
22291esac
22292fi
22293READELF=$ac_cv_path_READELF
22294if test -n "$READELF"; then
22295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22296$as_echo "$READELF" >&6; }
22297else
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22299$as_echo "no" >&6; }
22300fi
22301
22302
22303  test -n "$READELF" && break
22304done
22305
22306  else
22307    # The variable is set, but is it from the command line or the environment?
22308
22309    # Try to remove the string !READELF! from our list.
22310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22312      # If it failed, the variable was not from the command line. Ignore it,
22313      # but warn the user (except for BASH, which is always set by the calling BASH).
22314      if test "xREADELF" != xBASH; then
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22316$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22317      fi
22318      # Try to locate tool using the code snippet
22319      for ac_prog in greadelf readelf
22320do
22321  # Extract the first word of "$ac_prog", so it can be a program name with args.
22322set dummy $ac_prog; ac_word=$2
22323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22324$as_echo_n "checking for $ac_word... " >&6; }
22325if ${ac_cv_path_READELF+:} false; then :
22326  $as_echo_n "(cached) " >&6
22327else
22328  case $READELF in
22329  [\\/]* | ?:[\\/]*)
22330  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22331  ;;
22332  *)
22333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22334for as_dir in $PATH
22335do
22336  IFS=$as_save_IFS
22337  test -z "$as_dir" && as_dir=.
22338    for ac_exec_ext in '' $ac_executable_extensions; do
22339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22340    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22342    break 2
22343  fi
22344done
22345  done
22346IFS=$as_save_IFS
22347
22348  ;;
22349esac
22350fi
22351READELF=$ac_cv_path_READELF
22352if test -n "$READELF"; then
22353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22354$as_echo "$READELF" >&6; }
22355else
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22357$as_echo "no" >&6; }
22358fi
22359
22360
22361  test -n "$READELF" && break
22362done
22363
22364    else
22365      # If it succeeded, then it was overridden by the user. We will use it
22366      # for the tool.
22367
22368      # First remove it from the list of overridden variables, so we can test
22369      # for unknown variables in the end.
22370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22371
22372      # Check if we try to supply an empty value
22373      if test "x$READELF" = x; then
22374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22375$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22377$as_echo_n "checking for READELF... " >&6; }
22378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22379$as_echo "disabled" >&6; }
22380      else
22381        # Check if the provided tool contains a complete path.
22382        tool_specified="$READELF"
22383        tool_basename="${tool_specified##*/}"
22384        if test "x$tool_basename" = "x$tool_specified"; then
22385          # A command without a complete path is provided, search $PATH.
22386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22387$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22388          # Extract the first word of "$tool_basename", so it can be a program name with args.
22389set dummy $tool_basename; ac_word=$2
22390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22391$as_echo_n "checking for $ac_word... " >&6; }
22392if ${ac_cv_path_READELF+:} false; then :
22393  $as_echo_n "(cached) " >&6
22394else
22395  case $READELF in
22396  [\\/]* | ?:[\\/]*)
22397  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22398  ;;
22399  *)
22400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22401for as_dir in $PATH
22402do
22403  IFS=$as_save_IFS
22404  test -z "$as_dir" && as_dir=.
22405    for ac_exec_ext in '' $ac_executable_extensions; do
22406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22407    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22409    break 2
22410  fi
22411done
22412  done
22413IFS=$as_save_IFS
22414
22415  ;;
22416esac
22417fi
22418READELF=$ac_cv_path_READELF
22419if test -n "$READELF"; then
22420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22421$as_echo "$READELF" >&6; }
22422else
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22424$as_echo "no" >&6; }
22425fi
22426
22427
22428          if test "x$READELF" = x; then
22429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22430          fi
22431        else
22432          # Otherwise we believe it is a complete path. Use it as it is.
22433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22434$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22436$as_echo_n "checking for READELF... " >&6; }
22437          if test ! -x "$tool_specified"; then
22438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22439$as_echo "not found" >&6; }
22440            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22441          fi
22442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22443$as_echo "$tool_specified" >&6; }
22444        fi
22445      fi
22446    fi
22447
22448  fi
22449
22450
22451
22452
22453  # Publish this variable in the help.
22454
22455
22456  if [ -z "${DOT+x}" ]; then
22457    # The variable is not set by user, try to locate tool using the code snippet
22458    for ac_prog in dot
22459do
22460  # Extract the first word of "$ac_prog", so it can be a program name with args.
22461set dummy $ac_prog; ac_word=$2
22462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22463$as_echo_n "checking for $ac_word... " >&6; }
22464if ${ac_cv_path_DOT+:} false; then :
22465  $as_echo_n "(cached) " >&6
22466else
22467  case $DOT in
22468  [\\/]* | ?:[\\/]*)
22469  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22470  ;;
22471  *)
22472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22473for as_dir in $PATH
22474do
22475  IFS=$as_save_IFS
22476  test -z "$as_dir" && as_dir=.
22477    for ac_exec_ext in '' $ac_executable_extensions; do
22478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22479    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22481    break 2
22482  fi
22483done
22484  done
22485IFS=$as_save_IFS
22486
22487  ;;
22488esac
22489fi
22490DOT=$ac_cv_path_DOT
22491if test -n "$DOT"; then
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22493$as_echo "$DOT" >&6; }
22494else
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22496$as_echo "no" >&6; }
22497fi
22498
22499
22500  test -n "$DOT" && break
22501done
22502
22503  else
22504    # The variable is set, but is it from the command line or the environment?
22505
22506    # Try to remove the string !DOT! from our list.
22507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22509      # If it failed, the variable was not from the command line. Ignore it,
22510      # but warn the user (except for BASH, which is always set by the calling BASH).
22511      if test "xDOT" != xBASH; then
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22513$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22514      fi
22515      # Try to locate tool using the code snippet
22516      for ac_prog in dot
22517do
22518  # Extract the first word of "$ac_prog", so it can be a program name with args.
22519set dummy $ac_prog; ac_word=$2
22520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22521$as_echo_n "checking for $ac_word... " >&6; }
22522if ${ac_cv_path_DOT+:} false; then :
22523  $as_echo_n "(cached) " >&6
22524else
22525  case $DOT in
22526  [\\/]* | ?:[\\/]*)
22527  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22528  ;;
22529  *)
22530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531for as_dir in $PATH
22532do
22533  IFS=$as_save_IFS
22534  test -z "$as_dir" && as_dir=.
22535    for ac_exec_ext in '' $ac_executable_extensions; do
22536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22539    break 2
22540  fi
22541done
22542  done
22543IFS=$as_save_IFS
22544
22545  ;;
22546esac
22547fi
22548DOT=$ac_cv_path_DOT
22549if test -n "$DOT"; then
22550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22551$as_echo "$DOT" >&6; }
22552else
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22554$as_echo "no" >&6; }
22555fi
22556
22557
22558  test -n "$DOT" && break
22559done
22560
22561    else
22562      # If it succeeded, then it was overridden by the user. We will use it
22563      # for the tool.
22564
22565      # First remove it from the list of overridden variables, so we can test
22566      # for unknown variables in the end.
22567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22568
22569      # Check if we try to supply an empty value
22570      if test "x$DOT" = x; then
22571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22572$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22574$as_echo_n "checking for DOT... " >&6; }
22575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22576$as_echo "disabled" >&6; }
22577      else
22578        # Check if the provided tool contains a complete path.
22579        tool_specified="$DOT"
22580        tool_basename="${tool_specified##*/}"
22581        if test "x$tool_basename" = "x$tool_specified"; then
22582          # A command without a complete path is provided, search $PATH.
22583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22584$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22585          # Extract the first word of "$tool_basename", so it can be a program name with args.
22586set dummy $tool_basename; ac_word=$2
22587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22588$as_echo_n "checking for $ac_word... " >&6; }
22589if ${ac_cv_path_DOT+:} false; then :
22590  $as_echo_n "(cached) " >&6
22591else
22592  case $DOT in
22593  [\\/]* | ?:[\\/]*)
22594  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22595  ;;
22596  *)
22597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598for as_dir in $PATH
22599do
22600  IFS=$as_save_IFS
22601  test -z "$as_dir" && as_dir=.
22602    for ac_exec_ext in '' $ac_executable_extensions; do
22603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22606    break 2
22607  fi
22608done
22609  done
22610IFS=$as_save_IFS
22611
22612  ;;
22613esac
22614fi
22615DOT=$ac_cv_path_DOT
22616if test -n "$DOT"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22618$as_echo "$DOT" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624
22625          if test "x$DOT" = x; then
22626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22627          fi
22628        else
22629          # Otherwise we believe it is a complete path. Use it as it is.
22630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22631$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22633$as_echo_n "checking for DOT... " >&6; }
22634          if test ! -x "$tool_specified"; then
22635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22636$as_echo "not found" >&6; }
22637            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22638          fi
22639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22640$as_echo "$tool_specified" >&6; }
22641        fi
22642      fi
22643    fi
22644
22645  fi
22646
22647
22648
22649
22650  # Publish this variable in the help.
22651
22652
22653  if [ -z "${HG+x}" ]; then
22654    # The variable is not set by user, try to locate tool using the code snippet
22655    for ac_prog in hg
22656do
22657  # Extract the first word of "$ac_prog", so it can be a program name with args.
22658set dummy $ac_prog; ac_word=$2
22659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22660$as_echo_n "checking for $ac_word... " >&6; }
22661if ${ac_cv_path_HG+:} false; then :
22662  $as_echo_n "(cached) " >&6
22663else
22664  case $HG in
22665  [\\/]* | ?:[\\/]*)
22666  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22667  ;;
22668  *)
22669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22670for as_dir in $PATH
22671do
22672  IFS=$as_save_IFS
22673  test -z "$as_dir" && as_dir=.
22674    for ac_exec_ext in '' $ac_executable_extensions; do
22675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22676    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22678    break 2
22679  fi
22680done
22681  done
22682IFS=$as_save_IFS
22683
22684  ;;
22685esac
22686fi
22687HG=$ac_cv_path_HG
22688if test -n "$HG"; then
22689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22690$as_echo "$HG" >&6; }
22691else
22692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22693$as_echo "no" >&6; }
22694fi
22695
22696
22697  test -n "$HG" && break
22698done
22699
22700  else
22701    # The variable is set, but is it from the command line or the environment?
22702
22703    # Try to remove the string !HG! from our list.
22704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22706      # If it failed, the variable was not from the command line. Ignore it,
22707      # but warn the user (except for BASH, which is always set by the calling BASH).
22708      if test "xHG" != xBASH; then
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22710$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22711      fi
22712      # Try to locate tool using the code snippet
22713      for ac_prog in hg
22714do
22715  # Extract the first word of "$ac_prog", so it can be a program name with args.
22716set dummy $ac_prog; ac_word=$2
22717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22718$as_echo_n "checking for $ac_word... " >&6; }
22719if ${ac_cv_path_HG+:} false; then :
22720  $as_echo_n "(cached) " >&6
22721else
22722  case $HG in
22723  [\\/]* | ?:[\\/]*)
22724  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22725  ;;
22726  *)
22727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22728for as_dir in $PATH
22729do
22730  IFS=$as_save_IFS
22731  test -z "$as_dir" && as_dir=.
22732    for ac_exec_ext in '' $ac_executable_extensions; do
22733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22734    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22736    break 2
22737  fi
22738done
22739  done
22740IFS=$as_save_IFS
22741
22742  ;;
22743esac
22744fi
22745HG=$ac_cv_path_HG
22746if test -n "$HG"; then
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22748$as_echo "$HG" >&6; }
22749else
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22751$as_echo "no" >&6; }
22752fi
22753
22754
22755  test -n "$HG" && break
22756done
22757
22758    else
22759      # If it succeeded, then it was overridden by the user. We will use it
22760      # for the tool.
22761
22762      # First remove it from the list of overridden variables, so we can test
22763      # for unknown variables in the end.
22764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22765
22766      # Check if we try to supply an empty value
22767      if test "x$HG" = x; then
22768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22769$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22771$as_echo_n "checking for HG... " >&6; }
22772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22773$as_echo "disabled" >&6; }
22774      else
22775        # Check if the provided tool contains a complete path.
22776        tool_specified="$HG"
22777        tool_basename="${tool_specified##*/}"
22778        if test "x$tool_basename" = "x$tool_specified"; then
22779          # A command without a complete path is provided, search $PATH.
22780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22781$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22782          # Extract the first word of "$tool_basename", so it can be a program name with args.
22783set dummy $tool_basename; ac_word=$2
22784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22785$as_echo_n "checking for $ac_word... " >&6; }
22786if ${ac_cv_path_HG+:} false; then :
22787  $as_echo_n "(cached) " >&6
22788else
22789  case $HG in
22790  [\\/]* | ?:[\\/]*)
22791  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22792  ;;
22793  *)
22794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22795for as_dir in $PATH
22796do
22797  IFS=$as_save_IFS
22798  test -z "$as_dir" && as_dir=.
22799    for ac_exec_ext in '' $ac_executable_extensions; do
22800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22801    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22803    break 2
22804  fi
22805done
22806  done
22807IFS=$as_save_IFS
22808
22809  ;;
22810esac
22811fi
22812HG=$ac_cv_path_HG
22813if test -n "$HG"; then
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22815$as_echo "$HG" >&6; }
22816else
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22818$as_echo "no" >&6; }
22819fi
22820
22821
22822          if test "x$HG" = x; then
22823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22824          fi
22825        else
22826          # Otherwise we believe it is a complete path. Use it as it is.
22827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22828$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22830$as_echo_n "checking for HG... " >&6; }
22831          if test ! -x "$tool_specified"; then
22832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22833$as_echo "not found" >&6; }
22834            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22835          fi
22836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22837$as_echo "$tool_specified" >&6; }
22838        fi
22839      fi
22840    fi
22841
22842  fi
22843
22844
22845
22846
22847  # Publish this variable in the help.
22848
22849
22850  if [ -z "${STAT+x}" ]; then
22851    # The variable is not set by user, try to locate tool using the code snippet
22852    for ac_prog in stat
22853do
22854  # Extract the first word of "$ac_prog", so it can be a program name with args.
22855set dummy $ac_prog; ac_word=$2
22856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22857$as_echo_n "checking for $ac_word... " >&6; }
22858if ${ac_cv_path_STAT+:} false; then :
22859  $as_echo_n "(cached) " >&6
22860else
22861  case $STAT in
22862  [\\/]* | ?:[\\/]*)
22863  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22864  ;;
22865  *)
22866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22867for as_dir in $PATH
22868do
22869  IFS=$as_save_IFS
22870  test -z "$as_dir" && as_dir=.
22871    for ac_exec_ext in '' $ac_executable_extensions; do
22872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22873    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22875    break 2
22876  fi
22877done
22878  done
22879IFS=$as_save_IFS
22880
22881  ;;
22882esac
22883fi
22884STAT=$ac_cv_path_STAT
22885if test -n "$STAT"; then
22886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22887$as_echo "$STAT" >&6; }
22888else
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22890$as_echo "no" >&6; }
22891fi
22892
22893
22894  test -n "$STAT" && break
22895done
22896
22897  else
22898    # The variable is set, but is it from the command line or the environment?
22899
22900    # Try to remove the string !STAT! from our list.
22901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22903      # If it failed, the variable was not from the command line. Ignore it,
22904      # but warn the user (except for BASH, which is always set by the calling BASH).
22905      if test "xSTAT" != xBASH; then
22906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22907$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22908      fi
22909      # Try to locate tool using the code snippet
22910      for ac_prog in stat
22911do
22912  # Extract the first word of "$ac_prog", so it can be a program name with args.
22913set dummy $ac_prog; ac_word=$2
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915$as_echo_n "checking for $ac_word... " >&6; }
22916if ${ac_cv_path_STAT+:} false; then :
22917  $as_echo_n "(cached) " >&6
22918else
22919  case $STAT in
22920  [\\/]* | ?:[\\/]*)
22921  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22922  ;;
22923  *)
22924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925for as_dir in $PATH
22926do
22927  IFS=$as_save_IFS
22928  test -z "$as_dir" && as_dir=.
22929    for ac_exec_ext in '' $ac_executable_extensions; do
22930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933    break 2
22934  fi
22935done
22936  done
22937IFS=$as_save_IFS
22938
22939  ;;
22940esac
22941fi
22942STAT=$ac_cv_path_STAT
22943if test -n "$STAT"; then
22944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22945$as_echo "$STAT" >&6; }
22946else
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948$as_echo "no" >&6; }
22949fi
22950
22951
22952  test -n "$STAT" && break
22953done
22954
22955    else
22956      # If it succeeded, then it was overridden by the user. We will use it
22957      # for the tool.
22958
22959      # First remove it from the list of overridden variables, so we can test
22960      # for unknown variables in the end.
22961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22962
22963      # Check if we try to supply an empty value
22964      if test "x$STAT" = x; then
22965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22966$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22968$as_echo_n "checking for STAT... " >&6; }
22969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22970$as_echo "disabled" >&6; }
22971      else
22972        # Check if the provided tool contains a complete path.
22973        tool_specified="$STAT"
22974        tool_basename="${tool_specified##*/}"
22975        if test "x$tool_basename" = "x$tool_specified"; then
22976          # A command without a complete path is provided, search $PATH.
22977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22978$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22979          # Extract the first word of "$tool_basename", so it can be a program name with args.
22980set dummy $tool_basename; ac_word=$2
22981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22982$as_echo_n "checking for $ac_word... " >&6; }
22983if ${ac_cv_path_STAT+:} false; then :
22984  $as_echo_n "(cached) " >&6
22985else
22986  case $STAT in
22987  [\\/]* | ?:[\\/]*)
22988  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22989  ;;
22990  *)
22991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22992for as_dir in $PATH
22993do
22994  IFS=$as_save_IFS
22995  test -z "$as_dir" && as_dir=.
22996    for ac_exec_ext in '' $ac_executable_extensions; do
22997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22998    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23000    break 2
23001  fi
23002done
23003  done
23004IFS=$as_save_IFS
23005
23006  ;;
23007esac
23008fi
23009STAT=$ac_cv_path_STAT
23010if test -n "$STAT"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23012$as_echo "$STAT" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019          if test "x$STAT" = x; then
23020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23021          fi
23022        else
23023          # Otherwise we believe it is a complete path. Use it as it is.
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23025$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23027$as_echo_n "checking for STAT... " >&6; }
23028          if test ! -x "$tool_specified"; then
23029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23030$as_echo "not found" >&6; }
23031            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23032          fi
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23034$as_echo "$tool_specified" >&6; }
23035        fi
23036      fi
23037    fi
23038
23039  fi
23040
23041
23042
23043
23044  # Publish this variable in the help.
23045
23046
23047  if [ -z "${TIME+x}" ]; then
23048    # The variable is not set by user, try to locate tool using the code snippet
23049    for ac_prog in time
23050do
23051  # Extract the first word of "$ac_prog", so it can be a program name with args.
23052set dummy $ac_prog; ac_word=$2
23053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23054$as_echo_n "checking for $ac_word... " >&6; }
23055if ${ac_cv_path_TIME+:} false; then :
23056  $as_echo_n "(cached) " >&6
23057else
23058  case $TIME in
23059  [\\/]* | ?:[\\/]*)
23060  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23061  ;;
23062  *)
23063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23064for as_dir in $PATH
23065do
23066  IFS=$as_save_IFS
23067  test -z "$as_dir" && as_dir=.
23068    for ac_exec_ext in '' $ac_executable_extensions; do
23069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23070    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23072    break 2
23073  fi
23074done
23075  done
23076IFS=$as_save_IFS
23077
23078  ;;
23079esac
23080fi
23081TIME=$ac_cv_path_TIME
23082if test -n "$TIME"; then
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23084$as_echo "$TIME" >&6; }
23085else
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23087$as_echo "no" >&6; }
23088fi
23089
23090
23091  test -n "$TIME" && break
23092done
23093
23094  else
23095    # The variable is set, but is it from the command line or the environment?
23096
23097    # Try to remove the string !TIME! from our list.
23098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23100      # If it failed, the variable was not from the command line. Ignore it,
23101      # but warn the user (except for BASH, which is always set by the calling BASH).
23102      if test "xTIME" != xBASH; then
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23104$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23105      fi
23106      # Try to locate tool using the code snippet
23107      for ac_prog in time
23108do
23109  # Extract the first word of "$ac_prog", so it can be a program name with args.
23110set dummy $ac_prog; ac_word=$2
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112$as_echo_n "checking for $ac_word... " >&6; }
23113if ${ac_cv_path_TIME+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116  case $TIME in
23117  [\\/]* | ?:[\\/]*)
23118  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23119  ;;
23120  *)
23121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122for as_dir in $PATH
23123do
23124  IFS=$as_save_IFS
23125  test -z "$as_dir" && as_dir=.
23126    for ac_exec_ext in '' $ac_executable_extensions; do
23127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130    break 2
23131  fi
23132done
23133  done
23134IFS=$as_save_IFS
23135
23136  ;;
23137esac
23138fi
23139TIME=$ac_cv_path_TIME
23140if test -n "$TIME"; then
23141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23142$as_echo "$TIME" >&6; }
23143else
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145$as_echo "no" >&6; }
23146fi
23147
23148
23149  test -n "$TIME" && break
23150done
23151
23152    else
23153      # If it succeeded, then it was overridden by the user. We will use it
23154      # for the tool.
23155
23156      # First remove it from the list of overridden variables, so we can test
23157      # for unknown variables in the end.
23158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23159
23160      # Check if we try to supply an empty value
23161      if test "x$TIME" = x; then
23162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23163$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23165$as_echo_n "checking for TIME... " >&6; }
23166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23167$as_echo "disabled" >&6; }
23168      else
23169        # Check if the provided tool contains a complete path.
23170        tool_specified="$TIME"
23171        tool_basename="${tool_specified##*/}"
23172        if test "x$tool_basename" = "x$tool_specified"; then
23173          # A command without a complete path is provided, search $PATH.
23174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23175$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23176          # Extract the first word of "$tool_basename", so it can be a program name with args.
23177set dummy $tool_basename; ac_word=$2
23178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23179$as_echo_n "checking for $ac_word... " >&6; }
23180if ${ac_cv_path_TIME+:} false; then :
23181  $as_echo_n "(cached) " >&6
23182else
23183  case $TIME in
23184  [\\/]* | ?:[\\/]*)
23185  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23186  ;;
23187  *)
23188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189for as_dir in $PATH
23190do
23191  IFS=$as_save_IFS
23192  test -z "$as_dir" && as_dir=.
23193    for ac_exec_ext in '' $ac_executable_extensions; do
23194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23195    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23197    break 2
23198  fi
23199done
23200  done
23201IFS=$as_save_IFS
23202
23203  ;;
23204esac
23205fi
23206TIME=$ac_cv_path_TIME
23207if test -n "$TIME"; then
23208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23209$as_echo "$TIME" >&6; }
23210else
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23212$as_echo "no" >&6; }
23213fi
23214
23215
23216          if test "x$TIME" = x; then
23217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23218          fi
23219        else
23220          # Otherwise we believe it is a complete path. Use it as it is.
23221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23222$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23224$as_echo_n "checking for TIME... " >&6; }
23225          if test ! -x "$tool_specified"; then
23226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23227$as_echo "not found" >&6; }
23228            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23229          fi
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23231$as_echo "$tool_specified" >&6; }
23232        fi
23233      fi
23234    fi
23235
23236  fi
23237
23238
23239
23240
23241  # Publish this variable in the help.
23242
23243
23244  if [ -z "${FLOCK+x}" ]; then
23245    # The variable is not set by user, try to locate tool using the code snippet
23246    for ac_prog in flock
23247do
23248  # Extract the first word of "$ac_prog", so it can be a program name with args.
23249set dummy $ac_prog; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if ${ac_cv_path_FLOCK+:} false; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  case $FLOCK in
23256  [\\/]* | ?:[\\/]*)
23257  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23258  ;;
23259  *)
23260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23261for as_dir in $PATH
23262do
23263  IFS=$as_save_IFS
23264  test -z "$as_dir" && as_dir=.
23265    for ac_exec_ext in '' $ac_executable_extensions; do
23266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23267    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23269    break 2
23270  fi
23271done
23272  done
23273IFS=$as_save_IFS
23274
23275  ;;
23276esac
23277fi
23278FLOCK=$ac_cv_path_FLOCK
23279if test -n "$FLOCK"; then
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23281$as_echo "$FLOCK" >&6; }
23282else
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23284$as_echo "no" >&6; }
23285fi
23286
23287
23288  test -n "$FLOCK" && break
23289done
23290
23291  else
23292    # The variable is set, but is it from the command line or the environment?
23293
23294    # Try to remove the string !FLOCK! from our list.
23295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23297      # If it failed, the variable was not from the command line. Ignore it,
23298      # but warn the user (except for BASH, which is always set by the calling BASH).
23299      if test "xFLOCK" != xBASH; then
23300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23301$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23302      fi
23303      # Try to locate tool using the code snippet
23304      for ac_prog in flock
23305do
23306  # Extract the first word of "$ac_prog", so it can be a program name with args.
23307set dummy $ac_prog; ac_word=$2
23308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23309$as_echo_n "checking for $ac_word... " >&6; }
23310if ${ac_cv_path_FLOCK+:} false; then :
23311  $as_echo_n "(cached) " >&6
23312else
23313  case $FLOCK in
23314  [\\/]* | ?:[\\/]*)
23315  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23316  ;;
23317  *)
23318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23319for as_dir in $PATH
23320do
23321  IFS=$as_save_IFS
23322  test -z "$as_dir" && as_dir=.
23323    for ac_exec_ext in '' $ac_executable_extensions; do
23324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23325    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23327    break 2
23328  fi
23329done
23330  done
23331IFS=$as_save_IFS
23332
23333  ;;
23334esac
23335fi
23336FLOCK=$ac_cv_path_FLOCK
23337if test -n "$FLOCK"; then
23338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23339$as_echo "$FLOCK" >&6; }
23340else
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23342$as_echo "no" >&6; }
23343fi
23344
23345
23346  test -n "$FLOCK" && break
23347done
23348
23349    else
23350      # If it succeeded, then it was overridden by the user. We will use it
23351      # for the tool.
23352
23353      # First remove it from the list of overridden variables, so we can test
23354      # for unknown variables in the end.
23355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23356
23357      # Check if we try to supply an empty value
23358      if test "x$FLOCK" = x; then
23359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23360$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23362$as_echo_n "checking for FLOCK... " >&6; }
23363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23364$as_echo "disabled" >&6; }
23365      else
23366        # Check if the provided tool contains a complete path.
23367        tool_specified="$FLOCK"
23368        tool_basename="${tool_specified##*/}"
23369        if test "x$tool_basename" = "x$tool_specified"; then
23370          # A command without a complete path is provided, search $PATH.
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23372$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23373          # Extract the first word of "$tool_basename", so it can be a program name with args.
23374set dummy $tool_basename; ac_word=$2
23375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23376$as_echo_n "checking for $ac_word... " >&6; }
23377if ${ac_cv_path_FLOCK+:} false; then :
23378  $as_echo_n "(cached) " >&6
23379else
23380  case $FLOCK in
23381  [\\/]* | ?:[\\/]*)
23382  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23383  ;;
23384  *)
23385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23386for as_dir in $PATH
23387do
23388  IFS=$as_save_IFS
23389  test -z "$as_dir" && as_dir=.
23390    for ac_exec_ext in '' $ac_executable_extensions; do
23391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23392    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23394    break 2
23395  fi
23396done
23397  done
23398IFS=$as_save_IFS
23399
23400  ;;
23401esac
23402fi
23403FLOCK=$ac_cv_path_FLOCK
23404if test -n "$FLOCK"; then
23405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23406$as_echo "$FLOCK" >&6; }
23407else
23408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23409$as_echo "no" >&6; }
23410fi
23411
23412
23413          if test "x$FLOCK" = x; then
23414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23415          fi
23416        else
23417          # Otherwise we believe it is a complete path. Use it as it is.
23418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23419$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23421$as_echo_n "checking for FLOCK... " >&6; }
23422          if test ! -x "$tool_specified"; then
23423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23424$as_echo "not found" >&6; }
23425            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23426          fi
23427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23428$as_echo "$tool_specified" >&6; }
23429        fi
23430      fi
23431    fi
23432
23433  fi
23434
23435
23436  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23437  # be in the user path.
23438
23439
23440  # Publish this variable in the help.
23441
23442
23443  if [ -z "${DTRACE+x}" ]; then
23444    # The variable is not set by user, try to locate tool using the code snippet
23445    for ac_prog in dtrace
23446do
23447  # Extract the first word of "$ac_prog", so it can be a program name with args.
23448set dummy $ac_prog; ac_word=$2
23449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23450$as_echo_n "checking for $ac_word... " >&6; }
23451if ${ac_cv_path_DTRACE+:} false; then :
23452  $as_echo_n "(cached) " >&6
23453else
23454  case $DTRACE in
23455  [\\/]* | ?:[\\/]*)
23456  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23457  ;;
23458  *)
23459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23460as_dummy="$PATH:/usr/sbin"
23461for as_dir in $as_dummy
23462do
23463  IFS=$as_save_IFS
23464  test -z "$as_dir" && as_dir=.
23465    for ac_exec_ext in '' $ac_executable_extensions; do
23466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23467    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23469    break 2
23470  fi
23471done
23472  done
23473IFS=$as_save_IFS
23474
23475  ;;
23476esac
23477fi
23478DTRACE=$ac_cv_path_DTRACE
23479if test -n "$DTRACE"; then
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23481$as_echo "$DTRACE" >&6; }
23482else
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23484$as_echo "no" >&6; }
23485fi
23486
23487
23488  test -n "$DTRACE" && break
23489done
23490
23491  else
23492    # The variable is set, but is it from the command line or the environment?
23493
23494    # Try to remove the string !DTRACE! from our list.
23495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23497      # If it failed, the variable was not from the command line. Ignore it,
23498      # but warn the user (except for BASH, which is always set by the calling BASH).
23499      if test "xDTRACE" != xBASH; then
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23501$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23502      fi
23503      # Try to locate tool using the code snippet
23504      for ac_prog in dtrace
23505do
23506  # Extract the first word of "$ac_prog", so it can be a program name with args.
23507set dummy $ac_prog; ac_word=$2
23508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23509$as_echo_n "checking for $ac_word... " >&6; }
23510if ${ac_cv_path_DTRACE+:} false; then :
23511  $as_echo_n "(cached) " >&6
23512else
23513  case $DTRACE in
23514  [\\/]* | ?:[\\/]*)
23515  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23516  ;;
23517  *)
23518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23519as_dummy="$PATH:/usr/sbin"
23520for as_dir in $as_dummy
23521do
23522  IFS=$as_save_IFS
23523  test -z "$as_dir" && as_dir=.
23524    for ac_exec_ext in '' $ac_executable_extensions; do
23525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23526    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23528    break 2
23529  fi
23530done
23531  done
23532IFS=$as_save_IFS
23533
23534  ;;
23535esac
23536fi
23537DTRACE=$ac_cv_path_DTRACE
23538if test -n "$DTRACE"; then
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23540$as_echo "$DTRACE" >&6; }
23541else
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23543$as_echo "no" >&6; }
23544fi
23545
23546
23547  test -n "$DTRACE" && break
23548done
23549
23550    else
23551      # If it succeeded, then it was overridden by the user. We will use it
23552      # for the tool.
23553
23554      # First remove it from the list of overridden variables, so we can test
23555      # for unknown variables in the end.
23556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23557
23558      # Check if we try to supply an empty value
23559      if test "x$DTRACE" = x; then
23560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23561$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23563$as_echo_n "checking for DTRACE... " >&6; }
23564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23565$as_echo "disabled" >&6; }
23566      else
23567        # Check if the provided tool contains a complete path.
23568        tool_specified="$DTRACE"
23569        tool_basename="${tool_specified##*/}"
23570        if test "x$tool_basename" = "x$tool_specified"; then
23571          # A command without a complete path is provided, search $PATH.
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23573$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23574          # Extract the first word of "$tool_basename", so it can be a program name with args.
23575set dummy $tool_basename; ac_word=$2
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23577$as_echo_n "checking for $ac_word... " >&6; }
23578if ${ac_cv_path_DTRACE+:} false; then :
23579  $as_echo_n "(cached) " >&6
23580else
23581  case $DTRACE in
23582  [\\/]* | ?:[\\/]*)
23583  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23584  ;;
23585  *)
23586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23587for as_dir in $PATH
23588do
23589  IFS=$as_save_IFS
23590  test -z "$as_dir" && as_dir=.
23591    for ac_exec_ext in '' $ac_executable_extensions; do
23592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23593    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23595    break 2
23596  fi
23597done
23598  done
23599IFS=$as_save_IFS
23600
23601  ;;
23602esac
23603fi
23604DTRACE=$ac_cv_path_DTRACE
23605if test -n "$DTRACE"; then
23606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23607$as_echo "$DTRACE" >&6; }
23608else
23609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23610$as_echo "no" >&6; }
23611fi
23612
23613
23614          if test "x$DTRACE" = x; then
23615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23616          fi
23617        else
23618          # Otherwise we believe it is a complete path. Use it as it is.
23619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23620$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23622$as_echo_n "checking for DTRACE... " >&6; }
23623          if test ! -x "$tool_specified"; then
23624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23625$as_echo "not found" >&6; }
23626            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23627          fi
23628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23629$as_echo "$tool_specified" >&6; }
23630        fi
23631      fi
23632    fi
23633
23634  fi
23635
23636
23637
23638
23639  # Publish this variable in the help.
23640
23641
23642  if [ -z "${PATCH+x}" ]; then
23643    # The variable is not set by user, try to locate tool using the code snippet
23644    for ac_prog in gpatch patch
23645do
23646  # Extract the first word of "$ac_prog", so it can be a program name with args.
23647set dummy $ac_prog; ac_word=$2
23648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23649$as_echo_n "checking for $ac_word... " >&6; }
23650if ${ac_cv_path_PATCH+:} false; then :
23651  $as_echo_n "(cached) " >&6
23652else
23653  case $PATCH in
23654  [\\/]* | ?:[\\/]*)
23655  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23656  ;;
23657  *)
23658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23659for as_dir in $PATH
23660do
23661  IFS=$as_save_IFS
23662  test -z "$as_dir" && as_dir=.
23663    for ac_exec_ext in '' $ac_executable_extensions; do
23664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23665    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23667    break 2
23668  fi
23669done
23670  done
23671IFS=$as_save_IFS
23672
23673  ;;
23674esac
23675fi
23676PATCH=$ac_cv_path_PATCH
23677if test -n "$PATCH"; then
23678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23679$as_echo "$PATCH" >&6; }
23680else
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23682$as_echo "no" >&6; }
23683fi
23684
23685
23686  test -n "$PATCH" && break
23687done
23688
23689  else
23690    # The variable is set, but is it from the command line or the environment?
23691
23692    # Try to remove the string !PATCH! from our list.
23693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23695      # If it failed, the variable was not from the command line. Ignore it,
23696      # but warn the user (except for BASH, which is always set by the calling BASH).
23697      if test "xPATCH" != xBASH; then
23698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23699$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23700      fi
23701      # Try to locate tool using the code snippet
23702      for ac_prog in gpatch patch
23703do
23704  # Extract the first word of "$ac_prog", so it can be a program name with args.
23705set dummy $ac_prog; ac_word=$2
23706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23707$as_echo_n "checking for $ac_word... " >&6; }
23708if ${ac_cv_path_PATCH+:} false; then :
23709  $as_echo_n "(cached) " >&6
23710else
23711  case $PATCH in
23712  [\\/]* | ?:[\\/]*)
23713  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23714  ;;
23715  *)
23716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23717for as_dir in $PATH
23718do
23719  IFS=$as_save_IFS
23720  test -z "$as_dir" && as_dir=.
23721    for ac_exec_ext in '' $ac_executable_extensions; do
23722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23723    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23725    break 2
23726  fi
23727done
23728  done
23729IFS=$as_save_IFS
23730
23731  ;;
23732esac
23733fi
23734PATCH=$ac_cv_path_PATCH
23735if test -n "$PATCH"; then
23736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23737$as_echo "$PATCH" >&6; }
23738else
23739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23740$as_echo "no" >&6; }
23741fi
23742
23743
23744  test -n "$PATCH" && break
23745done
23746
23747    else
23748      # If it succeeded, then it was overridden by the user. We will use it
23749      # for the tool.
23750
23751      # First remove it from the list of overridden variables, so we can test
23752      # for unknown variables in the end.
23753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23754
23755      # Check if we try to supply an empty value
23756      if test "x$PATCH" = x; then
23757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23758$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23760$as_echo_n "checking for PATCH... " >&6; }
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23762$as_echo "disabled" >&6; }
23763      else
23764        # Check if the provided tool contains a complete path.
23765        tool_specified="$PATCH"
23766        tool_basename="${tool_specified##*/}"
23767        if test "x$tool_basename" = "x$tool_specified"; then
23768          # A command without a complete path is provided, search $PATH.
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23770$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23771          # Extract the first word of "$tool_basename", so it can be a program name with args.
23772set dummy $tool_basename; ac_word=$2
23773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23774$as_echo_n "checking for $ac_word... " >&6; }
23775if ${ac_cv_path_PATCH+:} false; then :
23776  $as_echo_n "(cached) " >&6
23777else
23778  case $PATCH in
23779  [\\/]* | ?:[\\/]*)
23780  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23781  ;;
23782  *)
23783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23784for as_dir in $PATH
23785do
23786  IFS=$as_save_IFS
23787  test -z "$as_dir" && as_dir=.
23788    for ac_exec_ext in '' $ac_executable_extensions; do
23789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23790    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23792    break 2
23793  fi
23794done
23795  done
23796IFS=$as_save_IFS
23797
23798  ;;
23799esac
23800fi
23801PATCH=$ac_cv_path_PATCH
23802if test -n "$PATCH"; then
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23804$as_echo "$PATCH" >&6; }
23805else
23806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807$as_echo "no" >&6; }
23808fi
23809
23810
23811          if test "x$PATCH" = x; then
23812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23813          fi
23814        else
23815          # Otherwise we believe it is a complete path. Use it as it is.
23816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23817$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23819$as_echo_n "checking for PATCH... " >&6; }
23820          if test ! -x "$tool_specified"; then
23821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23822$as_echo "not found" >&6; }
23823            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23824          fi
23825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23826$as_echo "$tool_specified" >&6; }
23827        fi
23828      fi
23829    fi
23830
23831  fi
23832
23833
23834  # Check if it's GNU time
23835  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23836  if test "x$IS_GNU_TIME" != x; then
23837    IS_GNU_TIME=yes
23838  else
23839    IS_GNU_TIME=no
23840  fi
23841
23842
23843  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23844
23845
23846
23847  # Publish this variable in the help.
23848
23849
23850  if [ -z "${DSYMUTIL+x}" ]; then
23851    # The variable is not set by user, try to locate tool using the code snippet
23852    for ac_prog in dsymutil
23853do
23854  # Extract the first word of "$ac_prog", so it can be a program name with args.
23855set dummy $ac_prog; ac_word=$2
23856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23857$as_echo_n "checking for $ac_word... " >&6; }
23858if ${ac_cv_path_DSYMUTIL+:} false; then :
23859  $as_echo_n "(cached) " >&6
23860else
23861  case $DSYMUTIL in
23862  [\\/]* | ?:[\\/]*)
23863  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23864  ;;
23865  *)
23866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23867for as_dir in $PATH
23868do
23869  IFS=$as_save_IFS
23870  test -z "$as_dir" && as_dir=.
23871    for ac_exec_ext in '' $ac_executable_extensions; do
23872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23873    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23875    break 2
23876  fi
23877done
23878  done
23879IFS=$as_save_IFS
23880
23881  ;;
23882esac
23883fi
23884DSYMUTIL=$ac_cv_path_DSYMUTIL
23885if test -n "$DSYMUTIL"; then
23886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23887$as_echo "$DSYMUTIL" >&6; }
23888else
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23890$as_echo "no" >&6; }
23891fi
23892
23893
23894  test -n "$DSYMUTIL" && break
23895done
23896
23897  else
23898    # The variable is set, but is it from the command line or the environment?
23899
23900    # Try to remove the string !DSYMUTIL! from our list.
23901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23903      # If it failed, the variable was not from the command line. Ignore it,
23904      # but warn the user (except for BASH, which is always set by the calling BASH).
23905      if test "xDSYMUTIL" != xBASH; then
23906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23907$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23908      fi
23909      # Try to locate tool using the code snippet
23910      for ac_prog in dsymutil
23911do
23912  # Extract the first word of "$ac_prog", so it can be a program name with args.
23913set dummy $ac_prog; ac_word=$2
23914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23915$as_echo_n "checking for $ac_word... " >&6; }
23916if ${ac_cv_path_DSYMUTIL+:} false; then :
23917  $as_echo_n "(cached) " >&6
23918else
23919  case $DSYMUTIL in
23920  [\\/]* | ?:[\\/]*)
23921  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23922  ;;
23923  *)
23924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23925for as_dir in $PATH
23926do
23927  IFS=$as_save_IFS
23928  test -z "$as_dir" && as_dir=.
23929    for ac_exec_ext in '' $ac_executable_extensions; do
23930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23931    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23933    break 2
23934  fi
23935done
23936  done
23937IFS=$as_save_IFS
23938
23939  ;;
23940esac
23941fi
23942DSYMUTIL=$ac_cv_path_DSYMUTIL
23943if test -n "$DSYMUTIL"; then
23944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23945$as_echo "$DSYMUTIL" >&6; }
23946else
23947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23948$as_echo "no" >&6; }
23949fi
23950
23951
23952  test -n "$DSYMUTIL" && break
23953done
23954
23955    else
23956      # If it succeeded, then it was overridden by the user. We will use it
23957      # for the tool.
23958
23959      # First remove it from the list of overridden variables, so we can test
23960      # for unknown variables in the end.
23961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23962
23963      # Check if we try to supply an empty value
23964      if test "x$DSYMUTIL" = x; then
23965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23966$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23968$as_echo_n "checking for DSYMUTIL... " >&6; }
23969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23970$as_echo "disabled" >&6; }
23971      else
23972        # Check if the provided tool contains a complete path.
23973        tool_specified="$DSYMUTIL"
23974        tool_basename="${tool_specified##*/}"
23975        if test "x$tool_basename" = "x$tool_specified"; then
23976          # A command without a complete path is provided, search $PATH.
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23978$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23979          # Extract the first word of "$tool_basename", so it can be a program name with args.
23980set dummy $tool_basename; ac_word=$2
23981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23982$as_echo_n "checking for $ac_word... " >&6; }
23983if ${ac_cv_path_DSYMUTIL+:} false; then :
23984  $as_echo_n "(cached) " >&6
23985else
23986  case $DSYMUTIL in
23987  [\\/]* | ?:[\\/]*)
23988  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23989  ;;
23990  *)
23991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23992for as_dir in $PATH
23993do
23994  IFS=$as_save_IFS
23995  test -z "$as_dir" && as_dir=.
23996    for ac_exec_ext in '' $ac_executable_extensions; do
23997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23998    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24000    break 2
24001  fi
24002done
24003  done
24004IFS=$as_save_IFS
24005
24006  ;;
24007esac
24008fi
24009DSYMUTIL=$ac_cv_path_DSYMUTIL
24010if test -n "$DSYMUTIL"; then
24011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24012$as_echo "$DSYMUTIL" >&6; }
24013else
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24015$as_echo "no" >&6; }
24016fi
24017
24018
24019          if test "x$DSYMUTIL" = x; then
24020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24021          fi
24022        else
24023          # Otherwise we believe it is a complete path. Use it as it is.
24024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24025$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24027$as_echo_n "checking for DSYMUTIL... " >&6; }
24028          if test ! -x "$tool_specified"; then
24029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24030$as_echo "not found" >&6; }
24031            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24032          fi
24033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24034$as_echo "$tool_specified" >&6; }
24035        fi
24036      fi
24037    fi
24038
24039  fi
24040
24041
24042
24043  if test "x$DSYMUTIL" = x; then
24044    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24045  fi
24046
24047
24048
24049
24050
24051  # Publish this variable in the help.
24052
24053
24054  if [ -z "${XATTR+x}" ]; then
24055    # The variable is not set by user, try to locate tool using the code snippet
24056    for ac_prog in xattr
24057do
24058  # Extract the first word of "$ac_prog", so it can be a program name with args.
24059set dummy $ac_prog; ac_word=$2
24060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24061$as_echo_n "checking for $ac_word... " >&6; }
24062if ${ac_cv_path_XATTR+:} false; then :
24063  $as_echo_n "(cached) " >&6
24064else
24065  case $XATTR in
24066  [\\/]* | ?:[\\/]*)
24067  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24068  ;;
24069  *)
24070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24071for as_dir in $PATH
24072do
24073  IFS=$as_save_IFS
24074  test -z "$as_dir" && as_dir=.
24075    for ac_exec_ext in '' $ac_executable_extensions; do
24076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24077    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24079    break 2
24080  fi
24081done
24082  done
24083IFS=$as_save_IFS
24084
24085  ;;
24086esac
24087fi
24088XATTR=$ac_cv_path_XATTR
24089if test -n "$XATTR"; then
24090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24091$as_echo "$XATTR" >&6; }
24092else
24093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24094$as_echo "no" >&6; }
24095fi
24096
24097
24098  test -n "$XATTR" && break
24099done
24100
24101  else
24102    # The variable is set, but is it from the command line or the environment?
24103
24104    # Try to remove the string !XATTR! from our list.
24105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24107      # If it failed, the variable was not from the command line. Ignore it,
24108      # but warn the user (except for BASH, which is always set by the calling BASH).
24109      if test "xXATTR" != xBASH; then
24110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24111$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24112      fi
24113      # Try to locate tool using the code snippet
24114      for ac_prog in xattr
24115do
24116  # Extract the first word of "$ac_prog", so it can be a program name with args.
24117set dummy $ac_prog; ac_word=$2
24118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24119$as_echo_n "checking for $ac_word... " >&6; }
24120if ${ac_cv_path_XATTR+:} false; then :
24121  $as_echo_n "(cached) " >&6
24122else
24123  case $XATTR in
24124  [\\/]* | ?:[\\/]*)
24125  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24126  ;;
24127  *)
24128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24129for as_dir in $PATH
24130do
24131  IFS=$as_save_IFS
24132  test -z "$as_dir" && as_dir=.
24133    for ac_exec_ext in '' $ac_executable_extensions; do
24134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24135    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24137    break 2
24138  fi
24139done
24140  done
24141IFS=$as_save_IFS
24142
24143  ;;
24144esac
24145fi
24146XATTR=$ac_cv_path_XATTR
24147if test -n "$XATTR"; then
24148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24149$as_echo "$XATTR" >&6; }
24150else
24151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24152$as_echo "no" >&6; }
24153fi
24154
24155
24156  test -n "$XATTR" && break
24157done
24158
24159    else
24160      # If it succeeded, then it was overridden by the user. We will use it
24161      # for the tool.
24162
24163      # First remove it from the list of overridden variables, so we can test
24164      # for unknown variables in the end.
24165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24166
24167      # Check if we try to supply an empty value
24168      if test "x$XATTR" = x; then
24169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24170$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24172$as_echo_n "checking for XATTR... " >&6; }
24173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24174$as_echo "disabled" >&6; }
24175      else
24176        # Check if the provided tool contains a complete path.
24177        tool_specified="$XATTR"
24178        tool_basename="${tool_specified##*/}"
24179        if test "x$tool_basename" = "x$tool_specified"; then
24180          # A command without a complete path is provided, search $PATH.
24181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24182$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24183          # Extract the first word of "$tool_basename", so it can be a program name with args.
24184set dummy $tool_basename; ac_word=$2
24185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24186$as_echo_n "checking for $ac_word... " >&6; }
24187if ${ac_cv_path_XATTR+:} false; then :
24188  $as_echo_n "(cached) " >&6
24189else
24190  case $XATTR in
24191  [\\/]* | ?:[\\/]*)
24192  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24193  ;;
24194  *)
24195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24196for as_dir in $PATH
24197do
24198  IFS=$as_save_IFS
24199  test -z "$as_dir" && as_dir=.
24200    for ac_exec_ext in '' $ac_executable_extensions; do
24201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24202    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24204    break 2
24205  fi
24206done
24207  done
24208IFS=$as_save_IFS
24209
24210  ;;
24211esac
24212fi
24213XATTR=$ac_cv_path_XATTR
24214if test -n "$XATTR"; then
24215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24216$as_echo "$XATTR" >&6; }
24217else
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220fi
24221
24222
24223          if test "x$XATTR" = x; then
24224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24225          fi
24226        else
24227          # Otherwise we believe it is a complete path. Use it as it is.
24228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24229$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24231$as_echo_n "checking for XATTR... " >&6; }
24232          if test ! -x "$tool_specified"; then
24233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24234$as_echo "not found" >&6; }
24235            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24236          fi
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24238$as_echo "$tool_specified" >&6; }
24239        fi
24240      fi
24241    fi
24242
24243  fi
24244
24245
24246
24247  if test "x$XATTR" = x; then
24248    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24249  fi
24250
24251
24252
24253
24254  # Publish this variable in the help.
24255
24256
24257  if [ -z "${CODESIGN+x}" ]; then
24258    # The variable is not set by user, try to locate tool using the code snippet
24259    for ac_prog in codesign
24260do
24261  # Extract the first word of "$ac_prog", so it can be a program name with args.
24262set dummy $ac_prog; ac_word=$2
24263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24264$as_echo_n "checking for $ac_word... " >&6; }
24265if ${ac_cv_path_CODESIGN+:} false; then :
24266  $as_echo_n "(cached) " >&6
24267else
24268  case $CODESIGN in
24269  [\\/]* | ?:[\\/]*)
24270  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24271  ;;
24272  *)
24273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24274for as_dir in $PATH
24275do
24276  IFS=$as_save_IFS
24277  test -z "$as_dir" && as_dir=.
24278    for ac_exec_ext in '' $ac_executable_extensions; do
24279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24280    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24282    break 2
24283  fi
24284done
24285  done
24286IFS=$as_save_IFS
24287
24288  ;;
24289esac
24290fi
24291CODESIGN=$ac_cv_path_CODESIGN
24292if test -n "$CODESIGN"; then
24293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24294$as_echo "$CODESIGN" >&6; }
24295else
24296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24297$as_echo "no" >&6; }
24298fi
24299
24300
24301  test -n "$CODESIGN" && break
24302done
24303
24304  else
24305    # The variable is set, but is it from the command line or the environment?
24306
24307    # Try to remove the string !CODESIGN! from our list.
24308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24310      # If it failed, the variable was not from the command line. Ignore it,
24311      # but warn the user (except for BASH, which is always set by the calling BASH).
24312      if test "xCODESIGN" != xBASH; then
24313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24314$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24315      fi
24316      # Try to locate tool using the code snippet
24317      for ac_prog in codesign
24318do
24319  # Extract the first word of "$ac_prog", so it can be a program name with args.
24320set dummy $ac_prog; ac_word=$2
24321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24322$as_echo_n "checking for $ac_word... " >&6; }
24323if ${ac_cv_path_CODESIGN+:} false; then :
24324  $as_echo_n "(cached) " >&6
24325else
24326  case $CODESIGN in
24327  [\\/]* | ?:[\\/]*)
24328  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24329  ;;
24330  *)
24331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24332for as_dir in $PATH
24333do
24334  IFS=$as_save_IFS
24335  test -z "$as_dir" && as_dir=.
24336    for ac_exec_ext in '' $ac_executable_extensions; do
24337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24338    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24340    break 2
24341  fi
24342done
24343  done
24344IFS=$as_save_IFS
24345
24346  ;;
24347esac
24348fi
24349CODESIGN=$ac_cv_path_CODESIGN
24350if test -n "$CODESIGN"; then
24351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24352$as_echo "$CODESIGN" >&6; }
24353else
24354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24355$as_echo "no" >&6; }
24356fi
24357
24358
24359  test -n "$CODESIGN" && break
24360done
24361
24362    else
24363      # If it succeeded, then it was overridden by the user. We will use it
24364      # for the tool.
24365
24366      # First remove it from the list of overridden variables, so we can test
24367      # for unknown variables in the end.
24368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24369
24370      # Check if we try to supply an empty value
24371      if test "x$CODESIGN" = x; then
24372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24373$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24375$as_echo_n "checking for CODESIGN... " >&6; }
24376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24377$as_echo "disabled" >&6; }
24378      else
24379        # Check if the provided tool contains a complete path.
24380        tool_specified="$CODESIGN"
24381        tool_basename="${tool_specified##*/}"
24382        if test "x$tool_basename" = "x$tool_specified"; then
24383          # A command without a complete path is provided, search $PATH.
24384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24385$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24386          # Extract the first word of "$tool_basename", so it can be a program name with args.
24387set dummy $tool_basename; ac_word=$2
24388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24389$as_echo_n "checking for $ac_word... " >&6; }
24390if ${ac_cv_path_CODESIGN+:} false; then :
24391  $as_echo_n "(cached) " >&6
24392else
24393  case $CODESIGN in
24394  [\\/]* | ?:[\\/]*)
24395  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24396  ;;
24397  *)
24398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24399for as_dir in $PATH
24400do
24401  IFS=$as_save_IFS
24402  test -z "$as_dir" && as_dir=.
24403    for ac_exec_ext in '' $ac_executable_extensions; do
24404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24405    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24407    break 2
24408  fi
24409done
24410  done
24411IFS=$as_save_IFS
24412
24413  ;;
24414esac
24415fi
24416CODESIGN=$ac_cv_path_CODESIGN
24417if test -n "$CODESIGN"; then
24418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24419$as_echo "$CODESIGN" >&6; }
24420else
24421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24422$as_echo "no" >&6; }
24423fi
24424
24425
24426          if test "x$CODESIGN" = x; then
24427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24428          fi
24429        else
24430          # Otherwise we believe it is a complete path. Use it as it is.
24431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24432$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24434$as_echo_n "checking for CODESIGN... " >&6; }
24435          if test ! -x "$tool_specified"; then
24436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24437$as_echo "not found" >&6; }
24438            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24439          fi
24440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24441$as_echo "$tool_specified" >&6; }
24442        fi
24443      fi
24444    fi
24445
24446  fi
24447
24448
24449    if test "x$CODESIGN" != "x"; then
24450      # Verify that the openjdk_codesign certificate is present
24451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24452$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24453      $RM codesign-testfile
24454      $TOUCH codesign-testfile
24455      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24456      $RM codesign-testfile
24457      if test "x$CODESIGN" = x; then
24458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24459$as_echo "no" >&6; }
24460      else
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24462$as_echo "yes" >&6; }
24463      fi
24464    fi
24465
24466
24467
24468  # Publish this variable in the help.
24469
24470
24471  if [ -z "${SETFILE+x}" ]; then
24472    # The variable is not set by user, try to locate tool using the code snippet
24473    for ac_prog in SetFile
24474do
24475  # Extract the first word of "$ac_prog", so it can be a program name with args.
24476set dummy $ac_prog; ac_word=$2
24477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24478$as_echo_n "checking for $ac_word... " >&6; }
24479if ${ac_cv_path_SETFILE+:} false; then :
24480  $as_echo_n "(cached) " >&6
24481else
24482  case $SETFILE in
24483  [\\/]* | ?:[\\/]*)
24484  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24485  ;;
24486  *)
24487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24488for as_dir in $PATH
24489do
24490  IFS=$as_save_IFS
24491  test -z "$as_dir" && as_dir=.
24492    for ac_exec_ext in '' $ac_executable_extensions; do
24493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24494    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24496    break 2
24497  fi
24498done
24499  done
24500IFS=$as_save_IFS
24501
24502  ;;
24503esac
24504fi
24505SETFILE=$ac_cv_path_SETFILE
24506if test -n "$SETFILE"; then
24507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24508$as_echo "$SETFILE" >&6; }
24509else
24510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24511$as_echo "no" >&6; }
24512fi
24513
24514
24515  test -n "$SETFILE" && break
24516done
24517
24518  else
24519    # The variable is set, but is it from the command line or the environment?
24520
24521    # Try to remove the string !SETFILE! from our list.
24522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24524      # If it failed, the variable was not from the command line. Ignore it,
24525      # but warn the user (except for BASH, which is always set by the calling BASH).
24526      if test "xSETFILE" != xBASH; then
24527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24528$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24529      fi
24530      # Try to locate tool using the code snippet
24531      for ac_prog in SetFile
24532do
24533  # Extract the first word of "$ac_prog", so it can be a program name with args.
24534set dummy $ac_prog; ac_word=$2
24535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24536$as_echo_n "checking for $ac_word... " >&6; }
24537if ${ac_cv_path_SETFILE+:} false; then :
24538  $as_echo_n "(cached) " >&6
24539else
24540  case $SETFILE in
24541  [\\/]* | ?:[\\/]*)
24542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24543  ;;
24544  *)
24545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24546for as_dir in $PATH
24547do
24548  IFS=$as_save_IFS
24549  test -z "$as_dir" && as_dir=.
24550    for ac_exec_ext in '' $ac_executable_extensions; do
24551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24554    break 2
24555  fi
24556done
24557  done
24558IFS=$as_save_IFS
24559
24560  ;;
24561esac
24562fi
24563SETFILE=$ac_cv_path_SETFILE
24564if test -n "$SETFILE"; then
24565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24566$as_echo "$SETFILE" >&6; }
24567else
24568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24569$as_echo "no" >&6; }
24570fi
24571
24572
24573  test -n "$SETFILE" && break
24574done
24575
24576    else
24577      # If it succeeded, then it was overridden by the user. We will use it
24578      # for the tool.
24579
24580      # First remove it from the list of overridden variables, so we can test
24581      # for unknown variables in the end.
24582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24583
24584      # Check if we try to supply an empty value
24585      if test "x$SETFILE" = x; then
24586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24587$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24589$as_echo_n "checking for SETFILE... " >&6; }
24590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24591$as_echo "disabled" >&6; }
24592      else
24593        # Check if the provided tool contains a complete path.
24594        tool_specified="$SETFILE"
24595        tool_basename="${tool_specified##*/}"
24596        if test "x$tool_basename" = "x$tool_specified"; then
24597          # A command without a complete path is provided, search $PATH.
24598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24599$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24600          # Extract the first word of "$tool_basename", so it can be a program name with args.
24601set dummy $tool_basename; ac_word=$2
24602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24603$as_echo_n "checking for $ac_word... " >&6; }
24604if ${ac_cv_path_SETFILE+:} false; then :
24605  $as_echo_n "(cached) " >&6
24606else
24607  case $SETFILE in
24608  [\\/]* | ?:[\\/]*)
24609  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24610  ;;
24611  *)
24612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24613for as_dir in $PATH
24614do
24615  IFS=$as_save_IFS
24616  test -z "$as_dir" && as_dir=.
24617    for ac_exec_ext in '' $ac_executable_extensions; do
24618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24619    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24621    break 2
24622  fi
24623done
24624  done
24625IFS=$as_save_IFS
24626
24627  ;;
24628esac
24629fi
24630SETFILE=$ac_cv_path_SETFILE
24631if test -n "$SETFILE"; then
24632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24633$as_echo "$SETFILE" >&6; }
24634else
24635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24636$as_echo "no" >&6; }
24637fi
24638
24639
24640          if test "x$SETFILE" = x; then
24641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24642          fi
24643        else
24644          # Otherwise we believe it is a complete path. Use it as it is.
24645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24646$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24648$as_echo_n "checking for SETFILE... " >&6; }
24649          if test ! -x "$tool_specified"; then
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24651$as_echo "not found" >&6; }
24652            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24653          fi
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24655$as_echo "$tool_specified" >&6; }
24656        fi
24657      fi
24658    fi
24659
24660  fi
24661
24662
24663
24664  if test "x$SETFILE" = x; then
24665    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24666  fi
24667
24668
24669  fi
24670
24671
24672  # Check bash version
24673  # Extra [ ] to stop m4 mangling
24674   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24676$as_echo_n "checking bash version... " >&6; }
24677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24678$as_echo "$BASH_VER" >&6; }
24679
24680  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24681  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24682  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24683    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24684  fi
24685
24686  # Test if bash supports pipefail.
24687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24688$as_echo_n "checking if bash supports pipefail... " >&6; }
24689  if ${BASH} -c 'set -o pipefail'; then
24690    BASH_ARGS="$BASH_ARGS -o pipefail"
24691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24692$as_echo "yes" >&6; }
24693  else
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24695$as_echo "no" >&6; }
24696  fi
24697
24698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24699$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24700  if ${BASH} -e -c 'true'; then
24701    BASH_ARGS="$BASH_ARGS -e"
24702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24703$as_echo "yes" >&6; }
24704  else
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24706$as_echo "no" >&6; }
24707  fi
24708
24709
24710
24711
24712# Check if pkg-config is available.
24713
24714
24715if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24716	if test -n "$ac_tool_prefix"; then
24717  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24718set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24720$as_echo_n "checking for $ac_word... " >&6; }
24721if ${ac_cv_path_PKG_CONFIG+:} false; then :
24722  $as_echo_n "(cached) " >&6
24723else
24724  case $PKG_CONFIG in
24725  [\\/]* | ?:[\\/]*)
24726  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24727  ;;
24728  *)
24729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24730for as_dir in $PATH
24731do
24732  IFS=$as_save_IFS
24733  test -z "$as_dir" && as_dir=.
24734    for ac_exec_ext in '' $ac_executable_extensions; do
24735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24736    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24738    break 2
24739  fi
24740done
24741  done
24742IFS=$as_save_IFS
24743
24744  ;;
24745esac
24746fi
24747PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24748if test -n "$PKG_CONFIG"; then
24749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24750$as_echo "$PKG_CONFIG" >&6; }
24751else
24752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24753$as_echo "no" >&6; }
24754fi
24755
24756
24757fi
24758if test -z "$ac_cv_path_PKG_CONFIG"; then
24759  ac_pt_PKG_CONFIG=$PKG_CONFIG
24760  # Extract the first word of "pkg-config", so it can be a program name with args.
24761set dummy pkg-config; ac_word=$2
24762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24763$as_echo_n "checking for $ac_word... " >&6; }
24764if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24765  $as_echo_n "(cached) " >&6
24766else
24767  case $ac_pt_PKG_CONFIG in
24768  [\\/]* | ?:[\\/]*)
24769  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24770  ;;
24771  *)
24772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24773for as_dir in $PATH
24774do
24775  IFS=$as_save_IFS
24776  test -z "$as_dir" && as_dir=.
24777    for ac_exec_ext in '' $ac_executable_extensions; do
24778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24779    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24781    break 2
24782  fi
24783done
24784  done
24785IFS=$as_save_IFS
24786
24787  ;;
24788esac
24789fi
24790ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24791if test -n "$ac_pt_PKG_CONFIG"; then
24792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24793$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24794else
24795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24796$as_echo "no" >&6; }
24797fi
24798
24799  if test "x$ac_pt_PKG_CONFIG" = x; then
24800    PKG_CONFIG=""
24801  else
24802    case $cross_compiling:$ac_tool_warned in
24803yes:)
24804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24806ac_tool_warned=yes ;;
24807esac
24808    PKG_CONFIG=$ac_pt_PKG_CONFIG
24809  fi
24810else
24811  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24812fi
24813
24814fi
24815if test -n "$PKG_CONFIG"; then
24816	_pkg_min_version=0.9.0
24817	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24818$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24819	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24820		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24821$as_echo "yes" >&6; }
24822	else
24823		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24824$as_echo "no" >&6; }
24825		PKG_CONFIG=""
24826	fi
24827
24828fi
24829
24830# After basic tools have been setup, we can check build os specific details.
24831
24832  ###############################################################################
24833
24834  # Note that this is the build platform OS version!
24835
24836  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24837  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24838  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24839  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24840
24841
24842
24843
24844
24845# Misc basic settings
24846
24847
24848# Check whether --with-default-make-target was given.
24849if test "${with_default_make_target+set}" = set; then :
24850  withval=$with_default_make_target;
24851fi
24852
24853  if test "x$with_default_make_target" = "x" \
24854      || test "x$with_default_make_target" = "xyes"; then
24855    DEFAULT_MAKE_TARGET="exploded-image"
24856  elif test "x$with_default_make_target" = "xno"; then
24857    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24858  else
24859    DEFAULT_MAKE_TARGET="$with_default_make_target"
24860  fi
24861
24862
24863
24864
24865###############################################################################
24866#
24867# Determine OpenJDK variants, options and version numbers.
24868#
24869###############################################################################
24870
24871# We need build & target for this.
24872
24873  # Should we build a JDK without a graphical UI?
24874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24875$as_echo_n "checking headless only... " >&6; }
24876  # Check whether --enable-headless-only was given.
24877if test "${enable_headless_only+set}" = set; then :
24878  enableval=$enable_headless_only;
24879fi
24880
24881
24882  if test "x$enable_headless_only" = "xyes"; then
24883    ENABLE_HEADLESS_ONLY="true"
24884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24885$as_echo "yes" >&6; }
24886  elif test "x$enable_headless_only" = "xno"; then
24887    ENABLE_HEADLESS_ONLY="false"
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24889$as_echo "no" >&6; }
24890  elif test "x$enable_headless_only" = "x"; then
24891    ENABLE_HEADLESS_ONLY="false"
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24893$as_echo "no" >&6; }
24894  else
24895    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24896  fi
24897
24898
24899
24900  # Should we build the complete docs, or just a lightweight version?
24901  # Check whether --enable-full-docs was given.
24902if test "${enable_full_docs+set}" = set; then :
24903  enableval=$enable_full_docs;
24904fi
24905
24906
24907  # Verify dependencies
24908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24909$as_echo_n "checking for graphviz dot... " >&6; }
24910  if test "x$DOT" != "x"; then
24911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24912$as_echo "yes" >&6; }
24913  else
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24915$as_echo "no, cannot generate full docs" >&6; }
24916    FULL_DOCS_DEP_MISSING=true
24917  fi
24918
24919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24920$as_echo_n "checking for pandoc... " >&6; }
24921  if test "x$PANDOC" != "x"; then
24922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24923$as_echo "yes" >&6; }
24924  else
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24926$as_echo "no, cannot generate full docs" >&6; }
24927    FULL_DOCS_DEP_MISSING=true
24928  fi
24929
24930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24931$as_echo_n "checking full docs... " >&6; }
24932  if test "x$enable_full_docs" = xyes; then
24933    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24935$as_echo "no, missing dependencies" >&6; }
24936
24937  # Print a helpful message on how to acquire the necessary build dependency.
24938  # dot is the help tag: freetype, cups, alsa etc
24939  MISSING_DEPENDENCY=dot
24940
24941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24942    cygwin_help $MISSING_DEPENDENCY
24943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24944    msys_help $MISSING_DEPENDENCY
24945  else
24946    PKGHANDLER_COMMAND=
24947
24948    case $PKGHANDLER in
24949      apt-get)
24950        apt_help     $MISSING_DEPENDENCY ;;
24951      yum)
24952        yum_help     $MISSING_DEPENDENCY ;;
24953      brew)
24954        brew_help    $MISSING_DEPENDENCY ;;
24955      port)
24956        port_help    $MISSING_DEPENDENCY ;;
24957      pkgutil)
24958        pkgutil_help $MISSING_DEPENDENCY ;;
24959      pkgadd)
24960        pkgadd_help  $MISSING_DEPENDENCY ;;
24961    esac
24962
24963    if test "x$PKGHANDLER_COMMAND" != x; then
24964      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24965    fi
24966  fi
24967
24968      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24969    else
24970      ENABLE_FULL_DOCS=true
24971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24972$as_echo "yes, forced" >&6; }
24973    fi
24974  elif test "x$enable_full_docs" = xno; then
24975    ENABLE_FULL_DOCS=false
24976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24977$as_echo "no, forced" >&6; }
24978  elif test "x$enable_full_docs" = x; then
24979    # Check for prerequisites
24980    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24981      ENABLE_FULL_DOCS=false
24982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24983$as_echo "no, missing dependencies" >&6; }
24984    else
24985      ENABLE_FULL_DOCS=true
24986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24987$as_echo "yes, dependencies present" >&6; }
24988    fi
24989  else
24990    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24991  fi
24992
24993
24994
24995  # Choose cacerts source file
24996
24997# Check whether --with-cacerts-file was given.
24998if test "${with_cacerts_file+set}" = set; then :
24999  withval=$with_cacerts_file;
25000fi
25001
25002  if test "x$with_cacerts_file" != x; then
25003    CACERTS_FILE=$with_cacerts_file
25004  fi
25005
25006
25007  # Enable or disable unlimited crypto
25008  # Check whether --enable-unlimited-crypto was given.
25009if test "${enable_unlimited_crypto+set}" = set; then :
25010  enableval=$enable_unlimited_crypto;
25011else
25012  enable_unlimited_crypto=yes
25013fi
25014
25015  if test "x$enable_unlimited_crypto" = "xyes"; then
25016    UNLIMITED_CRYPTO=true
25017  else
25018    UNLIMITED_CRYPTO=false
25019  fi
25020
25021
25022  # Should we build the serviceability agent (SA)?
25023  INCLUDE_SA=true
25024  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25025    INCLUDE_SA=false
25026  fi
25027  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25028    INCLUDE_SA=false
25029  fi
25030
25031
25032  # Compress jars
25033  COMPRESS_JARS=false
25034
25035
25036
25037  # Setup default copyright year. Mostly overridden when building close to a new year.
25038
25039# Check whether --with-copyright-year was given.
25040if test "${with_copyright_year+set}" = set; then :
25041  withval=$with_copyright_year;
25042fi
25043
25044  if test "x$with_copyright_year" = xyes; then
25045    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25046  elif test "x$with_copyright_year" != x; then
25047    COPYRIGHT_YEAR="$with_copyright_year"
25048  else
25049    COPYRIGHT_YEAR=`$DATE +'%Y'`
25050  fi
25051
25052
25053
25054  # Check whether --enable-keep-packaged-modules was given.
25055if test "${enable_keep_packaged_modules+set}" = set; then :
25056  enableval=$enable_keep_packaged_modules;
25057fi
25058
25059
25060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25061$as_echo_n "checking if packaged modules are kept... " >&6; }
25062  if test "x$enable_keep_packaged_modules" = "xyes"; then
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25064$as_echo "yes" >&6; }
25065    JLINK_KEEP_PACKAGED_MODULES=true
25066  elif test "x$enable_keep_packaged_modules" = "xno"; then
25067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25068$as_echo "no" >&6; }
25069    JLINK_KEEP_PACKAGED_MODULES=false
25070  elif test "x$enable_keep_packaged_modules" = "x"; then
25071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25072$as_echo "yes (default)" >&6; }
25073    JLINK_KEEP_PACKAGED_MODULES=true
25074  else
25075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25076$as_echo "error" >&6; }
25077    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25078  fi
25079
25080
25081
25082
25083  # Warn user that old version arguments are deprecated.
25084
25085
25086# Check whether --with-milestone was given.
25087if test "${with_milestone+set}" = set; then :
25088  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25089$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25090fi
25091
25092
25093
25094
25095# Check whether --with-update-version was given.
25096if test "${with_update_version+set}" = set; then :
25097  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25098$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25099fi
25100
25101
25102
25103
25104# Check whether --with-user-release-suffix was given.
25105if test "${with_user_release_suffix+set}" = set; then :
25106  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
25107$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25108fi
25109
25110
25111
25112
25113# Check whether --with-build-number was given.
25114if test "${with_build_number+set}" = set; then :
25115  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25116$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25117fi
25118
25119
25120
25121  # Source the version numbers file
25122  . $AUTOCONF_DIR/version-numbers
25123
25124  # Some non-version number information is set in that file
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134  # Override version from arguments
25135
25136  # If --with-version-string is set, process it first. It is possible to
25137  # override parts with more specific flags, since these are processed later.
25138
25139# Check whether --with-version-string was given.
25140if test "${with_version_string+set}" = set; then :
25141  withval=$with_version_string;
25142fi
25143
25144  if test "x$with_version_string" = xyes; then
25145    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25146  elif test "x$with_version_string" != x; then
25147    # Additional [] needed to keep m4 from mangling shell constructs.
25148    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25149      VERSION_MAJOR=${BASH_REMATCH[1]}
25150      VERSION_MINOR=${BASH_REMATCH[3]}
25151      VERSION_SECURITY=${BASH_REMATCH[5]}
25152      VERSION_PATCH=${BASH_REMATCH[7]}
25153      VERSION_PRE=${BASH_REMATCH[9]}
25154      version_plus_separator=${BASH_REMATCH[11]}
25155      VERSION_BUILD=${BASH_REMATCH[12]}
25156      VERSION_OPT=${BASH_REMATCH[14]}
25157      # Unspecified numerical fields are interpreted as 0.
25158      if test "x$VERSION_MINOR" = x; then
25159        VERSION_MINOR=0
25160      fi
25161      if test "x$VERSION_SECURITY" = x; then
25162        VERSION_SECURITY=0
25163      fi
25164      if test "x$VERSION_PATCH" = x; then
25165        VERSION_PATCH=0
25166      fi
25167      if test "x$version_plus_separator" != x \
25168          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25169        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25170      fi
25171      # Stop the version part process from setting default values.
25172      # We still allow them to explicitly override though.
25173      NO_DEFAULT_VERSION_PARTS=true
25174    else
25175      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25176    fi
25177  fi
25178
25179
25180# Check whether --with-version-pre was given.
25181if test "${with_version_pre+set}" = set; then :
25182  withval=$with_version_pre; with_version_pre_present=true
25183else
25184  with_version_pre_present=false
25185fi
25186
25187
25188  if test "x$with_version_pre_present" = xtrue; then
25189    if test "x$with_version_pre" = xyes; then
25190      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25191    elif test "x$with_version_pre" = xno; then
25192      # Interpret --without-* as empty string instead of the literal "no"
25193      VERSION_PRE=
25194    else
25195      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25196       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25197      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25199$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25200      fi
25201    fi
25202  else
25203    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25204      # Default is to use "internal" as pre
25205      VERSION_PRE="internal"
25206    fi
25207  fi
25208
25209
25210# Check whether --with-version-opt was given.
25211if test "${with_version_opt+set}" = set; then :
25212  withval=$with_version_opt; with_version_opt_present=true
25213else
25214  with_version_opt_present=false
25215fi
25216
25217
25218  if test "x$with_version_opt_present" = xtrue; then
25219    if test "x$with_version_opt" = xyes; then
25220      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25221    elif test "x$with_version_opt" = xno; then
25222      # Interpret --without-* as empty string instead of the literal "no"
25223      VERSION_OPT=
25224    else
25225      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25226       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25227      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25229$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25230      fi
25231    fi
25232  else
25233    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25234      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25235      # Outer [ ] to quote m4.
25236       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25237      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25238    fi
25239  fi
25240
25241
25242# Check whether --with-version-build was given.
25243if test "${with_version_build+set}" = set; then :
25244  withval=$with_version_build; with_version_build_present=true
25245else
25246  with_version_build_present=false
25247fi
25248
25249
25250  if test "x$with_version_build_present" = xtrue; then
25251    if test "x$with_version_build" = xyes; then
25252      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25253    elif test "x$with_version_build" = xno; then
25254      # Interpret --without-* as empty string instead of the literal "no"
25255      VERSION_BUILD=
25256    elif test "x$with_version_build" = x; then
25257      VERSION_BUILD=
25258    else
25259
25260  # Additional [] needed to keep m4 from mangling shell constructs.
25261  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25262    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25263  fi
25264  # Extract the version number without leading zeros.
25265  cleaned_value=${BASH_REMATCH[1]}
25266  if test "x$cleaned_value" = x; then
25267    # Special case for zero
25268    cleaned_value=${BASH_REMATCH[2]}
25269  fi
25270
25271  if test $cleaned_value -gt 255; then
25272    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25273  fi
25274  if test "x$cleaned_value" != "x$with_version_build"; then
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25276$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25277  fi
25278  VERSION_BUILD=$cleaned_value
25279
25280    fi
25281  else
25282    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25283      # Default is to not have a build number.
25284      VERSION_BUILD=""
25285      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25286      VERSION_BUILD=0
25287    fi
25288  fi
25289
25290
25291# Check whether --with-version-major was given.
25292if test "${with_version_major+set}" = set; then :
25293  withval=$with_version_major; with_version_major_present=true
25294else
25295  with_version_major_present=false
25296fi
25297
25298
25299  if test "x$with_version_major_present" = xtrue; then
25300    if test "x$with_version_major" = xyes; then
25301      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25302    else
25303
25304  # Additional [] needed to keep m4 from mangling shell constructs.
25305  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25306    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25307  fi
25308  # Extract the version number without leading zeros.
25309  cleaned_value=${BASH_REMATCH[1]}
25310  if test "x$cleaned_value" = x; then
25311    # Special case for zero
25312    cleaned_value=${BASH_REMATCH[2]}
25313  fi
25314
25315  if test $cleaned_value -gt 255; then
25316    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25317  fi
25318  if test "x$cleaned_value" != "x$with_version_major"; then
25319    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25320$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25321  fi
25322  VERSION_MAJOR=$cleaned_value
25323
25324    fi
25325  else
25326    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25327      # Default is to get value from version-numbers
25328      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25329    fi
25330  fi
25331
25332
25333# Check whether --with-version-minor was given.
25334if test "${with_version_minor+set}" = set; then :
25335  withval=$with_version_minor; with_version_minor_present=true
25336else
25337  with_version_minor_present=false
25338fi
25339
25340
25341  if test "x$with_version_minor_present" = xtrue; then
25342    if test "x$with_version_minor" = xyes; then
25343      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25344    elif test "x$with_version_minor" = xno; then
25345      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25346      VERSION_MINOR=0
25347    elif test "x$with_version_minor" = x; then
25348      VERSION_MINOR=0
25349    else
25350
25351  # Additional [] needed to keep m4 from mangling shell constructs.
25352  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25353    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25354  fi
25355  # Extract the version number without leading zeros.
25356  cleaned_value=${BASH_REMATCH[1]}
25357  if test "x$cleaned_value" = x; then
25358    # Special case for zero
25359    cleaned_value=${BASH_REMATCH[2]}
25360  fi
25361
25362  if test $cleaned_value -gt 255; then
25363    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25364  fi
25365  if test "x$cleaned_value" != "x$with_version_minor"; then
25366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25367$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25368  fi
25369  VERSION_MINOR=$cleaned_value
25370
25371    fi
25372  else
25373    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25374      # Default is 0, if unspecified
25375      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25376    fi
25377  fi
25378
25379
25380# Check whether --with-version-security was given.
25381if test "${with_version_security+set}" = set; then :
25382  withval=$with_version_security; with_version_security_present=true
25383else
25384  with_version_security_present=false
25385fi
25386
25387
25388  if test "x$with_version_security_present" = xtrue; then
25389    if test "x$with_version_security" = xyes; then
25390      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25391    elif test "x$with_version_security" = xno; then
25392      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25393      VERSION_SECURITY=0
25394    elif test "x$with_version_security" = x; then
25395      VERSION_SECURITY=0
25396    else
25397
25398  # Additional [] needed to keep m4 from mangling shell constructs.
25399  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25400    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25401  fi
25402  # Extract the version number without leading zeros.
25403  cleaned_value=${BASH_REMATCH[1]}
25404  if test "x$cleaned_value" = x; then
25405    # Special case for zero
25406    cleaned_value=${BASH_REMATCH[2]}
25407  fi
25408
25409  if test $cleaned_value -gt 255; then
25410    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25411  fi
25412  if test "x$cleaned_value" != "x$with_version_security"; then
25413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25414$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25415  fi
25416  VERSION_SECURITY=$cleaned_value
25417
25418    fi
25419  else
25420    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25421      # Default is 0, if unspecified
25422      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25423    fi
25424  fi
25425
25426
25427# Check whether --with-version-patch was given.
25428if test "${with_version_patch+set}" = set; then :
25429  withval=$with_version_patch; with_version_patch_present=true
25430else
25431  with_version_patch_present=false
25432fi
25433
25434
25435  if test "x$with_version_patch_present" = xtrue; then
25436    if test "x$with_version_patch" = xyes; then
25437      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25438    elif test "x$with_version_patch" = xno; then
25439      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25440      VERSION_PATCH=0
25441    elif test "x$with_version_patch" = x; then
25442      VERSION_PATCH=0
25443    else
25444
25445  # Additional [] needed to keep m4 from mangling shell constructs.
25446  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25447    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25448  fi
25449  # Extract the version number without leading zeros.
25450  cleaned_value=${BASH_REMATCH[1]}
25451  if test "x$cleaned_value" = x; then
25452    # Special case for zero
25453    cleaned_value=${BASH_REMATCH[2]}
25454  fi
25455
25456  if test $cleaned_value -gt 255; then
25457    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25458  fi
25459  if test "x$cleaned_value" != "x$with_version_patch"; then
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25461$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25462  fi
25463  VERSION_PATCH=$cleaned_value
25464
25465    fi
25466  else
25467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25468      # Default is 0, if unspecified
25469      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25470    fi
25471  fi
25472
25473  # Calculate derived version properties
25474
25475  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25476  if test "x$VERSION_PRE" = x; then
25477    VERSION_IS_GA=true
25478  else
25479    VERSION_IS_GA=false
25480  fi
25481
25482  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25483  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25484
25485  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25486  # Strip trailing zeroes from stripped_version_number
25487  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25488  VERSION_NUMBER=$stripped_version_number
25489
25490  # The complete version string, with additional build information
25491  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25492    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25493  else
25494    # If either build or opt is set, we need a + separator
25495    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25496  fi
25497
25498  # The short version string, just VERSION_NUMBER and PRE, if present.
25499  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25500
25501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25502$as_echo_n "checking for version string... " >&6; }
25503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25504$as_echo "$VERSION_STRING" >&6; }
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520###############################################################################
25521#
25522# Setup BootJDK, used to bootstrap the build.
25523#
25524###############################################################################
25525
25526
25527  BOOT_JDK_FOUND=no
25528
25529# Check whether --with-boot-jdk was given.
25530if test "${with_boot_jdk+set}" = set; then :
25531  withval=$with_boot_jdk;
25532fi
25533
25534
25535  # We look for the Boot JDK through various means, going from more certain to
25536  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25537  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25538  # must check if this is indeed valid; otherwise we'll continue looking.
25539
25540  # Test: Is bootjdk explicitly set by command line arguments?
25541
25542  if test "x$BOOT_JDK_FOUND" = xno; then
25543    # Now execute the test
25544
25545  if test "x$with_boot_jdk" != x; then
25546    BOOT_JDK=$with_boot_jdk
25547    BOOT_JDK_FOUND=maybe
25548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25549$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      if test -d "$path"; then
25706        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707      else
25708        dir="`$DIRNAME "$path"`"
25709        base="`$BASENAME "$path"`"
25710        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711      fi
25712    fi
25713  fi
25714
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716$as_echo_n "checking for Boot JDK... " >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718$as_echo "$BOOT_JDK" >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720$as_echo_n "checking Boot JDK version... " >&6; }
25721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723$as_echo "$BOOT_JDK_VERSION" >&6; }
25724          fi # end check jdk version
25725        fi # end check javac
25726      fi # end check java
25727    fi # end check boot jdk found
25728  fi
25729
25730  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25731    # Having specified an argument which is incorrect will produce an instant failure;
25732    # we should not go on looking
25733    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25734  fi
25735
25736  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25737
25738  if test "x$BOOT_JDK_FOUND" = xno; then
25739    # Now execute the test
25740
25741  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25742    # First check at user selected default
25743
25744  if test "x$BOOT_JDK_FOUND" = xno; then
25745    # Now execute the test
25746
25747  if test -x /usr/libexec/java_home; then
25748    BOOT_JDK=`/usr/libexec/java_home `
25749    BOOT_JDK_FOUND=maybe
25750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25751$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25752  fi
25753
25754
25755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25757      # Do we have a bin/java?
25758      if test ! -x "$BOOT_JDK/bin/java"; then
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25761        BOOT_JDK_FOUND=no
25762      else
25763        # Do we have a bin/javac?
25764        if test ! -x "$BOOT_JDK/bin/javac"; then
25765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25769          BOOT_JDK_FOUND=no
25770        else
25771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25773
25774          # Extra M4 quote needed to protect [] in grep expression.
25775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25776          if test "x$FOUND_CORRECT_VERSION" = x; then
25777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25781            BOOT_JDK_FOUND=no
25782          else
25783            # We're done! :-)
25784            BOOT_JDK_FOUND=yes
25785
25786  # Only process if variable expands to non-empty
25787
25788  if test "x$BOOT_JDK" != x; then
25789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25790
25791  # Input might be given as Windows format, start by converting to
25792  # unix format.
25793  path="$BOOT_JDK"
25794  new_path=`$CYGPATH -u "$path"`
25795
25796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25799  # "foo.exe" is OK but "foo" is an error.
25800  #
25801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25802  # It is also a way to make sure we got the proper file name for the real test later on.
25803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25804  if test "x$test_shortpath" = x; then
25805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25808  fi
25809
25810  # Call helper function which possibly converts this using DOS-style short mode.
25811  # If so, the updated path is stored in $new_path.
25812
25813  input_path="$new_path"
25814  # Check if we need to convert this using DOS-style short mode. If the path
25815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25816  # take no chances and rewrite it.
25817  # Note: m4 eats our [], so we need to use [ and ] instead.
25818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25819  if test "x$has_forbidden_chars" != x; then
25820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25824      # Going to short mode and back again did indeed matter. Since short mode is
25825      # case insensitive, let's make it lowercase to improve readability.
25826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25827      # Now convert it back to Unix-style (cygpath)
25828      input_path=`$CYGPATH -u "$shortmode_path"`
25829      new_path="$input_path"
25830    fi
25831  fi
25832
25833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25834  if test "x$test_cygdrive_prefix" = x; then
25835    # As a simple fix, exclude /usr/bin since it's not a real path.
25836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25838      # a path prefixed by /cygdrive for fixpath to work.
25839      new_path="$CYGWIN_ROOT_PATH$input_path"
25840    fi
25841  fi
25842
25843
25844  if test "x$path" != "x$new_path"; then
25845    BOOT_JDK="$new_path"
25846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25848  fi
25849
25850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25851
25852  path="$BOOT_JDK"
25853  has_colon=`$ECHO $path | $GREP ^.:`
25854  new_path="$path"
25855  if test "x$has_colon" = x; then
25856    # Not in mixed or Windows style, start by that.
25857    new_path=`cmd //c echo $path`
25858  fi
25859
25860
25861  input_path="$new_path"
25862  # Check if we need to convert this using DOS-style short mode. If the path
25863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25864  # take no chances and rewrite it.
25865  # Note: m4 eats our [], so we need to use [ and ] instead.
25866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25867  if test "x$has_forbidden_chars" != x; then
25868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25870  fi
25871
25872
25873  windows_path="$new_path"
25874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25875    unix_path=`$CYGPATH -u "$windows_path"`
25876    new_path="$unix_path"
25877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25879    new_path="$unix_path"
25880  fi
25881
25882  if test "x$path" != "x$new_path"; then
25883    BOOT_JDK="$new_path"
25884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25886  fi
25887
25888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25890
25891    else
25892      # We're on a unix platform. Hooray! :)
25893      path="$BOOT_JDK"
25894      has_space=`$ECHO "$path" | $GREP " "`
25895      if test "x$has_space" != x; then
25896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25899      fi
25900
25901      # Use eval to expand a potential ~
25902      eval path="$path"
25903      if test ! -f "$path" && test ! -d "$path"; then
25904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25905      fi
25906
25907      if test -d "$path"; then
25908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25909      else
25910        dir="`$DIRNAME "$path"`"
25911        base="`$BASENAME "$path"`"
25912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25913      fi
25914    fi
25915  fi
25916
25917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25918$as_echo_n "checking for Boot JDK... " >&6; }
25919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25920$as_echo "$BOOT_JDK" >&6; }
25921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25922$as_echo_n "checking Boot JDK version... " >&6; }
25923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25925$as_echo "$BOOT_JDK_VERSION" >&6; }
25926          fi # end check jdk version
25927        fi # end check javac
25928      fi # end check java
25929    fi # end check boot jdk found
25930  fi
25931
25932    # If that did not work out (e.g. too old), try explicit versions instead
25933
25934  if test "x$BOOT_JDK_FOUND" = xno; then
25935    # Now execute the test
25936
25937  if test -x /usr/libexec/java_home; then
25938    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25939    BOOT_JDK_FOUND=maybe
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25941$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25942  fi
25943
25944
25945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25947      # Do we have a bin/java?
25948      if test ! -x "$BOOT_JDK/bin/java"; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25951        BOOT_JDK_FOUND=no
25952      else
25953        # Do we have a bin/javac?
25954        if test ! -x "$BOOT_JDK/bin/javac"; then
25955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25959          BOOT_JDK_FOUND=no
25960        else
25961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25963
25964          # Extra M4 quote needed to protect [] in grep expression.
25965          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25966          if test "x$FOUND_CORRECT_VERSION" = x; then
25967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25971            BOOT_JDK_FOUND=no
25972          else
25973            # We're done! :-)
25974            BOOT_JDK_FOUND=yes
25975
25976  # Only process if variable expands to non-empty
25977
25978  if test "x$BOOT_JDK" != x; then
25979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25980
25981  # Input might be given as Windows format, start by converting to
25982  # unix format.
25983  path="$BOOT_JDK"
25984  new_path=`$CYGPATH -u "$path"`
25985
25986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25989  # "foo.exe" is OK but "foo" is an error.
25990  #
25991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25992  # It is also a way to make sure we got the proper file name for the real test later on.
25993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25994  if test "x$test_shortpath" = x; then
25995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25998  fi
25999
26000  # Call helper function which possibly converts this using DOS-style short mode.
26001  # If so, the updated path is stored in $new_path.
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26014      # Going to short mode and back again did indeed matter. Since short mode is
26015      # case insensitive, let's make it lowercase to improve readability.
26016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26017      # Now convert it back to Unix-style (cygpath)
26018      input_path=`$CYGPATH -u "$shortmode_path"`
26019      new_path="$input_path"
26020    fi
26021  fi
26022
26023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26024  if test "x$test_cygdrive_prefix" = x; then
26025    # As a simple fix, exclude /usr/bin since it's not a real path.
26026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26028      # a path prefixed by /cygdrive for fixpath to work.
26029      new_path="$CYGWIN_ROOT_PATH$input_path"
26030    fi
26031  fi
26032
26033
26034  if test "x$path" != "x$new_path"; then
26035    BOOT_JDK="$new_path"
26036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26038  fi
26039
26040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26041
26042  path="$BOOT_JDK"
26043  has_colon=`$ECHO $path | $GREP ^.:`
26044  new_path="$path"
26045  if test "x$has_colon" = x; then
26046    # Not in mixed or Windows style, start by that.
26047    new_path=`cmd //c echo $path`
26048  fi
26049
26050
26051  input_path="$new_path"
26052  # Check if we need to convert this using DOS-style short mode. If the path
26053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26054  # take no chances and rewrite it.
26055  # Note: m4 eats our [], so we need to use [ and ] instead.
26056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26057  if test "x$has_forbidden_chars" != x; then
26058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26060  fi
26061
26062
26063  windows_path="$new_path"
26064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26065    unix_path=`$CYGPATH -u "$windows_path"`
26066    new_path="$unix_path"
26067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26069    new_path="$unix_path"
26070  fi
26071
26072  if test "x$path" != "x$new_path"; then
26073    BOOT_JDK="$new_path"
26074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26076  fi
26077
26078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26080
26081    else
26082      # We're on a unix platform. Hooray! :)
26083      path="$BOOT_JDK"
26084      has_space=`$ECHO "$path" | $GREP " "`
26085      if test "x$has_space" != x; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26089      fi
26090
26091      # Use eval to expand a potential ~
26092      eval path="$path"
26093      if test ! -f "$path" && test ! -d "$path"; then
26094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26095      fi
26096
26097      if test -d "$path"; then
26098        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26099      else
26100        dir="`$DIRNAME "$path"`"
26101        base="`$BASENAME "$path"`"
26102        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26103      fi
26104    fi
26105  fi
26106
26107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26108$as_echo_n "checking for Boot JDK... " >&6; }
26109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26110$as_echo "$BOOT_JDK" >&6; }
26111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26112$as_echo_n "checking Boot JDK version... " >&6; }
26113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26115$as_echo "$BOOT_JDK_VERSION" >&6; }
26116          fi # end check jdk version
26117        fi # end check javac
26118      fi # end check java
26119    fi # end check boot jdk found
26120  fi
26121
26122
26123  if test "x$BOOT_JDK_FOUND" = xno; then
26124    # Now execute the test
26125
26126  if test -x /usr/libexec/java_home; then
26127    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26128    BOOT_JDK_FOUND=maybe
26129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26130$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26131  fi
26132
26133
26134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26136      # Do we have a bin/java?
26137      if test ! -x "$BOOT_JDK/bin/java"; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26140        BOOT_JDK_FOUND=no
26141      else
26142        # Do we have a bin/javac?
26143        if test ! -x "$BOOT_JDK/bin/javac"; then
26144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26148          BOOT_JDK_FOUND=no
26149        else
26150          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26151          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26152
26153          # Extra M4 quote needed to protect [] in grep expression.
26154          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26155          if test "x$FOUND_CORRECT_VERSION" = x; then
26156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26158            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26159$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26160            BOOT_JDK_FOUND=no
26161          else
26162            # We're done! :-)
26163            BOOT_JDK_FOUND=yes
26164
26165  # Only process if variable expands to non-empty
26166
26167  if test "x$BOOT_JDK" != x; then
26168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26169
26170  # Input might be given as Windows format, start by converting to
26171  # unix format.
26172  path="$BOOT_JDK"
26173  new_path=`$CYGPATH -u "$path"`
26174
26175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26178  # "foo.exe" is OK but "foo" is an error.
26179  #
26180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26181  # It is also a way to make sure we got the proper file name for the real test later on.
26182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26183  if test "x$test_shortpath" = x; then
26184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26187  fi
26188
26189  # Call helper function which possibly converts this using DOS-style short mode.
26190  # If so, the updated path is stored in $new_path.
26191
26192  input_path="$new_path"
26193  # Check if we need to convert this using DOS-style short mode. If the path
26194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26195  # take no chances and rewrite it.
26196  # Note: m4 eats our [], so we need to use [ and ] instead.
26197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26198  if test "x$has_forbidden_chars" != x; then
26199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26203      # Going to short mode and back again did indeed matter. Since short mode is
26204      # case insensitive, let's make it lowercase to improve readability.
26205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206      # Now convert it back to Unix-style (cygpath)
26207      input_path=`$CYGPATH -u "$shortmode_path"`
26208      new_path="$input_path"
26209    fi
26210  fi
26211
26212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26213  if test "x$test_cygdrive_prefix" = x; then
26214    # As a simple fix, exclude /usr/bin since it's not a real path.
26215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26217      # a path prefixed by /cygdrive for fixpath to work.
26218      new_path="$CYGWIN_ROOT_PATH$input_path"
26219    fi
26220  fi
26221
26222
26223  if test "x$path" != "x$new_path"; then
26224    BOOT_JDK="$new_path"
26225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26227  fi
26228
26229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26230
26231  path="$BOOT_JDK"
26232  has_colon=`$ECHO $path | $GREP ^.:`
26233  new_path="$path"
26234  if test "x$has_colon" = x; then
26235    # Not in mixed or Windows style, start by that.
26236    new_path=`cmd //c echo $path`
26237  fi
26238
26239
26240  input_path="$new_path"
26241  # Check if we need to convert this using DOS-style short mode. If the path
26242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26243  # take no chances and rewrite it.
26244  # Note: m4 eats our [], so we need to use [ and ] instead.
26245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26246  if test "x$has_forbidden_chars" != x; then
26247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26249  fi
26250
26251
26252  windows_path="$new_path"
26253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26254    unix_path=`$CYGPATH -u "$windows_path"`
26255    new_path="$unix_path"
26256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26258    new_path="$unix_path"
26259  fi
26260
26261  if test "x$path" != "x$new_path"; then
26262    BOOT_JDK="$new_path"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26265  fi
26266
26267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26269
26270    else
26271      # We're on a unix platform. Hooray! :)
26272      path="$BOOT_JDK"
26273      has_space=`$ECHO "$path" | $GREP " "`
26274      if test "x$has_space" != x; then
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26278      fi
26279
26280      # Use eval to expand a potential ~
26281      eval path="$path"
26282      if test ! -f "$path" && test ! -d "$path"; then
26283        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26284      fi
26285
26286      if test -d "$path"; then
26287        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26288      else
26289        dir="`$DIRNAME "$path"`"
26290        base="`$BASENAME "$path"`"
26291        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26292      fi
26293    fi
26294  fi
26295
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26297$as_echo_n "checking for Boot JDK... " >&6; }
26298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26299$as_echo "$BOOT_JDK" >&6; }
26300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26301$as_echo_n "checking Boot JDK version... " >&6; }
26302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26304$as_echo "$BOOT_JDK_VERSION" >&6; }
26305          fi # end check jdk version
26306        fi # end check javac
26307      fi # end check java
26308    fi # end check boot jdk found
26309  fi
26310
26311
26312  if test "x$BOOT_JDK_FOUND" = xno; then
26313    # Now execute the test
26314
26315  if test -x /usr/libexec/java_home; then
26316    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26317    BOOT_JDK_FOUND=maybe
26318    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26319$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26320  fi
26321
26322
26323    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26324    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26325      # Do we have a bin/java?
26326      if test ! -x "$BOOT_JDK/bin/java"; then
26327        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26329        BOOT_JDK_FOUND=no
26330      else
26331        # Do we have a bin/javac?
26332        if test ! -x "$BOOT_JDK/bin/javac"; then
26333          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26335          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26336$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26337          BOOT_JDK_FOUND=no
26338        else
26339          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26340          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26341
26342          # Extra M4 quote needed to protect [] in grep expression.
26343          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26344          if test "x$FOUND_CORRECT_VERSION" = x; then
26345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26347            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26348$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26349            BOOT_JDK_FOUND=no
26350          else
26351            # We're done! :-)
26352            BOOT_JDK_FOUND=yes
26353
26354  # Only process if variable expands to non-empty
26355
26356  if test "x$BOOT_JDK" != x; then
26357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26358
26359  # Input might be given as Windows format, start by converting to
26360  # unix format.
26361  path="$BOOT_JDK"
26362  new_path=`$CYGPATH -u "$path"`
26363
26364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26367  # "foo.exe" is OK but "foo" is an error.
26368  #
26369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26370  # It is also a way to make sure we got the proper file name for the real test later on.
26371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26372  if test "x$test_shortpath" = x; then
26373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26375    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26376  fi
26377
26378  # Call helper function which possibly converts this using DOS-style short mode.
26379  # If so, the updated path is stored in $new_path.
26380
26381  input_path="$new_path"
26382  # Check if we need to convert this using DOS-style short mode. If the path
26383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26384  # take no chances and rewrite it.
26385  # Note: m4 eats our [], so we need to use [ and ] instead.
26386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26387  if test "x$has_forbidden_chars" != x; then
26388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26392      # Going to short mode and back again did indeed matter. Since short mode is
26393      # case insensitive, let's make it lowercase to improve readability.
26394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26395      # Now convert it back to Unix-style (cygpath)
26396      input_path=`$CYGPATH -u "$shortmode_path"`
26397      new_path="$input_path"
26398    fi
26399  fi
26400
26401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26402  if test "x$test_cygdrive_prefix" = x; then
26403    # As a simple fix, exclude /usr/bin since it's not a real path.
26404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26406      # a path prefixed by /cygdrive for fixpath to work.
26407      new_path="$CYGWIN_ROOT_PATH$input_path"
26408    fi
26409  fi
26410
26411
26412  if test "x$path" != "x$new_path"; then
26413    BOOT_JDK="$new_path"
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26416  fi
26417
26418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26419
26420  path="$BOOT_JDK"
26421  has_colon=`$ECHO $path | $GREP ^.:`
26422  new_path="$path"
26423  if test "x$has_colon" = x; then
26424    # Not in mixed or Windows style, start by that.
26425    new_path=`cmd //c echo $path`
26426  fi
26427
26428
26429  input_path="$new_path"
26430  # Check if we need to convert this using DOS-style short mode. If the path
26431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26432  # take no chances and rewrite it.
26433  # Note: m4 eats our [], so we need to use [ and ] instead.
26434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26435  if test "x$has_forbidden_chars" != x; then
26436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26438  fi
26439
26440
26441  windows_path="$new_path"
26442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26443    unix_path=`$CYGPATH -u "$windows_path"`
26444    new_path="$unix_path"
26445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26447    new_path="$unix_path"
26448  fi
26449
26450  if test "x$path" != "x$new_path"; then
26451    BOOT_JDK="$new_path"
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26454  fi
26455
26456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26458
26459    else
26460      # We're on a unix platform. Hooray! :)
26461      path="$BOOT_JDK"
26462      has_space=`$ECHO "$path" | $GREP " "`
26463      if test "x$has_space" != x; then
26464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26467      fi
26468
26469      # Use eval to expand a potential ~
26470      eval path="$path"
26471      if test ! -f "$path" && test ! -d "$path"; then
26472        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26473      fi
26474
26475      if test -d "$path"; then
26476        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26477      else
26478        dir="`$DIRNAME "$path"`"
26479        base="`$BASENAME "$path"`"
26480        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26481      fi
26482    fi
26483  fi
26484
26485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26486$as_echo_n "checking for Boot JDK... " >&6; }
26487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26488$as_echo "$BOOT_JDK" >&6; }
26489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26490$as_echo_n "checking Boot JDK version... " >&6; }
26491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26493$as_echo "$BOOT_JDK_VERSION" >&6; }
26494          fi # end check jdk version
26495        fi # end check javac
26496      fi # end check java
26497    fi # end check boot jdk found
26498  fi
26499
26500  fi
26501
26502
26503    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26504    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26505      # Do we have a bin/java?
26506      if test ! -x "$BOOT_JDK/bin/java"; then
26507        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26509        BOOT_JDK_FOUND=no
26510      else
26511        # Do we have a bin/javac?
26512        if test ! -x "$BOOT_JDK/bin/javac"; then
26513          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26515          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26516$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26517          BOOT_JDK_FOUND=no
26518        else
26519          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26520          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26521
26522          # Extra M4 quote needed to protect [] in grep expression.
26523          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26524          if test "x$FOUND_CORRECT_VERSION" = x; then
26525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26527            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26528$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26529            BOOT_JDK_FOUND=no
26530          else
26531            # We're done! :-)
26532            BOOT_JDK_FOUND=yes
26533
26534  # Only process if variable expands to non-empty
26535
26536  if test "x$BOOT_JDK" != x; then
26537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538
26539  # Input might be given as Windows format, start by converting to
26540  # unix format.
26541  path="$BOOT_JDK"
26542  new_path=`$CYGPATH -u "$path"`
26543
26544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26547  # "foo.exe" is OK but "foo" is an error.
26548  #
26549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26550  # It is also a way to make sure we got the proper file name for the real test later on.
26551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26552  if test "x$test_shortpath" = x; then
26553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26556  fi
26557
26558  # Call helper function which possibly converts this using DOS-style short mode.
26559  # If so, the updated path is stored in $new_path.
26560
26561  input_path="$new_path"
26562  # Check if we need to convert this using DOS-style short mode. If the path
26563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26564  # take no chances and rewrite it.
26565  # Note: m4 eats our [], so we need to use [ and ] instead.
26566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26567  if test "x$has_forbidden_chars" != x; then
26568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26572      # Going to short mode and back again did indeed matter. Since short mode is
26573      # case insensitive, let's make it lowercase to improve readability.
26574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26575      # Now convert it back to Unix-style (cygpath)
26576      input_path=`$CYGPATH -u "$shortmode_path"`
26577      new_path="$input_path"
26578    fi
26579  fi
26580
26581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26582  if test "x$test_cygdrive_prefix" = x; then
26583    # As a simple fix, exclude /usr/bin since it's not a real path.
26584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26586      # a path prefixed by /cygdrive for fixpath to work.
26587      new_path="$CYGWIN_ROOT_PATH$input_path"
26588    fi
26589  fi
26590
26591
26592  if test "x$path" != "x$new_path"; then
26593    BOOT_JDK="$new_path"
26594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26596  fi
26597
26598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26599
26600  path="$BOOT_JDK"
26601  has_colon=`$ECHO $path | $GREP ^.:`
26602  new_path="$path"
26603  if test "x$has_colon" = x; then
26604    # Not in mixed or Windows style, start by that.
26605    new_path=`cmd //c echo $path`
26606  fi
26607
26608
26609  input_path="$new_path"
26610  # Check if we need to convert this using DOS-style short mode. If the path
26611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26612  # take no chances and rewrite it.
26613  # Note: m4 eats our [], so we need to use [ and ] instead.
26614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26615  if test "x$has_forbidden_chars" != x; then
26616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26618  fi
26619
26620
26621  windows_path="$new_path"
26622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26623    unix_path=`$CYGPATH -u "$windows_path"`
26624    new_path="$unix_path"
26625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26627    new_path="$unix_path"
26628  fi
26629
26630  if test "x$path" != "x$new_path"; then
26631    BOOT_JDK="$new_path"
26632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26634  fi
26635
26636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26638
26639    else
26640      # We're on a unix platform. Hooray! :)
26641      path="$BOOT_JDK"
26642      has_space=`$ECHO "$path" | $GREP " "`
26643      if test "x$has_space" != x; then
26644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26647      fi
26648
26649      # Use eval to expand a potential ~
26650      eval path="$path"
26651      if test ! -f "$path" && test ! -d "$path"; then
26652        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26653      fi
26654
26655      if test -d "$path"; then
26656        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26657      else
26658        dir="`$DIRNAME "$path"`"
26659        base="`$BASENAME "$path"`"
26660        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26661      fi
26662    fi
26663  fi
26664
26665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26666$as_echo_n "checking for Boot JDK... " >&6; }
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26668$as_echo "$BOOT_JDK" >&6; }
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26670$as_echo_n "checking Boot JDK version... " >&6; }
26671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26673$as_echo "$BOOT_JDK_VERSION" >&6; }
26674          fi # end check jdk version
26675        fi # end check javac
26676      fi # end check java
26677    fi # end check boot jdk found
26678  fi
26679
26680
26681  # Test: Is $JAVA_HOME set?
26682
26683  if test "x$BOOT_JDK_FOUND" = xno; then
26684    # Now execute the test
26685
26686  if test "x$JAVA_HOME" != x; then
26687    JAVA_HOME_PROCESSED="$JAVA_HOME"
26688
26689  # Only process if variable expands to non-empty
26690
26691  if test "x$JAVA_HOME_PROCESSED" != x; then
26692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26693
26694  # Input might be given as Windows format, start by converting to
26695  # unix format.
26696  path="$JAVA_HOME_PROCESSED"
26697  new_path=`$CYGPATH -u "$path"`
26698
26699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26702  # "foo.exe" is OK but "foo" is an error.
26703  #
26704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26705  # It is also a way to make sure we got the proper file name for the real test later on.
26706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26707  if test "x$test_shortpath" = x; then
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26709$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26710    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26711  fi
26712
26713  # Call helper function which possibly converts this using DOS-style short mode.
26714  # If so, the updated path is stored in $new_path.
26715
26716  input_path="$new_path"
26717  # Check if we need to convert this using DOS-style short mode. If the path
26718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26719  # take no chances and rewrite it.
26720  # Note: m4 eats our [], so we need to use [ and ] instead.
26721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26722  if test "x$has_forbidden_chars" != x; then
26723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26727      # Going to short mode and back again did indeed matter. Since short mode is
26728      # case insensitive, let's make it lowercase to improve readability.
26729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26730      # Now convert it back to Unix-style (cygpath)
26731      input_path=`$CYGPATH -u "$shortmode_path"`
26732      new_path="$input_path"
26733    fi
26734  fi
26735
26736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26737  if test "x$test_cygdrive_prefix" = x; then
26738    # As a simple fix, exclude /usr/bin since it's not a real path.
26739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26741      # a path prefixed by /cygdrive for fixpath to work.
26742      new_path="$CYGWIN_ROOT_PATH$input_path"
26743    fi
26744  fi
26745
26746
26747  if test "x$path" != "x$new_path"; then
26748    JAVA_HOME_PROCESSED="$new_path"
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26750$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26751  fi
26752
26753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754
26755  path="$JAVA_HOME_PROCESSED"
26756  has_colon=`$ECHO $path | $GREP ^.:`
26757  new_path="$path"
26758  if test "x$has_colon" = x; then
26759    # Not in mixed or Windows style, start by that.
26760    new_path=`cmd //c echo $path`
26761  fi
26762
26763
26764  input_path="$new_path"
26765  # Check if we need to convert this using DOS-style short mode. If the path
26766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26767  # take no chances and rewrite it.
26768  # Note: m4 eats our [], so we need to use [ and ] instead.
26769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26770  if test "x$has_forbidden_chars" != x; then
26771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26773  fi
26774
26775
26776  windows_path="$new_path"
26777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26778    unix_path=`$CYGPATH -u "$windows_path"`
26779    new_path="$unix_path"
26780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26782    new_path="$unix_path"
26783  fi
26784
26785  if test "x$path" != "x$new_path"; then
26786    JAVA_HOME_PROCESSED="$new_path"
26787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26788$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26789  fi
26790
26791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26793
26794    else
26795      # We're on a unix platform. Hooray! :)
26796      path="$JAVA_HOME_PROCESSED"
26797      has_space=`$ECHO "$path" | $GREP " "`
26798      if test "x$has_space" != x; then
26799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26800$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26802      fi
26803
26804      # Use eval to expand a potential ~
26805      eval path="$path"
26806      if test ! -f "$path" && test ! -d "$path"; then
26807        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26808      fi
26809
26810      if test -d "$path"; then
26811        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26812      else
26813        dir="`$DIRNAME "$path"`"
26814        base="`$BASENAME "$path"`"
26815        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26816      fi
26817    fi
26818  fi
26819
26820    if test ! -d "$JAVA_HOME_PROCESSED"; then
26821      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26822$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26823    else
26824      # Aha, the user has set a JAVA_HOME
26825      # let us use that as the Boot JDK.
26826      BOOT_JDK="$JAVA_HOME_PROCESSED"
26827      BOOT_JDK_FOUND=maybe
26828      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26829$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26830    fi
26831  fi
26832
26833
26834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26836      # Do we have a bin/java?
26837      if test ! -x "$BOOT_JDK/bin/java"; then
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26840        BOOT_JDK_FOUND=no
26841      else
26842        # Do we have a bin/javac?
26843        if test ! -x "$BOOT_JDK/bin/javac"; then
26844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26848          BOOT_JDK_FOUND=no
26849        else
26850          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26851          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26852
26853          # Extra M4 quote needed to protect [] in grep expression.
26854          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26855          if test "x$FOUND_CORRECT_VERSION" = x; then
26856            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26858            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26859$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26860            BOOT_JDK_FOUND=no
26861          else
26862            # We're done! :-)
26863            BOOT_JDK_FOUND=yes
26864
26865  # Only process if variable expands to non-empty
26866
26867  if test "x$BOOT_JDK" != x; then
26868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26869
26870  # Input might be given as Windows format, start by converting to
26871  # unix format.
26872  path="$BOOT_JDK"
26873  new_path=`$CYGPATH -u "$path"`
26874
26875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26878  # "foo.exe" is OK but "foo" is an error.
26879  #
26880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26881  # It is also a way to make sure we got the proper file name for the real test later on.
26882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26883  if test "x$test_shortpath" = x; then
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26887  fi
26888
26889  # Call helper function which possibly converts this using DOS-style short mode.
26890  # If so, the updated path is stored in $new_path.
26891
26892  input_path="$new_path"
26893  # Check if we need to convert this using DOS-style short mode. If the path
26894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26895  # take no chances and rewrite it.
26896  # Note: m4 eats our [], so we need to use [ and ] instead.
26897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26898  if test "x$has_forbidden_chars" != x; then
26899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26903      # Going to short mode and back again did indeed matter. Since short mode is
26904      # case insensitive, let's make it lowercase to improve readability.
26905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26906      # Now convert it back to Unix-style (cygpath)
26907      input_path=`$CYGPATH -u "$shortmode_path"`
26908      new_path="$input_path"
26909    fi
26910  fi
26911
26912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26913  if test "x$test_cygdrive_prefix" = x; then
26914    # As a simple fix, exclude /usr/bin since it's not a real path.
26915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26917      # a path prefixed by /cygdrive for fixpath to work.
26918      new_path="$CYGWIN_ROOT_PATH$input_path"
26919    fi
26920  fi
26921
26922
26923  if test "x$path" != "x$new_path"; then
26924    BOOT_JDK="$new_path"
26925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26927  fi
26928
26929    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930
26931  path="$BOOT_JDK"
26932  has_colon=`$ECHO $path | $GREP ^.:`
26933  new_path="$path"
26934  if test "x$has_colon" = x; then
26935    # Not in mixed or Windows style, start by that.
26936    new_path=`cmd //c echo $path`
26937  fi
26938
26939
26940  input_path="$new_path"
26941  # Check if we need to convert this using DOS-style short mode. If the path
26942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26943  # take no chances and rewrite it.
26944  # Note: m4 eats our [], so we need to use [ and ] instead.
26945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26946  if test "x$has_forbidden_chars" != x; then
26947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26949  fi
26950
26951
26952  windows_path="$new_path"
26953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26954    unix_path=`$CYGPATH -u "$windows_path"`
26955    new_path="$unix_path"
26956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26958    new_path="$unix_path"
26959  fi
26960
26961  if test "x$path" != "x$new_path"; then
26962    BOOT_JDK="$new_path"
26963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26965  fi
26966
26967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26969
26970    else
26971      # We're on a unix platform. Hooray! :)
26972      path="$BOOT_JDK"
26973      has_space=`$ECHO "$path" | $GREP " "`
26974      if test "x$has_space" != x; then
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26977        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26978      fi
26979
26980      # Use eval to expand a potential ~
26981      eval path="$path"
26982      if test ! -f "$path" && test ! -d "$path"; then
26983        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26984      fi
26985
26986      if test -d "$path"; then
26987        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26988      else
26989        dir="`$DIRNAME "$path"`"
26990        base="`$BASENAME "$path"`"
26991        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26992      fi
26993    fi
26994  fi
26995
26996            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26997$as_echo_n "checking for Boot JDK... " >&6; }
26998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26999$as_echo "$BOOT_JDK" >&6; }
27000            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27001$as_echo_n "checking Boot JDK version... " >&6; }
27002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27004$as_echo "$BOOT_JDK_VERSION" >&6; }
27005          fi # end check jdk version
27006        fi # end check javac
27007      fi # end check java
27008    fi # end check boot jdk found
27009  fi
27010
27011
27012  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27013
27014  if test "x$BOOT_JDK_FOUND" = xno; then
27015    # Now execute the test
27016
27017  # Extract the first word of "javac", so it can be a program name with args.
27018set dummy javac; ac_word=$2
27019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27020$as_echo_n "checking for $ac_word... " >&6; }
27021if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27022  $as_echo_n "(cached) " >&6
27023else
27024  case $JAVAC_CHECK in
27025  [\\/]* | ?:[\\/]*)
27026  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27027  ;;
27028  *)
27029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27030for as_dir in $PATH
27031do
27032  IFS=$as_save_IFS
27033  test -z "$as_dir" && as_dir=.
27034    for ac_exec_ext in '' $ac_executable_extensions; do
27035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27036    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27038    break 2
27039  fi
27040done
27041  done
27042IFS=$as_save_IFS
27043
27044  ;;
27045esac
27046fi
27047JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27048if test -n "$JAVAC_CHECK"; then
27049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27050$as_echo "$JAVAC_CHECK" >&6; }
27051else
27052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27053$as_echo "no" >&6; }
27054fi
27055
27056
27057  # Extract the first word of "java", so it can be a program name with args.
27058set dummy java; ac_word=$2
27059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27060$as_echo_n "checking for $ac_word... " >&6; }
27061if ${ac_cv_path_JAVA_CHECK+:} false; then :
27062  $as_echo_n "(cached) " >&6
27063else
27064  case $JAVA_CHECK in
27065  [\\/]* | ?:[\\/]*)
27066  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27067  ;;
27068  *)
27069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27070for as_dir in $PATH
27071do
27072  IFS=$as_save_IFS
27073  test -z "$as_dir" && as_dir=.
27074    for ac_exec_ext in '' $ac_executable_extensions; do
27075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27076    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27078    break 2
27079  fi
27080done
27081  done
27082IFS=$as_save_IFS
27083
27084  ;;
27085esac
27086fi
27087JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27088if test -n "$JAVA_CHECK"; then
27089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27090$as_echo "$JAVA_CHECK" >&6; }
27091else
27092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27093$as_echo "no" >&6; }
27094fi
27095
27096
27097  BINARY="$JAVAC_CHECK"
27098  if test "x$JAVAC_CHECK" = x; then
27099    BINARY="$JAVA_CHECK"
27100  fi
27101  if test "x$BINARY" != x; then
27102    # So there is a java(c) binary, it might be part of a JDK.
27103    # Lets find the JDK/JRE directory by following symbolic links.
27104    # Linux/GNU systems often have links from /usr/bin/java to
27105    # /etc/alternatives/java to the real JDK binary.
27106
27107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27108    # Follow a chain of symbolic links. Use readlink
27109    # where it exists, else fall back to horribly
27110    # complicated shell code.
27111    if test "x$READLINK_TESTED" != yes; then
27112      # On MacOSX there is a readlink tool with a different
27113      # purpose than the GNU readlink tool. Check the found readlink.
27114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27115      if test "x$ISGNU" = x; then
27116        # A readlink that we do not know how to use.
27117        # Are there other non-GNU readlinks out there?
27118        READLINK_TESTED=yes
27119        READLINK=
27120      fi
27121    fi
27122
27123    if test "x$READLINK" != x; then
27124      BINARY=`$READLINK -f $BINARY`
27125    else
27126      # Save the current directory for restoring afterwards
27127      STARTDIR=$PWD
27128      COUNTER=0
27129      sym_link_dir=`$DIRNAME $BINARY`
27130      sym_link_file=`$BASENAME $BINARY`
27131      cd $sym_link_dir
27132      # Use -P flag to resolve symlinks in directories.
27133      cd `$THEPWDCMD -P`
27134      sym_link_dir=`$THEPWDCMD -P`
27135      # Resolve file symlinks
27136      while test $COUNTER -lt 20; do
27137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27138        if test "x$ISLINK" == x; then
27139          # This is not a symbolic link! We are done!
27140          break
27141        fi
27142        # Again resolve directory symlinks since the target of the just found
27143        # link could be in a different directory
27144        cd `$DIRNAME $ISLINK`
27145        sym_link_dir=`$THEPWDCMD -P`
27146        sym_link_file=`$BASENAME $ISLINK`
27147        let COUNTER=COUNTER+1
27148      done
27149      cd $STARTDIR
27150      BINARY=$sym_link_dir/$sym_link_file
27151    fi
27152  fi
27153
27154    BOOT_JDK=`dirname "$BINARY"`
27155    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27156    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27157      # Looks like we found ourselves an JDK
27158      BOOT_JDK_FOUND=maybe
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27160$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27161    fi
27162  fi
27163
27164
27165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27167      # Do we have a bin/java?
27168      if test ! -x "$BOOT_JDK/bin/java"; then
27169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27171        BOOT_JDK_FOUND=no
27172      else
27173        # Do we have a bin/javac?
27174        if test ! -x "$BOOT_JDK/bin/javac"; then
27175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27179          BOOT_JDK_FOUND=no
27180        else
27181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27183
27184          # Extra M4 quote needed to protect [] in grep expression.
27185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27186          if test "x$FOUND_CORRECT_VERSION" = x; then
27187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27191            BOOT_JDK_FOUND=no
27192          else
27193            # We're done! :-)
27194            BOOT_JDK_FOUND=yes
27195
27196  # Only process if variable expands to non-empty
27197
27198  if test "x$BOOT_JDK" != x; then
27199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200
27201  # Input might be given as Windows format, start by converting to
27202  # unix format.
27203  path="$BOOT_JDK"
27204  new_path=`$CYGPATH -u "$path"`
27205
27206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27209  # "foo.exe" is OK but "foo" is an error.
27210  #
27211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27212  # It is also a way to make sure we got the proper file name for the real test later on.
27213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27214  if test "x$test_shortpath" = x; then
27215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27218  fi
27219
27220  # Call helper function which possibly converts this using DOS-style short mode.
27221  # If so, the updated path is stored in $new_path.
27222
27223  input_path="$new_path"
27224  # Check if we need to convert this using DOS-style short mode. If the path
27225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27226  # take no chances and rewrite it.
27227  # Note: m4 eats our [], so we need to use [ and ] instead.
27228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27229  if test "x$has_forbidden_chars" != x; then
27230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27234      # Going to short mode and back again did indeed matter. Since short mode is
27235      # case insensitive, let's make it lowercase to improve readability.
27236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27237      # Now convert it back to Unix-style (cygpath)
27238      input_path=`$CYGPATH -u "$shortmode_path"`
27239      new_path="$input_path"
27240    fi
27241  fi
27242
27243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27244  if test "x$test_cygdrive_prefix" = x; then
27245    # As a simple fix, exclude /usr/bin since it's not a real path.
27246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27248      # a path prefixed by /cygdrive for fixpath to work.
27249      new_path="$CYGWIN_ROOT_PATH$input_path"
27250    fi
27251  fi
27252
27253
27254  if test "x$path" != "x$new_path"; then
27255    BOOT_JDK="$new_path"
27256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27258  fi
27259
27260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27261
27262  path="$BOOT_JDK"
27263  has_colon=`$ECHO $path | $GREP ^.:`
27264  new_path="$path"
27265  if test "x$has_colon" = x; then
27266    # Not in mixed or Windows style, start by that.
27267    new_path=`cmd //c echo $path`
27268  fi
27269
27270
27271  input_path="$new_path"
27272  # Check if we need to convert this using DOS-style short mode. If the path
27273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27274  # take no chances and rewrite it.
27275  # Note: m4 eats our [], so we need to use [ and ] instead.
27276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27277  if test "x$has_forbidden_chars" != x; then
27278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27280  fi
27281
27282
27283  windows_path="$new_path"
27284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27285    unix_path=`$CYGPATH -u "$windows_path"`
27286    new_path="$unix_path"
27287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27289    new_path="$unix_path"
27290  fi
27291
27292  if test "x$path" != "x$new_path"; then
27293    BOOT_JDK="$new_path"
27294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27296  fi
27297
27298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27300
27301    else
27302      # We're on a unix platform. Hooray! :)
27303      path="$BOOT_JDK"
27304      has_space=`$ECHO "$path" | $GREP " "`
27305      if test "x$has_space" != x; then
27306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27309      fi
27310
27311      # Use eval to expand a potential ~
27312      eval path="$path"
27313      if test ! -f "$path" && test ! -d "$path"; then
27314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27315      fi
27316
27317      if test -d "$path"; then
27318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27319      else
27320        dir="`$DIRNAME "$path"`"
27321        base="`$BASENAME "$path"`"
27322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27323      fi
27324    fi
27325  fi
27326
27327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27328$as_echo_n "checking for Boot JDK... " >&6; }
27329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27330$as_echo "$BOOT_JDK" >&6; }
27331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27332$as_echo_n "checking Boot JDK version... " >&6; }
27333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27335$as_echo "$BOOT_JDK_VERSION" >&6; }
27336          fi # end check jdk version
27337        fi # end check javac
27338      fi # end check java
27339    fi # end check boot jdk found
27340  fi
27341
27342
27343  # Test: Is there a JDK installed in default, well-known locations?
27344
27345  if test "x$BOOT_JDK_FOUND" = xno; then
27346    # Now execute the test
27347
27348  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27349
27350  if test "x$BOOT_JDK_FOUND" = xno; then
27351    # Now execute the test
27352
27353  if test "x$ProgramW6432" != x; then
27354    VIRTUAL_DIR="$ProgramW6432/Java"
27355
27356  windows_path="$VIRTUAL_DIR"
27357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27358    unix_path=`$CYGPATH -u "$windows_path"`
27359    VIRTUAL_DIR="$unix_path"
27360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27362    VIRTUAL_DIR="$unix_path"
27363  fi
27364
27365
27366  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27367  BOOT_JDK_SUFFIX=""
27368  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27369  if test "x$ALL_JDKS_FOUND" != x; then
27370    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27371
27372  if test "x$BOOT_JDK_FOUND" = xno; then
27373    # Now execute the test
27374
27375        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27376        if test -d "$BOOT_JDK"; then
27377          BOOT_JDK_FOUND=maybe
27378          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27379$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27380        fi
27381
27382
27383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27385      # Do we have a bin/java?
27386      if test ! -x "$BOOT_JDK/bin/java"; then
27387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27389        BOOT_JDK_FOUND=no
27390      else
27391        # Do we have a bin/javac?
27392        if test ! -x "$BOOT_JDK/bin/javac"; then
27393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27397          BOOT_JDK_FOUND=no
27398        else
27399          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27400          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27401
27402          # Extra M4 quote needed to protect [] in grep expression.
27403          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27404          if test "x$FOUND_CORRECT_VERSION" = x; then
27405            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27407            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27408$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27409            BOOT_JDK_FOUND=no
27410          else
27411            # We're done! :-)
27412            BOOT_JDK_FOUND=yes
27413
27414  # Only process if variable expands to non-empty
27415
27416  if test "x$BOOT_JDK" != x; then
27417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27418
27419  # Input might be given as Windows format, start by converting to
27420  # unix format.
27421  path="$BOOT_JDK"
27422  new_path=`$CYGPATH -u "$path"`
27423
27424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27427  # "foo.exe" is OK but "foo" is an error.
27428  #
27429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27430  # It is also a way to make sure we got the proper file name for the real test later on.
27431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27432  if test "x$test_shortpath" = x; then
27433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27436  fi
27437
27438  # Call helper function which possibly converts this using DOS-style short mode.
27439  # If so, the updated path is stored in $new_path.
27440
27441  input_path="$new_path"
27442  # Check if we need to convert this using DOS-style short mode. If the path
27443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27444  # take no chances and rewrite it.
27445  # Note: m4 eats our [], so we need to use [ and ] instead.
27446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27447  if test "x$has_forbidden_chars" != x; then
27448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27452      # Going to short mode and back again did indeed matter. Since short mode is
27453      # case insensitive, let's make it lowercase to improve readability.
27454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27455      # Now convert it back to Unix-style (cygpath)
27456      input_path=`$CYGPATH -u "$shortmode_path"`
27457      new_path="$input_path"
27458    fi
27459  fi
27460
27461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27462  if test "x$test_cygdrive_prefix" = x; then
27463    # As a simple fix, exclude /usr/bin since it's not a real path.
27464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27466      # a path prefixed by /cygdrive for fixpath to work.
27467      new_path="$CYGWIN_ROOT_PATH$input_path"
27468    fi
27469  fi
27470
27471
27472  if test "x$path" != "x$new_path"; then
27473    BOOT_JDK="$new_path"
27474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27476  fi
27477
27478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27479
27480  path="$BOOT_JDK"
27481  has_colon=`$ECHO $path | $GREP ^.:`
27482  new_path="$path"
27483  if test "x$has_colon" = x; then
27484    # Not in mixed or Windows style, start by that.
27485    new_path=`cmd //c echo $path`
27486  fi
27487
27488
27489  input_path="$new_path"
27490  # Check if we need to convert this using DOS-style short mode. If the path
27491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27492  # take no chances and rewrite it.
27493  # Note: m4 eats our [], so we need to use [ and ] instead.
27494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27495  if test "x$has_forbidden_chars" != x; then
27496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27498  fi
27499
27500
27501  windows_path="$new_path"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    new_path="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    new_path="$unix_path"
27508  fi
27509
27510  if test "x$path" != "x$new_path"; then
27511    BOOT_JDK="$new_path"
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27514  fi
27515
27516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27518
27519    else
27520      # We're on a unix platform. Hooray! :)
27521      path="$BOOT_JDK"
27522      has_space=`$ECHO "$path" | $GREP " "`
27523      if test "x$has_space" != x; then
27524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27527      fi
27528
27529      # Use eval to expand a potential ~
27530      eval path="$path"
27531      if test ! -f "$path" && test ! -d "$path"; then
27532        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27533      fi
27534
27535      if test -d "$path"; then
27536        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27537      else
27538        dir="`$DIRNAME "$path"`"
27539        base="`$BASENAME "$path"`"
27540        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27541      fi
27542    fi
27543  fi
27544
27545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27546$as_echo_n "checking for Boot JDK... " >&6; }
27547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27548$as_echo "$BOOT_JDK" >&6; }
27549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27550$as_echo_n "checking Boot JDK version... " >&6; }
27551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27553$as_echo "$BOOT_JDK_VERSION" >&6; }
27554          fi # end check jdk version
27555        fi # end check javac
27556      fi # end check java
27557    fi # end check boot jdk found
27558  fi
27559
27560    done
27561  fi
27562
27563  fi
27564
27565
27566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27568      # Do we have a bin/java?
27569      if test ! -x "$BOOT_JDK/bin/java"; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27572        BOOT_JDK_FOUND=no
27573      else
27574        # Do we have a bin/javac?
27575        if test ! -x "$BOOT_JDK/bin/javac"; then
27576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27580          BOOT_JDK_FOUND=no
27581        else
27582          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27583          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27584
27585          # Extra M4 quote needed to protect [] in grep expression.
27586          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27587          if test "x$FOUND_CORRECT_VERSION" = x; then
27588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27590            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27591$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27592            BOOT_JDK_FOUND=no
27593          else
27594            # We're done! :-)
27595            BOOT_JDK_FOUND=yes
27596
27597  # Only process if variable expands to non-empty
27598
27599  if test "x$BOOT_JDK" != x; then
27600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27601
27602  # Input might be given as Windows format, start by converting to
27603  # unix format.
27604  path="$BOOT_JDK"
27605  new_path=`$CYGPATH -u "$path"`
27606
27607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27610  # "foo.exe" is OK but "foo" is an error.
27611  #
27612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27613  # It is also a way to make sure we got the proper file name for the real test later on.
27614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27615  if test "x$test_shortpath" = x; then
27616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27619  fi
27620
27621  # Call helper function which possibly converts this using DOS-style short mode.
27622  # If so, the updated path is stored in $new_path.
27623
27624  input_path="$new_path"
27625  # Check if we need to convert this using DOS-style short mode. If the path
27626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27627  # take no chances and rewrite it.
27628  # Note: m4 eats our [], so we need to use [ and ] instead.
27629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27630  if test "x$has_forbidden_chars" != x; then
27631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27635      # Going to short mode and back again did indeed matter. Since short mode is
27636      # case insensitive, let's make it lowercase to improve readability.
27637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27638      # Now convert it back to Unix-style (cygpath)
27639      input_path=`$CYGPATH -u "$shortmode_path"`
27640      new_path="$input_path"
27641    fi
27642  fi
27643
27644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27645  if test "x$test_cygdrive_prefix" = x; then
27646    # As a simple fix, exclude /usr/bin since it's not a real path.
27647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27649      # a path prefixed by /cygdrive for fixpath to work.
27650      new_path="$CYGWIN_ROOT_PATH$input_path"
27651    fi
27652  fi
27653
27654
27655  if test "x$path" != "x$new_path"; then
27656    BOOT_JDK="$new_path"
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27659  fi
27660
27661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27662
27663  path="$BOOT_JDK"
27664  has_colon=`$ECHO $path | $GREP ^.:`
27665  new_path="$path"
27666  if test "x$has_colon" = x; then
27667    # Not in mixed or Windows style, start by that.
27668    new_path=`cmd //c echo $path`
27669  fi
27670
27671
27672  input_path="$new_path"
27673  # Check if we need to convert this using DOS-style short mode. If the path
27674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27675  # take no chances and rewrite it.
27676  # Note: m4 eats our [], so we need to use [ and ] instead.
27677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27678  if test "x$has_forbidden_chars" != x; then
27679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27681  fi
27682
27683
27684  windows_path="$new_path"
27685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27686    unix_path=`$CYGPATH -u "$windows_path"`
27687    new_path="$unix_path"
27688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27690    new_path="$unix_path"
27691  fi
27692
27693  if test "x$path" != "x$new_path"; then
27694    BOOT_JDK="$new_path"
27695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27697  fi
27698
27699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27701
27702    else
27703      # We're on a unix platform. Hooray! :)
27704      path="$BOOT_JDK"
27705      has_space=`$ECHO "$path" | $GREP " "`
27706      if test "x$has_space" != x; then
27707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27710      fi
27711
27712      # Use eval to expand a potential ~
27713      eval path="$path"
27714      if test ! -f "$path" && test ! -d "$path"; then
27715        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27716      fi
27717
27718      if test -d "$path"; then
27719        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27720      else
27721        dir="`$DIRNAME "$path"`"
27722        base="`$BASENAME "$path"`"
27723        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27724      fi
27725    fi
27726  fi
27727
27728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27729$as_echo_n "checking for Boot JDK... " >&6; }
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27731$as_echo "$BOOT_JDK" >&6; }
27732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27733$as_echo_n "checking Boot JDK version... " >&6; }
27734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27736$as_echo "$BOOT_JDK_VERSION" >&6; }
27737          fi # end check jdk version
27738        fi # end check javac
27739      fi # end check java
27740    fi # end check boot jdk found
27741  fi
27742
27743
27744  if test "x$BOOT_JDK_FOUND" = xno; then
27745    # Now execute the test
27746
27747  if test "x$PROGRAMW6432" != x; then
27748    VIRTUAL_DIR="$PROGRAMW6432/Java"
27749
27750  windows_path="$VIRTUAL_DIR"
27751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27752    unix_path=`$CYGPATH -u "$windows_path"`
27753    VIRTUAL_DIR="$unix_path"
27754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27756    VIRTUAL_DIR="$unix_path"
27757  fi
27758
27759
27760  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27761  BOOT_JDK_SUFFIX=""
27762  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27763  if test "x$ALL_JDKS_FOUND" != x; then
27764    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27765
27766  if test "x$BOOT_JDK_FOUND" = xno; then
27767    # Now execute the test
27768
27769        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27770        if test -d "$BOOT_JDK"; then
27771          BOOT_JDK_FOUND=maybe
27772          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27773$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27774        fi
27775
27776
27777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27779      # Do we have a bin/java?
27780      if test ! -x "$BOOT_JDK/bin/java"; then
27781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27783        BOOT_JDK_FOUND=no
27784      else
27785        # Do we have a bin/javac?
27786        if test ! -x "$BOOT_JDK/bin/javac"; then
27787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27791          BOOT_JDK_FOUND=no
27792        else
27793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27795
27796          # Extra M4 quote needed to protect [] in grep expression.
27797          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27798          if test "x$FOUND_CORRECT_VERSION" = x; then
27799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27803            BOOT_JDK_FOUND=no
27804          else
27805            # We're done! :-)
27806            BOOT_JDK_FOUND=yes
27807
27808  # Only process if variable expands to non-empty
27809
27810  if test "x$BOOT_JDK" != x; then
27811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27812
27813  # Input might be given as Windows format, start by converting to
27814  # unix format.
27815  path="$BOOT_JDK"
27816  new_path=`$CYGPATH -u "$path"`
27817
27818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27821  # "foo.exe" is OK but "foo" is an error.
27822  #
27823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27824  # It is also a way to make sure we got the proper file name for the real test later on.
27825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27826  if test "x$test_shortpath" = x; then
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27830  fi
27831
27832  # Call helper function which possibly converts this using DOS-style short mode.
27833  # If so, the updated path is stored in $new_path.
27834
27835  input_path="$new_path"
27836  # Check if we need to convert this using DOS-style short mode. If the path
27837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27838  # take no chances and rewrite it.
27839  # Note: m4 eats our [], so we need to use [ and ] instead.
27840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27841  if test "x$has_forbidden_chars" != x; then
27842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27846      # Going to short mode and back again did indeed matter. Since short mode is
27847      # case insensitive, let's make it lowercase to improve readability.
27848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27849      # Now convert it back to Unix-style (cygpath)
27850      input_path=`$CYGPATH -u "$shortmode_path"`
27851      new_path="$input_path"
27852    fi
27853  fi
27854
27855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27856  if test "x$test_cygdrive_prefix" = x; then
27857    # As a simple fix, exclude /usr/bin since it's not a real path.
27858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27860      # a path prefixed by /cygdrive for fixpath to work.
27861      new_path="$CYGWIN_ROOT_PATH$input_path"
27862    fi
27863  fi
27864
27865
27866  if test "x$path" != "x$new_path"; then
27867    BOOT_JDK="$new_path"
27868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27870  fi
27871
27872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27873
27874  path="$BOOT_JDK"
27875  has_colon=`$ECHO $path | $GREP ^.:`
27876  new_path="$path"
27877  if test "x$has_colon" = x; then
27878    # Not in mixed or Windows style, start by that.
27879    new_path=`cmd //c echo $path`
27880  fi
27881
27882
27883  input_path="$new_path"
27884  # Check if we need to convert this using DOS-style short mode. If the path
27885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27886  # take no chances and rewrite it.
27887  # Note: m4 eats our [], so we need to use [ and ] instead.
27888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27889  if test "x$has_forbidden_chars" != x; then
27890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27892  fi
27893
27894
27895  windows_path="$new_path"
27896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27897    unix_path=`$CYGPATH -u "$windows_path"`
27898    new_path="$unix_path"
27899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27901    new_path="$unix_path"
27902  fi
27903
27904  if test "x$path" != "x$new_path"; then
27905    BOOT_JDK="$new_path"
27906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27908  fi
27909
27910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27912
27913    else
27914      # We're on a unix platform. Hooray! :)
27915      path="$BOOT_JDK"
27916      has_space=`$ECHO "$path" | $GREP " "`
27917      if test "x$has_space" != x; then
27918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27921      fi
27922
27923      # Use eval to expand a potential ~
27924      eval path="$path"
27925      if test ! -f "$path" && test ! -d "$path"; then
27926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27927      fi
27928
27929      if test -d "$path"; then
27930        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27931      else
27932        dir="`$DIRNAME "$path"`"
27933        base="`$BASENAME "$path"`"
27934        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27935      fi
27936    fi
27937  fi
27938
27939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27940$as_echo_n "checking for Boot JDK... " >&6; }
27941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27942$as_echo "$BOOT_JDK" >&6; }
27943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27944$as_echo_n "checking Boot JDK version... " >&6; }
27945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27947$as_echo "$BOOT_JDK_VERSION" >&6; }
27948          fi # end check jdk version
27949        fi # end check javac
27950      fi # end check java
27951    fi # end check boot jdk found
27952  fi
27953
27954    done
27955  fi
27956
27957  fi
27958
27959
27960    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27961    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27962      # Do we have a bin/java?
27963      if test ! -x "$BOOT_JDK/bin/java"; then
27964        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27966        BOOT_JDK_FOUND=no
27967      else
27968        # Do we have a bin/javac?
27969        if test ! -x "$BOOT_JDK/bin/javac"; then
27970          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27972          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27973$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27974          BOOT_JDK_FOUND=no
27975        else
27976          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27977          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27978
27979          # Extra M4 quote needed to protect [] in grep expression.
27980          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27981          if test "x$FOUND_CORRECT_VERSION" = x; then
27982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27984            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27985$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27986            BOOT_JDK_FOUND=no
27987          else
27988            # We're done! :-)
27989            BOOT_JDK_FOUND=yes
27990
27991  # Only process if variable expands to non-empty
27992
27993  if test "x$BOOT_JDK" != x; then
27994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27995
27996  # Input might be given as Windows format, start by converting to
27997  # unix format.
27998  path="$BOOT_JDK"
27999  new_path=`$CYGPATH -u "$path"`
28000
28001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28004  # "foo.exe" is OK but "foo" is an error.
28005  #
28006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28007  # It is also a way to make sure we got the proper file name for the real test later on.
28008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28009  if test "x$test_shortpath" = x; then
28010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28012    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28013  fi
28014
28015  # Call helper function which possibly converts this using DOS-style short mode.
28016  # If so, the updated path is stored in $new_path.
28017
28018  input_path="$new_path"
28019  # Check if we need to convert this using DOS-style short mode. If the path
28020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28021  # take no chances and rewrite it.
28022  # Note: m4 eats our [], so we need to use [ and ] instead.
28023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28024  if test "x$has_forbidden_chars" != x; then
28025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28029      # Going to short mode and back again did indeed matter. Since short mode is
28030      # case insensitive, let's make it lowercase to improve readability.
28031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28032      # Now convert it back to Unix-style (cygpath)
28033      input_path=`$CYGPATH -u "$shortmode_path"`
28034      new_path="$input_path"
28035    fi
28036  fi
28037
28038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28039  if test "x$test_cygdrive_prefix" = x; then
28040    # As a simple fix, exclude /usr/bin since it's not a real path.
28041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28043      # a path prefixed by /cygdrive for fixpath to work.
28044      new_path="$CYGWIN_ROOT_PATH$input_path"
28045    fi
28046  fi
28047
28048
28049  if test "x$path" != "x$new_path"; then
28050    BOOT_JDK="$new_path"
28051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28053  fi
28054
28055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28056
28057  path="$BOOT_JDK"
28058  has_colon=`$ECHO $path | $GREP ^.:`
28059  new_path="$path"
28060  if test "x$has_colon" = x; then
28061    # Not in mixed or Windows style, start by that.
28062    new_path=`cmd //c echo $path`
28063  fi
28064
28065
28066  input_path="$new_path"
28067  # Check if we need to convert this using DOS-style short mode. If the path
28068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28069  # take no chances and rewrite it.
28070  # Note: m4 eats our [], so we need to use [ and ] instead.
28071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28072  if test "x$has_forbidden_chars" != x; then
28073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28075  fi
28076
28077
28078  windows_path="$new_path"
28079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28080    unix_path=`$CYGPATH -u "$windows_path"`
28081    new_path="$unix_path"
28082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28084    new_path="$unix_path"
28085  fi
28086
28087  if test "x$path" != "x$new_path"; then
28088    BOOT_JDK="$new_path"
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28091  fi
28092
28093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28095
28096    else
28097      # We're on a unix platform. Hooray! :)
28098      path="$BOOT_JDK"
28099      has_space=`$ECHO "$path" | $GREP " "`
28100      if test "x$has_space" != x; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28104      fi
28105
28106      # Use eval to expand a potential ~
28107      eval path="$path"
28108      if test ! -f "$path" && test ! -d "$path"; then
28109        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28110      fi
28111
28112      if test -d "$path"; then
28113        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28114      else
28115        dir="`$DIRNAME "$path"`"
28116        base="`$BASENAME "$path"`"
28117        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28118      fi
28119    fi
28120  fi
28121
28122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28123$as_echo_n "checking for Boot JDK... " >&6; }
28124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28125$as_echo "$BOOT_JDK" >&6; }
28126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28127$as_echo_n "checking Boot JDK version... " >&6; }
28128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28130$as_echo "$BOOT_JDK_VERSION" >&6; }
28131          fi # end check jdk version
28132        fi # end check javac
28133      fi # end check java
28134    fi # end check boot jdk found
28135  fi
28136
28137
28138  if test "x$BOOT_JDK_FOUND" = xno; then
28139    # Now execute the test
28140
28141  if test "x$PROGRAMFILES" != x; then
28142    VIRTUAL_DIR="$PROGRAMFILES/Java"
28143
28144  windows_path="$VIRTUAL_DIR"
28145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28146    unix_path=`$CYGPATH -u "$windows_path"`
28147    VIRTUAL_DIR="$unix_path"
28148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28150    VIRTUAL_DIR="$unix_path"
28151  fi
28152
28153
28154  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28155  BOOT_JDK_SUFFIX=""
28156  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28157  if test "x$ALL_JDKS_FOUND" != x; then
28158    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28164        if test -d "$BOOT_JDK"; then
28165          BOOT_JDK_FOUND=maybe
28166          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28167$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28168        fi
28169
28170
28171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28173      # Do we have a bin/java?
28174      if test ! -x "$BOOT_JDK/bin/java"; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28177        BOOT_JDK_FOUND=no
28178      else
28179        # Do we have a bin/javac?
28180        if test ! -x "$BOOT_JDK/bin/javac"; then
28181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28185          BOOT_JDK_FOUND=no
28186        else
28187          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28188          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28189
28190          # Extra M4 quote needed to protect [] in grep expression.
28191          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28192          if test "x$FOUND_CORRECT_VERSION" = x; then
28193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28195            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28196$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28197            BOOT_JDK_FOUND=no
28198          else
28199            # We're done! :-)
28200            BOOT_JDK_FOUND=yes
28201
28202  # Only process if variable expands to non-empty
28203
28204  if test "x$BOOT_JDK" != x; then
28205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206
28207  # Input might be given as Windows format, start by converting to
28208  # unix format.
28209  path="$BOOT_JDK"
28210  new_path=`$CYGPATH -u "$path"`
28211
28212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28215  # "foo.exe" is OK but "foo" is an error.
28216  #
28217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28218  # It is also a way to make sure we got the proper file name for the real test later on.
28219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28220  if test "x$test_shortpath" = x; then
28221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28224  fi
28225
28226  # Call helper function which possibly converts this using DOS-style short mode.
28227  # If so, the updated path is stored in $new_path.
28228
28229  input_path="$new_path"
28230  # Check if we need to convert this using DOS-style short mode. If the path
28231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28232  # take no chances and rewrite it.
28233  # Note: m4 eats our [], so we need to use [ and ] instead.
28234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28235  if test "x$has_forbidden_chars" != x; then
28236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28240      # Going to short mode and back again did indeed matter. Since short mode is
28241      # case insensitive, let's make it lowercase to improve readability.
28242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28243      # Now convert it back to Unix-style (cygpath)
28244      input_path=`$CYGPATH -u "$shortmode_path"`
28245      new_path="$input_path"
28246    fi
28247  fi
28248
28249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28250  if test "x$test_cygdrive_prefix" = x; then
28251    # As a simple fix, exclude /usr/bin since it's not a real path.
28252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28254      # a path prefixed by /cygdrive for fixpath to work.
28255      new_path="$CYGWIN_ROOT_PATH$input_path"
28256    fi
28257  fi
28258
28259
28260  if test "x$path" != "x$new_path"; then
28261    BOOT_JDK="$new_path"
28262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28264  fi
28265
28266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28267
28268  path="$BOOT_JDK"
28269  has_colon=`$ECHO $path | $GREP ^.:`
28270  new_path="$path"
28271  if test "x$has_colon" = x; then
28272    # Not in mixed or Windows style, start by that.
28273    new_path=`cmd //c echo $path`
28274  fi
28275
28276
28277  input_path="$new_path"
28278  # Check if we need to convert this using DOS-style short mode. If the path
28279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28280  # take no chances and rewrite it.
28281  # Note: m4 eats our [], so we need to use [ and ] instead.
28282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28283  if test "x$has_forbidden_chars" != x; then
28284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28286  fi
28287
28288
28289  windows_path="$new_path"
28290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28291    unix_path=`$CYGPATH -u "$windows_path"`
28292    new_path="$unix_path"
28293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28295    new_path="$unix_path"
28296  fi
28297
28298  if test "x$path" != "x$new_path"; then
28299    BOOT_JDK="$new_path"
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28302  fi
28303
28304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28306
28307    else
28308      # We're on a unix platform. Hooray! :)
28309      path="$BOOT_JDK"
28310      has_space=`$ECHO "$path" | $GREP " "`
28311      if test "x$has_space" != x; then
28312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28315      fi
28316
28317      # Use eval to expand a potential ~
28318      eval path="$path"
28319      if test ! -f "$path" && test ! -d "$path"; then
28320        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28321      fi
28322
28323      if test -d "$path"; then
28324        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28325      else
28326        dir="`$DIRNAME "$path"`"
28327        base="`$BASENAME "$path"`"
28328        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28329      fi
28330    fi
28331  fi
28332
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28334$as_echo_n "checking for Boot JDK... " >&6; }
28335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28336$as_echo "$BOOT_JDK" >&6; }
28337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28338$as_echo_n "checking Boot JDK version... " >&6; }
28339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28341$as_echo "$BOOT_JDK_VERSION" >&6; }
28342          fi # end check jdk version
28343        fi # end check javac
28344      fi # end check java
28345    fi # end check boot jdk found
28346  fi
28347
28348    done
28349  fi
28350
28351  fi
28352
28353
28354    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28355    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28356      # Do we have a bin/java?
28357      if test ! -x "$BOOT_JDK/bin/java"; then
28358        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28360        BOOT_JDK_FOUND=no
28361      else
28362        # Do we have a bin/javac?
28363        if test ! -x "$BOOT_JDK/bin/javac"; then
28364          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28366          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28367$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28368          BOOT_JDK_FOUND=no
28369        else
28370          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28371          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28372
28373          # Extra M4 quote needed to protect [] in grep expression.
28374          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28375          if test "x$FOUND_CORRECT_VERSION" = x; then
28376            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28378            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28379$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28380            BOOT_JDK_FOUND=no
28381          else
28382            # We're done! :-)
28383            BOOT_JDK_FOUND=yes
28384
28385  # Only process if variable expands to non-empty
28386
28387  if test "x$BOOT_JDK" != x; then
28388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28389
28390  # Input might be given as Windows format, start by converting to
28391  # unix format.
28392  path="$BOOT_JDK"
28393  new_path=`$CYGPATH -u "$path"`
28394
28395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28398  # "foo.exe" is OK but "foo" is an error.
28399  #
28400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28401  # It is also a way to make sure we got the proper file name for the real test later on.
28402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28403  if test "x$test_shortpath" = x; then
28404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28407  fi
28408
28409  # Call helper function which possibly converts this using DOS-style short mode.
28410  # If so, the updated path is stored in $new_path.
28411
28412  input_path="$new_path"
28413  # Check if we need to convert this using DOS-style short mode. If the path
28414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28415  # take no chances and rewrite it.
28416  # Note: m4 eats our [], so we need to use [ and ] instead.
28417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28418  if test "x$has_forbidden_chars" != x; then
28419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28423      # Going to short mode and back again did indeed matter. Since short mode is
28424      # case insensitive, let's make it lowercase to improve readability.
28425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28426      # Now convert it back to Unix-style (cygpath)
28427      input_path=`$CYGPATH -u "$shortmode_path"`
28428      new_path="$input_path"
28429    fi
28430  fi
28431
28432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28433  if test "x$test_cygdrive_prefix" = x; then
28434    # As a simple fix, exclude /usr/bin since it's not a real path.
28435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28437      # a path prefixed by /cygdrive for fixpath to work.
28438      new_path="$CYGWIN_ROOT_PATH$input_path"
28439    fi
28440  fi
28441
28442
28443  if test "x$path" != "x$new_path"; then
28444    BOOT_JDK="$new_path"
28445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28447  fi
28448
28449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28450
28451  path="$BOOT_JDK"
28452  has_colon=`$ECHO $path | $GREP ^.:`
28453  new_path="$path"
28454  if test "x$has_colon" = x; then
28455    # Not in mixed or Windows style, start by that.
28456    new_path=`cmd //c echo $path`
28457  fi
28458
28459
28460  input_path="$new_path"
28461  # Check if we need to convert this using DOS-style short mode. If the path
28462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28463  # take no chances and rewrite it.
28464  # Note: m4 eats our [], so we need to use [ and ] instead.
28465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28466  if test "x$has_forbidden_chars" != x; then
28467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28469  fi
28470
28471
28472  windows_path="$new_path"
28473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28474    unix_path=`$CYGPATH -u "$windows_path"`
28475    new_path="$unix_path"
28476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28478    new_path="$unix_path"
28479  fi
28480
28481  if test "x$path" != "x$new_path"; then
28482    BOOT_JDK="$new_path"
28483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28485  fi
28486
28487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28489
28490    else
28491      # We're on a unix platform. Hooray! :)
28492      path="$BOOT_JDK"
28493      has_space=`$ECHO "$path" | $GREP " "`
28494      if test "x$has_space" != x; then
28495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28498      fi
28499
28500      # Use eval to expand a potential ~
28501      eval path="$path"
28502      if test ! -f "$path" && test ! -d "$path"; then
28503        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28504      fi
28505
28506      if test -d "$path"; then
28507        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28508      else
28509        dir="`$DIRNAME "$path"`"
28510        base="`$BASENAME "$path"`"
28511        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28512      fi
28513    fi
28514  fi
28515
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28517$as_echo_n "checking for Boot JDK... " >&6; }
28518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28519$as_echo "$BOOT_JDK" >&6; }
28520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28521$as_echo_n "checking Boot JDK version... " >&6; }
28522            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28524$as_echo "$BOOT_JDK_VERSION" >&6; }
28525          fi # end check jdk version
28526        fi # end check javac
28527      fi # end check java
28528    fi # end check boot jdk found
28529  fi
28530
28531
28532  if test "x$BOOT_JDK_FOUND" = xno; then
28533    # Now execute the test
28534
28535  if test "x$ProgramFiles" != x; then
28536    VIRTUAL_DIR="$ProgramFiles/Java"
28537
28538  windows_path="$VIRTUAL_DIR"
28539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28540    unix_path=`$CYGPATH -u "$windows_path"`
28541    VIRTUAL_DIR="$unix_path"
28542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28544    VIRTUAL_DIR="$unix_path"
28545  fi
28546
28547
28548  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28549  BOOT_JDK_SUFFIX=""
28550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28551  if test "x$ALL_JDKS_FOUND" != x; then
28552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28558        if test -d "$BOOT_JDK"; then
28559          BOOT_JDK_FOUND=maybe
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28562        fi
28563
28564
28565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28567      # Do we have a bin/java?
28568      if test ! -x "$BOOT_JDK/bin/java"; then
28569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28571        BOOT_JDK_FOUND=no
28572      else
28573        # Do we have a bin/javac?
28574        if test ! -x "$BOOT_JDK/bin/javac"; then
28575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28579          BOOT_JDK_FOUND=no
28580        else
28581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28583
28584          # Extra M4 quote needed to protect [] in grep expression.
28585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28586          if test "x$FOUND_CORRECT_VERSION" = x; then
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28591            BOOT_JDK_FOUND=no
28592          else
28593            # We're done! :-)
28594            BOOT_JDK_FOUND=yes
28595
28596  # Only process if variable expands to non-empty
28597
28598  if test "x$BOOT_JDK" != x; then
28599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600
28601  # Input might be given as Windows format, start by converting to
28602  # unix format.
28603  path="$BOOT_JDK"
28604  new_path=`$CYGPATH -u "$path"`
28605
28606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28609  # "foo.exe" is OK but "foo" is an error.
28610  #
28611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28612  # It is also a way to make sure we got the proper file name for the real test later on.
28613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28614  if test "x$test_shortpath" = x; then
28615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28618  fi
28619
28620  # Call helper function which possibly converts this using DOS-style short mode.
28621  # If so, the updated path is stored in $new_path.
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28634      # Going to short mode and back again did indeed matter. Since short mode is
28635      # case insensitive, let's make it lowercase to improve readability.
28636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28637      # Now convert it back to Unix-style (cygpath)
28638      input_path=`$CYGPATH -u "$shortmode_path"`
28639      new_path="$input_path"
28640    fi
28641  fi
28642
28643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28644  if test "x$test_cygdrive_prefix" = x; then
28645    # As a simple fix, exclude /usr/bin since it's not a real path.
28646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28648      # a path prefixed by /cygdrive for fixpath to work.
28649      new_path="$CYGWIN_ROOT_PATH$input_path"
28650    fi
28651  fi
28652
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28661
28662  path="$BOOT_JDK"
28663  has_colon=`$ECHO $path | $GREP ^.:`
28664  new_path="$path"
28665  if test "x$has_colon" = x; then
28666    # Not in mixed or Windows style, start by that.
28667    new_path=`cmd //c echo $path`
28668  fi
28669
28670
28671  input_path="$new_path"
28672  # Check if we need to convert this using DOS-style short mode. If the path
28673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28674  # take no chances and rewrite it.
28675  # Note: m4 eats our [], so we need to use [ and ] instead.
28676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28677  if test "x$has_forbidden_chars" != x; then
28678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28680  fi
28681
28682
28683  windows_path="$new_path"
28684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685    unix_path=`$CYGPATH -u "$windows_path"`
28686    new_path="$unix_path"
28687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28689    new_path="$unix_path"
28690  fi
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700
28701    else
28702      # We're on a unix platform. Hooray! :)
28703      path="$BOOT_JDK"
28704      has_space=`$ECHO "$path" | $GREP " "`
28705      if test "x$has_space" != x; then
28706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28709      fi
28710
28711      # Use eval to expand a potential ~
28712      eval path="$path"
28713      if test ! -f "$path" && test ! -d "$path"; then
28714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28715      fi
28716
28717      if test -d "$path"; then
28718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28719      else
28720        dir="`$DIRNAME "$path"`"
28721        base="`$BASENAME "$path"`"
28722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28723      fi
28724    fi
28725  fi
28726
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28728$as_echo_n "checking for Boot JDK... " >&6; }
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28730$as_echo "$BOOT_JDK" >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28732$as_echo_n "checking Boot JDK version... " >&6; }
28733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28735$as_echo "$BOOT_JDK_VERSION" >&6; }
28736          fi # end check jdk version
28737        fi # end check javac
28738      fi # end check java
28739    fi # end check boot jdk found
28740  fi
28741
28742    done
28743  fi
28744
28745  fi
28746
28747
28748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28750      # Do we have a bin/java?
28751      if test ! -x "$BOOT_JDK/bin/java"; then
28752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28754        BOOT_JDK_FOUND=no
28755      else
28756        # Do we have a bin/javac?
28757        if test ! -x "$BOOT_JDK/bin/javac"; then
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28762          BOOT_JDK_FOUND=no
28763        else
28764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28766
28767          # Extra M4 quote needed to protect [] in grep expression.
28768          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28769          if test "x$FOUND_CORRECT_VERSION" = x; then
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28774            BOOT_JDK_FOUND=no
28775          else
28776            # We're done! :-)
28777            BOOT_JDK_FOUND=yes
28778
28779  # Only process if variable expands to non-empty
28780
28781  if test "x$BOOT_JDK" != x; then
28782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28783
28784  # Input might be given as Windows format, start by converting to
28785  # unix format.
28786  path="$BOOT_JDK"
28787  new_path=`$CYGPATH -u "$path"`
28788
28789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28792  # "foo.exe" is OK but "foo" is an error.
28793  #
28794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28795  # It is also a way to make sure we got the proper file name for the real test later on.
28796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28797  if test "x$test_shortpath" = x; then
28798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28801  fi
28802
28803  # Call helper function which possibly converts this using DOS-style short mode.
28804  # If so, the updated path is stored in $new_path.
28805
28806  input_path="$new_path"
28807  # Check if we need to convert this using DOS-style short mode. If the path
28808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28809  # take no chances and rewrite it.
28810  # Note: m4 eats our [], so we need to use [ and ] instead.
28811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28812  if test "x$has_forbidden_chars" != x; then
28813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28817      # Going to short mode and back again did indeed matter. Since short mode is
28818      # case insensitive, let's make it lowercase to improve readability.
28819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28820      # Now convert it back to Unix-style (cygpath)
28821      input_path=`$CYGPATH -u "$shortmode_path"`
28822      new_path="$input_path"
28823    fi
28824  fi
28825
28826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28827  if test "x$test_cygdrive_prefix" = x; then
28828    # As a simple fix, exclude /usr/bin since it's not a real path.
28829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28831      # a path prefixed by /cygdrive for fixpath to work.
28832      new_path="$CYGWIN_ROOT_PATH$input_path"
28833    fi
28834  fi
28835
28836
28837  if test "x$path" != "x$new_path"; then
28838    BOOT_JDK="$new_path"
28839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28841  fi
28842
28843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28844
28845  path="$BOOT_JDK"
28846  has_colon=`$ECHO $path | $GREP ^.:`
28847  new_path="$path"
28848  if test "x$has_colon" = x; then
28849    # Not in mixed or Windows style, start by that.
28850    new_path=`cmd //c echo $path`
28851  fi
28852
28853
28854  input_path="$new_path"
28855  # Check if we need to convert this using DOS-style short mode. If the path
28856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28857  # take no chances and rewrite it.
28858  # Note: m4 eats our [], so we need to use [ and ] instead.
28859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28860  if test "x$has_forbidden_chars" != x; then
28861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28863  fi
28864
28865
28866  windows_path="$new_path"
28867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28868    unix_path=`$CYGPATH -u "$windows_path"`
28869    new_path="$unix_path"
28870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28872    new_path="$unix_path"
28873  fi
28874
28875  if test "x$path" != "x$new_path"; then
28876    BOOT_JDK="$new_path"
28877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28879  fi
28880
28881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28883
28884    else
28885      # We're on a unix platform. Hooray! :)
28886      path="$BOOT_JDK"
28887      has_space=`$ECHO "$path" | $GREP " "`
28888      if test "x$has_space" != x; then
28889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28892      fi
28893
28894      # Use eval to expand a potential ~
28895      eval path="$path"
28896      if test ! -f "$path" && test ! -d "$path"; then
28897        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28898      fi
28899
28900      if test -d "$path"; then
28901        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28902      else
28903        dir="`$DIRNAME "$path"`"
28904        base="`$BASENAME "$path"`"
28905        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28906      fi
28907    fi
28908  fi
28909
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28911$as_echo_n "checking for Boot JDK... " >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28913$as_echo "$BOOT_JDK" >&6; }
28914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28915$as_echo_n "checking Boot JDK version... " >&6; }
28916            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28918$as_echo "$BOOT_JDK_VERSION" >&6; }
28919          fi # end check jdk version
28920        fi # end check javac
28921      fi # end check java
28922    fi # end check boot jdk found
28923  fi
28924
28925
28926  if test "x$BOOT_JDK_FOUND" = xno; then
28927    # Now execute the test
28928
28929  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28930  BOOT_JDK_SUFFIX=""
28931  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28932  if test "x$ALL_JDKS_FOUND" != x; then
28933    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28934
28935  if test "x$BOOT_JDK_FOUND" = xno; then
28936    # Now execute the test
28937
28938        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28939        if test -d "$BOOT_JDK"; then
28940          BOOT_JDK_FOUND=maybe
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28942$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28943        fi
28944
28945
28946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28948      # Do we have a bin/java?
28949      if test ! -x "$BOOT_JDK/bin/java"; then
28950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28952        BOOT_JDK_FOUND=no
28953      else
28954        # Do we have a bin/javac?
28955        if test ! -x "$BOOT_JDK/bin/javac"; then
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28960          BOOT_JDK_FOUND=no
28961        else
28962          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28963          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28964
28965          # Extra M4 quote needed to protect [] in grep expression.
28966          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28967          if test "x$FOUND_CORRECT_VERSION" = x; then
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28970            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28971$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28972            BOOT_JDK_FOUND=no
28973          else
28974            # We're done! :-)
28975            BOOT_JDK_FOUND=yes
28976
28977  # Only process if variable expands to non-empty
28978
28979  if test "x$BOOT_JDK" != x; then
28980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28981
28982  # Input might be given as Windows format, start by converting to
28983  # unix format.
28984  path="$BOOT_JDK"
28985  new_path=`$CYGPATH -u "$path"`
28986
28987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28990  # "foo.exe" is OK but "foo" is an error.
28991  #
28992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28993  # It is also a way to make sure we got the proper file name for the real test later on.
28994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28995  if test "x$test_shortpath" = x; then
28996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28999  fi
29000
29001  # Call helper function which possibly converts this using DOS-style short mode.
29002  # If so, the updated path is stored in $new_path.
29003
29004  input_path="$new_path"
29005  # Check if we need to convert this using DOS-style short mode. If the path
29006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29007  # take no chances and rewrite it.
29008  # Note: m4 eats our [], so we need to use [ and ] instead.
29009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29010  if test "x$has_forbidden_chars" != x; then
29011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29015      # Going to short mode and back again did indeed matter. Since short mode is
29016      # case insensitive, let's make it lowercase to improve readability.
29017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29018      # Now convert it back to Unix-style (cygpath)
29019      input_path=`$CYGPATH -u "$shortmode_path"`
29020      new_path="$input_path"
29021    fi
29022  fi
29023
29024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29025  if test "x$test_cygdrive_prefix" = x; then
29026    # As a simple fix, exclude /usr/bin since it's not a real path.
29027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29029      # a path prefixed by /cygdrive for fixpath to work.
29030      new_path="$CYGWIN_ROOT_PATH$input_path"
29031    fi
29032  fi
29033
29034
29035  if test "x$path" != "x$new_path"; then
29036    BOOT_JDK="$new_path"
29037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29039  fi
29040
29041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29042
29043  path="$BOOT_JDK"
29044  has_colon=`$ECHO $path | $GREP ^.:`
29045  new_path="$path"
29046  if test "x$has_colon" = x; then
29047    # Not in mixed or Windows style, start by that.
29048    new_path=`cmd //c echo $path`
29049  fi
29050
29051
29052  input_path="$new_path"
29053  # Check if we need to convert this using DOS-style short mode. If the path
29054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29055  # take no chances and rewrite it.
29056  # Note: m4 eats our [], so we need to use [ and ] instead.
29057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29058  if test "x$has_forbidden_chars" != x; then
29059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29061  fi
29062
29063
29064  windows_path="$new_path"
29065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29066    unix_path=`$CYGPATH -u "$windows_path"`
29067    new_path="$unix_path"
29068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29070    new_path="$unix_path"
29071  fi
29072
29073  if test "x$path" != "x$new_path"; then
29074    BOOT_JDK="$new_path"
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29077  fi
29078
29079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29081
29082    else
29083      # We're on a unix platform. Hooray! :)
29084      path="$BOOT_JDK"
29085      has_space=`$ECHO "$path" | $GREP " "`
29086      if test "x$has_space" != x; then
29087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29090      fi
29091
29092      # Use eval to expand a potential ~
29093      eval path="$path"
29094      if test ! -f "$path" && test ! -d "$path"; then
29095        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29096      fi
29097
29098      if test -d "$path"; then
29099        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29100      else
29101        dir="`$DIRNAME "$path"`"
29102        base="`$BASENAME "$path"`"
29103        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29104      fi
29105    fi
29106  fi
29107
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29109$as_echo_n "checking for Boot JDK... " >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29111$as_echo "$BOOT_JDK" >&6; }
29112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29113$as_echo_n "checking Boot JDK version... " >&6; }
29114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29116$as_echo "$BOOT_JDK_VERSION" >&6; }
29117          fi # end check jdk version
29118        fi # end check javac
29119      fi # end check java
29120    fi # end check boot jdk found
29121  fi
29122
29123    done
29124  fi
29125
29126
29127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29129      # Do we have a bin/java?
29130      if test ! -x "$BOOT_JDK/bin/java"; then
29131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29133        BOOT_JDK_FOUND=no
29134      else
29135        # Do we have a bin/javac?
29136        if test ! -x "$BOOT_JDK/bin/javac"; then
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29141          BOOT_JDK_FOUND=no
29142        else
29143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29145
29146          # Extra M4 quote needed to protect [] in grep expression.
29147          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29148          if test "x$FOUND_CORRECT_VERSION" = x; then
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29153            BOOT_JDK_FOUND=no
29154          else
29155            # We're done! :-)
29156            BOOT_JDK_FOUND=yes
29157
29158  # Only process if variable expands to non-empty
29159
29160  if test "x$BOOT_JDK" != x; then
29161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29162
29163  # Input might be given as Windows format, start by converting to
29164  # unix format.
29165  path="$BOOT_JDK"
29166  new_path=`$CYGPATH -u "$path"`
29167
29168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29171  # "foo.exe" is OK but "foo" is an error.
29172  #
29173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29174  # It is also a way to make sure we got the proper file name for the real test later on.
29175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29176  if test "x$test_shortpath" = x; then
29177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29180  fi
29181
29182  # Call helper function which possibly converts this using DOS-style short mode.
29183  # If so, the updated path is stored in $new_path.
29184
29185  input_path="$new_path"
29186  # Check if we need to convert this using DOS-style short mode. If the path
29187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29188  # take no chances and rewrite it.
29189  # Note: m4 eats our [], so we need to use [ and ] instead.
29190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29191  if test "x$has_forbidden_chars" != x; then
29192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29196      # Going to short mode and back again did indeed matter. Since short mode is
29197      # case insensitive, let's make it lowercase to improve readability.
29198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29199      # Now convert it back to Unix-style (cygpath)
29200      input_path=`$CYGPATH -u "$shortmode_path"`
29201      new_path="$input_path"
29202    fi
29203  fi
29204
29205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29206  if test "x$test_cygdrive_prefix" = x; then
29207    # As a simple fix, exclude /usr/bin since it's not a real path.
29208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29210      # a path prefixed by /cygdrive for fixpath to work.
29211      new_path="$CYGWIN_ROOT_PATH$input_path"
29212    fi
29213  fi
29214
29215
29216  if test "x$path" != "x$new_path"; then
29217    BOOT_JDK="$new_path"
29218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29220  fi
29221
29222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29223
29224  path="$BOOT_JDK"
29225  has_colon=`$ECHO $path | $GREP ^.:`
29226  new_path="$path"
29227  if test "x$has_colon" = x; then
29228    # Not in mixed or Windows style, start by that.
29229    new_path=`cmd //c echo $path`
29230  fi
29231
29232
29233  input_path="$new_path"
29234  # Check if we need to convert this using DOS-style short mode. If the path
29235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29236  # take no chances and rewrite it.
29237  # Note: m4 eats our [], so we need to use [ and ] instead.
29238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29239  if test "x$has_forbidden_chars" != x; then
29240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29242  fi
29243
29244
29245  windows_path="$new_path"
29246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29247    unix_path=`$CYGPATH -u "$windows_path"`
29248    new_path="$unix_path"
29249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29251    new_path="$unix_path"
29252  fi
29253
29254  if test "x$path" != "x$new_path"; then
29255    BOOT_JDK="$new_path"
29256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29258  fi
29259
29260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29262
29263    else
29264      # We're on a unix platform. Hooray! :)
29265      path="$BOOT_JDK"
29266      has_space=`$ECHO "$path" | $GREP " "`
29267      if test "x$has_space" != x; then
29268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29271      fi
29272
29273      # Use eval to expand a potential ~
29274      eval path="$path"
29275      if test ! -f "$path" && test ! -d "$path"; then
29276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29277      fi
29278
29279      if test -d "$path"; then
29280        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29281      else
29282        dir="`$DIRNAME "$path"`"
29283        base="`$BASENAME "$path"`"
29284        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29285      fi
29286    fi
29287  fi
29288
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29290$as_echo_n "checking for Boot JDK... " >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29292$as_echo "$BOOT_JDK" >&6; }
29293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29294$as_echo_n "checking Boot JDK version... " >&6; }
29295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29297$as_echo "$BOOT_JDK_VERSION" >&6; }
29298          fi # end check jdk version
29299        fi # end check javac
29300      fi # end check java
29301    fi # end check boot jdk found
29302  fi
29303
29304  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29305
29306  if test "x$BOOT_JDK_FOUND" = xno; then
29307    # Now execute the test
29308
29309  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29310  BOOT_JDK_SUFFIX="/Contents/Home"
29311  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29312  if test "x$ALL_JDKS_FOUND" != x; then
29313    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29314
29315  if test "x$BOOT_JDK_FOUND" = xno; then
29316    # Now execute the test
29317
29318        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29319        if test -d "$BOOT_JDK"; then
29320          BOOT_JDK_FOUND=maybe
29321          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29322$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29323        fi
29324
29325
29326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29328      # Do we have a bin/java?
29329      if test ! -x "$BOOT_JDK/bin/java"; then
29330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29332        BOOT_JDK_FOUND=no
29333      else
29334        # Do we have a bin/javac?
29335        if test ! -x "$BOOT_JDK/bin/javac"; then
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29340          BOOT_JDK_FOUND=no
29341        else
29342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29344
29345          # Extra M4 quote needed to protect [] in grep expression.
29346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29347          if test "x$FOUND_CORRECT_VERSION" = x; then
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29352            BOOT_JDK_FOUND=no
29353          else
29354            # We're done! :-)
29355            BOOT_JDK_FOUND=yes
29356
29357  # Only process if variable expands to non-empty
29358
29359  if test "x$BOOT_JDK" != x; then
29360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29361
29362  # Input might be given as Windows format, start by converting to
29363  # unix format.
29364  path="$BOOT_JDK"
29365  new_path=`$CYGPATH -u "$path"`
29366
29367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29370  # "foo.exe" is OK but "foo" is an error.
29371  #
29372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29373  # It is also a way to make sure we got the proper file name for the real test later on.
29374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29375  if test "x$test_shortpath" = x; then
29376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29379  fi
29380
29381  # Call helper function which possibly converts this using DOS-style short mode.
29382  # If so, the updated path is stored in $new_path.
29383
29384  input_path="$new_path"
29385  # Check if we need to convert this using DOS-style short mode. If the path
29386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29387  # take no chances and rewrite it.
29388  # Note: m4 eats our [], so we need to use [ and ] instead.
29389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29390  if test "x$has_forbidden_chars" != x; then
29391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29395      # Going to short mode and back again did indeed matter. Since short mode is
29396      # case insensitive, let's make it lowercase to improve readability.
29397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29398      # Now convert it back to Unix-style (cygpath)
29399      input_path=`$CYGPATH -u "$shortmode_path"`
29400      new_path="$input_path"
29401    fi
29402  fi
29403
29404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29405  if test "x$test_cygdrive_prefix" = x; then
29406    # As a simple fix, exclude /usr/bin since it's not a real path.
29407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29409      # a path prefixed by /cygdrive for fixpath to work.
29410      new_path="$CYGWIN_ROOT_PATH$input_path"
29411    fi
29412  fi
29413
29414
29415  if test "x$path" != "x$new_path"; then
29416    BOOT_JDK="$new_path"
29417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29419  fi
29420
29421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29422
29423  path="$BOOT_JDK"
29424  has_colon=`$ECHO $path | $GREP ^.:`
29425  new_path="$path"
29426  if test "x$has_colon" = x; then
29427    # Not in mixed or Windows style, start by that.
29428    new_path=`cmd //c echo $path`
29429  fi
29430
29431
29432  input_path="$new_path"
29433  # Check if we need to convert this using DOS-style short mode. If the path
29434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29435  # take no chances and rewrite it.
29436  # Note: m4 eats our [], so we need to use [ and ] instead.
29437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29438  if test "x$has_forbidden_chars" != x; then
29439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29441  fi
29442
29443
29444  windows_path="$new_path"
29445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29446    unix_path=`$CYGPATH -u "$windows_path"`
29447    new_path="$unix_path"
29448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29450    new_path="$unix_path"
29451  fi
29452
29453  if test "x$path" != "x$new_path"; then
29454    BOOT_JDK="$new_path"
29455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29457  fi
29458
29459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29461
29462    else
29463      # We're on a unix platform. Hooray! :)
29464      path="$BOOT_JDK"
29465      has_space=`$ECHO "$path" | $GREP " "`
29466      if test "x$has_space" != x; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29470      fi
29471
29472      # Use eval to expand a potential ~
29473      eval path="$path"
29474      if test ! -f "$path" && test ! -d "$path"; then
29475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29476      fi
29477
29478      if test -d "$path"; then
29479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29480      else
29481        dir="`$DIRNAME "$path"`"
29482        base="`$BASENAME "$path"`"
29483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29484      fi
29485    fi
29486  fi
29487
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29489$as_echo_n "checking for Boot JDK... " >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29491$as_echo "$BOOT_JDK" >&6; }
29492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29493$as_echo_n "checking Boot JDK version... " >&6; }
29494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29496$as_echo "$BOOT_JDK_VERSION" >&6; }
29497          fi # end check jdk version
29498        fi # end check javac
29499      fi # end check java
29500    fi # end check boot jdk found
29501  fi
29502
29503    done
29504  fi
29505
29506
29507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29509      # Do we have a bin/java?
29510      if test ! -x "$BOOT_JDK/bin/java"; then
29511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29513        BOOT_JDK_FOUND=no
29514      else
29515        # Do we have a bin/javac?
29516        if test ! -x "$BOOT_JDK/bin/javac"; then
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29521          BOOT_JDK_FOUND=no
29522        else
29523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29525
29526          # Extra M4 quote needed to protect [] in grep expression.
29527          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29528          if test "x$FOUND_CORRECT_VERSION" = x; then
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29533            BOOT_JDK_FOUND=no
29534          else
29535            # We're done! :-)
29536            BOOT_JDK_FOUND=yes
29537
29538  # Only process if variable expands to non-empty
29539
29540  if test "x$BOOT_JDK" != x; then
29541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29542
29543  # Input might be given as Windows format, start by converting to
29544  # unix format.
29545  path="$BOOT_JDK"
29546  new_path=`$CYGPATH -u "$path"`
29547
29548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29551  # "foo.exe" is OK but "foo" is an error.
29552  #
29553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29554  # It is also a way to make sure we got the proper file name for the real test later on.
29555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29556  if test "x$test_shortpath" = x; then
29557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29560  fi
29561
29562  # Call helper function which possibly converts this using DOS-style short mode.
29563  # If so, the updated path is stored in $new_path.
29564
29565  input_path="$new_path"
29566  # Check if we need to convert this using DOS-style short mode. If the path
29567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29568  # take no chances and rewrite it.
29569  # Note: m4 eats our [], so we need to use [ and ] instead.
29570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29571  if test "x$has_forbidden_chars" != x; then
29572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29576      # Going to short mode and back again did indeed matter. Since short mode is
29577      # case insensitive, let's make it lowercase to improve readability.
29578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29579      # Now convert it back to Unix-style (cygpath)
29580      input_path=`$CYGPATH -u "$shortmode_path"`
29581      new_path="$input_path"
29582    fi
29583  fi
29584
29585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29586  if test "x$test_cygdrive_prefix" = x; then
29587    # As a simple fix, exclude /usr/bin since it's not a real path.
29588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29590      # a path prefixed by /cygdrive for fixpath to work.
29591      new_path="$CYGWIN_ROOT_PATH$input_path"
29592    fi
29593  fi
29594
29595
29596  if test "x$path" != "x$new_path"; then
29597    BOOT_JDK="$new_path"
29598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29600  fi
29601
29602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603
29604  path="$BOOT_JDK"
29605  has_colon=`$ECHO $path | $GREP ^.:`
29606  new_path="$path"
29607  if test "x$has_colon" = x; then
29608    # Not in mixed or Windows style, start by that.
29609    new_path=`cmd //c echo $path`
29610  fi
29611
29612
29613  input_path="$new_path"
29614  # Check if we need to convert this using DOS-style short mode. If the path
29615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29616  # take no chances and rewrite it.
29617  # Note: m4 eats our [], so we need to use [ and ] instead.
29618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29619  if test "x$has_forbidden_chars" != x; then
29620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29622  fi
29623
29624
29625  windows_path="$new_path"
29626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29627    unix_path=`$CYGPATH -u "$windows_path"`
29628    new_path="$unix_path"
29629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29631    new_path="$unix_path"
29632  fi
29633
29634  if test "x$path" != "x$new_path"; then
29635    BOOT_JDK="$new_path"
29636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29638  fi
29639
29640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29642
29643    else
29644      # We're on a unix platform. Hooray! :)
29645      path="$BOOT_JDK"
29646      has_space=`$ECHO "$path" | $GREP " "`
29647      if test "x$has_space" != x; then
29648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29651      fi
29652
29653      # Use eval to expand a potential ~
29654      eval path="$path"
29655      if test ! -f "$path" && test ! -d "$path"; then
29656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29657      fi
29658
29659      if test -d "$path"; then
29660        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29661      else
29662        dir="`$DIRNAME "$path"`"
29663        base="`$BASENAME "$path"`"
29664        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29665      fi
29666    fi
29667  fi
29668
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29670$as_echo_n "checking for Boot JDK... " >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29672$as_echo "$BOOT_JDK" >&6; }
29673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29674$as_echo_n "checking Boot JDK version... " >&6; }
29675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29677$as_echo "$BOOT_JDK_VERSION" >&6; }
29678          fi # end check jdk version
29679        fi # end check javac
29680      fi # end check java
29681    fi # end check boot jdk found
29682  fi
29683
29684
29685  if test "x$BOOT_JDK_FOUND" = xno; then
29686    # Now execute the test
29687
29688  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29689  BOOT_JDK_SUFFIX="/Contents/Home"
29690  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29691  if test "x$ALL_JDKS_FOUND" != x; then
29692    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29693
29694  if test "x$BOOT_JDK_FOUND" = xno; then
29695    # Now execute the test
29696
29697        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29698        if test -d "$BOOT_JDK"; then
29699          BOOT_JDK_FOUND=maybe
29700          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29701$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29702        fi
29703
29704
29705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29707      # Do we have a bin/java?
29708      if test ! -x "$BOOT_JDK/bin/java"; then
29709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29711        BOOT_JDK_FOUND=no
29712      else
29713        # Do we have a bin/javac?
29714        if test ! -x "$BOOT_JDK/bin/javac"; then
29715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29719          BOOT_JDK_FOUND=no
29720        else
29721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29723
29724          # Extra M4 quote needed to protect [] in grep expression.
29725          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29726          if test "x$FOUND_CORRECT_VERSION" = x; then
29727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29731            BOOT_JDK_FOUND=no
29732          else
29733            # We're done! :-)
29734            BOOT_JDK_FOUND=yes
29735
29736  # Only process if variable expands to non-empty
29737
29738  if test "x$BOOT_JDK" != x; then
29739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29740
29741  # Input might be given as Windows format, start by converting to
29742  # unix format.
29743  path="$BOOT_JDK"
29744  new_path=`$CYGPATH -u "$path"`
29745
29746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29749  # "foo.exe" is OK but "foo" is an error.
29750  #
29751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29752  # It is also a way to make sure we got the proper file name for the real test later on.
29753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29754  if test "x$test_shortpath" = x; then
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29757    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29758  fi
29759
29760  # Call helper function which possibly converts this using DOS-style short mode.
29761  # If so, the updated path is stored in $new_path.
29762
29763  input_path="$new_path"
29764  # Check if we need to convert this using DOS-style short mode. If the path
29765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29766  # take no chances and rewrite it.
29767  # Note: m4 eats our [], so we need to use [ and ] instead.
29768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29769  if test "x$has_forbidden_chars" != x; then
29770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29774      # Going to short mode and back again did indeed matter. Since short mode is
29775      # case insensitive, let's make it lowercase to improve readability.
29776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29777      # Now convert it back to Unix-style (cygpath)
29778      input_path=`$CYGPATH -u "$shortmode_path"`
29779      new_path="$input_path"
29780    fi
29781  fi
29782
29783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29784  if test "x$test_cygdrive_prefix" = x; then
29785    # As a simple fix, exclude /usr/bin since it's not a real path.
29786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29788      # a path prefixed by /cygdrive for fixpath to work.
29789      new_path="$CYGWIN_ROOT_PATH$input_path"
29790    fi
29791  fi
29792
29793
29794  if test "x$path" != "x$new_path"; then
29795    BOOT_JDK="$new_path"
29796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29798  fi
29799
29800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29801
29802  path="$BOOT_JDK"
29803  has_colon=`$ECHO $path | $GREP ^.:`
29804  new_path="$path"
29805  if test "x$has_colon" = x; then
29806    # Not in mixed or Windows style, start by that.
29807    new_path=`cmd //c echo $path`
29808  fi
29809
29810
29811  input_path="$new_path"
29812  # Check if we need to convert this using DOS-style short mode. If the path
29813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29814  # take no chances and rewrite it.
29815  # Note: m4 eats our [], so we need to use [ and ] instead.
29816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29817  if test "x$has_forbidden_chars" != x; then
29818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29820  fi
29821
29822
29823  windows_path="$new_path"
29824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29825    unix_path=`$CYGPATH -u "$windows_path"`
29826    new_path="$unix_path"
29827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29829    new_path="$unix_path"
29830  fi
29831
29832  if test "x$path" != "x$new_path"; then
29833    BOOT_JDK="$new_path"
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29836  fi
29837
29838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29840
29841    else
29842      # We're on a unix platform. Hooray! :)
29843      path="$BOOT_JDK"
29844      has_space=`$ECHO "$path" | $GREP " "`
29845      if test "x$has_space" != x; then
29846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29849      fi
29850
29851      # Use eval to expand a potential ~
29852      eval path="$path"
29853      if test ! -f "$path" && test ! -d "$path"; then
29854        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29855      fi
29856
29857      if test -d "$path"; then
29858        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29859      else
29860        dir="`$DIRNAME "$path"`"
29861        base="`$BASENAME "$path"`"
29862        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29863      fi
29864    fi
29865  fi
29866
29867            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29868$as_echo_n "checking for Boot JDK... " >&6; }
29869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29870$as_echo "$BOOT_JDK" >&6; }
29871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29872$as_echo_n "checking Boot JDK version... " >&6; }
29873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29875$as_echo "$BOOT_JDK_VERSION" >&6; }
29876          fi # end check jdk version
29877        fi # end check javac
29878      fi # end check java
29879    fi # end check boot jdk found
29880  fi
29881
29882    done
29883  fi
29884
29885
29886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29888      # Do we have a bin/java?
29889      if test ! -x "$BOOT_JDK/bin/java"; then
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29892        BOOT_JDK_FOUND=no
29893      else
29894        # Do we have a bin/javac?
29895        if test ! -x "$BOOT_JDK/bin/javac"; then
29896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29900          BOOT_JDK_FOUND=no
29901        else
29902          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29903          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29904
29905          # Extra M4 quote needed to protect [] in grep expression.
29906          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29907          if test "x$FOUND_CORRECT_VERSION" = x; then
29908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29910            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29911$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29912            BOOT_JDK_FOUND=no
29913          else
29914            # We're done! :-)
29915            BOOT_JDK_FOUND=yes
29916
29917  # Only process if variable expands to non-empty
29918
29919  if test "x$BOOT_JDK" != x; then
29920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29921
29922  # Input might be given as Windows format, start by converting to
29923  # unix format.
29924  path="$BOOT_JDK"
29925  new_path=`$CYGPATH -u "$path"`
29926
29927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29930  # "foo.exe" is OK but "foo" is an error.
29931  #
29932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29933  # It is also a way to make sure we got the proper file name for the real test later on.
29934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29935  if test "x$test_shortpath" = x; then
29936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29939  fi
29940
29941  # Call helper function which possibly converts this using DOS-style short mode.
29942  # If so, the updated path is stored in $new_path.
29943
29944  input_path="$new_path"
29945  # Check if we need to convert this using DOS-style short mode. If the path
29946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29947  # take no chances and rewrite it.
29948  # Note: m4 eats our [], so we need to use [ and ] instead.
29949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29950  if test "x$has_forbidden_chars" != x; then
29951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29955      # Going to short mode and back again did indeed matter. Since short mode is
29956      # case insensitive, let's make it lowercase to improve readability.
29957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29958      # Now convert it back to Unix-style (cygpath)
29959      input_path=`$CYGPATH -u "$shortmode_path"`
29960      new_path="$input_path"
29961    fi
29962  fi
29963
29964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29965  if test "x$test_cygdrive_prefix" = x; then
29966    # As a simple fix, exclude /usr/bin since it's not a real path.
29967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29969      # a path prefixed by /cygdrive for fixpath to work.
29970      new_path="$CYGWIN_ROOT_PATH$input_path"
29971    fi
29972  fi
29973
29974
29975  if test "x$path" != "x$new_path"; then
29976    BOOT_JDK="$new_path"
29977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29979  fi
29980
29981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29982
29983  path="$BOOT_JDK"
29984  has_colon=`$ECHO $path | $GREP ^.:`
29985  new_path="$path"
29986  if test "x$has_colon" = x; then
29987    # Not in mixed or Windows style, start by that.
29988    new_path=`cmd //c echo $path`
29989  fi
29990
29991
29992  input_path="$new_path"
29993  # Check if we need to convert this using DOS-style short mode. If the path
29994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29995  # take no chances and rewrite it.
29996  # Note: m4 eats our [], so we need to use [ and ] instead.
29997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29998  if test "x$has_forbidden_chars" != x; then
29999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30001  fi
30002
30003
30004  windows_path="$new_path"
30005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30006    unix_path=`$CYGPATH -u "$windows_path"`
30007    new_path="$unix_path"
30008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30010    new_path="$unix_path"
30011  fi
30012
30013  if test "x$path" != "x$new_path"; then
30014    BOOT_JDK="$new_path"
30015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30017  fi
30018
30019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30021
30022    else
30023      # We're on a unix platform. Hooray! :)
30024      path="$BOOT_JDK"
30025      has_space=`$ECHO "$path" | $GREP " "`
30026      if test "x$has_space" != x; then
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30030      fi
30031
30032      # Use eval to expand a potential ~
30033      eval path="$path"
30034      if test ! -f "$path" && test ! -d "$path"; then
30035        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30036      fi
30037
30038      if test -d "$path"; then
30039        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30040      else
30041        dir="`$DIRNAME "$path"`"
30042        base="`$BASENAME "$path"`"
30043        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30044      fi
30045    fi
30046  fi
30047
30048            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30049$as_echo_n "checking for Boot JDK... " >&6; }
30050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30051$as_echo "$BOOT_JDK" >&6; }
30052            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30053$as_echo_n "checking Boot JDK version... " >&6; }
30054            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30056$as_echo "$BOOT_JDK_VERSION" >&6; }
30057          fi # end check jdk version
30058        fi # end check javac
30059      fi # end check java
30060    fi # end check boot jdk found
30061  fi
30062
30063  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30064
30065  if test "x$BOOT_JDK_FOUND" = xno; then
30066    # Now execute the test
30067
30068  BOOT_JDK_PREFIX="/usr/lib/jvm"
30069  BOOT_JDK_SUFFIX=""
30070  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30071  if test "x$ALL_JDKS_FOUND" != x; then
30072    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30073
30074  if test "x$BOOT_JDK_FOUND" = xno; then
30075    # Now execute the test
30076
30077        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30078        if test -d "$BOOT_JDK"; then
30079          BOOT_JDK_FOUND=maybe
30080          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30081$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30082        fi
30083
30084
30085    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30086    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30087      # Do we have a bin/java?
30088      if test ! -x "$BOOT_JDK/bin/java"; then
30089        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30091        BOOT_JDK_FOUND=no
30092      else
30093        # Do we have a bin/javac?
30094        if test ! -x "$BOOT_JDK/bin/javac"; then
30095          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30097          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30098$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30099          BOOT_JDK_FOUND=no
30100        else
30101          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30102          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30103
30104          # Extra M4 quote needed to protect [] in grep expression.
30105          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30106          if test "x$FOUND_CORRECT_VERSION" = x; then
30107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30109            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30110$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30111            BOOT_JDK_FOUND=no
30112          else
30113            # We're done! :-)
30114            BOOT_JDK_FOUND=yes
30115
30116  # Only process if variable expands to non-empty
30117
30118  if test "x$BOOT_JDK" != x; then
30119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30120
30121  # Input might be given as Windows format, start by converting to
30122  # unix format.
30123  path="$BOOT_JDK"
30124  new_path=`$CYGPATH -u "$path"`
30125
30126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30129  # "foo.exe" is OK but "foo" is an error.
30130  #
30131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30132  # It is also a way to make sure we got the proper file name for the real test later on.
30133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30134  if test "x$test_shortpath" = x; then
30135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30138  fi
30139
30140  # Call helper function which possibly converts this using DOS-style short mode.
30141  # If so, the updated path is stored in $new_path.
30142
30143  input_path="$new_path"
30144  # Check if we need to convert this using DOS-style short mode. If the path
30145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30146  # take no chances and rewrite it.
30147  # Note: m4 eats our [], so we need to use [ and ] instead.
30148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30149  if test "x$has_forbidden_chars" != x; then
30150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30154      # Going to short mode and back again did indeed matter. Since short mode is
30155      # case insensitive, let's make it lowercase to improve readability.
30156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30157      # Now convert it back to Unix-style (cygpath)
30158      input_path=`$CYGPATH -u "$shortmode_path"`
30159      new_path="$input_path"
30160    fi
30161  fi
30162
30163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30164  if test "x$test_cygdrive_prefix" = x; then
30165    # As a simple fix, exclude /usr/bin since it's not a real path.
30166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30168      # a path prefixed by /cygdrive for fixpath to work.
30169      new_path="$CYGWIN_ROOT_PATH$input_path"
30170    fi
30171  fi
30172
30173
30174  if test "x$path" != "x$new_path"; then
30175    BOOT_JDK="$new_path"
30176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30178  fi
30179
30180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30181
30182  path="$BOOT_JDK"
30183  has_colon=`$ECHO $path | $GREP ^.:`
30184  new_path="$path"
30185  if test "x$has_colon" = x; then
30186    # Not in mixed or Windows style, start by that.
30187    new_path=`cmd //c echo $path`
30188  fi
30189
30190
30191  input_path="$new_path"
30192  # Check if we need to convert this using DOS-style short mode. If the path
30193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30194  # take no chances and rewrite it.
30195  # Note: m4 eats our [], so we need to use [ and ] instead.
30196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30197  if test "x$has_forbidden_chars" != x; then
30198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30200  fi
30201
30202
30203  windows_path="$new_path"
30204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205    unix_path=`$CYGPATH -u "$windows_path"`
30206    new_path="$unix_path"
30207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30209    new_path="$unix_path"
30210  fi
30211
30212  if test "x$path" != "x$new_path"; then
30213    BOOT_JDK="$new_path"
30214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30216  fi
30217
30218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30220
30221    else
30222      # We're on a unix platform. Hooray! :)
30223      path="$BOOT_JDK"
30224      has_space=`$ECHO "$path" | $GREP " "`
30225      if test "x$has_space" != x; then
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30229      fi
30230
30231      # Use eval to expand a potential ~
30232      eval path="$path"
30233      if test ! -f "$path" && test ! -d "$path"; then
30234        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30235      fi
30236
30237      if test -d "$path"; then
30238        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30239      else
30240        dir="`$DIRNAME "$path"`"
30241        base="`$BASENAME "$path"`"
30242        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30243      fi
30244    fi
30245  fi
30246
30247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30248$as_echo_n "checking for Boot JDK... " >&6; }
30249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30250$as_echo "$BOOT_JDK" >&6; }
30251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30252$as_echo_n "checking Boot JDK version... " >&6; }
30253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30255$as_echo "$BOOT_JDK_VERSION" >&6; }
30256          fi # end check jdk version
30257        fi # end check javac
30258      fi # end check java
30259    fi # end check boot jdk found
30260  fi
30261
30262    done
30263  fi
30264
30265
30266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30268      # Do we have a bin/java?
30269      if test ! -x "$BOOT_JDK/bin/java"; then
30270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30272        BOOT_JDK_FOUND=no
30273      else
30274        # Do we have a bin/javac?
30275        if test ! -x "$BOOT_JDK/bin/javac"; then
30276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30280          BOOT_JDK_FOUND=no
30281        else
30282          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30283          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30284
30285          # Extra M4 quote needed to protect [] in grep expression.
30286          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30287          if test "x$FOUND_CORRECT_VERSION" = x; then
30288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30290            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30291$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30292            BOOT_JDK_FOUND=no
30293          else
30294            # We're done! :-)
30295            BOOT_JDK_FOUND=yes
30296
30297  # Only process if variable expands to non-empty
30298
30299  if test "x$BOOT_JDK" != x; then
30300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30301
30302  # Input might be given as Windows format, start by converting to
30303  # unix format.
30304  path="$BOOT_JDK"
30305  new_path=`$CYGPATH -u "$path"`
30306
30307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30310  # "foo.exe" is OK but "foo" is an error.
30311  #
30312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30313  # It is also a way to make sure we got the proper file name for the real test later on.
30314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30315  if test "x$test_shortpath" = x; then
30316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30319  fi
30320
30321  # Call helper function which possibly converts this using DOS-style short mode.
30322  # If so, the updated path is stored in $new_path.
30323
30324  input_path="$new_path"
30325  # Check if we need to convert this using DOS-style short mode. If the path
30326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30327  # take no chances and rewrite it.
30328  # Note: m4 eats our [], so we need to use [ and ] instead.
30329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30330  if test "x$has_forbidden_chars" != x; then
30331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30335      # Going to short mode and back again did indeed matter. Since short mode is
30336      # case insensitive, let's make it lowercase to improve readability.
30337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30338      # Now convert it back to Unix-style (cygpath)
30339      input_path=`$CYGPATH -u "$shortmode_path"`
30340      new_path="$input_path"
30341    fi
30342  fi
30343
30344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30345  if test "x$test_cygdrive_prefix" = x; then
30346    # As a simple fix, exclude /usr/bin since it's not a real path.
30347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30349      # a path prefixed by /cygdrive for fixpath to work.
30350      new_path="$CYGWIN_ROOT_PATH$input_path"
30351    fi
30352  fi
30353
30354
30355  if test "x$path" != "x$new_path"; then
30356    BOOT_JDK="$new_path"
30357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30359  fi
30360
30361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30362
30363  path="$BOOT_JDK"
30364  has_colon=`$ECHO $path | $GREP ^.:`
30365  new_path="$path"
30366  if test "x$has_colon" = x; then
30367    # Not in mixed or Windows style, start by that.
30368    new_path=`cmd //c echo $path`
30369  fi
30370
30371
30372  input_path="$new_path"
30373  # Check if we need to convert this using DOS-style short mode. If the path
30374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30375  # take no chances and rewrite it.
30376  # Note: m4 eats our [], so we need to use [ and ] instead.
30377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30378  if test "x$has_forbidden_chars" != x; then
30379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30381  fi
30382
30383
30384  windows_path="$new_path"
30385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30386    unix_path=`$CYGPATH -u "$windows_path"`
30387    new_path="$unix_path"
30388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30390    new_path="$unix_path"
30391  fi
30392
30393  if test "x$path" != "x$new_path"; then
30394    BOOT_JDK="$new_path"
30395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30397  fi
30398
30399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30401
30402    else
30403      # We're on a unix platform. Hooray! :)
30404      path="$BOOT_JDK"
30405      has_space=`$ECHO "$path" | $GREP " "`
30406      if test "x$has_space" != x; then
30407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30410      fi
30411
30412      # Use eval to expand a potential ~
30413      eval path="$path"
30414      if test ! -f "$path" && test ! -d "$path"; then
30415        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30416      fi
30417
30418      if test -d "$path"; then
30419        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30420      else
30421        dir="`$DIRNAME "$path"`"
30422        base="`$BASENAME "$path"`"
30423        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30424      fi
30425    fi
30426  fi
30427
30428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30429$as_echo_n "checking for Boot JDK... " >&6; }
30430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30431$as_echo "$BOOT_JDK" >&6; }
30432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30433$as_echo_n "checking Boot JDK version... " >&6; }
30434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30436$as_echo "$BOOT_JDK_VERSION" >&6; }
30437          fi # end check jdk version
30438        fi # end check javac
30439      fi # end check java
30440    fi # end check boot jdk found
30441  fi
30442
30443  fi
30444
30445
30446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30448      # Do we have a bin/java?
30449      if test ! -x "$BOOT_JDK/bin/java"; then
30450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30452        BOOT_JDK_FOUND=no
30453      else
30454        # Do we have a bin/javac?
30455        if test ! -x "$BOOT_JDK/bin/javac"; then
30456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30460          BOOT_JDK_FOUND=no
30461        else
30462          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30463          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30464
30465          # Extra M4 quote needed to protect [] in grep expression.
30466          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30467          if test "x$FOUND_CORRECT_VERSION" = x; then
30468            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30470            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30471$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30472            BOOT_JDK_FOUND=no
30473          else
30474            # We're done! :-)
30475            BOOT_JDK_FOUND=yes
30476
30477  # Only process if variable expands to non-empty
30478
30479  if test "x$BOOT_JDK" != x; then
30480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30481
30482  # Input might be given as Windows format, start by converting to
30483  # unix format.
30484  path="$BOOT_JDK"
30485  new_path=`$CYGPATH -u "$path"`
30486
30487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30490  # "foo.exe" is OK but "foo" is an error.
30491  #
30492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30493  # It is also a way to make sure we got the proper file name for the real test later on.
30494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30495  if test "x$test_shortpath" = x; then
30496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30499  fi
30500
30501  # Call helper function which possibly converts this using DOS-style short mode.
30502  # If so, the updated path is stored in $new_path.
30503
30504  input_path="$new_path"
30505  # Check if we need to convert this using DOS-style short mode. If the path
30506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30507  # take no chances and rewrite it.
30508  # Note: m4 eats our [], so we need to use [ and ] instead.
30509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30510  if test "x$has_forbidden_chars" != x; then
30511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30515      # Going to short mode and back again did indeed matter. Since short mode is
30516      # case insensitive, let's make it lowercase to improve readability.
30517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30518      # Now convert it back to Unix-style (cygpath)
30519      input_path=`$CYGPATH -u "$shortmode_path"`
30520      new_path="$input_path"
30521    fi
30522  fi
30523
30524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30525  if test "x$test_cygdrive_prefix" = x; then
30526    # As a simple fix, exclude /usr/bin since it's not a real path.
30527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30529      # a path prefixed by /cygdrive for fixpath to work.
30530      new_path="$CYGWIN_ROOT_PATH$input_path"
30531    fi
30532  fi
30533
30534
30535  if test "x$path" != "x$new_path"; then
30536    BOOT_JDK="$new_path"
30537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30539  fi
30540
30541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30542
30543  path="$BOOT_JDK"
30544  has_colon=`$ECHO $path | $GREP ^.:`
30545  new_path="$path"
30546  if test "x$has_colon" = x; then
30547    # Not in mixed or Windows style, start by that.
30548    new_path=`cmd //c echo $path`
30549  fi
30550
30551
30552  input_path="$new_path"
30553  # Check if we need to convert this using DOS-style short mode. If the path
30554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30555  # take no chances and rewrite it.
30556  # Note: m4 eats our [], so we need to use [ and ] instead.
30557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30558  if test "x$has_forbidden_chars" != x; then
30559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30561  fi
30562
30563
30564  windows_path="$new_path"
30565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30566    unix_path=`$CYGPATH -u "$windows_path"`
30567    new_path="$unix_path"
30568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30570    new_path="$unix_path"
30571  fi
30572
30573  if test "x$path" != "x$new_path"; then
30574    BOOT_JDK="$new_path"
30575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30577  fi
30578
30579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30581
30582    else
30583      # We're on a unix platform. Hooray! :)
30584      path="$BOOT_JDK"
30585      has_space=`$ECHO "$path" | $GREP " "`
30586      if test "x$has_space" != x; then
30587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30590      fi
30591
30592      # Use eval to expand a potential ~
30593      eval path="$path"
30594      if test ! -f "$path" && test ! -d "$path"; then
30595        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30596      fi
30597
30598      if test -d "$path"; then
30599        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30600      else
30601        dir="`$DIRNAME "$path"`"
30602        base="`$BASENAME "$path"`"
30603        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30604      fi
30605    fi
30606  fi
30607
30608            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30609$as_echo_n "checking for Boot JDK... " >&6; }
30610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30611$as_echo "$BOOT_JDK" >&6; }
30612            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30613$as_echo_n "checking Boot JDK version... " >&6; }
30614            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30616$as_echo "$BOOT_JDK_VERSION" >&6; }
30617          fi # end check jdk version
30618        fi # end check javac
30619      fi # end check java
30620    fi # end check boot jdk found
30621  fi
30622
30623
30624  # If we haven't found anything yet, we've truly lost. Give up.
30625  if test "x$BOOT_JDK_FOUND" = xno; then
30626
30627  # Print a helpful message on how to acquire the necessary build dependency.
30628  # openjdk is the help tag: freetype, cups, alsa etc
30629  MISSING_DEPENDENCY=openjdk
30630
30631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30632    cygwin_help $MISSING_DEPENDENCY
30633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30634    msys_help $MISSING_DEPENDENCY
30635  else
30636    PKGHANDLER_COMMAND=
30637
30638    case $PKGHANDLER in
30639      apt-get)
30640        apt_help     $MISSING_DEPENDENCY ;;
30641      yum)
30642        yum_help     $MISSING_DEPENDENCY ;;
30643      brew)
30644        brew_help    $MISSING_DEPENDENCY ;;
30645      port)
30646        port_help    $MISSING_DEPENDENCY ;;
30647      pkgutil)
30648        pkgutil_help $MISSING_DEPENDENCY ;;
30649      pkgadd)
30650        pkgadd_help  $MISSING_DEPENDENCY ;;
30651    esac
30652
30653    if test "x$PKGHANDLER_COMMAND" != x; then
30654      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30655    fi
30656  fi
30657
30658    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30659$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30660    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30661$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30662    as_fn_error $? "Cannot continue" "$LINENO" 5
30663  fi
30664
30665
30666
30667  # Setup tools from the Boot JDK.
30668
30669  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30670
30671  # Publish this variable in the help.
30672
30673
30674  if [ -z "${JAVA+x}" ]; then
30675    # The variable is not set by user, try to locate tool using the code snippet
30676
30677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30678$as_echo_n "checking for java in Boot JDK... " >&6; }
30679      JAVA=$BOOT_JDK/bin/java
30680      if test ! -x $JAVA; then
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30682$as_echo "not found" >&6; }
30683        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30684$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30685        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30686      fi
30687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30688$as_echo "ok" >&6; }
30689
30690
30691  else
30692    # The variable is set, but is it from the command line or the environment?
30693
30694    # Try to remove the string !JAVA! from our list.
30695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30697      # If it failed, the variable was not from the command line. Ignore it,
30698      # but warn the user (except for BASH, which is always set by the calling BASH).
30699      if test "xJAVA" != xBASH; then
30700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30701$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30702      fi
30703      # Try to locate tool using the code snippet
30704
30705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30706$as_echo_n "checking for java in Boot JDK... " >&6; }
30707      JAVA=$BOOT_JDK/bin/java
30708      if test ! -x $JAVA; then
30709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30710$as_echo "not found" >&6; }
30711        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30712$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30713        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30714      fi
30715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30716$as_echo "ok" >&6; }
30717
30718
30719    else
30720      # If it succeeded, then it was overridden by the user. We will use it
30721      # for the tool.
30722
30723      # First remove it from the list of overridden variables, so we can test
30724      # for unknown variables in the end.
30725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30726
30727      # Check if we try to supply an empty value
30728      if test "x$JAVA" = x; then
30729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30730$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30732$as_echo_n "checking for JAVA... " >&6; }
30733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30734$as_echo "disabled" >&6; }
30735      else
30736        # Check if the provided tool contains a complete path.
30737        tool_specified="$JAVA"
30738        tool_basename="${tool_specified##*/}"
30739        if test "x$tool_basename" = "x$tool_specified"; then
30740          # A command without a complete path is provided, search $PATH.
30741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30742$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30743          # Extract the first word of "$tool_basename", so it can be a program name with args.
30744set dummy $tool_basename; ac_word=$2
30745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30746$as_echo_n "checking for $ac_word... " >&6; }
30747if ${ac_cv_path_JAVA+:} false; then :
30748  $as_echo_n "(cached) " >&6
30749else
30750  case $JAVA in
30751  [\\/]* | ?:[\\/]*)
30752  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30753  ;;
30754  *)
30755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30756for as_dir in $PATH
30757do
30758  IFS=$as_save_IFS
30759  test -z "$as_dir" && as_dir=.
30760    for ac_exec_ext in '' $ac_executable_extensions; do
30761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30762    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30764    break 2
30765  fi
30766done
30767  done
30768IFS=$as_save_IFS
30769
30770  ;;
30771esac
30772fi
30773JAVA=$ac_cv_path_JAVA
30774if test -n "$JAVA"; then
30775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30776$as_echo "$JAVA" >&6; }
30777else
30778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30779$as_echo "no" >&6; }
30780fi
30781
30782
30783          if test "x$JAVA" = x; then
30784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30785          fi
30786        else
30787          # Otherwise we believe it is a complete path. Use it as it is.
30788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30789$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30791$as_echo_n "checking for JAVA... " >&6; }
30792          if test ! -x "$tool_specified"; then
30793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30794$as_echo "not found" >&6; }
30795            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30796          fi
30797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30798$as_echo "$tool_specified" >&6; }
30799        fi
30800      fi
30801    fi
30802
30803  fi
30804
30805
30806
30807  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30808
30809  # Publish this variable in the help.
30810
30811
30812  if [ -z "${JAVAC+x}" ]; then
30813    # The variable is not set by user, try to locate tool using the code snippet
30814
30815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30816$as_echo_n "checking for javac in Boot JDK... " >&6; }
30817      JAVAC=$BOOT_JDK/bin/javac
30818      if test ! -x $JAVAC; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30820$as_echo "not found" >&6; }
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30822$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30823        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30824      fi
30825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30826$as_echo "ok" >&6; }
30827
30828
30829  else
30830    # The variable is set, but is it from the command line or the environment?
30831
30832    # Try to remove the string !JAVAC! from our list.
30833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30835      # If it failed, the variable was not from the command line. Ignore it,
30836      # but warn the user (except for BASH, which is always set by the calling BASH).
30837      if test "xJAVAC" != xBASH; then
30838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30839$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30840      fi
30841      # Try to locate tool using the code snippet
30842
30843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30844$as_echo_n "checking for javac in Boot JDK... " >&6; }
30845      JAVAC=$BOOT_JDK/bin/javac
30846      if test ! -x $JAVAC; then
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30848$as_echo "not found" >&6; }
30849        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30850$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30851        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30852      fi
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30854$as_echo "ok" >&6; }
30855
30856
30857    else
30858      # If it succeeded, then it was overridden by the user. We will use it
30859      # for the tool.
30860
30861      # First remove it from the list of overridden variables, so we can test
30862      # for unknown variables in the end.
30863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30864
30865      # Check if we try to supply an empty value
30866      if test "x$JAVAC" = x; then
30867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30868$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30870$as_echo_n "checking for JAVAC... " >&6; }
30871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30872$as_echo "disabled" >&6; }
30873      else
30874        # Check if the provided tool contains a complete path.
30875        tool_specified="$JAVAC"
30876        tool_basename="${tool_specified##*/}"
30877        if test "x$tool_basename" = "x$tool_specified"; then
30878          # A command without a complete path is provided, search $PATH.
30879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30880$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30881          # Extract the first word of "$tool_basename", so it can be a program name with args.
30882set dummy $tool_basename; ac_word=$2
30883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30884$as_echo_n "checking for $ac_word... " >&6; }
30885if ${ac_cv_path_JAVAC+:} false; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888  case $JAVAC in
30889  [\\/]* | ?:[\\/]*)
30890  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30891  ;;
30892  *)
30893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30894for as_dir in $PATH
30895do
30896  IFS=$as_save_IFS
30897  test -z "$as_dir" && as_dir=.
30898    for ac_exec_ext in '' $ac_executable_extensions; do
30899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30900    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30902    break 2
30903  fi
30904done
30905  done
30906IFS=$as_save_IFS
30907
30908  ;;
30909esac
30910fi
30911JAVAC=$ac_cv_path_JAVAC
30912if test -n "$JAVAC"; then
30913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30914$as_echo "$JAVAC" >&6; }
30915else
30916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30917$as_echo "no" >&6; }
30918fi
30919
30920
30921          if test "x$JAVAC" = x; then
30922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30923          fi
30924        else
30925          # Otherwise we believe it is a complete path. Use it as it is.
30926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30927$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30929$as_echo_n "checking for JAVAC... " >&6; }
30930          if test ! -x "$tool_specified"; then
30931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30932$as_echo "not found" >&6; }
30933            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30934          fi
30935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30936$as_echo "$tool_specified" >&6; }
30937        fi
30938      fi
30939    fi
30940
30941  fi
30942
30943
30944
30945  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30946
30947  # Publish this variable in the help.
30948
30949
30950  if [ -z "${JAVAH+x}" ]; then
30951    # The variable is not set by user, try to locate tool using the code snippet
30952
30953      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30954$as_echo_n "checking for javah in Boot JDK... " >&6; }
30955      JAVAH=$BOOT_JDK/bin/javah
30956      if test ! -x $JAVAH; then
30957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30958$as_echo "not found" >&6; }
30959        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30960$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30961        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30962      fi
30963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30964$as_echo "ok" >&6; }
30965
30966
30967  else
30968    # The variable is set, but is it from the command line or the environment?
30969
30970    # Try to remove the string !JAVAH! from our list.
30971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30973      # If it failed, the variable was not from the command line. Ignore it,
30974      # but warn the user (except for BASH, which is always set by the calling BASH).
30975      if test "xJAVAH" != xBASH; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30977$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30978      fi
30979      # Try to locate tool using the code snippet
30980
30981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30982$as_echo_n "checking for javah in Boot JDK... " >&6; }
30983      JAVAH=$BOOT_JDK/bin/javah
30984      if test ! -x $JAVAH; then
30985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30986$as_echo "not found" >&6; }
30987        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30988$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30989        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30990      fi
30991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30992$as_echo "ok" >&6; }
30993
30994
30995    else
30996      # If it succeeded, then it was overridden by the user. We will use it
30997      # for the tool.
30998
30999      # First remove it from the list of overridden variables, so we can test
31000      # for unknown variables in the end.
31001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31002
31003      # Check if we try to supply an empty value
31004      if test "x$JAVAH" = x; then
31005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31006$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31008$as_echo_n "checking for JAVAH... " >&6; }
31009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31010$as_echo "disabled" >&6; }
31011      else
31012        # Check if the provided tool contains a complete path.
31013        tool_specified="$JAVAH"
31014        tool_basename="${tool_specified##*/}"
31015        if test "x$tool_basename" = "x$tool_specified"; then
31016          # A command without a complete path is provided, search $PATH.
31017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31018$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31019          # Extract the first word of "$tool_basename", so it can be a program name with args.
31020set dummy $tool_basename; ac_word=$2
31021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31022$as_echo_n "checking for $ac_word... " >&6; }
31023if ${ac_cv_path_JAVAH+:} false; then :
31024  $as_echo_n "(cached) " >&6
31025else
31026  case $JAVAH in
31027  [\\/]* | ?:[\\/]*)
31028  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31029  ;;
31030  *)
31031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31032for as_dir in $PATH
31033do
31034  IFS=$as_save_IFS
31035  test -z "$as_dir" && as_dir=.
31036    for ac_exec_ext in '' $ac_executable_extensions; do
31037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31038    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31040    break 2
31041  fi
31042done
31043  done
31044IFS=$as_save_IFS
31045
31046  ;;
31047esac
31048fi
31049JAVAH=$ac_cv_path_JAVAH
31050if test -n "$JAVAH"; then
31051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31052$as_echo "$JAVAH" >&6; }
31053else
31054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31055$as_echo "no" >&6; }
31056fi
31057
31058
31059          if test "x$JAVAH" = x; then
31060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31061          fi
31062        else
31063          # Otherwise we believe it is a complete path. Use it as it is.
31064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31065$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31067$as_echo_n "checking for JAVAH... " >&6; }
31068          if test ! -x "$tool_specified"; then
31069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31070$as_echo "not found" >&6; }
31071            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31072          fi
31073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31074$as_echo "$tool_specified" >&6; }
31075        fi
31076      fi
31077    fi
31078
31079  fi
31080
31081
31082
31083  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31084
31085  # Publish this variable in the help.
31086
31087
31088  if [ -z "${JAR+x}" ]; then
31089    # The variable is not set by user, try to locate tool using the code snippet
31090
31091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31092$as_echo_n "checking for jar in Boot JDK... " >&6; }
31093      JAR=$BOOT_JDK/bin/jar
31094      if test ! -x $JAR; then
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31096$as_echo "not found" >&6; }
31097        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31098$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31099        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31100      fi
31101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31102$as_echo "ok" >&6; }
31103
31104
31105  else
31106    # The variable is set, but is it from the command line or the environment?
31107
31108    # Try to remove the string !JAR! from our list.
31109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31111      # If it failed, the variable was not from the command line. Ignore it,
31112      # but warn the user (except for BASH, which is always set by the calling BASH).
31113      if test "xJAR" != xBASH; then
31114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31115$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31116      fi
31117      # Try to locate tool using the code snippet
31118
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31120$as_echo_n "checking for jar in Boot JDK... " >&6; }
31121      JAR=$BOOT_JDK/bin/jar
31122      if test ! -x $JAR; then
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31124$as_echo "not found" >&6; }
31125        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31126$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31127        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31128      fi
31129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31130$as_echo "ok" >&6; }
31131
31132
31133    else
31134      # If it succeeded, then it was overridden by the user. We will use it
31135      # for the tool.
31136
31137      # First remove it from the list of overridden variables, so we can test
31138      # for unknown variables in the end.
31139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31140
31141      # Check if we try to supply an empty value
31142      if test "x$JAR" = x; then
31143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31144$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31146$as_echo_n "checking for JAR... " >&6; }
31147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31148$as_echo "disabled" >&6; }
31149      else
31150        # Check if the provided tool contains a complete path.
31151        tool_specified="$JAR"
31152        tool_basename="${tool_specified##*/}"
31153        if test "x$tool_basename" = "x$tool_specified"; then
31154          # A command without a complete path is provided, search $PATH.
31155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31156$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31157          # Extract the first word of "$tool_basename", so it can be a program name with args.
31158set dummy $tool_basename; ac_word=$2
31159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31160$as_echo_n "checking for $ac_word... " >&6; }
31161if ${ac_cv_path_JAR+:} false; then :
31162  $as_echo_n "(cached) " >&6
31163else
31164  case $JAR in
31165  [\\/]* | ?:[\\/]*)
31166  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31167  ;;
31168  *)
31169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31170for as_dir in $PATH
31171do
31172  IFS=$as_save_IFS
31173  test -z "$as_dir" && as_dir=.
31174    for ac_exec_ext in '' $ac_executable_extensions; do
31175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31176    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31178    break 2
31179  fi
31180done
31181  done
31182IFS=$as_save_IFS
31183
31184  ;;
31185esac
31186fi
31187JAR=$ac_cv_path_JAR
31188if test -n "$JAR"; then
31189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31190$as_echo "$JAR" >&6; }
31191else
31192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31193$as_echo "no" >&6; }
31194fi
31195
31196
31197          if test "x$JAR" = x; then
31198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31199          fi
31200        else
31201          # Otherwise we believe it is a complete path. Use it as it is.
31202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31203$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31205$as_echo_n "checking for JAR... " >&6; }
31206          if test ! -x "$tool_specified"; then
31207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31208$as_echo "not found" >&6; }
31209            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31210          fi
31211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31212$as_echo "$tool_specified" >&6; }
31213        fi
31214      fi
31215    fi
31216
31217  fi
31218
31219
31220
31221  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31222
31223  # Publish this variable in the help.
31224
31225
31226  if [ -z "${JARSIGNER+x}" ]; then
31227    # The variable is not set by user, try to locate tool using the code snippet
31228
31229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31230$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31231      JARSIGNER=$BOOT_JDK/bin/jarsigner
31232      if test ! -x $JARSIGNER; then
31233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31234$as_echo "not found" >&6; }
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31236$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31237        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31238      fi
31239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31240$as_echo "ok" >&6; }
31241
31242
31243  else
31244    # The variable is set, but is it from the command line or the environment?
31245
31246    # Try to remove the string !JARSIGNER! from our list.
31247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31249      # If it failed, the variable was not from the command line. Ignore it,
31250      # but warn the user (except for BASH, which is always set by the calling BASH).
31251      if test "xJARSIGNER" != xBASH; then
31252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31253$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31254      fi
31255      # Try to locate tool using the code snippet
31256
31257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31258$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31259      JARSIGNER=$BOOT_JDK/bin/jarsigner
31260      if test ! -x $JARSIGNER; then
31261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31262$as_echo "not found" >&6; }
31263        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31264$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31265        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31266      fi
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31268$as_echo "ok" >&6; }
31269
31270
31271    else
31272      # If it succeeded, then it was overridden by the user. We will use it
31273      # for the tool.
31274
31275      # First remove it from the list of overridden variables, so we can test
31276      # for unknown variables in the end.
31277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31278
31279      # Check if we try to supply an empty value
31280      if test "x$JARSIGNER" = x; then
31281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31282$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31284$as_echo_n "checking for JARSIGNER... " >&6; }
31285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31286$as_echo "disabled" >&6; }
31287      else
31288        # Check if the provided tool contains a complete path.
31289        tool_specified="$JARSIGNER"
31290        tool_basename="${tool_specified##*/}"
31291        if test "x$tool_basename" = "x$tool_specified"; then
31292          # A command without a complete path is provided, search $PATH.
31293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31294$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31295          # Extract the first word of "$tool_basename", so it can be a program name with args.
31296set dummy $tool_basename; ac_word=$2
31297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31298$as_echo_n "checking for $ac_word... " >&6; }
31299if ${ac_cv_path_JARSIGNER+:} false; then :
31300  $as_echo_n "(cached) " >&6
31301else
31302  case $JARSIGNER in
31303  [\\/]* | ?:[\\/]*)
31304  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31305  ;;
31306  *)
31307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31308for as_dir in $PATH
31309do
31310  IFS=$as_save_IFS
31311  test -z "$as_dir" && as_dir=.
31312    for ac_exec_ext in '' $ac_executable_extensions; do
31313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31314    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31316    break 2
31317  fi
31318done
31319  done
31320IFS=$as_save_IFS
31321
31322  ;;
31323esac
31324fi
31325JARSIGNER=$ac_cv_path_JARSIGNER
31326if test -n "$JARSIGNER"; then
31327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31328$as_echo "$JARSIGNER" >&6; }
31329else
31330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31331$as_echo "no" >&6; }
31332fi
31333
31334
31335          if test "x$JARSIGNER" = x; then
31336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31337          fi
31338        else
31339          # Otherwise we believe it is a complete path. Use it as it is.
31340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31341$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31343$as_echo_n "checking for JARSIGNER... " >&6; }
31344          if test ! -x "$tool_specified"; then
31345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31346$as_echo "not found" >&6; }
31347            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31348          fi
31349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31350$as_echo "$tool_specified" >&6; }
31351        fi
31352      fi
31353    fi
31354
31355  fi
31356
31357
31358
31359  # Finally, set some other options...
31360
31361  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31362  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31363
31364
31365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31366$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31367  if "$JAVA" --list-modules > /dev/null 2>&1; then
31368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31369$as_echo "yes" >&6; }
31370    BOOT_JDK_MODULAR="true"
31371  else
31372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31373$as_echo "no" >&6; }
31374    BOOT_JDK_MODULAR="false"
31375  fi
31376
31377
31378
31379
31380  # Check if the boot jdk is 32 or 64 bit
31381  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31382    BOOT_JDK_BITS="64"
31383  else
31384    BOOT_JDK_BITS="32"
31385  fi
31386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31387$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31389$as_echo "$BOOT_JDK_BITS" >&6; }
31390
31391
31392
31393# Check whether --with-build-jdk was given.
31394if test "${with_build_jdk+set}" = set; then :
31395  withval=$with_build_jdk;
31396fi
31397
31398
31399  CREATE_BUILDJDK=false
31400  EXTERNAL_BUILDJDK=false
31401  BUILD_JDK_FOUND="no"
31402  if test "x$with_build_jdk" != "x"; then
31403
31404  if test "x$BUILD_JDK_FOUND" = xno; then
31405    # Execute the test
31406
31407       if test "x$with_build_jdk" != x; then
31408         BUILD_JDK=$with_build_jdk
31409         BUILD_JDK_FOUND=maybe
31410         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31411$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31412       fi
31413
31414    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31415    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31416      # Do we have a bin/java?
31417      if test ! -x "$BUILD_JDK/bin/java"; then
31418        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31419$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31420        BUILD_JDK_FOUND=no
31421      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31422        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31423$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31424        BUILD_JDK_FOUND=no
31425      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31427$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31428        BUILD_JDK_FOUND=no
31429      elif test ! -x "$BUILD_JDK/bin/javac"; then
31430        # Do we have a bin/javac?
31431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31432$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31433        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31434$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31435        BUILD_JDK_FOUND=no
31436      else
31437        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31438        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31439
31440        # Extra M4 quote needed to protect [] in grep expression.
31441        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31442        if test "x$FOUND_CORRECT_VERSION" = x; then
31443          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31444$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31445          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31446$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31447          BUILD_JDK_FOUND=no
31448        else
31449          # We're done!
31450          BUILD_JDK_FOUND=yes
31451
31452  # Only process if variable expands to non-empty
31453
31454  if test "x$BUILD_JDK" != x; then
31455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31456
31457  # Input might be given as Windows format, start by converting to
31458  # unix format.
31459  path="$BUILD_JDK"
31460  new_path=`$CYGPATH -u "$path"`
31461
31462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31465  # "foo.exe" is OK but "foo" is an error.
31466  #
31467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31468  # It is also a way to make sure we got the proper file name for the real test later on.
31469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31470  if test "x$test_shortpath" = x; then
31471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31472$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31473    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31474  fi
31475
31476  # Call helper function which possibly converts this using DOS-style short mode.
31477  # If so, the updated path is stored in $new_path.
31478
31479  input_path="$new_path"
31480  # Check if we need to convert this using DOS-style short mode. If the path
31481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31482  # take no chances and rewrite it.
31483  # Note: m4 eats our [], so we need to use [ and ] instead.
31484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31485  if test "x$has_forbidden_chars" != x; then
31486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31490      # Going to short mode and back again did indeed matter. Since short mode is
31491      # case insensitive, let's make it lowercase to improve readability.
31492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31493      # Now convert it back to Unix-style (cygpath)
31494      input_path=`$CYGPATH -u "$shortmode_path"`
31495      new_path="$input_path"
31496    fi
31497  fi
31498
31499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31500  if test "x$test_cygdrive_prefix" = x; then
31501    # As a simple fix, exclude /usr/bin since it's not a real path.
31502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31504      # a path prefixed by /cygdrive for fixpath to work.
31505      new_path="$CYGWIN_ROOT_PATH$input_path"
31506    fi
31507  fi
31508
31509
31510  if test "x$path" != "x$new_path"; then
31511    BUILD_JDK="$new_path"
31512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31513$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31514  fi
31515
31516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31517
31518  path="$BUILD_JDK"
31519  has_colon=`$ECHO $path | $GREP ^.:`
31520  new_path="$path"
31521  if test "x$has_colon" = x; then
31522    # Not in mixed or Windows style, start by that.
31523    new_path=`cmd //c echo $path`
31524  fi
31525
31526
31527  input_path="$new_path"
31528  # Check if we need to convert this using DOS-style short mode. If the path
31529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31530  # take no chances and rewrite it.
31531  # Note: m4 eats our [], so we need to use [ and ] instead.
31532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31533  if test "x$has_forbidden_chars" != x; then
31534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31536  fi
31537
31538
31539  windows_path="$new_path"
31540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31541    unix_path=`$CYGPATH -u "$windows_path"`
31542    new_path="$unix_path"
31543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31545    new_path="$unix_path"
31546  fi
31547
31548  if test "x$path" != "x$new_path"; then
31549    BUILD_JDK="$new_path"
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31551$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31552  fi
31553
31554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31556
31557    else
31558      # We're on a unix platform. Hooray! :)
31559      path="$BUILD_JDK"
31560      has_space=`$ECHO "$path" | $GREP " "`
31561      if test "x$has_space" != x; then
31562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31563$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31565      fi
31566
31567      # Use eval to expand a potential ~
31568      eval path="$path"
31569      if test ! -f "$path" && test ! -d "$path"; then
31570        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31571      fi
31572
31573      if test -d "$path"; then
31574        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31575      else
31576        dir="`$DIRNAME "$path"`"
31577        base="`$BASENAME "$path"`"
31578        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31579      fi
31580    fi
31581  fi
31582
31583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31584$as_echo_n "checking for Build JDK... " >&6; }
31585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31586$as_echo "$BUILD_JDK" >&6; }
31587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31588$as_echo_n "checking Build JDK version... " >&6; }
31589          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31591$as_echo "$BUILD_JDK_VERSION" >&6; }
31592        fi # end check jdk version
31593      fi # end check java
31594    fi # end check build jdk found
31595  fi
31596
31597    EXTERNAL_BUILDJDK=true
31598  else
31599    if test "x$COMPILE_TYPE" = "xcross"; then
31600      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31601      BUILD_JDK_FOUND=yes
31602      CREATE_BUILDJDK=true
31603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31604$as_echo_n "checking for Build JDK... " >&6; }
31605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31606$as_echo "yes, will build it for the host platform" >&6; }
31607    else
31608      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31609      BUILD_JDK_FOUND=yes
31610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31611$as_echo_n "checking for Build JDK... " >&6; }
31612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31613$as_echo "yes, will use output dir" >&6; }
31614    fi
31615  fi
31616
31617  JMOD="$BUILD_JDK/bin/jmod"
31618  JLINK="$BUILD_JDK/bin/jlink"
31619
31620
31621
31622  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31624$as_echo_n "checking for Build JDK... " >&6; }
31625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31628  fi
31629
31630
31631
31632
31633
31634
31635###############################################################################
31636#
31637# Configure the sources to use. We can add or override individual directories.
31638#
31639###############################################################################
31640
31641
31642  # Where are the sources.
31643  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31644  CORBA_TOPDIR="$SRC_ROOT/corba"
31645  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31646  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31647  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31648  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31649  JDK_TOPDIR="$SRC_ROOT/jdk"
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659  # This feature is no longer supported.
31660
31661
31662
31663# Check whether --with-add-source-root was given.
31664if test "${with_add_source_root+set}" = set; then :
31665  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
31666$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31667fi
31668
31669
31670
31671
31672# Check whether --with-override-source-root was given.
31673if test "${with_override_source_root+set}" = set; then :
31674  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
31675$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31676fi
31677
31678
31679
31680
31681# Check whether --with-adds-and-overrides was given.
31682if test "${with_adds_and_overrides+set}" = set; then :
31683  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
31684$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31685fi
31686
31687
31688
31689
31690# Check whether --with-override-langtools was given.
31691if test "${with_override_langtools+set}" = set; then :
31692  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31693$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31694fi
31695
31696
31697
31698
31699# Check whether --with-override-corba was given.
31700if test "${with_override_corba+set}" = set; then :
31701  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31702$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31703fi
31704
31705
31706
31707
31708# Check whether --with-override-jaxp was given.
31709if test "${with_override_jaxp+set}" = set; then :
31710  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31711$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31712fi
31713
31714
31715
31716
31717# Check whether --with-override-jaxws was given.
31718if test "${with_override_jaxws+set}" = set; then :
31719  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31720$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31721fi
31722
31723
31724
31725
31726# Check whether --with-override-hotspot was given.
31727if test "${with_override_hotspot+set}" = set; then :
31728  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31729$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31730fi
31731
31732
31733
31734
31735# Check whether --with-override-nashorn was given.
31736if test "${with_override_nashorn+set}" = set; then :
31737  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31738$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31739fi
31740
31741
31742
31743
31744# Check whether --with-override-jdk was given.
31745if test "${with_override_jdk+set}" = set; then :
31746  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31747$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31748fi
31749
31750
31751
31752
31753  BUILD_OUTPUT="$OUTPUT_ROOT"
31754
31755  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31756
31757
31758
31759# Check whether --with-import_hotspot was given.
31760if test "${with_import_hotspot+set}" = set; then :
31761  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31762$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31763fi
31764
31765
31766
31767
31768
31769
31770# Check whether --with-import-modules was given.
31771if test "${with_import_modules+set}" = set; then :
31772  withval=$with_import_modules;
31773fi
31774
31775
31776  if test "x$with_import_modules" != x \
31777      && test "x$with_import_modules" != "xno"; then
31778    if test -d "$with_import_modules"; then
31779      IMPORT_MODULES_TOPDIR="$with_import_modules"
31780
31781  # Only process if variable expands to non-empty
31782
31783  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785
31786  # Input might be given as Windows format, start by converting to
31787  # unix format.
31788  path="$IMPORT_MODULES_TOPDIR"
31789  new_path=`$CYGPATH -u "$path"`
31790
31791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31794  # "foo.exe" is OK but "foo" is an error.
31795  #
31796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31797  # It is also a way to make sure we got the proper file name for the real test later on.
31798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31799  if test "x$test_shortpath" = x; then
31800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31801$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31802    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31803  fi
31804
31805  # Call helper function which possibly converts this using DOS-style short mode.
31806  # If so, the updated path is stored in $new_path.
31807
31808  input_path="$new_path"
31809  # Check if we need to convert this using DOS-style short mode. If the path
31810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31811  # take no chances and rewrite it.
31812  # Note: m4 eats our [], so we need to use [ and ] instead.
31813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31814  if test "x$has_forbidden_chars" != x; then
31815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31819      # Going to short mode and back again did indeed matter. Since short mode is
31820      # case insensitive, let's make it lowercase to improve readability.
31821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31822      # Now convert it back to Unix-style (cygpath)
31823      input_path=`$CYGPATH -u "$shortmode_path"`
31824      new_path="$input_path"
31825    fi
31826  fi
31827
31828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31829  if test "x$test_cygdrive_prefix" = x; then
31830    # As a simple fix, exclude /usr/bin since it's not a real path.
31831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31833      # a path prefixed by /cygdrive for fixpath to work.
31834      new_path="$CYGWIN_ROOT_PATH$input_path"
31835    fi
31836  fi
31837
31838
31839  if test "x$path" != "x$new_path"; then
31840    IMPORT_MODULES_TOPDIR="$new_path"
31841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31842$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31843  fi
31844
31845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31846
31847  path="$IMPORT_MODULES_TOPDIR"
31848  has_colon=`$ECHO $path | $GREP ^.:`
31849  new_path="$path"
31850  if test "x$has_colon" = x; then
31851    # Not in mixed or Windows style, start by that.
31852    new_path=`cmd //c echo $path`
31853  fi
31854
31855
31856  input_path="$new_path"
31857  # Check if we need to convert this using DOS-style short mode. If the path
31858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31859  # take no chances and rewrite it.
31860  # Note: m4 eats our [], so we need to use [ and ] instead.
31861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31862  if test "x$has_forbidden_chars" != x; then
31863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31865  fi
31866
31867
31868  windows_path="$new_path"
31869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870    unix_path=`$CYGPATH -u "$windows_path"`
31871    new_path="$unix_path"
31872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874    new_path="$unix_path"
31875  fi
31876
31877  if test "x$path" != "x$new_path"; then
31878    IMPORT_MODULES_TOPDIR="$new_path"
31879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31880$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31881  fi
31882
31883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31885
31886    else
31887      # We're on a unix platform. Hooray! :)
31888      path="$IMPORT_MODULES_TOPDIR"
31889      has_space=`$ECHO "$path" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31892$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31894      fi
31895
31896      # Use eval to expand a potential ~
31897      eval path="$path"
31898      if test ! -f "$path" && test ! -d "$path"; then
31899        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31900      fi
31901
31902      if test -d "$path"; then
31903        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31904      else
31905        dir="`$DIRNAME "$path"`"
31906        base="`$BASENAME "$path"`"
31907        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31908      fi
31909    fi
31910  fi
31911
31912    elif test -e "$with_import_modules"; then
31913      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31914      $RM -rf "$IMPORT_MODULES_TOPDIR"
31915      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31916      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31917        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31918      fi
31919    else
31920      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31921    fi
31922  fi
31923
31924  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31925    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31926  fi
31927  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31928    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31929  fi
31930  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31931    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31932  fi
31933  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31934    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31935  fi
31936  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31937    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31938  fi
31939  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31940    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31941  fi
31942  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31943    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31944  fi
31945  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31946    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31947  fi
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959###############################################################################
31960#
31961# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31962# native code.
31963#
31964###############################################################################
31965
31966# See if we are doing a complete static build or not
31967
31968  # Check whether --enable-static-build was given.
31969if test "${enable_static_build+set}" = set; then :
31970  enableval=$enable_static_build;
31971fi
31972
31973  STATIC_BUILD=false
31974  if test "x$enable_static_build" = "xyes"; then
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31976$as_echo_n "checking if static build is enabled... " >&6; }
31977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31978$as_echo "yes" >&6; }
31979    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31980      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31981    fi
31982    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31983    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31984    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31985    STATIC_BUILD=true
31986  elif test "x$enable_static_build" = "xno"; then
31987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31988$as_echo_n "checking if static build is enabled... " >&6; }
31989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31990$as_echo "no" >&6; }
31991  elif test "x$enable_static_build" != "x"; then
31992    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31993  fi
31994
31995
31996
31997
31998# First determine the toolchain type (compiler family)
31999
32000
32001# Check whether --with-toolchain-type was given.
32002if test "${with_toolchain_type+set}" = set; then :
32003  withval=$with_toolchain_type;
32004fi
32005
32006
32007  # Use indirect variable referencing
32008  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32009  VALID_TOOLCHAINS=${!toolchain_var_name}
32010
32011  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32012    if test -n "$XCODEBUILD"; then
32013      # On Mac OS X, default toolchain to clang after Xcode 5
32014      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32015      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32016      if test $? -ne 0; then
32017        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32018      fi
32019      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32020          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32021          $CUT -f 1 -d .`
32022      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32023$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32024      if test $XCODE_MAJOR_VERSION -ge 5; then
32025          DEFAULT_TOOLCHAIN="clang"
32026      else
32027          DEFAULT_TOOLCHAIN="gcc"
32028      fi
32029    else
32030      # If Xcode is not installed, but the command line tools are
32031      # then we can't run xcodebuild. On these systems we should
32032      # default to clang
32033      DEFAULT_TOOLCHAIN="clang"
32034    fi
32035  else
32036    # First toolchain type in the list is the default
32037    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32038  fi
32039
32040  if test "x$with_toolchain_type" = xlist; then
32041    # List all toolchains
32042    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32043$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32044    for toolchain in $VALID_TOOLCHAINS; do
32045      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32046      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32047      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32048    done
32049
32050    exit 0
32051  elif test "x$with_toolchain_type" != x; then
32052    # User override; check that it is valid
32053    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32054      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32055$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32057$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32058      as_fn_error $? "Cannot continue." "$LINENO" 5
32059    fi
32060    TOOLCHAIN_TYPE=$with_toolchain_type
32061  else
32062    # No flag given, use default
32063    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32064  fi
32065
32066
32067  TOOLCHAIN_CC_BINARY_clang="clang"
32068  TOOLCHAIN_CC_BINARY_gcc="gcc"
32069  TOOLCHAIN_CC_BINARY_microsoft="cl"
32070  TOOLCHAIN_CC_BINARY_solstudio="cc"
32071  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32072
32073  TOOLCHAIN_CXX_BINARY_clang="clang++"
32074  TOOLCHAIN_CXX_BINARY_gcc="g++"
32075  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32076  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32077  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32078
32079  # Use indirect variable referencing
32080  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32081  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32082  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32083  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32084  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32085  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32086  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32087  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32088
32089
32090  # Define filename patterns
32091  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32092    LIBRARY_PREFIX=
32093    SHARED_LIBRARY_SUFFIX='.dll'
32094    STATIC_LIBRARY_SUFFIX='.lib'
32095    SHARED_LIBRARY='$1.dll'
32096    STATIC_LIBRARY='$1.lib'
32097    OBJ_SUFFIX='.obj'
32098    EXE_SUFFIX='.exe'
32099  else
32100    LIBRARY_PREFIX=lib
32101    SHARED_LIBRARY_SUFFIX='.so'
32102    STATIC_LIBRARY_SUFFIX='.a'
32103    SHARED_LIBRARY='lib$1.so'
32104    STATIC_LIBRARY='lib$1.a'
32105    OBJ_SUFFIX='.o'
32106    EXE_SUFFIX=''
32107    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32108      # For full static builds, we're overloading the SHARED_LIBRARY
32109      # variables in order to limit the amount of changes required.
32110      # It would be better to remove SHARED and just use LIBRARY and
32111      # LIBRARY_SUFFIX for libraries that can be built either
32112      # shared or static and use STATIC_* for libraries that are
32113      # always built statically.
32114      if test "x$STATIC_BUILD" = xtrue; then
32115        SHARED_LIBRARY='lib$1.a'
32116        SHARED_LIBRARY_SUFFIX='.a'
32117      else
32118        SHARED_LIBRARY='lib$1.dylib'
32119        SHARED_LIBRARY_SUFFIX='.dylib'
32120      fi
32121    fi
32122  fi
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32134    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32135$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32136  else
32137    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32138$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32139  fi
32140
32141
32142# User supplied flags should be used when configure detects compilers
32143
32144  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32146$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32147  fi
32148
32149  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32151$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32152  fi
32153
32154  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32156$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32157  fi
32158
32159
32160# Check whether --with-extra-cflags was given.
32161if test "${with_extra_cflags+set}" = set; then :
32162  withval=$with_extra_cflags;
32163fi
32164
32165
32166
32167# Check whether --with-extra-cxxflags was given.
32168if test "${with_extra_cxxflags+set}" = set; then :
32169  withval=$with_extra_cxxflags;
32170fi
32171
32172
32173
32174# Check whether --with-extra-ldflags was given.
32175if test "${with_extra_ldflags+set}" = set; then :
32176  withval=$with_extra_ldflags;
32177fi
32178
32179
32180  EXTRA_CFLAGS="$with_extra_cflags"
32181  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32182  EXTRA_LDFLAGS="$with_extra_ldflags"
32183
32184
32185
32186
32187
32188  # The global CFLAGS and LDLAGS variables are used by configure tests and
32189  # should include the extra parameters
32190  CFLAGS="$EXTRA_CFLAGS"
32191  CXXFLAGS="$EXTRA_CXXFLAGS"
32192  LDFLAGS="$EXTRA_LDFLAGS"
32193  CPPFLAGS=""
32194
32195# The sysroot cflags are needed for configure to be able to run the compilers
32196
32197  if test "x$SYSROOT" != "x"; then
32198    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32199      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32200        # Solaris Studio does not have a concept of sysroot. Instead we must
32201        # make sure the default include and lib dirs are appended to each
32202        # compile and link command line. Must also add -I-xbuiltin to enable
32203        # inlining of system functions and intrinsics.
32204        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32205        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32206            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32207      fi
32208    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32209      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32210      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32211    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32212      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32213      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32214    fi
32215    # The global CFLAGS and LDFLAGS variables need these for configure to function
32216    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32217    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32218    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32219    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32220  fi
32221
32222  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32223    # We also need -iframework<path>/System/Library/Frameworks
32224    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32225    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32226    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32227    # set this here so it doesn't have to be peppered throughout the forest
32228    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32229    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32230  fi
32231
32232
32233
32234
32235
32236# Then detect the actual binaries needed
32237
32238  # FIXME: Is this needed?
32239  ac_ext=cpp
32240ac_cpp='$CXXCPP $CPPFLAGS'
32241ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32242ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32243ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32244
32245
32246  # Store the CFLAGS etc passed to the configure script.
32247  ORG_CFLAGS="$CFLAGS"
32248  ORG_CXXFLAGS="$CXXFLAGS"
32249
32250  # autoconf magic only relies on PATH, so update it if tools dir is specified
32251  OLD_PATH="$PATH"
32252
32253  # On Windows, we need to detect the visual studio installation first.
32254  # This will change the PATH, but we need to keep that new PATH even
32255  # after toolchain detection is done, since the compiler (on x86) uses
32256  # it for DLL resolution in runtime.
32257  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32258      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32259
32260  # Store path to cygwin link.exe to help excluding it when searching for
32261  # VS linker. This must be done before changing the PATH when looking for VS.
32262  # Extract the first word of "link", so it can be a program name with args.
32263set dummy link; ac_word=$2
32264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32265$as_echo_n "checking for $ac_word... " >&6; }
32266if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32267  $as_echo_n "(cached) " >&6
32268else
32269  case $CYGWIN_LINK in
32270  [\\/]* | ?:[\\/]*)
32271  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32272  ;;
32273  *)
32274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32275for as_dir in $PATH
32276do
32277  IFS=$as_save_IFS
32278  test -z "$as_dir" && as_dir=.
32279    for ac_exec_ext in '' $ac_executable_extensions; do
32280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32281    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32283    break 2
32284  fi
32285done
32286  done
32287IFS=$as_save_IFS
32288
32289  ;;
32290esac
32291fi
32292CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32293if test -n "$CYGWIN_LINK"; then
32294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32295$as_echo "$CYGWIN_LINK" >&6; }
32296else
32297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32298$as_echo "no" >&6; }
32299fi
32300
32301
32302  if test "x$CYGWIN_LINK" != x; then
32303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32304$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32305    "$CYGWIN_LINK" --version > /dev/null
32306    if test $? -eq 0 ; then
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32308$as_echo "yes" >&6; }
32309    else
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32311$as_echo "no" >&6; }
32312      # This might be the VS linker. Don't exclude it later on.
32313      CYGWIN_LINK=""
32314    fi
32315  fi
32316
32317  # First-hand choice is to locate and run the vsvars bat file.
32318
32319
32320# Check whether --with-toolchain-version was given.
32321if test "${with_toolchain_version+set}" = set; then :
32322  withval=$with_toolchain_version;
32323fi
32324
32325
32326  if test "x$with_toolchain_version" = xlist; then
32327    # List all toolchains
32328    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32329$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32330    for version in $VALID_VS_VERSIONS; do
32331      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32332      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32333    done
32334
32335    exit 0
32336  elif test "x$DEVKIT_VS_VERSION" != x; then
32337    VS_VERSION=$DEVKIT_VS_VERSION
32338    TOOLCHAIN_VERSION=$VS_VERSION
32339    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32340    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32341    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32342    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32343    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32344    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32345
32346    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32347    # can still be exported as INCLUDE for compiler invocations without
32348    # SYSROOT_CFLAGS
32349    OLDIFS="$IFS"
32350    IFS=";"
32351    for i in $DEVKIT_VS_INCLUDE; do
32352      ipath=$i
32353
32354  unix_path="$ipath"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    windows_path=`$CYGPATH -m "$unix_path"`
32357    ipath="$windows_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    windows_path=`cmd //c echo $unix_path`
32360    ipath="$windows_path"
32361  fi
32362
32363      VS_INCLUDE="$VS_INCLUDE;$ipath"
32364    done
32365    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32366    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32367    for i in $DEVKIT_VS_LIB; do
32368      libpath=$i
32369
32370  unix_path="$libpath"
32371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32372    windows_path=`$CYGPATH -m "$unix_path"`
32373    libpath="$windows_path"
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375    windows_path=`cmd //c echo $unix_path`
32376    libpath="$windows_path"
32377  fi
32378
32379      VS_LIB="$VS_LIB;$libpath"
32380    done
32381    IFS="$OLDIFS"
32382
32383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32384$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32385
32386  elif test "x$with_toolchain_version" != x; then
32387    # User override; check that it is valid
32388    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32389      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32390$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32391      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32392$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32393      as_fn_error $? "Cannot continue." "$LINENO" 5
32394    fi
32395    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32396  else
32397    # No flag given, use default
32398    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32399  fi
32400
32401  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32402
32403  VS_VERSION="$VS_VERSION"
32404  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32405  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32406  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32407  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32408
32409  # When using --with-tools-dir, assume it points to the correct and default
32410  # version of Visual Studio or that --with-toolchain-version was also set.
32411  if test "x$with_tools_dir" != x; then
32412
32413  if test "x$VS_ENV_CMD" = x; then
32414    VS_VERSION="${VS_VERSION}"
32415    VS_BASE="$with_tools_dir/../.."
32416    METHOD="--with-tools-dir"
32417
32418    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32419      VCVARSFILE="vc/bin/vcvars32.bat"
32420    else
32421      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32422    fi
32423
32424
32425  windows_path="$VS_BASE"
32426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32427    unix_path=`$CYGPATH -u "$windows_path"`
32428    VS_BASE="$unix_path"
32429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32431    VS_BASE="$unix_path"
32432  fi
32433
32434    if test -d "$VS_BASE"; then
32435      if test -f "$VS_BASE/$VCVARSFILE"; then
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32437$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32438        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32439        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32440        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32441        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32442      else
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32444$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32445        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32446$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32447      fi
32448    fi
32449  fi
32450
32451
32452  if test "x$VS_ENV_CMD" = x; then
32453    VS_VERSION="${VS_VERSION}"
32454    VS_BASE="$with_tools_dir/../../.."
32455    METHOD="--with-tools-dir"
32456
32457    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32458      VCVARSFILE="vc/bin/vcvars32.bat"
32459    else
32460      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32461    fi
32462
32463
32464  windows_path="$VS_BASE"
32465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32466    unix_path=`$CYGPATH -u "$windows_path"`
32467    VS_BASE="$unix_path"
32468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32470    VS_BASE="$unix_path"
32471  fi
32472
32473    if test -d "$VS_BASE"; then
32474      if test -f "$VS_BASE/$VCVARSFILE"; then
32475        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32476$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32477        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32478        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32479        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32480        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32481      else
32482        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32483$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32484        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32485$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32486      fi
32487    fi
32488  fi
32489
32490    if test "x$VS_ENV_CMD" = x; then
32491      # Having specified an argument which is incorrect will produce an instant failure;
32492      # we should not go on looking
32493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32494$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32495      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32496$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32497      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32498$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32499      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32500    fi
32501  fi
32502
32503  VS_ENV_CMD=""
32504  VS_ENV_ARGS=""
32505
32506  if test "x$VS_COMNTOOLS" != x; then
32507
32508  if test "x$VS_ENV_CMD" = x; then
32509    VS_VERSION="${VS_VERSION}"
32510    VS_BASE="$VS_COMNTOOLS/../.."
32511    METHOD="$VS_COMNTOOLS_VAR variable"
32512
32513    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32514      VCVARSFILE="vc/bin/vcvars32.bat"
32515    else
32516      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32517    fi
32518
32519
32520  windows_path="$VS_BASE"
32521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32522    unix_path=`$CYGPATH -u "$windows_path"`
32523    VS_BASE="$unix_path"
32524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32526    VS_BASE="$unix_path"
32527  fi
32528
32529    if test -d "$VS_BASE"; then
32530      if test -f "$VS_BASE/$VCVARSFILE"; then
32531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32532$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32533        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32534        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32535        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32536        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32537      else
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32539$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32541$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32542      fi
32543    fi
32544  fi
32545
32546  fi
32547  if test "x$PROGRAMFILES" != x; then
32548
32549  if test "x$VS_ENV_CMD" = x; then
32550    VS_VERSION="${VS_VERSION}"
32551    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32552    METHOD="well-known name"
32553
32554    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32555      VCVARSFILE="vc/bin/vcvars32.bat"
32556    else
32557      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32558    fi
32559
32560
32561  windows_path="$VS_BASE"
32562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32563    unix_path=`$CYGPATH -u "$windows_path"`
32564    VS_BASE="$unix_path"
32565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32567    VS_BASE="$unix_path"
32568  fi
32569
32570    if test -d "$VS_BASE"; then
32571      if test -f "$VS_BASE/$VCVARSFILE"; then
32572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32573$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32574        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32575        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32576        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32577        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32578      else
32579        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32580$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32581        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32582$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32583      fi
32584    fi
32585  fi
32586
32587  fi
32588  # Work around the insanely named ProgramFiles(x86) env variable
32589  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32590  if test "x$PROGRAMFILES_X86" != x; then
32591
32592  if test "x$VS_ENV_CMD" = x; then
32593    VS_VERSION="${VS_VERSION}"
32594    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32595    METHOD="well-known name"
32596
32597    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32598      VCVARSFILE="vc/bin/vcvars32.bat"
32599    else
32600      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32601    fi
32602
32603
32604  windows_path="$VS_BASE"
32605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32606    unix_path=`$CYGPATH -u "$windows_path"`
32607    VS_BASE="$unix_path"
32608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32610    VS_BASE="$unix_path"
32611  fi
32612
32613    if test -d "$VS_BASE"; then
32614      if test -f "$VS_BASE/$VCVARSFILE"; then
32615        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32616$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32617        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32618        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32619        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32620        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32621      else
32622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32623$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32624        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32625$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32626      fi
32627    fi
32628  fi
32629
32630  fi
32631
32632  if test "x$VS_ENV_CMD" = x; then
32633    VS_VERSION="${VS_VERSION}"
32634    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32635    METHOD="well-known name"
32636
32637    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32638      VCVARSFILE="vc/bin/vcvars32.bat"
32639    else
32640      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32641    fi
32642
32643
32644  windows_path="$VS_BASE"
32645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32646    unix_path=`$CYGPATH -u "$windows_path"`
32647    VS_BASE="$unix_path"
32648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32650    VS_BASE="$unix_path"
32651  fi
32652
32653    if test -d "$VS_BASE"; then
32654      if test -f "$VS_BASE/$VCVARSFILE"; then
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32656$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32657        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32658        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32659        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32660        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32661      else
32662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32663$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32665$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32666      fi
32667    fi
32668  fi
32669
32670
32671  if test "x$VS_ENV_CMD" = x; then
32672    VS_VERSION="${VS_VERSION}"
32673    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32674    METHOD="well-known name"
32675
32676    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32677      VCVARSFILE="vc/bin/vcvars32.bat"
32678    else
32679      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32680    fi
32681
32682
32683  windows_path="$VS_BASE"
32684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32685    unix_path=`$CYGPATH -u "$windows_path"`
32686    VS_BASE="$unix_path"
32687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32689    VS_BASE="$unix_path"
32690  fi
32691
32692    if test -d "$VS_BASE"; then
32693      if test -f "$VS_BASE/$VCVARSFILE"; then
32694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32695$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32696        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32697        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32698        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32699        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32700      else
32701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32702$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32705      fi
32706    fi
32707  fi
32708
32709
32710  if test "x$SDK_INSTALL_DIR" != x; then
32711    if test "x$ProgramW6432" != x; then
32712
32713  if test "x$VS_ENV_CMD" = x; then
32714    VS_VERSION="${VS_VERSION}"
32715    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32716    METHOD="well-known name"
32717
32718  windows_path="$WIN_SDK_BASE"
32719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32720    unix_path=`$CYGPATH -u "$windows_path"`
32721    WIN_SDK_BASE="$unix_path"
32722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32724    WIN_SDK_BASE="$unix_path"
32725  fi
32726
32727    if test -d "$WIN_SDK_BASE"; then
32728      # There have been cases of partial or broken SDK installations. A missing
32729      # lib dir is not going to work.
32730      if test ! -d "$WIN_SDK_BASE/lib"; then
32731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32732$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32734$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32735      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32737$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32738        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32739        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32740          VS_ENV_ARGS="/x86"
32741        else
32742          VS_ENV_ARGS="/x64"
32743        fi
32744        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32745        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32746        # TODO: improve detection for other versions of SDK
32747        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32748      else
32749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32750$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32751        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32752$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32753      fi
32754    fi
32755  fi
32756
32757    fi
32758    if test "x$PROGRAMW6432" != x; then
32759
32760  if test "x$VS_ENV_CMD" = x; then
32761    VS_VERSION="${VS_VERSION}"
32762    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32763    METHOD="well-known name"
32764
32765  windows_path="$WIN_SDK_BASE"
32766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32767    unix_path=`$CYGPATH -u "$windows_path"`
32768    WIN_SDK_BASE="$unix_path"
32769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32771    WIN_SDK_BASE="$unix_path"
32772  fi
32773
32774    if test -d "$WIN_SDK_BASE"; then
32775      # There have been cases of partial or broken SDK installations. A missing
32776      # lib dir is not going to work.
32777      if test ! -d "$WIN_SDK_BASE/lib"; then
32778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32779$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32780        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32781$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32782      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32784$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32785        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32786        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32787          VS_ENV_ARGS="/x86"
32788        else
32789          VS_ENV_ARGS="/x64"
32790        fi
32791        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32792        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32793        # TODO: improve detection for other versions of SDK
32794        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32795      else
32796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32797$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32799$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32800      fi
32801    fi
32802  fi
32803
32804    fi
32805    if test "x$PROGRAMFILES" != x; then
32806
32807  if test "x$VS_ENV_CMD" = x; then
32808    VS_VERSION="${VS_VERSION}"
32809    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32810    METHOD="well-known name"
32811
32812  windows_path="$WIN_SDK_BASE"
32813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32814    unix_path=`$CYGPATH -u "$windows_path"`
32815    WIN_SDK_BASE="$unix_path"
32816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32818    WIN_SDK_BASE="$unix_path"
32819  fi
32820
32821    if test -d "$WIN_SDK_BASE"; then
32822      # There have been cases of partial or broken SDK installations. A missing
32823      # lib dir is not going to work.
32824      if test ! -d "$WIN_SDK_BASE/lib"; then
32825        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32826$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32827        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32828$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32829      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32830        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32831$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32832        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32833        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32834          VS_ENV_ARGS="/x86"
32835        else
32836          VS_ENV_ARGS="/x64"
32837        fi
32838        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32839        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32840        # TODO: improve detection for other versions of SDK
32841        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32842      else
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32844$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32846$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32847      fi
32848    fi
32849  fi
32850
32851    fi
32852
32853  if test "x$VS_ENV_CMD" = x; then
32854    VS_VERSION="${VS_VERSION}"
32855    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32856    METHOD="well-known name"
32857
32858  windows_path="$WIN_SDK_BASE"
32859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32860    unix_path=`$CYGPATH -u "$windows_path"`
32861    WIN_SDK_BASE="$unix_path"
32862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32864    WIN_SDK_BASE="$unix_path"
32865  fi
32866
32867    if test -d "$WIN_SDK_BASE"; then
32868      # There have been cases of partial or broken SDK installations. A missing
32869      # lib dir is not going to work.
32870      if test ! -d "$WIN_SDK_BASE/lib"; then
32871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32872$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32874$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32875      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32877$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32878        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32879        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32880          VS_ENV_ARGS="/x86"
32881        else
32882          VS_ENV_ARGS="/x64"
32883        fi
32884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32886        # TODO: improve detection for other versions of SDK
32887        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32888      else
32889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32892$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32893      fi
32894    fi
32895  fi
32896
32897
32898  if test "x$VS_ENV_CMD" = x; then
32899    VS_VERSION="${VS_VERSION}"
32900    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32901    METHOD="well-known name"
32902
32903  windows_path="$WIN_SDK_BASE"
32904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32905    unix_path=`$CYGPATH -u "$windows_path"`
32906    WIN_SDK_BASE="$unix_path"
32907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32909    WIN_SDK_BASE="$unix_path"
32910  fi
32911
32912    if test -d "$WIN_SDK_BASE"; then
32913      # There have been cases of partial or broken SDK installations. A missing
32914      # lib dir is not going to work.
32915      if test ! -d "$WIN_SDK_BASE/lib"; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32919$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32920      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32923        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32924        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32925          VS_ENV_ARGS="/x86"
32926        else
32927          VS_ENV_ARGS="/x64"
32928        fi
32929        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32930        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32931        # TODO: improve detection for other versions of SDK
32932        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32933      else
32934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32937$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32938      fi
32939    fi
32940  fi
32941
32942  fi
32943
32944    if test "x$VS_ENV_CMD" != x; then
32945      TOOLCHAIN_VERSION=$VS_VERSION
32946      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32947      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32948      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32949      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32950      # The rest of the variables are already evaled while probing
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32952$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32953      break
32954    fi
32955  done
32956
32957
32958  # If we have a devkit, skip all of the below.
32959  if test "x$DEVKIT_VS_VERSION" = x; then
32960    if test "x$VS_ENV_CMD" != x; then
32961      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32962
32963  # Only process if variable expands to non-empty
32964
32965  if test "x$VS_ENV_CMD" != x; then
32966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32967
32968  # First separate the path from the arguments. This will split at the first
32969  # space.
32970  complete="$VS_ENV_CMD"
32971  path="${complete%% *}"
32972  tmp="$complete EOL"
32973  arguments="${tmp#* }"
32974
32975  # Input might be given as Windows format, start by converting to
32976  # unix format.
32977  new_path=`$CYGPATH -u "$path"`
32978
32979  # Now try to locate executable using which
32980  new_path=`$WHICH "$new_path" 2> /dev/null`
32981  # bat and cmd files are not always considered executable in cygwin causing which
32982  # to not find them
32983  if test "x$new_path" = x \
32984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32986    new_path=`$CYGPATH -u "$path"`
32987  fi
32988  if test "x$new_path" = x; then
32989    # Oops. Which didn't find the executable.
32990    # The splitting of arguments from the executable at a space might have been incorrect,
32991    # since paths with space are more likely in Windows. Give it another try with the whole
32992    # argument.
32993    path="$complete"
32994    arguments="EOL"
32995    new_path=`$CYGPATH -u "$path"`
32996    new_path=`$WHICH "$new_path" 2> /dev/null`
32997    # bat and cmd files are not always considered executable in cygwin causing which
32998    # to not find them
32999    if test "x$new_path" = x \
33000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33002      new_path=`$CYGPATH -u "$path"`
33003    fi
33004    if test "x$new_path" = x; then
33005      # It's still not found. Now this is an unrecoverable error.
33006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33007$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33008      has_space=`$ECHO "$complete" | $GREP " "`
33009      if test "x$has_space" != x; then
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33012      fi
33013      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33014    fi
33015  fi
33016
33017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33020  # "foo.exe" is OK but "foo" is an error.
33021  #
33022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33023  # It is also a way to make sure we got the proper file name for the real test later on.
33024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33025  if test "x$test_shortpath" = x; then
33026    # Short path failed, file does not exist as specified.
33027    # Try adding .exe or .cmd
33028    if test -f "${new_path}.exe"; then
33029      input_to_shortpath="${new_path}.exe"
33030    elif test -f "${new_path}.cmd"; then
33031      input_to_shortpath="${new_path}.cmd"
33032    else
33033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33034$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33037      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33038    fi
33039  else
33040    input_to_shortpath="$new_path"
33041  fi
33042
33043  # Call helper function which possibly converts this using DOS-style short mode.
33044  # If so, the updated path is stored in $new_path.
33045  new_path="$input_to_shortpath"
33046
33047  input_path="$input_to_shortpath"
33048  # Check if we need to convert this using DOS-style short mode. If the path
33049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33050  # take no chances and rewrite it.
33051  # Note: m4 eats our [], so we need to use [ and ] instead.
33052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33053  if test "x$has_forbidden_chars" != x; then
33054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33058      # Going to short mode and back again did indeed matter. Since short mode is
33059      # case insensitive, let's make it lowercase to improve readability.
33060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33061      # Now convert it back to Unix-style (cygpath)
33062      input_path=`$CYGPATH -u "$shortmode_path"`
33063      new_path="$input_path"
33064    fi
33065  fi
33066
33067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33068  if test "x$test_cygdrive_prefix" = x; then
33069    # As a simple fix, exclude /usr/bin since it's not a real path.
33070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33072      # a path prefixed by /cygdrive for fixpath to work.
33073      new_path="$CYGWIN_ROOT_PATH$input_path"
33074    fi
33075  fi
33076
33077  # remove trailing .exe if any
33078  new_path="${new_path/%.exe/}"
33079
33080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33081
33082  # First separate the path from the arguments. This will split at the first
33083  # space.
33084  complete="$VS_ENV_CMD"
33085  path="${complete%% *}"
33086  tmp="$complete EOL"
33087  arguments="${tmp#* }"
33088
33089  # Input might be given as Windows format, start by converting to
33090  # unix format.
33091  new_path="$path"
33092
33093  windows_path="$new_path"
33094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33095    unix_path=`$CYGPATH -u "$windows_path"`
33096    new_path="$unix_path"
33097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33099    new_path="$unix_path"
33100  fi
33101
33102
33103  # Now try to locate executable using which
33104  new_path=`$WHICH "$new_path" 2> /dev/null`
33105
33106  if test "x$new_path" = x; then
33107    # Oops. Which didn't find the executable.
33108    # The splitting of arguments from the executable at a space might have been incorrect,
33109    # since paths with space are more likely in Windows. Give it another try with the whole
33110    # argument.
33111    path="$complete"
33112    arguments="EOL"
33113    new_path="$path"
33114
33115  windows_path="$new_path"
33116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33117    unix_path=`$CYGPATH -u "$windows_path"`
33118    new_path="$unix_path"
33119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33121    new_path="$unix_path"
33122  fi
33123
33124
33125    new_path=`$WHICH "$new_path" 2> /dev/null`
33126    # bat and cmd files are not always considered executable in MSYS causing which
33127    # to not find them
33128    if test "x$new_path" = x \
33129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33131      new_path="$path"
33132
33133  windows_path="$new_path"
33134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33135    unix_path=`$CYGPATH -u "$windows_path"`
33136    new_path="$unix_path"
33137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33139    new_path="$unix_path"
33140  fi
33141
33142    fi
33143
33144    if test "x$new_path" = x; then
33145      # It's still not found. Now this is an unrecoverable error.
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33147$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33148      has_space=`$ECHO "$complete" | $GREP " "`
33149      if test "x$has_space" != x; then
33150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33152      fi
33153      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33154    fi
33155  fi
33156
33157  # Now new_path has a complete unix path to the binary
33158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33159    # Keep paths in /bin as-is, but remove trailing .exe if any
33160    new_path="${new_path/%.exe/}"
33161    # Do not save /bin paths to all_fixpath_prefixes!
33162  else
33163    # Not in mixed or Windows style, start by that.
33164    new_path=`cmd //c echo $new_path`
33165
33166  input_path="$new_path"
33167  # Check if we need to convert this using DOS-style short mode. If the path
33168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33169  # take no chances and rewrite it.
33170  # Note: m4 eats our [], so we need to use [ and ] instead.
33171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33172  if test "x$has_forbidden_chars" != x; then
33173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33175  fi
33176
33177    # Output is in $new_path
33178
33179  windows_path="$new_path"
33180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33181    unix_path=`$CYGPATH -u "$windows_path"`
33182    new_path="$unix_path"
33183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33185    new_path="$unix_path"
33186  fi
33187
33188    # remove trailing .exe if any
33189    new_path="${new_path/%.exe/}"
33190
33191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33193  fi
33194
33195    else
33196      # We're on a unix platform. Hooray! :)
33197      # First separate the path from the arguments. This will split at the first
33198      # space.
33199      complete="$VS_ENV_CMD"
33200      path="${complete%% *}"
33201      tmp="$complete EOL"
33202      arguments="${tmp#* }"
33203
33204      # Cannot rely on the command "which" here since it doesn't always work.
33205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33206      if test -z "$is_absolute_path"; then
33207        # Path to executable is not absolute. Find it.
33208        IFS_save="$IFS"
33209        IFS=:
33210        for p in $PATH; do
33211          if test -f "$p/$path" && test -x "$p/$path"; then
33212            new_path="$p/$path"
33213            break
33214          fi
33215        done
33216        IFS="$IFS_save"
33217      else
33218        # This is an absolute path, we can use it without further modifications.
33219        new_path="$path"
33220      fi
33221
33222      if test "x$new_path" = x; then
33223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33224$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33225        has_space=`$ECHO "$complete" | $GREP " "`
33226        if test "x$has_space" != x; then
33227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33229        fi
33230        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33231      fi
33232    fi
33233
33234    # Now join together the path and the arguments once again
33235    if test "x$arguments" != xEOL; then
33236      new_complete="$new_path ${arguments% *}"
33237    else
33238      new_complete="$new_path"
33239    fi
33240
33241    if test "x$complete" != "x$new_complete"; then
33242      VS_ENV_CMD="$new_complete"
33243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33244$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33245    fi
33246  fi
33247
33248
33249      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33250      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33251$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33252
33253      # We need to create a couple of temporary files.
33254      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33255      $MKDIR -p $VS_ENV_TMP_DIR
33256
33257      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33258      # Instead create a shell script which will set the relevant variables when run.
33259      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33260
33261  unix_path="$WINPATH_VS_ENV_CMD"
33262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33263    windows_path=`$CYGPATH -m "$unix_path"`
33264    WINPATH_VS_ENV_CMD="$windows_path"
33265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33266    windows_path=`cmd //c echo $unix_path`
33267    WINPATH_VS_ENV_CMD="$windows_path"
33268  fi
33269
33270      WINPATH_BASH="$BASH"
33271
33272  unix_path="$WINPATH_BASH"
33273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33274    windows_path=`$CYGPATH -m "$unix_path"`
33275    WINPATH_BASH="$windows_path"
33276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33277    windows_path=`cmd //c echo $unix_path`
33278    WINPATH_BASH="$windows_path"
33279  fi
33280
33281
33282      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33283      # script (executable by bash) that will setup the important variables.
33284      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33285      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33286      # This will end up something like:
33287      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33288      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33289      # These will end up something like:
33290      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33291      # The trailing space for everyone except PATH is no typo, but is needed due
33292      # to trailing \ in the Windows paths. These will be stripped later.
33293      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33294          >> $EXTRACT_VC_ENV_BAT_FILE
33295      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33296          >> $EXTRACT_VC_ENV_BAT_FILE
33297      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33298          >> $EXTRACT_VC_ENV_BAT_FILE
33299      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33300          >> $EXTRACT_VC_ENV_BAT_FILE
33301      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33302          >> $EXTRACT_VC_ENV_BAT_FILE
33303      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33304          >> $EXTRACT_VC_ENV_BAT_FILE
33305
33306      # Now execute the newly created bat file.
33307      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33308      # Change directory so we don't need to mess with Windows paths in redirects.
33309      cd $VS_ENV_TMP_DIR
33310      cmd /c extract-vs-env.bat | $CAT
33311      cd $CURDIR
33312
33313      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33314        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33315$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33316        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33317$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33318        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33319$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33320        as_fn_error $? "Cannot continue" "$LINENO" 5
33321      fi
33322
33323      # Now set all paths and other env variables. This will allow the rest of
33324      # the configure script to find and run the compiler in the proper way.
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33326$as_echo "$as_me: Setting extracted environment variables" >&6;}
33327      . $VS_ENV_TMP_DIR/set-vs-env.sh
33328      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33329      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33330    else
33331      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33332      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33333$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33334    fi
33335  fi
33336
33337  # At this point, we should have correct variables in the environment, or we can't continue.
33338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33339$as_echo_n "checking for Visual Studio variables... " >&6; }
33340
33341  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33342      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33343    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33345$as_echo "present but broken" >&6; }
33346      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33347    else
33348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33349$as_echo "ok" >&6; }
33350      # Remove any trailing "\" ";" and " " from the variables.
33351      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33352      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33353      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33354      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33355      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33356      # Remove any paths containing # (typically F#) as that messes up make. This
33357      # is needed if visual studio was installed with F# support.
33358      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33359
33360
33361
33362
33363
33364      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33365      OLDIFS="$IFS"
33366      IFS=";"
33367      for i in $VS_INCLUDE; do
33368        ipath=$i
33369        # Only process non-empty elements
33370        if test "x$ipath" != x; then
33371          IFS="$OLDIFS"
33372          # Check that directory exists before calling fixup_path
33373          testpath=$ipath
33374
33375  windows_path="$testpath"
33376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33377    unix_path=`$CYGPATH -u "$windows_path"`
33378    testpath="$unix_path"
33379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33381    testpath="$unix_path"
33382  fi
33383
33384          if test -d "$testpath"; then
33385
33386  # Only process if variable expands to non-empty
33387
33388  if test "x$ipath" != x; then
33389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390
33391  # Input might be given as Windows format, start by converting to
33392  # unix format.
33393  path="$ipath"
33394  new_path=`$CYGPATH -u "$path"`
33395
33396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33399  # "foo.exe" is OK but "foo" is an error.
33400  #
33401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33402  # It is also a way to make sure we got the proper file name for the real test later on.
33403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33404  if test "x$test_shortpath" = x; then
33405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33406$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33407    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33408  fi
33409
33410  # Call helper function which possibly converts this using DOS-style short mode.
33411  # If so, the updated path is stored in $new_path.
33412
33413  input_path="$new_path"
33414  # Check if we need to convert this using DOS-style short mode. If the path
33415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33416  # take no chances and rewrite it.
33417  # Note: m4 eats our [], so we need to use [ and ] instead.
33418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33419  if test "x$has_forbidden_chars" != x; then
33420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33424      # Going to short mode and back again did indeed matter. Since short mode is
33425      # case insensitive, let's make it lowercase to improve readability.
33426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33427      # Now convert it back to Unix-style (cygpath)
33428      input_path=`$CYGPATH -u "$shortmode_path"`
33429      new_path="$input_path"
33430    fi
33431  fi
33432
33433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33434  if test "x$test_cygdrive_prefix" = x; then
33435    # As a simple fix, exclude /usr/bin since it's not a real path.
33436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33438      # a path prefixed by /cygdrive for fixpath to work.
33439      new_path="$CYGWIN_ROOT_PATH$input_path"
33440    fi
33441  fi
33442
33443
33444  if test "x$path" != "x$new_path"; then
33445    ipath="$new_path"
33446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33447$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33448  fi
33449
33450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33451
33452  path="$ipath"
33453  has_colon=`$ECHO $path | $GREP ^.:`
33454  new_path="$path"
33455  if test "x$has_colon" = x; then
33456    # Not in mixed or Windows style, start by that.
33457    new_path=`cmd //c echo $path`
33458  fi
33459
33460
33461  input_path="$new_path"
33462  # Check if we need to convert this using DOS-style short mode. If the path
33463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33464  # take no chances and rewrite it.
33465  # Note: m4 eats our [], so we need to use [ and ] instead.
33466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33467  if test "x$has_forbidden_chars" != x; then
33468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33470  fi
33471
33472
33473  windows_path="$new_path"
33474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33475    unix_path=`$CYGPATH -u "$windows_path"`
33476    new_path="$unix_path"
33477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33479    new_path="$unix_path"
33480  fi
33481
33482  if test "x$path" != "x$new_path"; then
33483    ipath="$new_path"
33484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33485$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33486  fi
33487
33488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33490
33491    else
33492      # We're on a unix platform. Hooray! :)
33493      path="$ipath"
33494      has_space=`$ECHO "$path" | $GREP " "`
33495      if test "x$has_space" != x; then
33496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33497$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33499      fi
33500
33501      # Use eval to expand a potential ~
33502      eval path="$path"
33503      if test ! -f "$path" && test ! -d "$path"; then
33504        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33505      fi
33506
33507      if test -d "$path"; then
33508        ipath="`cd "$path"; $THEPWDCMD -L`"
33509      else
33510        dir="`$DIRNAME "$path"`"
33511        base="`$BASENAME "$path"`"
33512        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33513      fi
33514    fi
33515  fi
33516
33517            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33518          fi
33519          IFS=";"
33520        fi
33521      done
33522      # Convert VS_LIB into SYSROOT_LDFLAGS
33523      for i in $VS_LIB; do
33524        libpath=$i
33525        # Only process non-empty elements
33526        if test "x$libpath" != x; then
33527          IFS="$OLDIFS"
33528          # Check that directory exists before calling fixup_path
33529          testpath=$libpath
33530
33531  windows_path="$testpath"
33532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33533    unix_path=`$CYGPATH -u "$windows_path"`
33534    testpath="$unix_path"
33535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33537    testpath="$unix_path"
33538  fi
33539
33540          if test -d "$testpath"; then
33541
33542  # Only process if variable expands to non-empty
33543
33544  if test "x$libpath" != x; then
33545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33546
33547  # Input might be given as Windows format, start by converting to
33548  # unix format.
33549  path="$libpath"
33550  new_path=`$CYGPATH -u "$path"`
33551
33552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33555  # "foo.exe" is OK but "foo" is an error.
33556  #
33557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33558  # It is also a way to make sure we got the proper file name for the real test later on.
33559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33560  if test "x$test_shortpath" = x; then
33561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33562$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33563    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33564  fi
33565
33566  # Call helper function which possibly converts this using DOS-style short mode.
33567  # If so, the updated path is stored in $new_path.
33568
33569  input_path="$new_path"
33570  # Check if we need to convert this using DOS-style short mode. If the path
33571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33572  # take no chances and rewrite it.
33573  # Note: m4 eats our [], so we need to use [ and ] instead.
33574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33575  if test "x$has_forbidden_chars" != x; then
33576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33580      # Going to short mode and back again did indeed matter. Since short mode is
33581      # case insensitive, let's make it lowercase to improve readability.
33582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33583      # Now convert it back to Unix-style (cygpath)
33584      input_path=`$CYGPATH -u "$shortmode_path"`
33585      new_path="$input_path"
33586    fi
33587  fi
33588
33589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33590  if test "x$test_cygdrive_prefix" = x; then
33591    # As a simple fix, exclude /usr/bin since it's not a real path.
33592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33594      # a path prefixed by /cygdrive for fixpath to work.
33595      new_path="$CYGWIN_ROOT_PATH$input_path"
33596    fi
33597  fi
33598
33599
33600  if test "x$path" != "x$new_path"; then
33601    libpath="$new_path"
33602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33603$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33604  fi
33605
33606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33607
33608  path="$libpath"
33609  has_colon=`$ECHO $path | $GREP ^.:`
33610  new_path="$path"
33611  if test "x$has_colon" = x; then
33612    # Not in mixed or Windows style, start by that.
33613    new_path=`cmd //c echo $path`
33614  fi
33615
33616
33617  input_path="$new_path"
33618  # Check if we need to convert this using DOS-style short mode. If the path
33619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33620  # take no chances and rewrite it.
33621  # Note: m4 eats our [], so we need to use [ and ] instead.
33622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33623  if test "x$has_forbidden_chars" != x; then
33624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33626  fi
33627
33628
33629  windows_path="$new_path"
33630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33631    unix_path=`$CYGPATH -u "$windows_path"`
33632    new_path="$unix_path"
33633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33635    new_path="$unix_path"
33636  fi
33637
33638  if test "x$path" != "x$new_path"; then
33639    libpath="$new_path"
33640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33641$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33642  fi
33643
33644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33646
33647    else
33648      # We're on a unix platform. Hooray! :)
33649      path="$libpath"
33650      has_space=`$ECHO "$path" | $GREP " "`
33651      if test "x$has_space" != x; then
33652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33653$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33655      fi
33656
33657      # Use eval to expand a potential ~
33658      eval path="$path"
33659      if test ! -f "$path" && test ! -d "$path"; then
33660        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33661      fi
33662
33663      if test -d "$path"; then
33664        libpath="`cd "$path"; $THEPWDCMD -L`"
33665      else
33666        dir="`$DIRNAME "$path"`"
33667        base="`$BASENAME "$path"`"
33668        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33669      fi
33670    fi
33671  fi
33672
33673            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33674          fi
33675          IFS=";"
33676        fi
33677      done
33678      IFS="$OLDIFS"
33679    fi
33680  else
33681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33682$as_echo "not found" >&6; }
33683
33684    if test "x$VS_ENV_CMD" = x; then
33685      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33686$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33688$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33689    else
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33691$as_echo "$as_me: Running the extraction script failed." >&6;}
33692    fi
33693    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33694$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33695    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33696$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33697    as_fn_error $? "Cannot continue" "$LINENO" 5
33698  fi
33699
33700    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33701    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33702    PATH="$VS_PATH"
33703    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33704    export INCLUDE="$VS_INCLUDE"
33705    export LIB="$VS_LIB"
33706  else
33707    if test "x$XCODE_VERSION_OUTPUT" != x; then
33708      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33709      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33710      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33711    else
33712      # Currently we do not define this for other toolchains. This might change as the need arise.
33713      TOOLCHAIN_VERSION=
33714    fi
33715  fi
33716
33717
33718  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33719  # override all other locations.
33720  if test "x$TOOLCHAIN_PATH" != x; then
33721    PATH=$TOOLCHAIN_PATH:$PATH
33722  fi
33723
33724
33725  #
33726  # Setup the compilers (CC and CXX)
33727  #
33728
33729  COMPILER_NAME=C
33730  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33731
33732  if test "x$CC" != x; then
33733    # User has supplied compiler name already, always let that override.
33734    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33735$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33736    if test "x`basename $CC`" = "x$CC"; then
33737      # A command without a complete path is provided, search $PATH.
33738
33739      for ac_prog in $CC
33740do
33741  # Extract the first word of "$ac_prog", so it can be a program name with args.
33742set dummy $ac_prog; ac_word=$2
33743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33744$as_echo_n "checking for $ac_word... " >&6; }
33745if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33746  $as_echo_n "(cached) " >&6
33747else
33748  case $POTENTIAL_CC in
33749  [\\/]* | ?:[\\/]*)
33750  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33751  ;;
33752  *)
33753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33754for as_dir in $PATH
33755do
33756  IFS=$as_save_IFS
33757  test -z "$as_dir" && as_dir=.
33758    for ac_exec_ext in '' $ac_executable_extensions; do
33759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33760    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33762    break 2
33763  fi
33764done
33765  done
33766IFS=$as_save_IFS
33767
33768  ;;
33769esac
33770fi
33771POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33772if test -n "$POTENTIAL_CC"; then
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33774$as_echo "$POTENTIAL_CC" >&6; }
33775else
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33777$as_echo "no" >&6; }
33778fi
33779
33780
33781  test -n "$POTENTIAL_CC" && break
33782done
33783
33784      if test "x$POTENTIAL_CC" != x; then
33785        CC=$POTENTIAL_CC
33786      else
33787        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33788      fi
33789    else
33790      # Otherwise it might already be a complete path
33791      if test ! -x "$CC"; then
33792        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33793      fi
33794    fi
33795  else
33796    # No user supplied value. Locate compiler ourselves.
33797
33798    # If we are cross compiling, assume cross compilation tools follows the
33799    # cross compilation standard where they are prefixed with the autoconf
33800    # standard name for the target. For example the binary
33801    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33802    # If we are not cross compiling, then the default compiler name will be
33803    # used.
33804
33805    CC=
33806    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33807    # before checking the rest of the PATH.
33808    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33809    # step, this should not be necessary.
33810    if test -n "$TOOLCHAIN_PATH"; then
33811      PATH_save="$PATH"
33812      PATH="$TOOLCHAIN_PATH"
33813      if test -n "$ac_tool_prefix"; then
33814  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33815set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33817$as_echo_n "checking for $ac_word... " >&6; }
33818if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33819  $as_echo_n "(cached) " >&6
33820else
33821  case $TOOLCHAIN_PATH_CC in
33822  [\\/]* | ?:[\\/]*)
33823  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33824  ;;
33825  *)
33826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33827for as_dir in $PATH
33828do
33829  IFS=$as_save_IFS
33830  test -z "$as_dir" && as_dir=.
33831    for ac_exec_ext in '' $ac_executable_extensions; do
33832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33833    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33835    break 2
33836  fi
33837done
33838  done
33839IFS=$as_save_IFS
33840
33841  ;;
33842esac
33843fi
33844TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33845if test -n "$TOOLCHAIN_PATH_CC"; then
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33847$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33848else
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33850$as_echo "no" >&6; }
33851fi
33852
33853
33854fi
33855if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33856  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33857  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33858set dummy $SEARCH_LIST; ac_word=$2
33859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33860$as_echo_n "checking for $ac_word... " >&6; }
33861if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33862  $as_echo_n "(cached) " >&6
33863else
33864  case $ac_pt_TOOLCHAIN_PATH_CC in
33865  [\\/]* | ?:[\\/]*)
33866  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33867  ;;
33868  *)
33869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33870for as_dir in $PATH
33871do
33872  IFS=$as_save_IFS
33873  test -z "$as_dir" && as_dir=.
33874    for ac_exec_ext in '' $ac_executable_extensions; do
33875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33876    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33878    break 2
33879  fi
33880done
33881  done
33882IFS=$as_save_IFS
33883
33884  ;;
33885esac
33886fi
33887ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33888if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33890$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33891else
33892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33893$as_echo "no" >&6; }
33894fi
33895
33896  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33897    TOOLCHAIN_PATH_CC=""
33898  else
33899    case $cross_compiling:$ac_tool_warned in
33900yes:)
33901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33903ac_tool_warned=yes ;;
33904esac
33905    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33906  fi
33907else
33908  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33909fi
33910
33911      CC=$TOOLCHAIN_PATH_CC
33912      PATH="$PATH_save"
33913    fi
33914
33915    # AC_PATH_TOOL can't be run multiple times with the same variable,
33916    # so create a new name for this run.
33917    if test "x$CC" = x; then
33918      if test -n "$ac_tool_prefix"; then
33919  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33920set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33922$as_echo_n "checking for $ac_word... " >&6; }
33923if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33924  $as_echo_n "(cached) " >&6
33925else
33926  case $POTENTIAL_CC in
33927  [\\/]* | ?:[\\/]*)
33928  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33929  ;;
33930  *)
33931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33932for as_dir in $PATH
33933do
33934  IFS=$as_save_IFS
33935  test -z "$as_dir" && as_dir=.
33936    for ac_exec_ext in '' $ac_executable_extensions; do
33937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33938    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33940    break 2
33941  fi
33942done
33943  done
33944IFS=$as_save_IFS
33945
33946  ;;
33947esac
33948fi
33949POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33950if test -n "$POTENTIAL_CC"; then
33951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33952$as_echo "$POTENTIAL_CC" >&6; }
33953else
33954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33955$as_echo "no" >&6; }
33956fi
33957
33958
33959fi
33960if test -z "$ac_cv_path_POTENTIAL_CC"; then
33961  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33962  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33963set dummy $SEARCH_LIST; ac_word=$2
33964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33965$as_echo_n "checking for $ac_word... " >&6; }
33966if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33967  $as_echo_n "(cached) " >&6
33968else
33969  case $ac_pt_POTENTIAL_CC in
33970  [\\/]* | ?:[\\/]*)
33971  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33972  ;;
33973  *)
33974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33975for as_dir in $PATH
33976do
33977  IFS=$as_save_IFS
33978  test -z "$as_dir" && as_dir=.
33979    for ac_exec_ext in '' $ac_executable_extensions; do
33980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33981    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33983    break 2
33984  fi
33985done
33986  done
33987IFS=$as_save_IFS
33988
33989  ;;
33990esac
33991fi
33992ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33993if test -n "$ac_pt_POTENTIAL_CC"; then
33994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33995$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33996else
33997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33998$as_echo "no" >&6; }
33999fi
34000
34001  if test "x$ac_pt_POTENTIAL_CC" = x; then
34002    POTENTIAL_CC=""
34003  else
34004    case $cross_compiling:$ac_tool_warned in
34005yes:)
34006{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34007$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34008ac_tool_warned=yes ;;
34009esac
34010    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34011  fi
34012else
34013  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34014fi
34015
34016      CC=$POTENTIAL_CC
34017    fi
34018
34019    if test "x$CC" = x; then
34020
34021  # Print a helpful message on how to acquire the necessary build dependency.
34022  # devkit is the help tag: freetype, cups, alsa etc
34023  MISSING_DEPENDENCY=devkit
34024
34025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34026    cygwin_help $MISSING_DEPENDENCY
34027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34028    msys_help $MISSING_DEPENDENCY
34029  else
34030    PKGHANDLER_COMMAND=
34031
34032    case $PKGHANDLER in
34033      apt-get)
34034        apt_help     $MISSING_DEPENDENCY ;;
34035      yum)
34036        yum_help     $MISSING_DEPENDENCY ;;
34037      brew)
34038        brew_help    $MISSING_DEPENDENCY ;;
34039      port)
34040        port_help    $MISSING_DEPENDENCY ;;
34041      pkgutil)
34042        pkgutil_help $MISSING_DEPENDENCY ;;
34043      pkgadd)
34044        pkgadd_help  $MISSING_DEPENDENCY ;;
34045    esac
34046
34047    if test "x$PKGHANDLER_COMMAND" != x; then
34048      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34049    fi
34050  fi
34051
34052      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34053    fi
34054  fi
34055
34056  # Now we have a compiler binary in CC. Make sure it's okay.
34057
34058  # Only process if variable expands to non-empty
34059
34060  if test "x$CC" != x; then
34061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34062
34063  # First separate the path from the arguments. This will split at the first
34064  # space.
34065  complete="$CC"
34066  path="${complete%% *}"
34067  tmp="$complete EOL"
34068  arguments="${tmp#* }"
34069
34070  # Input might be given as Windows format, start by converting to
34071  # unix format.
34072  new_path=`$CYGPATH -u "$path"`
34073
34074  # Now try to locate executable using which
34075  new_path=`$WHICH "$new_path" 2> /dev/null`
34076  # bat and cmd files are not always considered executable in cygwin causing which
34077  # to not find them
34078  if test "x$new_path" = x \
34079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34081    new_path=`$CYGPATH -u "$path"`
34082  fi
34083  if test "x$new_path" = x; then
34084    # Oops. Which didn't find the executable.
34085    # The splitting of arguments from the executable at a space might have been incorrect,
34086    # since paths with space are more likely in Windows. Give it another try with the whole
34087    # argument.
34088    path="$complete"
34089    arguments="EOL"
34090    new_path=`$CYGPATH -u "$path"`
34091    new_path=`$WHICH "$new_path" 2> /dev/null`
34092    # bat and cmd files are not always considered executable in cygwin causing which
34093    # to not find them
34094    if test "x$new_path" = x \
34095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34097      new_path=`$CYGPATH -u "$path"`
34098    fi
34099    if test "x$new_path" = x; then
34100      # It's still not found. Now this is an unrecoverable error.
34101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34102$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34103      has_space=`$ECHO "$complete" | $GREP " "`
34104      if test "x$has_space" != x; then
34105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34107      fi
34108      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34109    fi
34110  fi
34111
34112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34115  # "foo.exe" is OK but "foo" is an error.
34116  #
34117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34118  # It is also a way to make sure we got the proper file name for the real test later on.
34119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34120  if test "x$test_shortpath" = x; then
34121    # Short path failed, file does not exist as specified.
34122    # Try adding .exe or .cmd
34123    if test -f "${new_path}.exe"; then
34124      input_to_shortpath="${new_path}.exe"
34125    elif test -f "${new_path}.cmd"; then
34126      input_to_shortpath="${new_path}.cmd"
34127    else
34128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34129$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34132      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34133    fi
34134  else
34135    input_to_shortpath="$new_path"
34136  fi
34137
34138  # Call helper function which possibly converts this using DOS-style short mode.
34139  # If so, the updated path is stored in $new_path.
34140  new_path="$input_to_shortpath"
34141
34142  input_path="$input_to_shortpath"
34143  # Check if we need to convert this using DOS-style short mode. If the path
34144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34145  # take no chances and rewrite it.
34146  # Note: m4 eats our [], so we need to use [ and ] instead.
34147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34148  if test "x$has_forbidden_chars" != x; then
34149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34153      # Going to short mode and back again did indeed matter. Since short mode is
34154      # case insensitive, let's make it lowercase to improve readability.
34155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34156      # Now convert it back to Unix-style (cygpath)
34157      input_path=`$CYGPATH -u "$shortmode_path"`
34158      new_path="$input_path"
34159    fi
34160  fi
34161
34162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34163  if test "x$test_cygdrive_prefix" = x; then
34164    # As a simple fix, exclude /usr/bin since it's not a real path.
34165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34167      # a path prefixed by /cygdrive for fixpath to work.
34168      new_path="$CYGWIN_ROOT_PATH$input_path"
34169    fi
34170  fi
34171
34172  # remove trailing .exe if any
34173  new_path="${new_path/%.exe/}"
34174
34175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34176
34177  # First separate the path from the arguments. This will split at the first
34178  # space.
34179  complete="$CC"
34180  path="${complete%% *}"
34181  tmp="$complete EOL"
34182  arguments="${tmp#* }"
34183
34184  # Input might be given as Windows format, start by converting to
34185  # unix format.
34186  new_path="$path"
34187
34188  windows_path="$new_path"
34189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34190    unix_path=`$CYGPATH -u "$windows_path"`
34191    new_path="$unix_path"
34192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34194    new_path="$unix_path"
34195  fi
34196
34197
34198  # Now try to locate executable using which
34199  new_path=`$WHICH "$new_path" 2> /dev/null`
34200
34201  if test "x$new_path" = x; then
34202    # Oops. Which didn't find the executable.
34203    # The splitting of arguments from the executable at a space might have been incorrect,
34204    # since paths with space are more likely in Windows. Give it another try with the whole
34205    # argument.
34206    path="$complete"
34207    arguments="EOL"
34208    new_path="$path"
34209
34210  windows_path="$new_path"
34211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34212    unix_path=`$CYGPATH -u "$windows_path"`
34213    new_path="$unix_path"
34214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34216    new_path="$unix_path"
34217  fi
34218
34219
34220    new_path=`$WHICH "$new_path" 2> /dev/null`
34221    # bat and cmd files are not always considered executable in MSYS causing which
34222    # to not find them
34223    if test "x$new_path" = x \
34224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34226      new_path="$path"
34227
34228  windows_path="$new_path"
34229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34230    unix_path=`$CYGPATH -u "$windows_path"`
34231    new_path="$unix_path"
34232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34234    new_path="$unix_path"
34235  fi
34236
34237    fi
34238
34239    if test "x$new_path" = x; then
34240      # It's still not found. Now this is an unrecoverable error.
34241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34242$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34243      has_space=`$ECHO "$complete" | $GREP " "`
34244      if test "x$has_space" != x; then
34245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34247      fi
34248      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34249    fi
34250  fi
34251
34252  # Now new_path has a complete unix path to the binary
34253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34254    # Keep paths in /bin as-is, but remove trailing .exe if any
34255    new_path="${new_path/%.exe/}"
34256    # Do not save /bin paths to all_fixpath_prefixes!
34257  else
34258    # Not in mixed or Windows style, start by that.
34259    new_path=`cmd //c echo $new_path`
34260
34261  input_path="$new_path"
34262  # Check if we need to convert this using DOS-style short mode. If the path
34263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34264  # take no chances and rewrite it.
34265  # Note: m4 eats our [], so we need to use [ and ] instead.
34266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34267  if test "x$has_forbidden_chars" != x; then
34268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34270  fi
34271
34272    # Output is in $new_path
34273
34274  windows_path="$new_path"
34275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34276    unix_path=`$CYGPATH -u "$windows_path"`
34277    new_path="$unix_path"
34278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34280    new_path="$unix_path"
34281  fi
34282
34283    # remove trailing .exe if any
34284    new_path="${new_path/%.exe/}"
34285
34286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34288  fi
34289
34290    else
34291      # We're on a unix platform. Hooray! :)
34292      # First separate the path from the arguments. This will split at the first
34293      # space.
34294      complete="$CC"
34295      path="${complete%% *}"
34296      tmp="$complete EOL"
34297      arguments="${tmp#* }"
34298
34299      # Cannot rely on the command "which" here since it doesn't always work.
34300      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34301      if test -z "$is_absolute_path"; then
34302        # Path to executable is not absolute. Find it.
34303        IFS_save="$IFS"
34304        IFS=:
34305        for p in $PATH; do
34306          if test -f "$p/$path" && test -x "$p/$path"; then
34307            new_path="$p/$path"
34308            break
34309          fi
34310        done
34311        IFS="$IFS_save"
34312      else
34313        # This is an absolute path, we can use it without further modifications.
34314        new_path="$path"
34315      fi
34316
34317      if test "x$new_path" = x; then
34318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34319$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34320        has_space=`$ECHO "$complete" | $GREP " "`
34321        if test "x$has_space" != x; then
34322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34324        fi
34325        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34326      fi
34327    fi
34328
34329    # Now join together the path and the arguments once again
34330    if test "x$arguments" != xEOL; then
34331      new_complete="$new_path ${arguments% *}"
34332    else
34333      new_complete="$new_path"
34334    fi
34335
34336    if test "x$complete" != "x$new_complete"; then
34337      CC="$new_complete"
34338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34339$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34340    fi
34341  fi
34342
34343  TEST_COMPILER="$CC"
34344
34345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34346$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34347  SYMLINK_ORIGINAL="$TEST_COMPILER"
34348
34349  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34350    # Follow a chain of symbolic links. Use readlink
34351    # where it exists, else fall back to horribly
34352    # complicated shell code.
34353    if test "x$READLINK_TESTED" != yes; then
34354      # On MacOSX there is a readlink tool with a different
34355      # purpose than the GNU readlink tool. Check the found readlink.
34356      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34357      if test "x$ISGNU" = x; then
34358        # A readlink that we do not know how to use.
34359        # Are there other non-GNU readlinks out there?
34360        READLINK_TESTED=yes
34361        READLINK=
34362      fi
34363    fi
34364
34365    if test "x$READLINK" != x; then
34366      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34367    else
34368      # Save the current directory for restoring afterwards
34369      STARTDIR=$PWD
34370      COUNTER=0
34371      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34372      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34373      cd $sym_link_dir
34374      # Use -P flag to resolve symlinks in directories.
34375      cd `$THEPWDCMD -P`
34376      sym_link_dir=`$THEPWDCMD -P`
34377      # Resolve file symlinks
34378      while test $COUNTER -lt 20; do
34379        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34380        if test "x$ISLINK" == x; then
34381          # This is not a symbolic link! We are done!
34382          break
34383        fi
34384        # Again resolve directory symlinks since the target of the just found
34385        # link could be in a different directory
34386        cd `$DIRNAME $ISLINK`
34387        sym_link_dir=`$THEPWDCMD -P`
34388        sym_link_file=`$BASENAME $ISLINK`
34389        let COUNTER=COUNTER+1
34390      done
34391      cd $STARTDIR
34392      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34393    fi
34394  fi
34395
34396  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34398$as_echo "no symlink" >&6; }
34399  else
34400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34401$as_echo "$SYMLINK_ORIGINAL" >&6; }
34402
34403    # We can't handle ccache by gcc wrappers, since we need to know if we're
34404    # using ccache. Instead ccache usage must be controlled by a configure option.
34405    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34406    if test "x$COMPILER_BASENAME" = "xccache"; then
34407      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34408$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34409      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34410    fi
34411  fi
34412
34413
34414  COMPILER=$CC
34415  COMPILER_NAME=$COMPILER_NAME
34416
34417  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34418    # cc -V output typically looks like
34419    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34420    # or
34421    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34422    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34423    # Check that this is likely to be the Solaris Studio cc.
34424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34425    if test $? -ne 0; then
34426      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34427      { $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
34428$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34429      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34430$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34432$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34434    fi
34435    # Remove usage instructions (if present), and
34436    # collapse compiler output into a single line
34437    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34438        $SED -e 's/ *[Uu]sage:.*//'`
34439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34440        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34441  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34442    # xlc -qversion output typically looks like
34443    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34444    #     Version: 11.01.0000.0015
34445    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34446    # Check that this is likely to be the IBM XL C compiler.
34447    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34448    if test $? -ne 0; then
34449      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34450      { $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
34451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34453$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34455$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34456      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34457    fi
34458    # Collapse compiler output into a single line
34459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34460    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34462  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34463    # There is no specific version flag, but all output starts with a version string.
34464    # First line typically looks something like:
34465    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34466    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34467    # Check that this is likely to be Microsoft CL.EXE.
34468    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34469    if test $? -ne 0; then
34470      { $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
34471$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34473$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34474      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34475    fi
34476    # Collapse compiler output into a single line
34477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34478    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34479        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34480  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34481    # gcc --version output typically looks like
34482    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34483    #     Copyright (C) 2013 Free Software Foundation, Inc.
34484    #     This is free software; see the source for copying conditions.  There is NO
34485    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34486    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34487    # Check that this is likely to be GCC.
34488    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34489    if test $? -ne 0; then
34490      { $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
34491$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34493$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34495    fi
34496    # Remove Copyright and legalese from version string, and
34497    # collapse into a single line
34498    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34499        $SED -e 's/ *Copyright .*//'`
34500    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34501        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34502  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34503    # clang --version output typically looks like
34504    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34505    #    clang version 3.3 (tags/RELEASE_33/final)
34506    # or
34507    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34508    #    Target: x86_64-pc-linux-gnu
34509    #    Thread model: posix
34510    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34511    # Check that this is likely to be clang
34512    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34513    if test $? -ne 0; then
34514      { $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
34515$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34517$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34518      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34519    fi
34520    # Collapse compiler output into a single line
34521    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34522    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34523        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34524  else
34525      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34526  fi
34527  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34528  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34529  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34530  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34531
34532  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34533$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34534
34535
34536  # Now that we have resolved CC ourself, let autoconf have its go at it
34537  ac_ext=c
34538ac_cpp='$CPP $CPPFLAGS'
34539ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34540ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34541ac_compiler_gnu=$ac_cv_c_compiler_gnu
34542if test -n "$ac_tool_prefix"; then
34543  for ac_prog in $CC
34544  do
34545    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34546set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34548$as_echo_n "checking for $ac_word... " >&6; }
34549if ${ac_cv_prog_CC+:} false; then :
34550  $as_echo_n "(cached) " >&6
34551else
34552  if test -n "$CC"; then
34553  ac_cv_prog_CC="$CC" # Let the user override the test.
34554else
34555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34556for as_dir in $PATH
34557do
34558  IFS=$as_save_IFS
34559  test -z "$as_dir" && as_dir=.
34560    for ac_exec_ext in '' $ac_executable_extensions; do
34561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34562    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34564    break 2
34565  fi
34566done
34567  done
34568IFS=$as_save_IFS
34569
34570fi
34571fi
34572CC=$ac_cv_prog_CC
34573if test -n "$CC"; then
34574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34575$as_echo "$CC" >&6; }
34576else
34577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34578$as_echo "no" >&6; }
34579fi
34580
34581
34582    test -n "$CC" && break
34583  done
34584fi
34585if test -z "$CC"; then
34586  ac_ct_CC=$CC
34587  for ac_prog in $CC
34588do
34589  # Extract the first word of "$ac_prog", so it can be a program name with args.
34590set dummy $ac_prog; ac_word=$2
34591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34592$as_echo_n "checking for $ac_word... " >&6; }
34593if ${ac_cv_prog_ac_ct_CC+:} false; then :
34594  $as_echo_n "(cached) " >&6
34595else
34596  if test -n "$ac_ct_CC"; then
34597  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34598else
34599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34600for as_dir in $PATH
34601do
34602  IFS=$as_save_IFS
34603  test -z "$as_dir" && as_dir=.
34604    for ac_exec_ext in '' $ac_executable_extensions; do
34605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34606    ac_cv_prog_ac_ct_CC="$ac_prog"
34607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34608    break 2
34609  fi
34610done
34611  done
34612IFS=$as_save_IFS
34613
34614fi
34615fi
34616ac_ct_CC=$ac_cv_prog_ac_ct_CC
34617if test -n "$ac_ct_CC"; then
34618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34619$as_echo "$ac_ct_CC" >&6; }
34620else
34621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34622$as_echo "no" >&6; }
34623fi
34624
34625
34626  test -n "$ac_ct_CC" && break
34627done
34628
34629  if test "x$ac_ct_CC" = x; then
34630    CC=""
34631  else
34632    case $cross_compiling:$ac_tool_warned in
34633yes:)
34634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34636ac_tool_warned=yes ;;
34637esac
34638    CC=$ac_ct_CC
34639  fi
34640fi
34641
34642
34643test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34645as_fn_error $? "no acceptable C compiler found in \$PATH
34646See \`config.log' for more details" "$LINENO" 5; }
34647
34648# Provide some information about the compiler.
34649$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34650set X $ac_compile
34651ac_compiler=$2
34652for ac_option in --version -v -V -qversion; do
34653  { { ac_try="$ac_compiler $ac_option >&5"
34654case "(($ac_try" in
34655  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34656  *) ac_try_echo=$ac_try;;
34657esac
34658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34659$as_echo "$ac_try_echo"; } >&5
34660  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34661  ac_status=$?
34662  if test -s conftest.err; then
34663    sed '10a\
34664... rest of stderr output deleted ...
34665         10q' conftest.err >conftest.er1
34666    cat conftest.er1 >&5
34667  fi
34668  rm -f conftest.er1 conftest.err
34669  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34670  test $ac_status = 0; }
34671done
34672
34673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34674/* end confdefs.h.  */
34675
34676int
34677main ()
34678{
34679
34680  ;
34681  return 0;
34682}
34683_ACEOF
34684ac_clean_files_save=$ac_clean_files
34685ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34686# Try to create an executable without -o first, disregard a.out.
34687# It will help us diagnose broken compilers, and finding out an intuition
34688# of exeext.
34689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34690$as_echo_n "checking whether the C compiler works... " >&6; }
34691ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34692
34693# The possible output files:
34694ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34695
34696ac_rmfiles=
34697for ac_file in $ac_files
34698do
34699  case $ac_file in
34700    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34701    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34702  esac
34703done
34704rm -f $ac_rmfiles
34705
34706if { { ac_try="$ac_link_default"
34707case "(($ac_try" in
34708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34709  *) ac_try_echo=$ac_try;;
34710esac
34711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34712$as_echo "$ac_try_echo"; } >&5
34713  (eval "$ac_link_default") 2>&5
34714  ac_status=$?
34715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34716  test $ac_status = 0; }; then :
34717  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34718# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34719# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34720# so that the user can short-circuit this test for compilers unknown to
34721# Autoconf.
34722for ac_file in $ac_files ''
34723do
34724  test -f "$ac_file" || continue
34725  case $ac_file in
34726    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34727	;;
34728    [ab].out )
34729	# We found the default executable, but exeext='' is most
34730	# certainly right.
34731	break;;
34732    *.* )
34733	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34734	then :; else
34735	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34736	fi
34737	# We set ac_cv_exeext here because the later test for it is not
34738	# safe: cross compilers may not add the suffix if given an `-o'
34739	# argument, so we may need to know it at that point already.
34740	# Even if this section looks crufty: it has the advantage of
34741	# actually working.
34742	break;;
34743    * )
34744	break;;
34745  esac
34746done
34747test "$ac_cv_exeext" = no && ac_cv_exeext=
34748
34749else
34750  ac_file=''
34751fi
34752if test -z "$ac_file"; then :
34753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34754$as_echo "no" >&6; }
34755$as_echo "$as_me: failed program was:" >&5
34756sed 's/^/| /' conftest.$ac_ext >&5
34757
34758{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34760as_fn_error 77 "C compiler cannot create executables
34761See \`config.log' for more details" "$LINENO" 5; }
34762else
34763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34764$as_echo "yes" >&6; }
34765fi
34766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34767$as_echo_n "checking for C compiler default output file name... " >&6; }
34768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34769$as_echo "$ac_file" >&6; }
34770ac_exeext=$ac_cv_exeext
34771
34772rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34773ac_clean_files=$ac_clean_files_save
34774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34775$as_echo_n "checking for suffix of executables... " >&6; }
34776if { { ac_try="$ac_link"
34777case "(($ac_try" in
34778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34779  *) ac_try_echo=$ac_try;;
34780esac
34781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34782$as_echo "$ac_try_echo"; } >&5
34783  (eval "$ac_link") 2>&5
34784  ac_status=$?
34785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34786  test $ac_status = 0; }; then :
34787  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34788# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34789# work properly (i.e., refer to `conftest.exe'), while it won't with
34790# `rm'.
34791for ac_file in conftest.exe conftest conftest.*; do
34792  test -f "$ac_file" || continue
34793  case $ac_file in
34794    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34795    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34796	  break;;
34797    * ) break;;
34798  esac
34799done
34800else
34801  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34803as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34804See \`config.log' for more details" "$LINENO" 5; }
34805fi
34806rm -f conftest conftest$ac_cv_exeext
34807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34808$as_echo "$ac_cv_exeext" >&6; }
34809
34810rm -f conftest.$ac_ext
34811EXEEXT=$ac_cv_exeext
34812ac_exeext=$EXEEXT
34813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34814/* end confdefs.h.  */
34815#include <stdio.h>
34816int
34817main ()
34818{
34819FILE *f = fopen ("conftest.out", "w");
34820 return ferror (f) || fclose (f) != 0;
34821
34822  ;
34823  return 0;
34824}
34825_ACEOF
34826ac_clean_files="$ac_clean_files conftest.out"
34827# Check that the compiler produces executables we can run.  If not, either
34828# the compiler is broken, or we cross compile.
34829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34830$as_echo_n "checking whether we are cross compiling... " >&6; }
34831if test "$cross_compiling" != yes; then
34832  { { ac_try="$ac_link"
34833case "(($ac_try" in
34834  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34835  *) ac_try_echo=$ac_try;;
34836esac
34837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34838$as_echo "$ac_try_echo"; } >&5
34839  (eval "$ac_link") 2>&5
34840  ac_status=$?
34841  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34842  test $ac_status = 0; }
34843  if { ac_try='./conftest$ac_cv_exeext'
34844  { { case "(($ac_try" in
34845  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34846  *) ac_try_echo=$ac_try;;
34847esac
34848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34849$as_echo "$ac_try_echo"; } >&5
34850  (eval "$ac_try") 2>&5
34851  ac_status=$?
34852  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34853  test $ac_status = 0; }; }; then
34854    cross_compiling=no
34855  else
34856    if test "$cross_compiling" = maybe; then
34857	cross_compiling=yes
34858    else
34859	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34861as_fn_error $? "cannot run C compiled programs.
34862If you meant to cross compile, use \`--host'.
34863See \`config.log' for more details" "$LINENO" 5; }
34864    fi
34865  fi
34866fi
34867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34868$as_echo "$cross_compiling" >&6; }
34869
34870rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34871ac_clean_files=$ac_clean_files_save
34872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34873$as_echo_n "checking for suffix of object files... " >&6; }
34874if ${ac_cv_objext+:} false; then :
34875  $as_echo_n "(cached) " >&6
34876else
34877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34878/* end confdefs.h.  */
34879
34880int
34881main ()
34882{
34883
34884  ;
34885  return 0;
34886}
34887_ACEOF
34888rm -f conftest.o conftest.obj
34889if { { ac_try="$ac_compile"
34890case "(($ac_try" in
34891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34892  *) ac_try_echo=$ac_try;;
34893esac
34894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34895$as_echo "$ac_try_echo"; } >&5
34896  (eval "$ac_compile") 2>&5
34897  ac_status=$?
34898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34899  test $ac_status = 0; }; then :
34900  for ac_file in conftest.o conftest.obj conftest.*; do
34901  test -f "$ac_file" || continue;
34902  case $ac_file in
34903    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34904    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34905       break;;
34906  esac
34907done
34908else
34909  $as_echo "$as_me: failed program was:" >&5
34910sed 's/^/| /' conftest.$ac_ext >&5
34911
34912{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34914as_fn_error $? "cannot compute suffix of object files: cannot compile
34915See \`config.log' for more details" "$LINENO" 5; }
34916fi
34917rm -f conftest.$ac_cv_objext conftest.$ac_ext
34918fi
34919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34920$as_echo "$ac_cv_objext" >&6; }
34921OBJEXT=$ac_cv_objext
34922ac_objext=$OBJEXT
34923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34924$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34925if ${ac_cv_c_compiler_gnu+:} false; then :
34926  $as_echo_n "(cached) " >&6
34927else
34928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34929/* end confdefs.h.  */
34930
34931int
34932main ()
34933{
34934#ifndef __GNUC__
34935       choke me
34936#endif
34937
34938  ;
34939  return 0;
34940}
34941_ACEOF
34942if ac_fn_c_try_compile "$LINENO"; then :
34943  ac_compiler_gnu=yes
34944else
34945  ac_compiler_gnu=no
34946fi
34947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34948ac_cv_c_compiler_gnu=$ac_compiler_gnu
34949
34950fi
34951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34952$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34953if test $ac_compiler_gnu = yes; then
34954  GCC=yes
34955else
34956  GCC=
34957fi
34958ac_test_CFLAGS=${CFLAGS+set}
34959ac_save_CFLAGS=$CFLAGS
34960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34961$as_echo_n "checking whether $CC accepts -g... " >&6; }
34962if ${ac_cv_prog_cc_g+:} false; then :
34963  $as_echo_n "(cached) " >&6
34964else
34965  ac_save_c_werror_flag=$ac_c_werror_flag
34966   ac_c_werror_flag=yes
34967   ac_cv_prog_cc_g=no
34968   CFLAGS="-g"
34969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34970/* end confdefs.h.  */
34971
34972int
34973main ()
34974{
34975
34976  ;
34977  return 0;
34978}
34979_ACEOF
34980if ac_fn_c_try_compile "$LINENO"; then :
34981  ac_cv_prog_cc_g=yes
34982else
34983  CFLAGS=""
34984      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34985/* end confdefs.h.  */
34986
34987int
34988main ()
34989{
34990
34991  ;
34992  return 0;
34993}
34994_ACEOF
34995if ac_fn_c_try_compile "$LINENO"; then :
34996
34997else
34998  ac_c_werror_flag=$ac_save_c_werror_flag
34999	 CFLAGS="-g"
35000	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35001/* end confdefs.h.  */
35002
35003int
35004main ()
35005{
35006
35007  ;
35008  return 0;
35009}
35010_ACEOF
35011if ac_fn_c_try_compile "$LINENO"; then :
35012  ac_cv_prog_cc_g=yes
35013fi
35014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35015fi
35016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35017fi
35018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35019   ac_c_werror_flag=$ac_save_c_werror_flag
35020fi
35021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35022$as_echo "$ac_cv_prog_cc_g" >&6; }
35023if test "$ac_test_CFLAGS" = set; then
35024  CFLAGS=$ac_save_CFLAGS
35025elif test $ac_cv_prog_cc_g = yes; then
35026  if test "$GCC" = yes; then
35027    CFLAGS="-g -O2"
35028  else
35029    CFLAGS="-g"
35030  fi
35031else
35032  if test "$GCC" = yes; then
35033    CFLAGS="-O2"
35034  else
35035    CFLAGS=
35036  fi
35037fi
35038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35039$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35040if ${ac_cv_prog_cc_c89+:} false; then :
35041  $as_echo_n "(cached) " >&6
35042else
35043  ac_cv_prog_cc_c89=no
35044ac_save_CC=$CC
35045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35046/* end confdefs.h.  */
35047#include <stdarg.h>
35048#include <stdio.h>
35049struct stat;
35050/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35051struct buf { int x; };
35052FILE * (*rcsopen) (struct buf *, struct stat *, int);
35053static char *e (p, i)
35054     char **p;
35055     int i;
35056{
35057  return p[i];
35058}
35059static char *f (char * (*g) (char **, int), char **p, ...)
35060{
35061  char *s;
35062  va_list v;
35063  va_start (v,p);
35064  s = g (p, va_arg (v,int));
35065  va_end (v);
35066  return s;
35067}
35068
35069/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35070   function prototypes and stuff, but not '\xHH' hex character constants.
35071   These don't provoke an error unfortunately, instead are silently treated
35072   as 'x'.  The following induces an error, until -std is added to get
35073   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35074   array size at least.  It's necessary to write '\x00'==0 to get something
35075   that's true only with -std.  */
35076int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35077
35078/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35079   inside strings and character constants.  */
35080#define FOO(x) 'x'
35081int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35082
35083int test (int i, double x);
35084struct s1 {int (*f) (int a);};
35085struct s2 {int (*f) (double a);};
35086int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35087int argc;
35088char **argv;
35089int
35090main ()
35091{
35092return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35093  ;
35094  return 0;
35095}
35096_ACEOF
35097for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35098	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35099do
35100  CC="$ac_save_CC $ac_arg"
35101  if ac_fn_c_try_compile "$LINENO"; then :
35102  ac_cv_prog_cc_c89=$ac_arg
35103fi
35104rm -f core conftest.err conftest.$ac_objext
35105  test "x$ac_cv_prog_cc_c89" != "xno" && break
35106done
35107rm -f conftest.$ac_ext
35108CC=$ac_save_CC
35109
35110fi
35111# AC_CACHE_VAL
35112case "x$ac_cv_prog_cc_c89" in
35113  x)
35114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35115$as_echo "none needed" >&6; } ;;
35116  xno)
35117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35118$as_echo "unsupported" >&6; } ;;
35119  *)
35120    CC="$CC $ac_cv_prog_cc_c89"
35121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35122$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35123esac
35124if test "x$ac_cv_prog_cc_c89" != xno; then :
35125
35126fi
35127
35128ac_ext=cpp
35129ac_cpp='$CXXCPP $CPPFLAGS'
35130ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35131ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35132ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35133
35134
35135
35136  COMPILER_NAME=C++
35137  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35138
35139  if test "x$CXX" != x; then
35140    # User has supplied compiler name already, always let that override.
35141    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35142$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35143    if test "x`basename $CXX`" = "x$CXX"; then
35144      # A command without a complete path is provided, search $PATH.
35145
35146      for ac_prog in $CXX
35147do
35148  # Extract the first word of "$ac_prog", so it can be a program name with args.
35149set dummy $ac_prog; ac_word=$2
35150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35151$as_echo_n "checking for $ac_word... " >&6; }
35152if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35153  $as_echo_n "(cached) " >&6
35154else
35155  case $POTENTIAL_CXX in
35156  [\\/]* | ?:[\\/]*)
35157  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35158  ;;
35159  *)
35160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35161for as_dir in $PATH
35162do
35163  IFS=$as_save_IFS
35164  test -z "$as_dir" && as_dir=.
35165    for ac_exec_ext in '' $ac_executable_extensions; do
35166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35167    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35169    break 2
35170  fi
35171done
35172  done
35173IFS=$as_save_IFS
35174
35175  ;;
35176esac
35177fi
35178POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35179if test -n "$POTENTIAL_CXX"; then
35180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35181$as_echo "$POTENTIAL_CXX" >&6; }
35182else
35183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35184$as_echo "no" >&6; }
35185fi
35186
35187
35188  test -n "$POTENTIAL_CXX" && break
35189done
35190
35191      if test "x$POTENTIAL_CXX" != x; then
35192        CXX=$POTENTIAL_CXX
35193      else
35194        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35195      fi
35196    else
35197      # Otherwise it might already be a complete path
35198      if test ! -x "$CXX"; then
35199        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35200      fi
35201    fi
35202  else
35203    # No user supplied value. Locate compiler ourselves.
35204
35205    # If we are cross compiling, assume cross compilation tools follows the
35206    # cross compilation standard where they are prefixed with the autoconf
35207    # standard name for the target. For example the binary
35208    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35209    # If we are not cross compiling, then the default compiler name will be
35210    # used.
35211
35212    CXX=
35213    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35214    # before checking the rest of the PATH.
35215    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35216    # step, this should not be necessary.
35217    if test -n "$TOOLCHAIN_PATH"; then
35218      PATH_save="$PATH"
35219      PATH="$TOOLCHAIN_PATH"
35220      if test -n "$ac_tool_prefix"; then
35221  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35222set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35224$as_echo_n "checking for $ac_word... " >&6; }
35225if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35226  $as_echo_n "(cached) " >&6
35227else
35228  case $TOOLCHAIN_PATH_CXX in
35229  [\\/]* | ?:[\\/]*)
35230  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35231  ;;
35232  *)
35233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35234for as_dir in $PATH
35235do
35236  IFS=$as_save_IFS
35237  test -z "$as_dir" && as_dir=.
35238    for ac_exec_ext in '' $ac_executable_extensions; do
35239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35240    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35242    break 2
35243  fi
35244done
35245  done
35246IFS=$as_save_IFS
35247
35248  ;;
35249esac
35250fi
35251TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35252if test -n "$TOOLCHAIN_PATH_CXX"; then
35253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35254$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35255else
35256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35257$as_echo "no" >&6; }
35258fi
35259
35260
35261fi
35262if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35263  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35264  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35265set dummy $SEARCH_LIST; ac_word=$2
35266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35267$as_echo_n "checking for $ac_word... " >&6; }
35268if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35269  $as_echo_n "(cached) " >&6
35270else
35271  case $ac_pt_TOOLCHAIN_PATH_CXX in
35272  [\\/]* | ?:[\\/]*)
35273  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35274  ;;
35275  *)
35276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35277for as_dir in $PATH
35278do
35279  IFS=$as_save_IFS
35280  test -z "$as_dir" && as_dir=.
35281    for ac_exec_ext in '' $ac_executable_extensions; do
35282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35283    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35285    break 2
35286  fi
35287done
35288  done
35289IFS=$as_save_IFS
35290
35291  ;;
35292esac
35293fi
35294ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35295if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35297$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35298else
35299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35300$as_echo "no" >&6; }
35301fi
35302
35303  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35304    TOOLCHAIN_PATH_CXX=""
35305  else
35306    case $cross_compiling:$ac_tool_warned in
35307yes:)
35308{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35310ac_tool_warned=yes ;;
35311esac
35312    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35313  fi
35314else
35315  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35316fi
35317
35318      CXX=$TOOLCHAIN_PATH_CXX
35319      PATH="$PATH_save"
35320    fi
35321
35322    # AC_PATH_TOOL can't be run multiple times with the same variable,
35323    # so create a new name for this run.
35324    if test "x$CXX" = x; then
35325      if test -n "$ac_tool_prefix"; then
35326  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35327set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35329$as_echo_n "checking for $ac_word... " >&6; }
35330if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35331  $as_echo_n "(cached) " >&6
35332else
35333  case $POTENTIAL_CXX in
35334  [\\/]* | ?:[\\/]*)
35335  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35336  ;;
35337  *)
35338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35339for as_dir in $PATH
35340do
35341  IFS=$as_save_IFS
35342  test -z "$as_dir" && as_dir=.
35343    for ac_exec_ext in '' $ac_executable_extensions; do
35344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35345    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35347    break 2
35348  fi
35349done
35350  done
35351IFS=$as_save_IFS
35352
35353  ;;
35354esac
35355fi
35356POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35357if test -n "$POTENTIAL_CXX"; then
35358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35359$as_echo "$POTENTIAL_CXX" >&6; }
35360else
35361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35362$as_echo "no" >&6; }
35363fi
35364
35365
35366fi
35367if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35368  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35369  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35370set dummy $SEARCH_LIST; ac_word=$2
35371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35372$as_echo_n "checking for $ac_word... " >&6; }
35373if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35374  $as_echo_n "(cached) " >&6
35375else
35376  case $ac_pt_POTENTIAL_CXX in
35377  [\\/]* | ?:[\\/]*)
35378  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35379  ;;
35380  *)
35381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35382for as_dir in $PATH
35383do
35384  IFS=$as_save_IFS
35385  test -z "$as_dir" && as_dir=.
35386    for ac_exec_ext in '' $ac_executable_extensions; do
35387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35388    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35390    break 2
35391  fi
35392done
35393  done
35394IFS=$as_save_IFS
35395
35396  ;;
35397esac
35398fi
35399ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35400if test -n "$ac_pt_POTENTIAL_CXX"; then
35401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35402$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35403else
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35405$as_echo "no" >&6; }
35406fi
35407
35408  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35409    POTENTIAL_CXX=""
35410  else
35411    case $cross_compiling:$ac_tool_warned in
35412yes:)
35413{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35414$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35415ac_tool_warned=yes ;;
35416esac
35417    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35418  fi
35419else
35420  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35421fi
35422
35423      CXX=$POTENTIAL_CXX
35424    fi
35425
35426    if test "x$CXX" = x; then
35427
35428  # Print a helpful message on how to acquire the necessary build dependency.
35429  # devkit is the help tag: freetype, cups, alsa etc
35430  MISSING_DEPENDENCY=devkit
35431
35432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35433    cygwin_help $MISSING_DEPENDENCY
35434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35435    msys_help $MISSING_DEPENDENCY
35436  else
35437    PKGHANDLER_COMMAND=
35438
35439    case $PKGHANDLER in
35440      apt-get)
35441        apt_help     $MISSING_DEPENDENCY ;;
35442      yum)
35443        yum_help     $MISSING_DEPENDENCY ;;
35444      brew)
35445        brew_help    $MISSING_DEPENDENCY ;;
35446      port)
35447        port_help    $MISSING_DEPENDENCY ;;
35448      pkgutil)
35449        pkgutil_help $MISSING_DEPENDENCY ;;
35450      pkgadd)
35451        pkgadd_help  $MISSING_DEPENDENCY ;;
35452    esac
35453
35454    if test "x$PKGHANDLER_COMMAND" != x; then
35455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35456    fi
35457  fi
35458
35459      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35460    fi
35461  fi
35462
35463  # Now we have a compiler binary in CXX. Make sure it's okay.
35464
35465  # Only process if variable expands to non-empty
35466
35467  if test "x$CXX" != x; then
35468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35469
35470  # First separate the path from the arguments. This will split at the first
35471  # space.
35472  complete="$CXX"
35473  path="${complete%% *}"
35474  tmp="$complete EOL"
35475  arguments="${tmp#* }"
35476
35477  # Input might be given as Windows format, start by converting to
35478  # unix format.
35479  new_path=`$CYGPATH -u "$path"`
35480
35481  # Now try to locate executable using which
35482  new_path=`$WHICH "$new_path" 2> /dev/null`
35483  # bat and cmd files are not always considered executable in cygwin causing which
35484  # to not find them
35485  if test "x$new_path" = x \
35486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35488    new_path=`$CYGPATH -u "$path"`
35489  fi
35490  if test "x$new_path" = x; then
35491    # Oops. Which didn't find the executable.
35492    # The splitting of arguments from the executable at a space might have been incorrect,
35493    # since paths with space are more likely in Windows. Give it another try with the whole
35494    # argument.
35495    path="$complete"
35496    arguments="EOL"
35497    new_path=`$CYGPATH -u "$path"`
35498    new_path=`$WHICH "$new_path" 2> /dev/null`
35499    # bat and cmd files are not always considered executable in cygwin causing which
35500    # to not find them
35501    if test "x$new_path" = x \
35502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35504      new_path=`$CYGPATH -u "$path"`
35505    fi
35506    if test "x$new_path" = x; then
35507      # It's still not found. Now this is an unrecoverable error.
35508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35509$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35510      has_space=`$ECHO "$complete" | $GREP " "`
35511      if test "x$has_space" != x; then
35512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35514      fi
35515      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35516    fi
35517  fi
35518
35519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35522  # "foo.exe" is OK but "foo" is an error.
35523  #
35524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35525  # It is also a way to make sure we got the proper file name for the real test later on.
35526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35527  if test "x$test_shortpath" = x; then
35528    # Short path failed, file does not exist as specified.
35529    # Try adding .exe or .cmd
35530    if test -f "${new_path}.exe"; then
35531      input_to_shortpath="${new_path}.exe"
35532    elif test -f "${new_path}.cmd"; then
35533      input_to_shortpath="${new_path}.cmd"
35534    else
35535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35536$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35539      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35540    fi
35541  else
35542    input_to_shortpath="$new_path"
35543  fi
35544
35545  # Call helper function which possibly converts this using DOS-style short mode.
35546  # If so, the updated path is stored in $new_path.
35547  new_path="$input_to_shortpath"
35548
35549  input_path="$input_to_shortpath"
35550  # Check if we need to convert this using DOS-style short mode. If the path
35551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35552  # take no chances and rewrite it.
35553  # Note: m4 eats our [], so we need to use [ and ] instead.
35554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35555  if test "x$has_forbidden_chars" != x; then
35556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35560      # Going to short mode and back again did indeed matter. Since short mode is
35561      # case insensitive, let's make it lowercase to improve readability.
35562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35563      # Now convert it back to Unix-style (cygpath)
35564      input_path=`$CYGPATH -u "$shortmode_path"`
35565      new_path="$input_path"
35566    fi
35567  fi
35568
35569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35570  if test "x$test_cygdrive_prefix" = x; then
35571    # As a simple fix, exclude /usr/bin since it's not a real path.
35572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35574      # a path prefixed by /cygdrive for fixpath to work.
35575      new_path="$CYGWIN_ROOT_PATH$input_path"
35576    fi
35577  fi
35578
35579  # remove trailing .exe if any
35580  new_path="${new_path/%.exe/}"
35581
35582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35583
35584  # First separate the path from the arguments. This will split at the first
35585  # space.
35586  complete="$CXX"
35587  path="${complete%% *}"
35588  tmp="$complete EOL"
35589  arguments="${tmp#* }"
35590
35591  # Input might be given as Windows format, start by converting to
35592  # unix format.
35593  new_path="$path"
35594
35595  windows_path="$new_path"
35596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35597    unix_path=`$CYGPATH -u "$windows_path"`
35598    new_path="$unix_path"
35599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35601    new_path="$unix_path"
35602  fi
35603
35604
35605  # Now try to locate executable using which
35606  new_path=`$WHICH "$new_path" 2> /dev/null`
35607
35608  if test "x$new_path" = x; then
35609    # Oops. Which didn't find the executable.
35610    # The splitting of arguments from the executable at a space might have been incorrect,
35611    # since paths with space are more likely in Windows. Give it another try with the whole
35612    # argument.
35613    path="$complete"
35614    arguments="EOL"
35615    new_path="$path"
35616
35617  windows_path="$new_path"
35618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35619    unix_path=`$CYGPATH -u "$windows_path"`
35620    new_path="$unix_path"
35621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35623    new_path="$unix_path"
35624  fi
35625
35626
35627    new_path=`$WHICH "$new_path" 2> /dev/null`
35628    # bat and cmd files are not always considered executable in MSYS causing which
35629    # to not find them
35630    if test "x$new_path" = x \
35631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35633      new_path="$path"
35634
35635  windows_path="$new_path"
35636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35637    unix_path=`$CYGPATH -u "$windows_path"`
35638    new_path="$unix_path"
35639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35641    new_path="$unix_path"
35642  fi
35643
35644    fi
35645
35646    if test "x$new_path" = x; then
35647      # It's still not found. Now this is an unrecoverable error.
35648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35649$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35650      has_space=`$ECHO "$complete" | $GREP " "`
35651      if test "x$has_space" != x; then
35652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35654      fi
35655      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35656    fi
35657  fi
35658
35659  # Now new_path has a complete unix path to the binary
35660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35661    # Keep paths in /bin as-is, but remove trailing .exe if any
35662    new_path="${new_path/%.exe/}"
35663    # Do not save /bin paths to all_fixpath_prefixes!
35664  else
35665    # Not in mixed or Windows style, start by that.
35666    new_path=`cmd //c echo $new_path`
35667
35668  input_path="$new_path"
35669  # Check if we need to convert this using DOS-style short mode. If the path
35670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35671  # take no chances and rewrite it.
35672  # Note: m4 eats our [], so we need to use [ and ] instead.
35673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35674  if test "x$has_forbidden_chars" != x; then
35675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35677  fi
35678
35679    # Output is in $new_path
35680
35681  windows_path="$new_path"
35682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35683    unix_path=`$CYGPATH -u "$windows_path"`
35684    new_path="$unix_path"
35685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35687    new_path="$unix_path"
35688  fi
35689
35690    # remove trailing .exe if any
35691    new_path="${new_path/%.exe/}"
35692
35693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35695  fi
35696
35697    else
35698      # We're on a unix platform. Hooray! :)
35699      # First separate the path from the arguments. This will split at the first
35700      # space.
35701      complete="$CXX"
35702      path="${complete%% *}"
35703      tmp="$complete EOL"
35704      arguments="${tmp#* }"
35705
35706      # Cannot rely on the command "which" here since it doesn't always work.
35707      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35708      if test -z "$is_absolute_path"; then
35709        # Path to executable is not absolute. Find it.
35710        IFS_save="$IFS"
35711        IFS=:
35712        for p in $PATH; do
35713          if test -f "$p/$path" && test -x "$p/$path"; then
35714            new_path="$p/$path"
35715            break
35716          fi
35717        done
35718        IFS="$IFS_save"
35719      else
35720        # This is an absolute path, we can use it without further modifications.
35721        new_path="$path"
35722      fi
35723
35724      if test "x$new_path" = x; then
35725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35726$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35727        has_space=`$ECHO "$complete" | $GREP " "`
35728        if test "x$has_space" != x; then
35729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35731        fi
35732        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35733      fi
35734    fi
35735
35736    # Now join together the path and the arguments once again
35737    if test "x$arguments" != xEOL; then
35738      new_complete="$new_path ${arguments% *}"
35739    else
35740      new_complete="$new_path"
35741    fi
35742
35743    if test "x$complete" != "x$new_complete"; then
35744      CXX="$new_complete"
35745      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35746$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35747    fi
35748  fi
35749
35750  TEST_COMPILER="$CXX"
35751
35752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35753$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35754  SYMLINK_ORIGINAL="$TEST_COMPILER"
35755
35756  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35757    # Follow a chain of symbolic links. Use readlink
35758    # where it exists, else fall back to horribly
35759    # complicated shell code.
35760    if test "x$READLINK_TESTED" != yes; then
35761      # On MacOSX there is a readlink tool with a different
35762      # purpose than the GNU readlink tool. Check the found readlink.
35763      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35764      if test "x$ISGNU" = x; then
35765        # A readlink that we do not know how to use.
35766        # Are there other non-GNU readlinks out there?
35767        READLINK_TESTED=yes
35768        READLINK=
35769      fi
35770    fi
35771
35772    if test "x$READLINK" != x; then
35773      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35774    else
35775      # Save the current directory for restoring afterwards
35776      STARTDIR=$PWD
35777      COUNTER=0
35778      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35779      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35780      cd $sym_link_dir
35781      # Use -P flag to resolve symlinks in directories.
35782      cd `$THEPWDCMD -P`
35783      sym_link_dir=`$THEPWDCMD -P`
35784      # Resolve file symlinks
35785      while test $COUNTER -lt 20; do
35786        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35787        if test "x$ISLINK" == x; then
35788          # This is not a symbolic link! We are done!
35789          break
35790        fi
35791        # Again resolve directory symlinks since the target of the just found
35792        # link could be in a different directory
35793        cd `$DIRNAME $ISLINK`
35794        sym_link_dir=`$THEPWDCMD -P`
35795        sym_link_file=`$BASENAME $ISLINK`
35796        let COUNTER=COUNTER+1
35797      done
35798      cd $STARTDIR
35799      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35800    fi
35801  fi
35802
35803  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35805$as_echo "no symlink" >&6; }
35806  else
35807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35808$as_echo "$SYMLINK_ORIGINAL" >&6; }
35809
35810    # We can't handle ccache by gcc wrappers, since we need to know if we're
35811    # using ccache. Instead ccache usage must be controlled by a configure option.
35812    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35813    if test "x$COMPILER_BASENAME" = "xccache"; then
35814      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35815$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35816      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35817    fi
35818  fi
35819
35820
35821  COMPILER=$CXX
35822  COMPILER_NAME=$COMPILER_NAME
35823
35824  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35825    # cc -V output typically looks like
35826    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35827    # or
35828    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35829    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35830    # Check that this is likely to be the Solaris Studio cc.
35831    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35832    if test $? -ne 0; then
35833      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35834      { $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
35835$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35836      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35837$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35838      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35839$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35840      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35841    fi
35842    # Remove usage instructions (if present), and
35843    # collapse compiler output into a single line
35844    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35845        $SED -e 's/ *[Uu]sage:.*//'`
35846    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35847        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35848  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35849    # xlc -qversion output typically looks like
35850    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35851    #     Version: 11.01.0000.0015
35852    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35853    # Check that this is likely to be the IBM XL C compiler.
35854    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35855    if test $? -ne 0; then
35856      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35857      { $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
35858$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35859      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35860$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35862$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35863      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35864    fi
35865    # Collapse compiler output into a single line
35866    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35867    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35868        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35869  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35870    # There is no specific version flag, but all output starts with a version string.
35871    # First line typically looks something like:
35872    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35873    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35874    # Check that this is likely to be Microsoft CL.EXE.
35875    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35876    if test $? -ne 0; then
35877      { $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
35878$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35879      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35880$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35881      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35882    fi
35883    # Collapse compiler output into a single line
35884    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35885    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35886        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35887  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35888    # gcc --version output typically looks like
35889    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35890    #     Copyright (C) 2013 Free Software Foundation, Inc.
35891    #     This is free software; see the source for copying conditions.  There is NO
35892    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35893    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35894    # Check that this is likely to be GCC.
35895    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35896    if test $? -ne 0; then
35897      { $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
35898$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35899      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35900$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35901      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35902    fi
35903    # Remove Copyright and legalese from version string, and
35904    # collapse into a single line
35905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35906        $SED -e 's/ *Copyright .*//'`
35907    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35908        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35909  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35910    # clang --version output typically looks like
35911    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35912    #    clang version 3.3 (tags/RELEASE_33/final)
35913    # or
35914    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35915    #    Target: x86_64-pc-linux-gnu
35916    #    Thread model: posix
35917    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35918    # Check that this is likely to be clang
35919    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35920    if test $? -ne 0; then
35921      { $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
35922$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35923      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35924$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35925      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35926    fi
35927    # Collapse compiler output into a single line
35928    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35929    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35930        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35931  else
35932      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35933  fi
35934  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35935  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35936  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35937  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35938
35939  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35940$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35941
35942
35943  # Now that we have resolved CXX ourself, let autoconf have its go at it
35944  ac_ext=cpp
35945ac_cpp='$CXXCPP $CPPFLAGS'
35946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35949if test -z "$CXX"; then
35950  if test -n "$CCC"; then
35951    CXX=$CCC
35952  else
35953    if test -n "$ac_tool_prefix"; then
35954  for ac_prog in $CXX
35955  do
35956    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35959$as_echo_n "checking for $ac_word... " >&6; }
35960if ${ac_cv_prog_CXX+:} false; then :
35961  $as_echo_n "(cached) " >&6
35962else
35963  if test -n "$CXX"; then
35964  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35965else
35966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35967for as_dir in $PATH
35968do
35969  IFS=$as_save_IFS
35970  test -z "$as_dir" && as_dir=.
35971    for ac_exec_ext in '' $ac_executable_extensions; do
35972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35973    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35975    break 2
35976  fi
35977done
35978  done
35979IFS=$as_save_IFS
35980
35981fi
35982fi
35983CXX=$ac_cv_prog_CXX
35984if test -n "$CXX"; then
35985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35986$as_echo "$CXX" >&6; }
35987else
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35989$as_echo "no" >&6; }
35990fi
35991
35992
35993    test -n "$CXX" && break
35994  done
35995fi
35996if test -z "$CXX"; then
35997  ac_ct_CXX=$CXX
35998  for ac_prog in $CXX
35999do
36000  # Extract the first word of "$ac_prog", so it can be a program name with args.
36001set dummy $ac_prog; ac_word=$2
36002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36003$as_echo_n "checking for $ac_word... " >&6; }
36004if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36005  $as_echo_n "(cached) " >&6
36006else
36007  if test -n "$ac_ct_CXX"; then
36008  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36009else
36010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36011for as_dir in $PATH
36012do
36013  IFS=$as_save_IFS
36014  test -z "$as_dir" && as_dir=.
36015    for ac_exec_ext in '' $ac_executable_extensions; do
36016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36017    ac_cv_prog_ac_ct_CXX="$ac_prog"
36018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36019    break 2
36020  fi
36021done
36022  done
36023IFS=$as_save_IFS
36024
36025fi
36026fi
36027ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36028if test -n "$ac_ct_CXX"; then
36029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36030$as_echo "$ac_ct_CXX" >&6; }
36031else
36032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36033$as_echo "no" >&6; }
36034fi
36035
36036
36037  test -n "$ac_ct_CXX" && break
36038done
36039
36040  if test "x$ac_ct_CXX" = x; then
36041    CXX="g++"
36042  else
36043    case $cross_compiling:$ac_tool_warned in
36044yes:)
36045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36047ac_tool_warned=yes ;;
36048esac
36049    CXX=$ac_ct_CXX
36050  fi
36051fi
36052
36053  fi
36054fi
36055# Provide some information about the compiler.
36056$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36057set X $ac_compile
36058ac_compiler=$2
36059for ac_option in --version -v -V -qversion; do
36060  { { ac_try="$ac_compiler $ac_option >&5"
36061case "(($ac_try" in
36062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36063  *) ac_try_echo=$ac_try;;
36064esac
36065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36066$as_echo "$ac_try_echo"; } >&5
36067  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36068  ac_status=$?
36069  if test -s conftest.err; then
36070    sed '10a\
36071... rest of stderr output deleted ...
36072         10q' conftest.err >conftest.er1
36073    cat conftest.er1 >&5
36074  fi
36075  rm -f conftest.er1 conftest.err
36076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36077  test $ac_status = 0; }
36078done
36079
36080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36081$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36082if ${ac_cv_cxx_compiler_gnu+:} false; then :
36083  $as_echo_n "(cached) " >&6
36084else
36085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36086/* end confdefs.h.  */
36087
36088int
36089main ()
36090{
36091#ifndef __GNUC__
36092       choke me
36093#endif
36094
36095  ;
36096  return 0;
36097}
36098_ACEOF
36099if ac_fn_cxx_try_compile "$LINENO"; then :
36100  ac_compiler_gnu=yes
36101else
36102  ac_compiler_gnu=no
36103fi
36104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36105ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36106
36107fi
36108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36109$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36110if test $ac_compiler_gnu = yes; then
36111  GXX=yes
36112else
36113  GXX=
36114fi
36115ac_test_CXXFLAGS=${CXXFLAGS+set}
36116ac_save_CXXFLAGS=$CXXFLAGS
36117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36118$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36119if ${ac_cv_prog_cxx_g+:} false; then :
36120  $as_echo_n "(cached) " >&6
36121else
36122  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36123   ac_cxx_werror_flag=yes
36124   ac_cv_prog_cxx_g=no
36125   CXXFLAGS="-g"
36126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36127/* end confdefs.h.  */
36128
36129int
36130main ()
36131{
36132
36133  ;
36134  return 0;
36135}
36136_ACEOF
36137if ac_fn_cxx_try_compile "$LINENO"; then :
36138  ac_cv_prog_cxx_g=yes
36139else
36140  CXXFLAGS=""
36141      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36142/* end confdefs.h.  */
36143
36144int
36145main ()
36146{
36147
36148  ;
36149  return 0;
36150}
36151_ACEOF
36152if ac_fn_cxx_try_compile "$LINENO"; then :
36153
36154else
36155  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36156	 CXXFLAGS="-g"
36157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36158/* end confdefs.h.  */
36159
36160int
36161main ()
36162{
36163
36164  ;
36165  return 0;
36166}
36167_ACEOF
36168if ac_fn_cxx_try_compile "$LINENO"; then :
36169  ac_cv_prog_cxx_g=yes
36170fi
36171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36172fi
36173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36174fi
36175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36176   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36177fi
36178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36179$as_echo "$ac_cv_prog_cxx_g" >&6; }
36180if test "$ac_test_CXXFLAGS" = set; then
36181  CXXFLAGS=$ac_save_CXXFLAGS
36182elif test $ac_cv_prog_cxx_g = yes; then
36183  if test "$GXX" = yes; then
36184    CXXFLAGS="-g -O2"
36185  else
36186    CXXFLAGS="-g"
36187  fi
36188else
36189  if test "$GXX" = yes; then
36190    CXXFLAGS="-O2"
36191  else
36192    CXXFLAGS=
36193  fi
36194fi
36195ac_ext=cpp
36196ac_cpp='$CXXCPP $CPPFLAGS'
36197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36200
36201
36202  # This is the compiler version number on the form X.Y[.Z]
36203
36204
36205
36206
36207  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36208    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36209$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36210    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36211$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36212  fi
36213
36214  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36215  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36217$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36218  fi
36219
36220  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36221    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36222$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36223  fi
36224
36225  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36226
36227
36228  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278    # Execute function body
36279
36280  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36281  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36282
36283  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36284    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36285  fi
36286
36287  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36288    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36289  fi
36290
36291  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36292  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36293
36294  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36295    :
36296
36297  else
36298    :
36299
36300          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
36301$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36302
36303
36304  fi
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319  fi
36320
36321  #
36322  # Setup the preprocessor (CPP and CXXCPP)
36323  #
36324  ac_ext=c
36325ac_cpp='$CPP $CPPFLAGS'
36326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36328ac_compiler_gnu=$ac_cv_c_compiler_gnu
36329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36330$as_echo_n "checking how to run the C preprocessor... " >&6; }
36331# On Suns, sometimes $CPP names a directory.
36332if test -n "$CPP" && test -d "$CPP"; then
36333  CPP=
36334fi
36335if test -z "$CPP"; then
36336  if ${ac_cv_prog_CPP+:} false; then :
36337  $as_echo_n "(cached) " >&6
36338else
36339      # Double quotes because CPP needs to be expanded
36340    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36341    do
36342      ac_preproc_ok=false
36343for ac_c_preproc_warn_flag in '' yes
36344do
36345  # Use a header file that comes with gcc, so configuring glibc
36346  # with a fresh cross-compiler works.
36347  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36348  # <limits.h> exists even on freestanding compilers.
36349  # On the NeXT, cc -E runs the code through the compiler's parser,
36350  # not just through cpp. "Syntax error" is here to catch this case.
36351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36352/* end confdefs.h.  */
36353#ifdef __STDC__
36354# include <limits.h>
36355#else
36356# include <assert.h>
36357#endif
36358		     Syntax error
36359_ACEOF
36360if ac_fn_c_try_cpp "$LINENO"; then :
36361
36362else
36363  # Broken: fails on valid input.
36364continue
36365fi
36366rm -f conftest.err conftest.i conftest.$ac_ext
36367
36368  # OK, works on sane cases.  Now check whether nonexistent headers
36369  # can be detected and how.
36370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36371/* end confdefs.h.  */
36372#include <ac_nonexistent.h>
36373_ACEOF
36374if ac_fn_c_try_cpp "$LINENO"; then :
36375  # Broken: success on invalid input.
36376continue
36377else
36378  # Passes both tests.
36379ac_preproc_ok=:
36380break
36381fi
36382rm -f conftest.err conftest.i conftest.$ac_ext
36383
36384done
36385# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36386rm -f conftest.i conftest.err conftest.$ac_ext
36387if $ac_preproc_ok; then :
36388  break
36389fi
36390
36391    done
36392    ac_cv_prog_CPP=$CPP
36393
36394fi
36395  CPP=$ac_cv_prog_CPP
36396else
36397  ac_cv_prog_CPP=$CPP
36398fi
36399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36400$as_echo "$CPP" >&6; }
36401ac_preproc_ok=false
36402for ac_c_preproc_warn_flag in '' yes
36403do
36404  # Use a header file that comes with gcc, so configuring glibc
36405  # with a fresh cross-compiler works.
36406  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36407  # <limits.h> exists even on freestanding compilers.
36408  # On the NeXT, cc -E runs the code through the compiler's parser,
36409  # not just through cpp. "Syntax error" is here to catch this case.
36410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36411/* end confdefs.h.  */
36412#ifdef __STDC__
36413# include <limits.h>
36414#else
36415# include <assert.h>
36416#endif
36417		     Syntax error
36418_ACEOF
36419if ac_fn_c_try_cpp "$LINENO"; then :
36420
36421else
36422  # Broken: fails on valid input.
36423continue
36424fi
36425rm -f conftest.err conftest.i conftest.$ac_ext
36426
36427  # OK, works on sane cases.  Now check whether nonexistent headers
36428  # can be detected and how.
36429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36430/* end confdefs.h.  */
36431#include <ac_nonexistent.h>
36432_ACEOF
36433if ac_fn_c_try_cpp "$LINENO"; then :
36434  # Broken: success on invalid input.
36435continue
36436else
36437  # Passes both tests.
36438ac_preproc_ok=:
36439break
36440fi
36441rm -f conftest.err conftest.i conftest.$ac_ext
36442
36443done
36444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36445rm -f conftest.i conftest.err conftest.$ac_ext
36446if $ac_preproc_ok; then :
36447
36448else
36449  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36451as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36452See \`config.log' for more details" "$LINENO" 5; }
36453fi
36454
36455ac_ext=cpp
36456ac_cpp='$CXXCPP $CPPFLAGS'
36457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36460
36461
36462  # Only process if variable expands to non-empty
36463
36464  if test "x$CPP" != x; then
36465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36466
36467  # First separate the path from the arguments. This will split at the first
36468  # space.
36469  complete="$CPP"
36470  path="${complete%% *}"
36471  tmp="$complete EOL"
36472  arguments="${tmp#* }"
36473
36474  # Input might be given as Windows format, start by converting to
36475  # unix format.
36476  new_path=`$CYGPATH -u "$path"`
36477
36478  # Now try to locate executable using which
36479  new_path=`$WHICH "$new_path" 2> /dev/null`
36480  # bat and cmd files are not always considered executable in cygwin causing which
36481  # to not find them
36482  if test "x$new_path" = x \
36483      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36484      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36485    new_path=`$CYGPATH -u "$path"`
36486  fi
36487  if test "x$new_path" = x; then
36488    # Oops. Which didn't find the executable.
36489    # The splitting of arguments from the executable at a space might have been incorrect,
36490    # since paths with space are more likely in Windows. Give it another try with the whole
36491    # argument.
36492    path="$complete"
36493    arguments="EOL"
36494    new_path=`$CYGPATH -u "$path"`
36495    new_path=`$WHICH "$new_path" 2> /dev/null`
36496    # bat and cmd files are not always considered executable in cygwin causing which
36497    # to not find them
36498    if test "x$new_path" = x \
36499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36501      new_path=`$CYGPATH -u "$path"`
36502    fi
36503    if test "x$new_path" = x; then
36504      # It's still not found. Now this is an unrecoverable error.
36505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36506$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36507      has_space=`$ECHO "$complete" | $GREP " "`
36508      if test "x$has_space" != x; then
36509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36511      fi
36512      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36513    fi
36514  fi
36515
36516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36519  # "foo.exe" is OK but "foo" is an error.
36520  #
36521  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36522  # It is also a way to make sure we got the proper file name for the real test later on.
36523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36524  if test "x$test_shortpath" = x; then
36525    # Short path failed, file does not exist as specified.
36526    # Try adding .exe or .cmd
36527    if test -f "${new_path}.exe"; then
36528      input_to_shortpath="${new_path}.exe"
36529    elif test -f "${new_path}.cmd"; then
36530      input_to_shortpath="${new_path}.cmd"
36531    else
36532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36533$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36534      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36535$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36536      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36537    fi
36538  else
36539    input_to_shortpath="$new_path"
36540  fi
36541
36542  # Call helper function which possibly converts this using DOS-style short mode.
36543  # If so, the updated path is stored in $new_path.
36544  new_path="$input_to_shortpath"
36545
36546  input_path="$input_to_shortpath"
36547  # Check if we need to convert this using DOS-style short mode. If the path
36548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36549  # take no chances and rewrite it.
36550  # Note: m4 eats our [], so we need to use [ and ] instead.
36551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36552  if test "x$has_forbidden_chars" != x; then
36553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36557      # Going to short mode and back again did indeed matter. Since short mode is
36558      # case insensitive, let's make it lowercase to improve readability.
36559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36560      # Now convert it back to Unix-style (cygpath)
36561      input_path=`$CYGPATH -u "$shortmode_path"`
36562      new_path="$input_path"
36563    fi
36564  fi
36565
36566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36567  if test "x$test_cygdrive_prefix" = x; then
36568    # As a simple fix, exclude /usr/bin since it's not a real path.
36569    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36571      # a path prefixed by /cygdrive for fixpath to work.
36572      new_path="$CYGWIN_ROOT_PATH$input_path"
36573    fi
36574  fi
36575
36576  # remove trailing .exe if any
36577  new_path="${new_path/%.exe/}"
36578
36579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36580
36581  # First separate the path from the arguments. This will split at the first
36582  # space.
36583  complete="$CPP"
36584  path="${complete%% *}"
36585  tmp="$complete EOL"
36586  arguments="${tmp#* }"
36587
36588  # Input might be given as Windows format, start by converting to
36589  # unix format.
36590  new_path="$path"
36591
36592  windows_path="$new_path"
36593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36594    unix_path=`$CYGPATH -u "$windows_path"`
36595    new_path="$unix_path"
36596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36598    new_path="$unix_path"
36599  fi
36600
36601
36602  # Now try to locate executable using which
36603  new_path=`$WHICH "$new_path" 2> /dev/null`
36604
36605  if test "x$new_path" = x; then
36606    # Oops. Which didn't find the executable.
36607    # The splitting of arguments from the executable at a space might have been incorrect,
36608    # since paths with space are more likely in Windows. Give it another try with the whole
36609    # argument.
36610    path="$complete"
36611    arguments="EOL"
36612    new_path="$path"
36613
36614  windows_path="$new_path"
36615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36616    unix_path=`$CYGPATH -u "$windows_path"`
36617    new_path="$unix_path"
36618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36620    new_path="$unix_path"
36621  fi
36622
36623
36624    new_path=`$WHICH "$new_path" 2> /dev/null`
36625    # bat and cmd files are not always considered executable in MSYS causing which
36626    # to not find them
36627    if test "x$new_path" = x \
36628        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36629        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36630      new_path="$path"
36631
36632  windows_path="$new_path"
36633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36634    unix_path=`$CYGPATH -u "$windows_path"`
36635    new_path="$unix_path"
36636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36638    new_path="$unix_path"
36639  fi
36640
36641    fi
36642
36643    if test "x$new_path" = x; then
36644      # It's still not found. Now this is an unrecoverable error.
36645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36646$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36647      has_space=`$ECHO "$complete" | $GREP " "`
36648      if test "x$has_space" != x; then
36649        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36650$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36651      fi
36652      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36653    fi
36654  fi
36655
36656  # Now new_path has a complete unix path to the binary
36657  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36658    # Keep paths in /bin as-is, but remove trailing .exe if any
36659    new_path="${new_path/%.exe/}"
36660    # Do not save /bin paths to all_fixpath_prefixes!
36661  else
36662    # Not in mixed or Windows style, start by that.
36663    new_path=`cmd //c echo $new_path`
36664
36665  input_path="$new_path"
36666  # Check if we need to convert this using DOS-style short mode. If the path
36667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36668  # take no chances and rewrite it.
36669  # Note: m4 eats our [], so we need to use [ and ] instead.
36670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36671  if test "x$has_forbidden_chars" != x; then
36672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36674  fi
36675
36676    # Output is in $new_path
36677
36678  windows_path="$new_path"
36679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36680    unix_path=`$CYGPATH -u "$windows_path"`
36681    new_path="$unix_path"
36682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36684    new_path="$unix_path"
36685  fi
36686
36687    # remove trailing .exe if any
36688    new_path="${new_path/%.exe/}"
36689
36690    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36691    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36692  fi
36693
36694    else
36695      # We're on a unix platform. Hooray! :)
36696      # First separate the path from the arguments. This will split at the first
36697      # space.
36698      complete="$CPP"
36699      path="${complete%% *}"
36700      tmp="$complete EOL"
36701      arguments="${tmp#* }"
36702
36703      # Cannot rely on the command "which" here since it doesn't always work.
36704      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36705      if test -z "$is_absolute_path"; then
36706        # Path to executable is not absolute. Find it.
36707        IFS_save="$IFS"
36708        IFS=:
36709        for p in $PATH; do
36710          if test -f "$p/$path" && test -x "$p/$path"; then
36711            new_path="$p/$path"
36712            break
36713          fi
36714        done
36715        IFS="$IFS_save"
36716      else
36717        # This is an absolute path, we can use it without further modifications.
36718        new_path="$path"
36719      fi
36720
36721      if test "x$new_path" = x; then
36722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36723$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36724        has_space=`$ECHO "$complete" | $GREP " "`
36725        if test "x$has_space" != x; then
36726          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36727$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36728        fi
36729        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36730      fi
36731    fi
36732
36733    # Now join together the path and the arguments once again
36734    if test "x$arguments" != xEOL; then
36735      new_complete="$new_path ${arguments% *}"
36736    else
36737      new_complete="$new_path"
36738    fi
36739
36740    if test "x$complete" != "x$new_complete"; then
36741      CPP="$new_complete"
36742      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36743$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36744    fi
36745  fi
36746
36747  ac_ext=cpp
36748ac_cpp='$CXXCPP $CPPFLAGS'
36749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36753$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36754if test -z "$CXXCPP"; then
36755  if ${ac_cv_prog_CXXCPP+:} false; then :
36756  $as_echo_n "(cached) " >&6
36757else
36758      # Double quotes because CXXCPP needs to be expanded
36759    for CXXCPP in "$CXX -E" "/lib/cpp"
36760    do
36761      ac_preproc_ok=false
36762for ac_cxx_preproc_warn_flag in '' yes
36763do
36764  # Use a header file that comes with gcc, so configuring glibc
36765  # with a fresh cross-compiler works.
36766  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36767  # <limits.h> exists even on freestanding compilers.
36768  # On the NeXT, cc -E runs the code through the compiler's parser,
36769  # not just through cpp. "Syntax error" is here to catch this case.
36770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36771/* end confdefs.h.  */
36772#ifdef __STDC__
36773# include <limits.h>
36774#else
36775# include <assert.h>
36776#endif
36777		     Syntax error
36778_ACEOF
36779if ac_fn_cxx_try_cpp "$LINENO"; then :
36780
36781else
36782  # Broken: fails on valid input.
36783continue
36784fi
36785rm -f conftest.err conftest.i conftest.$ac_ext
36786
36787  # OK, works on sane cases.  Now check whether nonexistent headers
36788  # can be detected and how.
36789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36790/* end confdefs.h.  */
36791#include <ac_nonexistent.h>
36792_ACEOF
36793if ac_fn_cxx_try_cpp "$LINENO"; then :
36794  # Broken: success on invalid input.
36795continue
36796else
36797  # Passes both tests.
36798ac_preproc_ok=:
36799break
36800fi
36801rm -f conftest.err conftest.i conftest.$ac_ext
36802
36803done
36804# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36805rm -f conftest.i conftest.err conftest.$ac_ext
36806if $ac_preproc_ok; then :
36807  break
36808fi
36809
36810    done
36811    ac_cv_prog_CXXCPP=$CXXCPP
36812
36813fi
36814  CXXCPP=$ac_cv_prog_CXXCPP
36815else
36816  ac_cv_prog_CXXCPP=$CXXCPP
36817fi
36818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36819$as_echo "$CXXCPP" >&6; }
36820ac_preproc_ok=false
36821for ac_cxx_preproc_warn_flag in '' yes
36822do
36823  # Use a header file that comes with gcc, so configuring glibc
36824  # with a fresh cross-compiler works.
36825  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36826  # <limits.h> exists even on freestanding compilers.
36827  # On the NeXT, cc -E runs the code through the compiler's parser,
36828  # not just through cpp. "Syntax error" is here to catch this case.
36829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36830/* end confdefs.h.  */
36831#ifdef __STDC__
36832# include <limits.h>
36833#else
36834# include <assert.h>
36835#endif
36836		     Syntax error
36837_ACEOF
36838if ac_fn_cxx_try_cpp "$LINENO"; then :
36839
36840else
36841  # Broken: fails on valid input.
36842continue
36843fi
36844rm -f conftest.err conftest.i conftest.$ac_ext
36845
36846  # OK, works on sane cases.  Now check whether nonexistent headers
36847  # can be detected and how.
36848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36849/* end confdefs.h.  */
36850#include <ac_nonexistent.h>
36851_ACEOF
36852if ac_fn_cxx_try_cpp "$LINENO"; then :
36853  # Broken: success on invalid input.
36854continue
36855else
36856  # Passes both tests.
36857ac_preproc_ok=:
36858break
36859fi
36860rm -f conftest.err conftest.i conftest.$ac_ext
36861
36862done
36863# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36864rm -f conftest.i conftest.err conftest.$ac_ext
36865if $ac_preproc_ok; then :
36866
36867else
36868  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36870as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36871See \`config.log' for more details" "$LINENO" 5; }
36872fi
36873
36874ac_ext=cpp
36875ac_cpp='$CXXCPP $CPPFLAGS'
36876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36879
36880
36881  # Only process if variable expands to non-empty
36882
36883  if test "x$CXXCPP" != x; then
36884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36885
36886  # First separate the path from the arguments. This will split at the first
36887  # space.
36888  complete="$CXXCPP"
36889  path="${complete%% *}"
36890  tmp="$complete EOL"
36891  arguments="${tmp#* }"
36892
36893  # Input might be given as Windows format, start by converting to
36894  # unix format.
36895  new_path=`$CYGPATH -u "$path"`
36896
36897  # Now try to locate executable using which
36898  new_path=`$WHICH "$new_path" 2> /dev/null`
36899  # bat and cmd files are not always considered executable in cygwin causing which
36900  # to not find them
36901  if test "x$new_path" = x \
36902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36904    new_path=`$CYGPATH -u "$path"`
36905  fi
36906  if test "x$new_path" = x; then
36907    # Oops. Which didn't find the executable.
36908    # The splitting of arguments from the executable at a space might have been incorrect,
36909    # since paths with space are more likely in Windows. Give it another try with the whole
36910    # argument.
36911    path="$complete"
36912    arguments="EOL"
36913    new_path=`$CYGPATH -u "$path"`
36914    new_path=`$WHICH "$new_path" 2> /dev/null`
36915    # bat and cmd files are not always considered executable in cygwin causing which
36916    # to not find them
36917    if test "x$new_path" = x \
36918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36920      new_path=`$CYGPATH -u "$path"`
36921    fi
36922    if test "x$new_path" = x; then
36923      # It's still not found. Now this is an unrecoverable error.
36924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36925$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36926      has_space=`$ECHO "$complete" | $GREP " "`
36927      if test "x$has_space" != x; then
36928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36930      fi
36931      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36932    fi
36933  fi
36934
36935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36938  # "foo.exe" is OK but "foo" is an error.
36939  #
36940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36941  # It is also a way to make sure we got the proper file name for the real test later on.
36942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36943  if test "x$test_shortpath" = x; then
36944    # Short path failed, file does not exist as specified.
36945    # Try adding .exe or .cmd
36946    if test -f "${new_path}.exe"; then
36947      input_to_shortpath="${new_path}.exe"
36948    elif test -f "${new_path}.cmd"; then
36949      input_to_shortpath="${new_path}.cmd"
36950    else
36951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36952$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36955      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36956    fi
36957  else
36958    input_to_shortpath="$new_path"
36959  fi
36960
36961  # Call helper function which possibly converts this using DOS-style short mode.
36962  # If so, the updated path is stored in $new_path.
36963  new_path="$input_to_shortpath"
36964
36965  input_path="$input_to_shortpath"
36966  # Check if we need to convert this using DOS-style short mode. If the path
36967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36968  # take no chances and rewrite it.
36969  # Note: m4 eats our [], so we need to use [ and ] instead.
36970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36971  if test "x$has_forbidden_chars" != x; then
36972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36976      # Going to short mode and back again did indeed matter. Since short mode is
36977      # case insensitive, let's make it lowercase to improve readability.
36978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36979      # Now convert it back to Unix-style (cygpath)
36980      input_path=`$CYGPATH -u "$shortmode_path"`
36981      new_path="$input_path"
36982    fi
36983  fi
36984
36985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36986  if test "x$test_cygdrive_prefix" = x; then
36987    # As a simple fix, exclude /usr/bin since it's not a real path.
36988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36990      # a path prefixed by /cygdrive for fixpath to work.
36991      new_path="$CYGWIN_ROOT_PATH$input_path"
36992    fi
36993  fi
36994
36995  # remove trailing .exe if any
36996  new_path="${new_path/%.exe/}"
36997
36998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36999
37000  # First separate the path from the arguments. This will split at the first
37001  # space.
37002  complete="$CXXCPP"
37003  path="${complete%% *}"
37004  tmp="$complete EOL"
37005  arguments="${tmp#* }"
37006
37007  # Input might be given as Windows format, start by converting to
37008  # unix format.
37009  new_path="$path"
37010
37011  windows_path="$new_path"
37012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37013    unix_path=`$CYGPATH -u "$windows_path"`
37014    new_path="$unix_path"
37015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37017    new_path="$unix_path"
37018  fi
37019
37020
37021  # Now try to locate executable using which
37022  new_path=`$WHICH "$new_path" 2> /dev/null`
37023
37024  if test "x$new_path" = x; then
37025    # Oops. Which didn't find the executable.
37026    # The splitting of arguments from the executable at a space might have been incorrect,
37027    # since paths with space are more likely in Windows. Give it another try with the whole
37028    # argument.
37029    path="$complete"
37030    arguments="EOL"
37031    new_path="$path"
37032
37033  windows_path="$new_path"
37034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37035    unix_path=`$CYGPATH -u "$windows_path"`
37036    new_path="$unix_path"
37037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37039    new_path="$unix_path"
37040  fi
37041
37042
37043    new_path=`$WHICH "$new_path" 2> /dev/null`
37044    # bat and cmd files are not always considered executable in MSYS causing which
37045    # to not find them
37046    if test "x$new_path" = x \
37047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37049      new_path="$path"
37050
37051  windows_path="$new_path"
37052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37053    unix_path=`$CYGPATH -u "$windows_path"`
37054    new_path="$unix_path"
37055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37057    new_path="$unix_path"
37058  fi
37059
37060    fi
37061
37062    if test "x$new_path" = x; then
37063      # It's still not found. Now this is an unrecoverable error.
37064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37065$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37066      has_space=`$ECHO "$complete" | $GREP " "`
37067      if test "x$has_space" != x; then
37068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37070      fi
37071      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37072    fi
37073  fi
37074
37075  # Now new_path has a complete unix path to the binary
37076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37077    # Keep paths in /bin as-is, but remove trailing .exe if any
37078    new_path="${new_path/%.exe/}"
37079    # Do not save /bin paths to all_fixpath_prefixes!
37080  else
37081    # Not in mixed or Windows style, start by that.
37082    new_path=`cmd //c echo $new_path`
37083
37084  input_path="$new_path"
37085  # Check if we need to convert this using DOS-style short mode. If the path
37086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37087  # take no chances and rewrite it.
37088  # Note: m4 eats our [], so we need to use [ and ] instead.
37089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37090  if test "x$has_forbidden_chars" != x; then
37091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37093  fi
37094
37095    # Output is in $new_path
37096
37097  windows_path="$new_path"
37098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37099    unix_path=`$CYGPATH -u "$windows_path"`
37100    new_path="$unix_path"
37101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37103    new_path="$unix_path"
37104  fi
37105
37106    # remove trailing .exe if any
37107    new_path="${new_path/%.exe/}"
37108
37109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37111  fi
37112
37113    else
37114      # We're on a unix platform. Hooray! :)
37115      # First separate the path from the arguments. This will split at the first
37116      # space.
37117      complete="$CXXCPP"
37118      path="${complete%% *}"
37119      tmp="$complete EOL"
37120      arguments="${tmp#* }"
37121
37122      # Cannot rely on the command "which" here since it doesn't always work.
37123      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37124      if test -z "$is_absolute_path"; then
37125        # Path to executable is not absolute. Find it.
37126        IFS_save="$IFS"
37127        IFS=:
37128        for p in $PATH; do
37129          if test -f "$p/$path" && test -x "$p/$path"; then
37130            new_path="$p/$path"
37131            break
37132          fi
37133        done
37134        IFS="$IFS_save"
37135      else
37136        # This is an absolute path, we can use it without further modifications.
37137        new_path="$path"
37138      fi
37139
37140      if test "x$new_path" = x; then
37141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37142$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37143        has_space=`$ECHO "$complete" | $GREP " "`
37144        if test "x$has_space" != x; then
37145          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37147        fi
37148        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37149      fi
37150    fi
37151
37152    # Now join together the path and the arguments once again
37153    if test "x$arguments" != xEOL; then
37154      new_complete="$new_path ${arguments% *}"
37155    else
37156      new_complete="$new_path"
37157    fi
37158
37159    if test "x$complete" != "x$new_complete"; then
37160      CXXCPP="$new_complete"
37161      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37162$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37163    fi
37164  fi
37165
37166
37167  #
37168  # Setup the linker (LD)
37169  #
37170  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37171    # In the Microsoft toolchain we have a separate LD command "link".
37172    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37173    # a cygwin program for something completely different.
37174    # Extract the first word of "link", so it can be a program name with args.
37175set dummy link; ac_word=$2
37176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37177$as_echo_n "checking for $ac_word... " >&6; }
37178if ${ac_cv_prog_LD+:} false; then :
37179  $as_echo_n "(cached) " >&6
37180else
37181  if test -n "$LD"; then
37182  ac_cv_prog_LD="$LD" # Let the user override the test.
37183else
37184  ac_prog_rejected=no
37185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37186for as_dir in $PATH
37187do
37188  IFS=$as_save_IFS
37189  test -z "$as_dir" && as_dir=.
37190    for ac_exec_ext in '' $ac_executable_extensions; do
37191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37192    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37193       ac_prog_rejected=yes
37194       continue
37195     fi
37196    ac_cv_prog_LD="link"
37197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198    break 2
37199  fi
37200done
37201  done
37202IFS=$as_save_IFS
37203
37204if test $ac_prog_rejected = yes; then
37205  # We found a bogon in the path, so make sure we never use it.
37206  set dummy $ac_cv_prog_LD
37207  shift
37208  if test $# != 0; then
37209    # We chose a different compiler from the bogus one.
37210    # However, it has the same basename, so the bogon will be chosen
37211    # first if we set LD to just the basename; use the full file name.
37212    shift
37213    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37214  fi
37215fi
37216fi
37217fi
37218LD=$ac_cv_prog_LD
37219if test -n "$LD"; then
37220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37221$as_echo "$LD" >&6; }
37222else
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37224$as_echo "no" >&6; }
37225fi
37226
37227
37228
37229  # Only process if variable expands to non-empty
37230
37231  if test "x$LD" != x; then
37232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37233
37234  # First separate the path from the arguments. This will split at the first
37235  # space.
37236  complete="$LD"
37237  path="${complete%% *}"
37238  tmp="$complete EOL"
37239  arguments="${tmp#* }"
37240
37241  # Input might be given as Windows format, start by converting to
37242  # unix format.
37243  new_path=`$CYGPATH -u "$path"`
37244
37245  # Now try to locate executable using which
37246  new_path=`$WHICH "$new_path" 2> /dev/null`
37247  # bat and cmd files are not always considered executable in cygwin causing which
37248  # to not find them
37249  if test "x$new_path" = x \
37250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37252    new_path=`$CYGPATH -u "$path"`
37253  fi
37254  if test "x$new_path" = x; then
37255    # Oops. Which didn't find the executable.
37256    # The splitting of arguments from the executable at a space might have been incorrect,
37257    # since paths with space are more likely in Windows. Give it another try with the whole
37258    # argument.
37259    path="$complete"
37260    arguments="EOL"
37261    new_path=`$CYGPATH -u "$path"`
37262    new_path=`$WHICH "$new_path" 2> /dev/null`
37263    # bat and cmd files are not always considered executable in cygwin causing which
37264    # to not find them
37265    if test "x$new_path" = x \
37266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37268      new_path=`$CYGPATH -u "$path"`
37269    fi
37270    if test "x$new_path" = x; then
37271      # It's still not found. Now this is an unrecoverable error.
37272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37273$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37274      has_space=`$ECHO "$complete" | $GREP " "`
37275      if test "x$has_space" != x; then
37276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37278      fi
37279      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37280    fi
37281  fi
37282
37283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37286  # "foo.exe" is OK but "foo" is an error.
37287  #
37288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37289  # It is also a way to make sure we got the proper file name for the real test later on.
37290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37291  if test "x$test_shortpath" = x; then
37292    # Short path failed, file does not exist as specified.
37293    # Try adding .exe or .cmd
37294    if test -f "${new_path}.exe"; then
37295      input_to_shortpath="${new_path}.exe"
37296    elif test -f "${new_path}.cmd"; then
37297      input_to_shortpath="${new_path}.cmd"
37298    else
37299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37300$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37303      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37304    fi
37305  else
37306    input_to_shortpath="$new_path"
37307  fi
37308
37309  # Call helper function which possibly converts this using DOS-style short mode.
37310  # If so, the updated path is stored in $new_path.
37311  new_path="$input_to_shortpath"
37312
37313  input_path="$input_to_shortpath"
37314  # Check if we need to convert this using DOS-style short mode. If the path
37315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37316  # take no chances and rewrite it.
37317  # Note: m4 eats our [], so we need to use [ and ] instead.
37318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37319  if test "x$has_forbidden_chars" != x; then
37320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37324      # Going to short mode and back again did indeed matter. Since short mode is
37325      # case insensitive, let's make it lowercase to improve readability.
37326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37327      # Now convert it back to Unix-style (cygpath)
37328      input_path=`$CYGPATH -u "$shortmode_path"`
37329      new_path="$input_path"
37330    fi
37331  fi
37332
37333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37334  if test "x$test_cygdrive_prefix" = x; then
37335    # As a simple fix, exclude /usr/bin since it's not a real path.
37336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37338      # a path prefixed by /cygdrive for fixpath to work.
37339      new_path="$CYGWIN_ROOT_PATH$input_path"
37340    fi
37341  fi
37342
37343  # remove trailing .exe if any
37344  new_path="${new_path/%.exe/}"
37345
37346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37347
37348  # First separate the path from the arguments. This will split at the first
37349  # space.
37350  complete="$LD"
37351  path="${complete%% *}"
37352  tmp="$complete EOL"
37353  arguments="${tmp#* }"
37354
37355  # Input might be given as Windows format, start by converting to
37356  # unix format.
37357  new_path="$path"
37358
37359  windows_path="$new_path"
37360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37361    unix_path=`$CYGPATH -u "$windows_path"`
37362    new_path="$unix_path"
37363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37365    new_path="$unix_path"
37366  fi
37367
37368
37369  # Now try to locate executable using which
37370  new_path=`$WHICH "$new_path" 2> /dev/null`
37371
37372  if test "x$new_path" = x; then
37373    # Oops. Which didn't find the executable.
37374    # The splitting of arguments from the executable at a space might have been incorrect,
37375    # since paths with space are more likely in Windows. Give it another try with the whole
37376    # argument.
37377    path="$complete"
37378    arguments="EOL"
37379    new_path="$path"
37380
37381  windows_path="$new_path"
37382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37383    unix_path=`$CYGPATH -u "$windows_path"`
37384    new_path="$unix_path"
37385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37387    new_path="$unix_path"
37388  fi
37389
37390
37391    new_path=`$WHICH "$new_path" 2> /dev/null`
37392    # bat and cmd files are not always considered executable in MSYS causing which
37393    # to not find them
37394    if test "x$new_path" = x \
37395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37397      new_path="$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    fi
37409
37410    if test "x$new_path" = x; then
37411      # It's still not found. Now this is an unrecoverable error.
37412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37413$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37414      has_space=`$ECHO "$complete" | $GREP " "`
37415      if test "x$has_space" != x; then
37416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37418      fi
37419      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37420    fi
37421  fi
37422
37423  # Now new_path has a complete unix path to the binary
37424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37425    # Keep paths in /bin as-is, but remove trailing .exe if any
37426    new_path="${new_path/%.exe/}"
37427    # Do not save /bin paths to all_fixpath_prefixes!
37428  else
37429    # Not in mixed or Windows style, start by that.
37430    new_path=`cmd //c echo $new_path`
37431
37432  input_path="$new_path"
37433  # Check if we need to convert this using DOS-style short mode. If the path
37434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37435  # take no chances and rewrite it.
37436  # Note: m4 eats our [], so we need to use [ and ] instead.
37437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37438  if test "x$has_forbidden_chars" != x; then
37439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37441  fi
37442
37443    # Output is in $new_path
37444
37445  windows_path="$new_path"
37446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37447    unix_path=`$CYGPATH -u "$windows_path"`
37448    new_path="$unix_path"
37449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37451    new_path="$unix_path"
37452  fi
37453
37454    # remove trailing .exe if any
37455    new_path="${new_path/%.exe/}"
37456
37457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37459  fi
37460
37461    else
37462      # We're on a unix platform. Hooray! :)
37463      # First separate the path from the arguments. This will split at the first
37464      # space.
37465      complete="$LD"
37466      path="${complete%% *}"
37467      tmp="$complete EOL"
37468      arguments="${tmp#* }"
37469
37470      # Cannot rely on the command "which" here since it doesn't always work.
37471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37472      if test -z "$is_absolute_path"; then
37473        # Path to executable is not absolute. Find it.
37474        IFS_save="$IFS"
37475        IFS=:
37476        for p in $PATH; do
37477          if test -f "$p/$path" && test -x "$p/$path"; then
37478            new_path="$p/$path"
37479            break
37480          fi
37481        done
37482        IFS="$IFS_save"
37483      else
37484        # This is an absolute path, we can use it without further modifications.
37485        new_path="$path"
37486      fi
37487
37488      if test "x$new_path" = x; then
37489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37490$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37491        has_space=`$ECHO "$complete" | $GREP " "`
37492        if test "x$has_space" != x; then
37493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37495        fi
37496        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37497      fi
37498    fi
37499
37500    # Now join together the path and the arguments once again
37501    if test "x$arguments" != xEOL; then
37502      new_complete="$new_path ${arguments% *}"
37503    else
37504      new_complete="$new_path"
37505    fi
37506
37507    if test "x$complete" != "x$new_complete"; then
37508      LD="$new_complete"
37509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37510$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37511    fi
37512  fi
37513
37514    # Verify that we indeed succeeded with this trick.
37515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37516$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37517    "$LD" --version > /dev/null
37518    if test $? -eq 0 ; then
37519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37520$as_echo "no" >&6; }
37521      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37522    else
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37524$as_echo "yes" >&6; }
37525    fi
37526    LDCXX="$LD"
37527  else
37528    # All other toolchains use the compiler to link.
37529    LD="$CC"
37530    LDCXX="$CXX"
37531  fi
37532
37533  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37534
37535
37536  #
37537  # Setup the assembler (AS)
37538  #
37539  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37540
37541
37542  # Publish this variable in the help.
37543
37544
37545  if [ -z "${AS+x}" ]; then
37546    # The variable is not set by user, try to locate tool using the code snippet
37547    for ac_prog in as
37548do
37549  # Extract the first word of "$ac_prog", so it can be a program name with args.
37550set dummy $ac_prog; ac_word=$2
37551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37552$as_echo_n "checking for $ac_word... " >&6; }
37553if ${ac_cv_path_AS+:} false; then :
37554  $as_echo_n "(cached) " >&6
37555else
37556  case $AS in
37557  [\\/]* | ?:[\\/]*)
37558  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37559  ;;
37560  *)
37561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37562for as_dir in $PATH
37563do
37564  IFS=$as_save_IFS
37565  test -z "$as_dir" && as_dir=.
37566    for ac_exec_ext in '' $ac_executable_extensions; do
37567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37568    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37570    break 2
37571  fi
37572done
37573  done
37574IFS=$as_save_IFS
37575
37576  ;;
37577esac
37578fi
37579AS=$ac_cv_path_AS
37580if test -n "$AS"; then
37581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37582$as_echo "$AS" >&6; }
37583else
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37585$as_echo "no" >&6; }
37586fi
37587
37588
37589  test -n "$AS" && break
37590done
37591
37592  else
37593    # The variable is set, but is it from the command line or the environment?
37594
37595    # Try to remove the string !AS! from our list.
37596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37598      # If it failed, the variable was not from the command line. Ignore it,
37599      # but warn the user (except for BASH, which is always set by the calling BASH).
37600      if test "xAS" != xBASH; then
37601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37602$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37603      fi
37604      # Try to locate tool using the code snippet
37605      for ac_prog in as
37606do
37607  # Extract the first word of "$ac_prog", so it can be a program name with args.
37608set dummy $ac_prog; ac_word=$2
37609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37610$as_echo_n "checking for $ac_word... " >&6; }
37611if ${ac_cv_path_AS+:} false; then :
37612  $as_echo_n "(cached) " >&6
37613else
37614  case $AS in
37615  [\\/]* | ?:[\\/]*)
37616  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37617  ;;
37618  *)
37619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37620for as_dir in $PATH
37621do
37622  IFS=$as_save_IFS
37623  test -z "$as_dir" && as_dir=.
37624    for ac_exec_ext in '' $ac_executable_extensions; do
37625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37626    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37628    break 2
37629  fi
37630done
37631  done
37632IFS=$as_save_IFS
37633
37634  ;;
37635esac
37636fi
37637AS=$ac_cv_path_AS
37638if test -n "$AS"; then
37639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37640$as_echo "$AS" >&6; }
37641else
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37643$as_echo "no" >&6; }
37644fi
37645
37646
37647  test -n "$AS" && break
37648done
37649
37650    else
37651      # If it succeeded, then it was overridden by the user. We will use it
37652      # for the tool.
37653
37654      # First remove it from the list of overridden variables, so we can test
37655      # for unknown variables in the end.
37656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37657
37658      # Check if we try to supply an empty value
37659      if test "x$AS" = x; then
37660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37661$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37663$as_echo_n "checking for AS... " >&6; }
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37665$as_echo "disabled" >&6; }
37666      else
37667        # Check if the provided tool contains a complete path.
37668        tool_specified="$AS"
37669        tool_basename="${tool_specified##*/}"
37670        if test "x$tool_basename" = "x$tool_specified"; then
37671          # A command without a complete path is provided, search $PATH.
37672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37673$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37674          # Extract the first word of "$tool_basename", so it can be a program name with args.
37675set dummy $tool_basename; ac_word=$2
37676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37677$as_echo_n "checking for $ac_word... " >&6; }
37678if ${ac_cv_path_AS+:} false; then :
37679  $as_echo_n "(cached) " >&6
37680else
37681  case $AS in
37682  [\\/]* | ?:[\\/]*)
37683  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37684  ;;
37685  *)
37686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37687for as_dir in $PATH
37688do
37689  IFS=$as_save_IFS
37690  test -z "$as_dir" && as_dir=.
37691    for ac_exec_ext in '' $ac_executable_extensions; do
37692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37693    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37695    break 2
37696  fi
37697done
37698  done
37699IFS=$as_save_IFS
37700
37701  ;;
37702esac
37703fi
37704AS=$ac_cv_path_AS
37705if test -n "$AS"; then
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37707$as_echo "$AS" >&6; }
37708else
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710$as_echo "no" >&6; }
37711fi
37712
37713
37714          if test "x$AS" = x; then
37715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37716          fi
37717        else
37718          # Otherwise we believe it is a complete path. Use it as it is.
37719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37720$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37722$as_echo_n "checking for AS... " >&6; }
37723          if test ! -x "$tool_specified"; then
37724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37725$as_echo "not found" >&6; }
37726            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37727          fi
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37729$as_echo "$tool_specified" >&6; }
37730        fi
37731      fi
37732    fi
37733
37734  fi
37735
37736
37737
37738  # Only process if variable expands to non-empty
37739
37740  if test "x$AS" != x; then
37741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37742
37743  # First separate the path from the arguments. This will split at the first
37744  # space.
37745  complete="$AS"
37746  path="${complete%% *}"
37747  tmp="$complete EOL"
37748  arguments="${tmp#* }"
37749
37750  # Input might be given as Windows format, start by converting to
37751  # unix format.
37752  new_path=`$CYGPATH -u "$path"`
37753
37754  # Now try to locate executable using which
37755  new_path=`$WHICH "$new_path" 2> /dev/null`
37756  # bat and cmd files are not always considered executable in cygwin causing which
37757  # to not find them
37758  if test "x$new_path" = x \
37759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37761    new_path=`$CYGPATH -u "$path"`
37762  fi
37763  if test "x$new_path" = x; then
37764    # Oops. Which didn't find the executable.
37765    # The splitting of arguments from the executable at a space might have been incorrect,
37766    # since paths with space are more likely in Windows. Give it another try with the whole
37767    # argument.
37768    path="$complete"
37769    arguments="EOL"
37770    new_path=`$CYGPATH -u "$path"`
37771    new_path=`$WHICH "$new_path" 2> /dev/null`
37772    # bat and cmd files are not always considered executable in cygwin causing which
37773    # to not find them
37774    if test "x$new_path" = x \
37775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37777      new_path=`$CYGPATH -u "$path"`
37778    fi
37779    if test "x$new_path" = x; then
37780      # It's still not found. Now this is an unrecoverable error.
37781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37782$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37783      has_space=`$ECHO "$complete" | $GREP " "`
37784      if test "x$has_space" != x; then
37785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37787      fi
37788      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37789    fi
37790  fi
37791
37792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37795  # "foo.exe" is OK but "foo" is an error.
37796  #
37797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37798  # It is also a way to make sure we got the proper file name for the real test later on.
37799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37800  if test "x$test_shortpath" = x; then
37801    # Short path failed, file does not exist as specified.
37802    # Try adding .exe or .cmd
37803    if test -f "${new_path}.exe"; then
37804      input_to_shortpath="${new_path}.exe"
37805    elif test -f "${new_path}.cmd"; then
37806      input_to_shortpath="${new_path}.cmd"
37807    else
37808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37809$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37812      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37813    fi
37814  else
37815    input_to_shortpath="$new_path"
37816  fi
37817
37818  # Call helper function which possibly converts this using DOS-style short mode.
37819  # If so, the updated path is stored in $new_path.
37820  new_path="$input_to_shortpath"
37821
37822  input_path="$input_to_shortpath"
37823  # Check if we need to convert this using DOS-style short mode. If the path
37824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37825  # take no chances and rewrite it.
37826  # Note: m4 eats our [], so we need to use [ and ] instead.
37827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37828  if test "x$has_forbidden_chars" != x; then
37829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37833      # Going to short mode and back again did indeed matter. Since short mode is
37834      # case insensitive, let's make it lowercase to improve readability.
37835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37836      # Now convert it back to Unix-style (cygpath)
37837      input_path=`$CYGPATH -u "$shortmode_path"`
37838      new_path="$input_path"
37839    fi
37840  fi
37841
37842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37843  if test "x$test_cygdrive_prefix" = x; then
37844    # As a simple fix, exclude /usr/bin since it's not a real path.
37845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37847      # a path prefixed by /cygdrive for fixpath to work.
37848      new_path="$CYGWIN_ROOT_PATH$input_path"
37849    fi
37850  fi
37851
37852  # remove trailing .exe if any
37853  new_path="${new_path/%.exe/}"
37854
37855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37856
37857  # First separate the path from the arguments. This will split at the first
37858  # space.
37859  complete="$AS"
37860  path="${complete%% *}"
37861  tmp="$complete EOL"
37862  arguments="${tmp#* }"
37863
37864  # Input might be given as Windows format, start by converting to
37865  # unix format.
37866  new_path="$path"
37867
37868  windows_path="$new_path"
37869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37870    unix_path=`$CYGPATH -u "$windows_path"`
37871    new_path="$unix_path"
37872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37874    new_path="$unix_path"
37875  fi
37876
37877
37878  # Now try to locate executable using which
37879  new_path=`$WHICH "$new_path" 2> /dev/null`
37880
37881  if test "x$new_path" = x; then
37882    # Oops. Which didn't find the executable.
37883    # The splitting of arguments from the executable at a space might have been incorrect,
37884    # since paths with space are more likely in Windows. Give it another try with the whole
37885    # argument.
37886    path="$complete"
37887    arguments="EOL"
37888    new_path="$path"
37889
37890  windows_path="$new_path"
37891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37892    unix_path=`$CYGPATH -u "$windows_path"`
37893    new_path="$unix_path"
37894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37896    new_path="$unix_path"
37897  fi
37898
37899
37900    new_path=`$WHICH "$new_path" 2> /dev/null`
37901    # bat and cmd files are not always considered executable in MSYS causing which
37902    # to not find them
37903    if test "x$new_path" = x \
37904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37906      new_path="$path"
37907
37908  windows_path="$new_path"
37909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37910    unix_path=`$CYGPATH -u "$windows_path"`
37911    new_path="$unix_path"
37912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37914    new_path="$unix_path"
37915  fi
37916
37917    fi
37918
37919    if test "x$new_path" = x; then
37920      # It's still not found. Now this is an unrecoverable error.
37921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37922$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37923      has_space=`$ECHO "$complete" | $GREP " "`
37924      if test "x$has_space" != x; then
37925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37927      fi
37928      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37929    fi
37930  fi
37931
37932  # Now new_path has a complete unix path to the binary
37933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37934    # Keep paths in /bin as-is, but remove trailing .exe if any
37935    new_path="${new_path/%.exe/}"
37936    # Do not save /bin paths to all_fixpath_prefixes!
37937  else
37938    # Not in mixed or Windows style, start by that.
37939    new_path=`cmd //c echo $new_path`
37940
37941  input_path="$new_path"
37942  # Check if we need to convert this using DOS-style short mode. If the path
37943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37944  # take no chances and rewrite it.
37945  # Note: m4 eats our [], so we need to use [ and ] instead.
37946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37947  if test "x$has_forbidden_chars" != x; then
37948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37950  fi
37951
37952    # Output is in $new_path
37953
37954  windows_path="$new_path"
37955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37956    unix_path=`$CYGPATH -u "$windows_path"`
37957    new_path="$unix_path"
37958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37960    new_path="$unix_path"
37961  fi
37962
37963    # remove trailing .exe if any
37964    new_path="${new_path/%.exe/}"
37965
37966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37968  fi
37969
37970    else
37971      # We're on a unix platform. Hooray! :)
37972      # First separate the path from the arguments. This will split at the first
37973      # space.
37974      complete="$AS"
37975      path="${complete%% *}"
37976      tmp="$complete EOL"
37977      arguments="${tmp#* }"
37978
37979      # Cannot rely on the command "which" here since it doesn't always work.
37980      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37981      if test -z "$is_absolute_path"; then
37982        # Path to executable is not absolute. Find it.
37983        IFS_save="$IFS"
37984        IFS=:
37985        for p in $PATH; do
37986          if test -f "$p/$path" && test -x "$p/$path"; then
37987            new_path="$p/$path"
37988            break
37989          fi
37990        done
37991        IFS="$IFS_save"
37992      else
37993        # This is an absolute path, we can use it without further modifications.
37994        new_path="$path"
37995      fi
37996
37997      if test "x$new_path" = x; then
37998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37999$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38000        has_space=`$ECHO "$complete" | $GREP " "`
38001        if test "x$has_space" != x; then
38002          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38004        fi
38005        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38006      fi
38007    fi
38008
38009    # Now join together the path and the arguments once again
38010    if test "x$arguments" != xEOL; then
38011      new_complete="$new_path ${arguments% *}"
38012    else
38013      new_complete="$new_path"
38014    fi
38015
38016    if test "x$complete" != "x$new_complete"; then
38017      AS="$new_complete"
38018      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38019$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38020    fi
38021  fi
38022
38023    if test "x$AS" = x; then
38024      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38025    fi
38026  else
38027    # FIXME: is this correct for microsoft?
38028    AS="$CC -c"
38029  fi
38030
38031
38032  #
38033  # Setup the archiver (AR)
38034  #
38035  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38036    # The corresponding ar tool is lib.exe (used to create static libraries)
38037    # Extract the first word of "lib", so it can be a program name with args.
38038set dummy lib; ac_word=$2
38039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38040$as_echo_n "checking for $ac_word... " >&6; }
38041if ${ac_cv_prog_AR+:} false; then :
38042  $as_echo_n "(cached) " >&6
38043else
38044  if test -n "$AR"; then
38045  ac_cv_prog_AR="$AR" # Let the user override the test.
38046else
38047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38048for as_dir in $PATH
38049do
38050  IFS=$as_save_IFS
38051  test -z "$as_dir" && as_dir=.
38052    for ac_exec_ext in '' $ac_executable_extensions; do
38053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38054    ac_cv_prog_AR="lib"
38055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38056    break 2
38057  fi
38058done
38059  done
38060IFS=$as_save_IFS
38061
38062fi
38063fi
38064AR=$ac_cv_prog_AR
38065if test -n "$AR"; then
38066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38067$as_echo "$AR" >&6; }
38068else
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38070$as_echo "no" >&6; }
38071fi
38072
38073
38074  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38075
38076
38077  # Publish this variable in the help.
38078
38079
38080  if [ -z "${AR+x}" ]; then
38081    # The variable is not set by user, try to locate tool using the code snippet
38082    if test -n "$ac_tool_prefix"; then
38083  for ac_prog in ar gcc-ar
38084  do
38085    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38088$as_echo_n "checking for $ac_word... " >&6; }
38089if ${ac_cv_prog_AR+:} false; then :
38090  $as_echo_n "(cached) " >&6
38091else
38092  if test -n "$AR"; then
38093  ac_cv_prog_AR="$AR" # Let the user override the test.
38094else
38095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38096for as_dir in $PATH
38097do
38098  IFS=$as_save_IFS
38099  test -z "$as_dir" && as_dir=.
38100    for ac_exec_ext in '' $ac_executable_extensions; do
38101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38102    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38104    break 2
38105  fi
38106done
38107  done
38108IFS=$as_save_IFS
38109
38110fi
38111fi
38112AR=$ac_cv_prog_AR
38113if test -n "$AR"; then
38114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38115$as_echo "$AR" >&6; }
38116else
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38118$as_echo "no" >&6; }
38119fi
38120
38121
38122    test -n "$AR" && break
38123  done
38124fi
38125if test -z "$AR"; then
38126  ac_ct_AR=$AR
38127  for ac_prog in ar gcc-ar
38128do
38129  # Extract the first word of "$ac_prog", so it can be a program name with args.
38130set dummy $ac_prog; ac_word=$2
38131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38132$as_echo_n "checking for $ac_word... " >&6; }
38133if ${ac_cv_prog_ac_ct_AR+:} false; then :
38134  $as_echo_n "(cached) " >&6
38135else
38136  if test -n "$ac_ct_AR"; then
38137  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38138else
38139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38140for as_dir in $PATH
38141do
38142  IFS=$as_save_IFS
38143  test -z "$as_dir" && as_dir=.
38144    for ac_exec_ext in '' $ac_executable_extensions; do
38145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38146    ac_cv_prog_ac_ct_AR="$ac_prog"
38147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38148    break 2
38149  fi
38150done
38151  done
38152IFS=$as_save_IFS
38153
38154fi
38155fi
38156ac_ct_AR=$ac_cv_prog_ac_ct_AR
38157if test -n "$ac_ct_AR"; then
38158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38159$as_echo "$ac_ct_AR" >&6; }
38160else
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38162$as_echo "no" >&6; }
38163fi
38164
38165
38166  test -n "$ac_ct_AR" && break
38167done
38168
38169  if test "x$ac_ct_AR" = x; then
38170    AR=""
38171  else
38172    case $cross_compiling:$ac_tool_warned in
38173yes:)
38174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38176ac_tool_warned=yes ;;
38177esac
38178    AR=$ac_ct_AR
38179  fi
38180fi
38181
38182  else
38183    # The variable is set, but is it from the command line or the environment?
38184
38185    # Try to remove the string !AR! from our list.
38186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38188      # If it failed, the variable was not from the command line. Ignore it,
38189      # but warn the user (except for BASH, which is always set by the calling BASH).
38190      if test "xAR" != xBASH; then
38191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38192$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38193      fi
38194      # Try to locate tool using the code snippet
38195      if test -n "$ac_tool_prefix"; then
38196  for ac_prog in ar gcc-ar
38197  do
38198    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38199set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38201$as_echo_n "checking for $ac_word... " >&6; }
38202if ${ac_cv_prog_AR+:} false; then :
38203  $as_echo_n "(cached) " >&6
38204else
38205  if test -n "$AR"; then
38206  ac_cv_prog_AR="$AR" # Let the user override the test.
38207else
38208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38209for as_dir in $PATH
38210do
38211  IFS=$as_save_IFS
38212  test -z "$as_dir" && as_dir=.
38213    for ac_exec_ext in '' $ac_executable_extensions; do
38214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38215    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38217    break 2
38218  fi
38219done
38220  done
38221IFS=$as_save_IFS
38222
38223fi
38224fi
38225AR=$ac_cv_prog_AR
38226if test -n "$AR"; then
38227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38228$as_echo "$AR" >&6; }
38229else
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38231$as_echo "no" >&6; }
38232fi
38233
38234
38235    test -n "$AR" && break
38236  done
38237fi
38238if test -z "$AR"; then
38239  ac_ct_AR=$AR
38240  for ac_prog in ar gcc-ar
38241do
38242  # Extract the first word of "$ac_prog", so it can be a program name with args.
38243set dummy $ac_prog; ac_word=$2
38244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38245$as_echo_n "checking for $ac_word... " >&6; }
38246if ${ac_cv_prog_ac_ct_AR+:} false; then :
38247  $as_echo_n "(cached) " >&6
38248else
38249  if test -n "$ac_ct_AR"; then
38250  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38251else
38252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38253for as_dir in $PATH
38254do
38255  IFS=$as_save_IFS
38256  test -z "$as_dir" && as_dir=.
38257    for ac_exec_ext in '' $ac_executable_extensions; do
38258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38259    ac_cv_prog_ac_ct_AR="$ac_prog"
38260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38261    break 2
38262  fi
38263done
38264  done
38265IFS=$as_save_IFS
38266
38267fi
38268fi
38269ac_ct_AR=$ac_cv_prog_ac_ct_AR
38270if test -n "$ac_ct_AR"; then
38271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38272$as_echo "$ac_ct_AR" >&6; }
38273else
38274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38275$as_echo "no" >&6; }
38276fi
38277
38278
38279  test -n "$ac_ct_AR" && break
38280done
38281
38282  if test "x$ac_ct_AR" = x; then
38283    AR=""
38284  else
38285    case $cross_compiling:$ac_tool_warned in
38286yes:)
38287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38289ac_tool_warned=yes ;;
38290esac
38291    AR=$ac_ct_AR
38292  fi
38293fi
38294
38295    else
38296      # If it succeeded, then it was overridden by the user. We will use it
38297      # for the tool.
38298
38299      # First remove it from the list of overridden variables, so we can test
38300      # for unknown variables in the end.
38301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38302
38303      # Check if we try to supply an empty value
38304      if test "x$AR" = x; then
38305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38306$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38308$as_echo_n "checking for AR... " >&6; }
38309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38310$as_echo "disabled" >&6; }
38311      else
38312        # Check if the provided tool contains a complete path.
38313        tool_specified="$AR"
38314        tool_basename="${tool_specified##*/}"
38315        if test "x$tool_basename" = "x$tool_specified"; then
38316          # A command without a complete path is provided, search $PATH.
38317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38318$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38319          # Extract the first word of "$tool_basename", so it can be a program name with args.
38320set dummy $tool_basename; ac_word=$2
38321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38322$as_echo_n "checking for $ac_word... " >&6; }
38323if ${ac_cv_path_AR+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  case $AR in
38327  [\\/]* | ?:[\\/]*)
38328  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38329  ;;
38330  *)
38331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38332for as_dir in $PATH
38333do
38334  IFS=$as_save_IFS
38335  test -z "$as_dir" && as_dir=.
38336    for ac_exec_ext in '' $ac_executable_extensions; do
38337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38338    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38340    break 2
38341  fi
38342done
38343  done
38344IFS=$as_save_IFS
38345
38346  ;;
38347esac
38348fi
38349AR=$ac_cv_path_AR
38350if test -n "$AR"; then
38351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38352$as_echo "$AR" >&6; }
38353else
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38355$as_echo "no" >&6; }
38356fi
38357
38358
38359          if test "x$AR" = x; then
38360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38361          fi
38362        else
38363          # Otherwise we believe it is a complete path. Use it as it is.
38364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38365$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38367$as_echo_n "checking for AR... " >&6; }
38368          if test ! -x "$tool_specified"; then
38369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38370$as_echo "not found" >&6; }
38371            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38372          fi
38373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38374$as_echo "$tool_specified" >&6; }
38375        fi
38376      fi
38377    fi
38378
38379  fi
38380
38381
38382  else
38383
38384
38385  # Publish this variable in the help.
38386
38387
38388  if [ -z "${AR+x}" ]; then
38389    # The variable is not set by user, try to locate tool using the code snippet
38390    if test -n "$ac_tool_prefix"; then
38391  for ac_prog in ar
38392  do
38393    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38396$as_echo_n "checking for $ac_word... " >&6; }
38397if ${ac_cv_prog_AR+:} false; then :
38398  $as_echo_n "(cached) " >&6
38399else
38400  if test -n "$AR"; then
38401  ac_cv_prog_AR="$AR" # Let the user override the test.
38402else
38403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38404for as_dir in $PATH
38405do
38406  IFS=$as_save_IFS
38407  test -z "$as_dir" && as_dir=.
38408    for ac_exec_ext in '' $ac_executable_extensions; do
38409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38410    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38412    break 2
38413  fi
38414done
38415  done
38416IFS=$as_save_IFS
38417
38418fi
38419fi
38420AR=$ac_cv_prog_AR
38421if test -n "$AR"; then
38422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38423$as_echo "$AR" >&6; }
38424else
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38426$as_echo "no" >&6; }
38427fi
38428
38429
38430    test -n "$AR" && break
38431  done
38432fi
38433if test -z "$AR"; then
38434  ac_ct_AR=$AR
38435  for ac_prog in ar
38436do
38437  # Extract the first word of "$ac_prog", so it can be a program name with args.
38438set dummy $ac_prog; ac_word=$2
38439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38440$as_echo_n "checking for $ac_word... " >&6; }
38441if ${ac_cv_prog_ac_ct_AR+:} false; then :
38442  $as_echo_n "(cached) " >&6
38443else
38444  if test -n "$ac_ct_AR"; then
38445  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38446else
38447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38448for as_dir in $PATH
38449do
38450  IFS=$as_save_IFS
38451  test -z "$as_dir" && as_dir=.
38452    for ac_exec_ext in '' $ac_executable_extensions; do
38453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38454    ac_cv_prog_ac_ct_AR="$ac_prog"
38455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38456    break 2
38457  fi
38458done
38459  done
38460IFS=$as_save_IFS
38461
38462fi
38463fi
38464ac_ct_AR=$ac_cv_prog_ac_ct_AR
38465if test -n "$ac_ct_AR"; then
38466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38467$as_echo "$ac_ct_AR" >&6; }
38468else
38469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38470$as_echo "no" >&6; }
38471fi
38472
38473
38474  test -n "$ac_ct_AR" && break
38475done
38476
38477  if test "x$ac_ct_AR" = x; then
38478    AR=""
38479  else
38480    case $cross_compiling:$ac_tool_warned in
38481yes:)
38482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38484ac_tool_warned=yes ;;
38485esac
38486    AR=$ac_ct_AR
38487  fi
38488fi
38489
38490  else
38491    # The variable is set, but is it from the command line or the environment?
38492
38493    # Try to remove the string !AR! from our list.
38494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38496      # If it failed, the variable was not from the command line. Ignore it,
38497      # but warn the user (except for BASH, which is always set by the calling BASH).
38498      if test "xAR" != xBASH; then
38499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38500$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38501      fi
38502      # Try to locate tool using the code snippet
38503      if test -n "$ac_tool_prefix"; then
38504  for ac_prog in ar
38505  do
38506    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38507set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38509$as_echo_n "checking for $ac_word... " >&6; }
38510if ${ac_cv_prog_AR+:} false; then :
38511  $as_echo_n "(cached) " >&6
38512else
38513  if test -n "$AR"; then
38514  ac_cv_prog_AR="$AR" # Let the user override the test.
38515else
38516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38517for as_dir in $PATH
38518do
38519  IFS=$as_save_IFS
38520  test -z "$as_dir" && as_dir=.
38521    for ac_exec_ext in '' $ac_executable_extensions; do
38522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38523    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38525    break 2
38526  fi
38527done
38528  done
38529IFS=$as_save_IFS
38530
38531fi
38532fi
38533AR=$ac_cv_prog_AR
38534if test -n "$AR"; then
38535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38536$as_echo "$AR" >&6; }
38537else
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38539$as_echo "no" >&6; }
38540fi
38541
38542
38543    test -n "$AR" && break
38544  done
38545fi
38546if test -z "$AR"; then
38547  ac_ct_AR=$AR
38548  for ac_prog in ar
38549do
38550  # Extract the first word of "$ac_prog", so it can be a program name with args.
38551set dummy $ac_prog; ac_word=$2
38552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38553$as_echo_n "checking for $ac_word... " >&6; }
38554if ${ac_cv_prog_ac_ct_AR+:} false; then :
38555  $as_echo_n "(cached) " >&6
38556else
38557  if test -n "$ac_ct_AR"; then
38558  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38559else
38560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38561for as_dir in $PATH
38562do
38563  IFS=$as_save_IFS
38564  test -z "$as_dir" && as_dir=.
38565    for ac_exec_ext in '' $ac_executable_extensions; do
38566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38567    ac_cv_prog_ac_ct_AR="$ac_prog"
38568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38569    break 2
38570  fi
38571done
38572  done
38573IFS=$as_save_IFS
38574
38575fi
38576fi
38577ac_ct_AR=$ac_cv_prog_ac_ct_AR
38578if test -n "$ac_ct_AR"; then
38579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38580$as_echo "$ac_ct_AR" >&6; }
38581else
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38583$as_echo "no" >&6; }
38584fi
38585
38586
38587  test -n "$ac_ct_AR" && break
38588done
38589
38590  if test "x$ac_ct_AR" = x; then
38591    AR=""
38592  else
38593    case $cross_compiling:$ac_tool_warned in
38594yes:)
38595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38597ac_tool_warned=yes ;;
38598esac
38599    AR=$ac_ct_AR
38600  fi
38601fi
38602
38603    else
38604      # If it succeeded, then it was overridden by the user. We will use it
38605      # for the tool.
38606
38607      # First remove it from the list of overridden variables, so we can test
38608      # for unknown variables in the end.
38609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38610
38611      # Check if we try to supply an empty value
38612      if test "x$AR" = x; then
38613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38614$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38616$as_echo_n "checking for AR... " >&6; }
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38618$as_echo "disabled" >&6; }
38619      else
38620        # Check if the provided tool contains a complete path.
38621        tool_specified="$AR"
38622        tool_basename="${tool_specified##*/}"
38623        if test "x$tool_basename" = "x$tool_specified"; then
38624          # A command without a complete path is provided, search $PATH.
38625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38626$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38627          # Extract the first word of "$tool_basename", so it can be a program name with args.
38628set dummy $tool_basename; ac_word=$2
38629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38630$as_echo_n "checking for $ac_word... " >&6; }
38631if ${ac_cv_path_AR+:} false; then :
38632  $as_echo_n "(cached) " >&6
38633else
38634  case $AR in
38635  [\\/]* | ?:[\\/]*)
38636  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38637  ;;
38638  *)
38639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38640for as_dir in $PATH
38641do
38642  IFS=$as_save_IFS
38643  test -z "$as_dir" && as_dir=.
38644    for ac_exec_ext in '' $ac_executable_extensions; do
38645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38646    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38648    break 2
38649  fi
38650done
38651  done
38652IFS=$as_save_IFS
38653
38654  ;;
38655esac
38656fi
38657AR=$ac_cv_path_AR
38658if test -n "$AR"; then
38659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38660$as_echo "$AR" >&6; }
38661else
38662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38663$as_echo "no" >&6; }
38664fi
38665
38666
38667          if test "x$AR" = x; then
38668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38669          fi
38670        else
38671          # Otherwise we believe it is a complete path. Use it as it is.
38672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38673$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38675$as_echo_n "checking for AR... " >&6; }
38676          if test ! -x "$tool_specified"; then
38677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38678$as_echo "not found" >&6; }
38679            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38680          fi
38681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38682$as_echo "$tool_specified" >&6; }
38683        fi
38684      fi
38685    fi
38686
38687  fi
38688
38689
38690  fi
38691
38692  # Only process if variable expands to non-empty
38693
38694  if test "x$AR" != x; then
38695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38696
38697  # First separate the path from the arguments. This will split at the first
38698  # space.
38699  complete="$AR"
38700  path="${complete%% *}"
38701  tmp="$complete EOL"
38702  arguments="${tmp#* }"
38703
38704  # Input might be given as Windows format, start by converting to
38705  # unix format.
38706  new_path=`$CYGPATH -u "$path"`
38707
38708  # Now try to locate executable using which
38709  new_path=`$WHICH "$new_path" 2> /dev/null`
38710  # bat and cmd files are not always considered executable in cygwin causing which
38711  # to not find them
38712  if test "x$new_path" = x \
38713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38715    new_path=`$CYGPATH -u "$path"`
38716  fi
38717  if test "x$new_path" = x; then
38718    # Oops. Which didn't find the executable.
38719    # The splitting of arguments from the executable at a space might have been incorrect,
38720    # since paths with space are more likely in Windows. Give it another try with the whole
38721    # argument.
38722    path="$complete"
38723    arguments="EOL"
38724    new_path=`$CYGPATH -u "$path"`
38725    new_path=`$WHICH "$new_path" 2> /dev/null`
38726    # bat and cmd files are not always considered executable in cygwin causing which
38727    # to not find them
38728    if test "x$new_path" = x \
38729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38731      new_path=`$CYGPATH -u "$path"`
38732    fi
38733    if test "x$new_path" = x; then
38734      # It's still not found. Now this is an unrecoverable error.
38735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38736$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38737      has_space=`$ECHO "$complete" | $GREP " "`
38738      if test "x$has_space" != x; then
38739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38741      fi
38742      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38743    fi
38744  fi
38745
38746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38749  # "foo.exe" is OK but "foo" is an error.
38750  #
38751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38752  # It is also a way to make sure we got the proper file name for the real test later on.
38753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38754  if test "x$test_shortpath" = x; then
38755    # Short path failed, file does not exist as specified.
38756    # Try adding .exe or .cmd
38757    if test -f "${new_path}.exe"; then
38758      input_to_shortpath="${new_path}.exe"
38759    elif test -f "${new_path}.cmd"; then
38760      input_to_shortpath="${new_path}.cmd"
38761    else
38762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38763$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38766      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38767    fi
38768  else
38769    input_to_shortpath="$new_path"
38770  fi
38771
38772  # Call helper function which possibly converts this using DOS-style short mode.
38773  # If so, the updated path is stored in $new_path.
38774  new_path="$input_to_shortpath"
38775
38776  input_path="$input_to_shortpath"
38777  # Check if we need to convert this using DOS-style short mode. If the path
38778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38779  # take no chances and rewrite it.
38780  # Note: m4 eats our [], so we need to use [ and ] instead.
38781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38782  if test "x$has_forbidden_chars" != x; then
38783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38787      # Going to short mode and back again did indeed matter. Since short mode is
38788      # case insensitive, let's make it lowercase to improve readability.
38789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38790      # Now convert it back to Unix-style (cygpath)
38791      input_path=`$CYGPATH -u "$shortmode_path"`
38792      new_path="$input_path"
38793    fi
38794  fi
38795
38796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38797  if test "x$test_cygdrive_prefix" = x; then
38798    # As a simple fix, exclude /usr/bin since it's not a real path.
38799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38801      # a path prefixed by /cygdrive for fixpath to work.
38802      new_path="$CYGWIN_ROOT_PATH$input_path"
38803    fi
38804  fi
38805
38806  # remove trailing .exe if any
38807  new_path="${new_path/%.exe/}"
38808
38809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38810
38811  # First separate the path from the arguments. This will split at the first
38812  # space.
38813  complete="$AR"
38814  path="${complete%% *}"
38815  tmp="$complete EOL"
38816  arguments="${tmp#* }"
38817
38818  # Input might be given as Windows format, start by converting to
38819  # unix format.
38820  new_path="$path"
38821
38822  windows_path="$new_path"
38823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38824    unix_path=`$CYGPATH -u "$windows_path"`
38825    new_path="$unix_path"
38826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38828    new_path="$unix_path"
38829  fi
38830
38831
38832  # Now try to locate executable using which
38833  new_path=`$WHICH "$new_path" 2> /dev/null`
38834
38835  if test "x$new_path" = x; then
38836    # Oops. Which didn't find the executable.
38837    # The splitting of arguments from the executable at a space might have been incorrect,
38838    # since paths with space are more likely in Windows. Give it another try with the whole
38839    # argument.
38840    path="$complete"
38841    arguments="EOL"
38842    new_path="$path"
38843
38844  windows_path="$new_path"
38845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38846    unix_path=`$CYGPATH -u "$windows_path"`
38847    new_path="$unix_path"
38848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38850    new_path="$unix_path"
38851  fi
38852
38853
38854    new_path=`$WHICH "$new_path" 2> /dev/null`
38855    # bat and cmd files are not always considered executable in MSYS causing which
38856    # to not find them
38857    if test "x$new_path" = x \
38858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38860      new_path="$path"
38861
38862  windows_path="$new_path"
38863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38864    unix_path=`$CYGPATH -u "$windows_path"`
38865    new_path="$unix_path"
38866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38868    new_path="$unix_path"
38869  fi
38870
38871    fi
38872
38873    if test "x$new_path" = x; then
38874      # It's still not found. Now this is an unrecoverable error.
38875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38876$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38877      has_space=`$ECHO "$complete" | $GREP " "`
38878      if test "x$has_space" != x; then
38879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38881      fi
38882      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38883    fi
38884  fi
38885
38886  # Now new_path has a complete unix path to the binary
38887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38888    # Keep paths in /bin as-is, but remove trailing .exe if any
38889    new_path="${new_path/%.exe/}"
38890    # Do not save /bin paths to all_fixpath_prefixes!
38891  else
38892    # Not in mixed or Windows style, start by that.
38893    new_path=`cmd //c echo $new_path`
38894
38895  input_path="$new_path"
38896  # Check if we need to convert this using DOS-style short mode. If the path
38897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38898  # take no chances and rewrite it.
38899  # Note: m4 eats our [], so we need to use [ and ] instead.
38900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38901  if test "x$has_forbidden_chars" != x; then
38902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38904  fi
38905
38906    # Output is in $new_path
38907
38908  windows_path="$new_path"
38909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38910    unix_path=`$CYGPATH -u "$windows_path"`
38911    new_path="$unix_path"
38912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38914    new_path="$unix_path"
38915  fi
38916
38917    # remove trailing .exe if any
38918    new_path="${new_path/%.exe/}"
38919
38920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38922  fi
38923
38924    else
38925      # We're on a unix platform. Hooray! :)
38926      # First separate the path from the arguments. This will split at the first
38927      # space.
38928      complete="$AR"
38929      path="${complete%% *}"
38930      tmp="$complete EOL"
38931      arguments="${tmp#* }"
38932
38933      # Cannot rely on the command "which" here since it doesn't always work.
38934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38935      if test -z "$is_absolute_path"; then
38936        # Path to executable is not absolute. Find it.
38937        IFS_save="$IFS"
38938        IFS=:
38939        for p in $PATH; do
38940          if test -f "$p/$path" && test -x "$p/$path"; then
38941            new_path="$p/$path"
38942            break
38943          fi
38944        done
38945        IFS="$IFS_save"
38946      else
38947        # This is an absolute path, we can use it without further modifications.
38948        new_path="$path"
38949      fi
38950
38951      if test "x$new_path" = x; then
38952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38953$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38954        has_space=`$ECHO "$complete" | $GREP " "`
38955        if test "x$has_space" != x; then
38956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38958        fi
38959        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38960      fi
38961    fi
38962
38963    # Now join together the path and the arguments once again
38964    if test "x$arguments" != xEOL; then
38965      new_complete="$new_path ${arguments% *}"
38966    else
38967      new_complete="$new_path"
38968    fi
38969
38970    if test "x$complete" != "x$new_complete"; then
38971      AR="$new_complete"
38972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38973$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38974    fi
38975  fi
38976
38977
38978
38979  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38980
38981
38982  # Publish this variable in the help.
38983
38984
38985  if [ -z "${LIPO+x}" ]; then
38986    # The variable is not set by user, try to locate tool using the code snippet
38987    for ac_prog in lipo
38988do
38989  # Extract the first word of "$ac_prog", so it can be a program name with args.
38990set dummy $ac_prog; ac_word=$2
38991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38992$as_echo_n "checking for $ac_word... " >&6; }
38993if ${ac_cv_path_LIPO+:} false; then :
38994  $as_echo_n "(cached) " >&6
38995else
38996  case $LIPO in
38997  [\\/]* | ?:[\\/]*)
38998  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38999  ;;
39000  *)
39001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39002for as_dir in $PATH
39003do
39004  IFS=$as_save_IFS
39005  test -z "$as_dir" && as_dir=.
39006    for ac_exec_ext in '' $ac_executable_extensions; do
39007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39008    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39010    break 2
39011  fi
39012done
39013  done
39014IFS=$as_save_IFS
39015
39016  ;;
39017esac
39018fi
39019LIPO=$ac_cv_path_LIPO
39020if test -n "$LIPO"; then
39021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39022$as_echo "$LIPO" >&6; }
39023else
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025$as_echo "no" >&6; }
39026fi
39027
39028
39029  test -n "$LIPO" && break
39030done
39031
39032  else
39033    # The variable is set, but is it from the command line or the environment?
39034
39035    # Try to remove the string !LIPO! from our list.
39036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39038      # If it failed, the variable was not from the command line. Ignore it,
39039      # but warn the user (except for BASH, which is always set by the calling BASH).
39040      if test "xLIPO" != xBASH; then
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39042$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39043      fi
39044      # Try to locate tool using the code snippet
39045      for ac_prog in lipo
39046do
39047  # Extract the first word of "$ac_prog", so it can be a program name with args.
39048set dummy $ac_prog; ac_word=$2
39049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39050$as_echo_n "checking for $ac_word... " >&6; }
39051if ${ac_cv_path_LIPO+:} false; then :
39052  $as_echo_n "(cached) " >&6
39053else
39054  case $LIPO in
39055  [\\/]* | ?:[\\/]*)
39056  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39057  ;;
39058  *)
39059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39060for as_dir in $PATH
39061do
39062  IFS=$as_save_IFS
39063  test -z "$as_dir" && as_dir=.
39064    for ac_exec_ext in '' $ac_executable_extensions; do
39065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39066    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39068    break 2
39069  fi
39070done
39071  done
39072IFS=$as_save_IFS
39073
39074  ;;
39075esac
39076fi
39077LIPO=$ac_cv_path_LIPO
39078if test -n "$LIPO"; then
39079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39080$as_echo "$LIPO" >&6; }
39081else
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39083$as_echo "no" >&6; }
39084fi
39085
39086
39087  test -n "$LIPO" && break
39088done
39089
39090    else
39091      # If it succeeded, then it was overridden by the user. We will use it
39092      # for the tool.
39093
39094      # First remove it from the list of overridden variables, so we can test
39095      # for unknown variables in the end.
39096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39097
39098      # Check if we try to supply an empty value
39099      if test "x$LIPO" = x; then
39100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39101$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39103$as_echo_n "checking for LIPO... " >&6; }
39104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39105$as_echo "disabled" >&6; }
39106      else
39107        # Check if the provided tool contains a complete path.
39108        tool_specified="$LIPO"
39109        tool_basename="${tool_specified##*/}"
39110        if test "x$tool_basename" = "x$tool_specified"; then
39111          # A command without a complete path is provided, search $PATH.
39112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39113$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39114          # Extract the first word of "$tool_basename", so it can be a program name with args.
39115set dummy $tool_basename; ac_word=$2
39116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39117$as_echo_n "checking for $ac_word... " >&6; }
39118if ${ac_cv_path_LIPO+:} false; then :
39119  $as_echo_n "(cached) " >&6
39120else
39121  case $LIPO in
39122  [\\/]* | ?:[\\/]*)
39123  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39124  ;;
39125  *)
39126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39127for as_dir in $PATH
39128do
39129  IFS=$as_save_IFS
39130  test -z "$as_dir" && as_dir=.
39131    for ac_exec_ext in '' $ac_executable_extensions; do
39132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39133    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39135    break 2
39136  fi
39137done
39138  done
39139IFS=$as_save_IFS
39140
39141  ;;
39142esac
39143fi
39144LIPO=$ac_cv_path_LIPO
39145if test -n "$LIPO"; then
39146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39147$as_echo "$LIPO" >&6; }
39148else
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39150$as_echo "no" >&6; }
39151fi
39152
39153
39154          if test "x$LIPO" = x; then
39155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39156          fi
39157        else
39158          # Otherwise we believe it is a complete path. Use it as it is.
39159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39160$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39162$as_echo_n "checking for LIPO... " >&6; }
39163          if test ! -x "$tool_specified"; then
39164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39165$as_echo "not found" >&6; }
39166            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39167          fi
39168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39169$as_echo "$tool_specified" >&6; }
39170        fi
39171      fi
39172    fi
39173
39174  fi
39175
39176
39177
39178  # Only process if variable expands to non-empty
39179
39180  if test "x$LIPO" != x; then
39181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39182
39183  # First separate the path from the arguments. This will split at the first
39184  # space.
39185  complete="$LIPO"
39186  path="${complete%% *}"
39187  tmp="$complete EOL"
39188  arguments="${tmp#* }"
39189
39190  # Input might be given as Windows format, start by converting to
39191  # unix format.
39192  new_path=`$CYGPATH -u "$path"`
39193
39194  # Now try to locate executable using which
39195  new_path=`$WHICH "$new_path" 2> /dev/null`
39196  # bat and cmd files are not always considered executable in cygwin causing which
39197  # to not find them
39198  if test "x$new_path" = x \
39199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39201    new_path=`$CYGPATH -u "$path"`
39202  fi
39203  if test "x$new_path" = x; then
39204    # Oops. Which didn't find the executable.
39205    # The splitting of arguments from the executable at a space might have been incorrect,
39206    # since paths with space are more likely in Windows. Give it another try with the whole
39207    # argument.
39208    path="$complete"
39209    arguments="EOL"
39210    new_path=`$CYGPATH -u "$path"`
39211    new_path=`$WHICH "$new_path" 2> /dev/null`
39212    # bat and cmd files are not always considered executable in cygwin causing which
39213    # to not find them
39214    if test "x$new_path" = x \
39215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39217      new_path=`$CYGPATH -u "$path"`
39218    fi
39219    if test "x$new_path" = x; then
39220      # It's still not found. Now this is an unrecoverable error.
39221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39222$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39223      has_space=`$ECHO "$complete" | $GREP " "`
39224      if test "x$has_space" != x; then
39225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39227      fi
39228      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39229    fi
39230  fi
39231
39232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39235  # "foo.exe" is OK but "foo" is an error.
39236  #
39237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39238  # It is also a way to make sure we got the proper file name for the real test later on.
39239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39240  if test "x$test_shortpath" = x; then
39241    # Short path failed, file does not exist as specified.
39242    # Try adding .exe or .cmd
39243    if test -f "${new_path}.exe"; then
39244      input_to_shortpath="${new_path}.exe"
39245    elif test -f "${new_path}.cmd"; then
39246      input_to_shortpath="${new_path}.cmd"
39247    else
39248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39249$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39252      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39253    fi
39254  else
39255    input_to_shortpath="$new_path"
39256  fi
39257
39258  # Call helper function which possibly converts this using DOS-style short mode.
39259  # If so, the updated path is stored in $new_path.
39260  new_path="$input_to_shortpath"
39261
39262  input_path="$input_to_shortpath"
39263  # Check if we need to convert this using DOS-style short mode. If the path
39264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39265  # take no chances and rewrite it.
39266  # Note: m4 eats our [], so we need to use [ and ] instead.
39267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39268  if test "x$has_forbidden_chars" != x; then
39269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39273      # Going to short mode and back again did indeed matter. Since short mode is
39274      # case insensitive, let's make it lowercase to improve readability.
39275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39276      # Now convert it back to Unix-style (cygpath)
39277      input_path=`$CYGPATH -u "$shortmode_path"`
39278      new_path="$input_path"
39279    fi
39280  fi
39281
39282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39283  if test "x$test_cygdrive_prefix" = x; then
39284    # As a simple fix, exclude /usr/bin since it's not a real path.
39285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39287      # a path prefixed by /cygdrive for fixpath to work.
39288      new_path="$CYGWIN_ROOT_PATH$input_path"
39289    fi
39290  fi
39291
39292  # remove trailing .exe if any
39293  new_path="${new_path/%.exe/}"
39294
39295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39296
39297  # First separate the path from the arguments. This will split at the first
39298  # space.
39299  complete="$LIPO"
39300  path="${complete%% *}"
39301  tmp="$complete EOL"
39302  arguments="${tmp#* }"
39303
39304  # Input might be given as Windows format, start by converting to
39305  # unix format.
39306  new_path="$path"
39307
39308  windows_path="$new_path"
39309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39310    unix_path=`$CYGPATH -u "$windows_path"`
39311    new_path="$unix_path"
39312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39314    new_path="$unix_path"
39315  fi
39316
39317
39318  # Now try to locate executable using which
39319  new_path=`$WHICH "$new_path" 2> /dev/null`
39320
39321  if test "x$new_path" = x; then
39322    # Oops. Which didn't find the executable.
39323    # The splitting of arguments from the executable at a space might have been incorrect,
39324    # since paths with space are more likely in Windows. Give it another try with the whole
39325    # argument.
39326    path="$complete"
39327    arguments="EOL"
39328    new_path="$path"
39329
39330  windows_path="$new_path"
39331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39332    unix_path=`$CYGPATH -u "$windows_path"`
39333    new_path="$unix_path"
39334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39336    new_path="$unix_path"
39337  fi
39338
39339
39340    new_path=`$WHICH "$new_path" 2> /dev/null`
39341    # bat and cmd files are not always considered executable in MSYS causing which
39342    # to not find them
39343    if test "x$new_path" = x \
39344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39346      new_path="$path"
39347
39348  windows_path="$new_path"
39349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39350    unix_path=`$CYGPATH -u "$windows_path"`
39351    new_path="$unix_path"
39352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39354    new_path="$unix_path"
39355  fi
39356
39357    fi
39358
39359    if test "x$new_path" = x; then
39360      # It's still not found. Now this is an unrecoverable error.
39361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39362$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39363      has_space=`$ECHO "$complete" | $GREP " "`
39364      if test "x$has_space" != x; then
39365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39367      fi
39368      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39369    fi
39370  fi
39371
39372  # Now new_path has a complete unix path to the binary
39373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39374    # Keep paths in /bin as-is, but remove trailing .exe if any
39375    new_path="${new_path/%.exe/}"
39376    # Do not save /bin paths to all_fixpath_prefixes!
39377  else
39378    # Not in mixed or Windows style, start by that.
39379    new_path=`cmd //c echo $new_path`
39380
39381  input_path="$new_path"
39382  # Check if we need to convert this using DOS-style short mode. If the path
39383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39384  # take no chances and rewrite it.
39385  # Note: m4 eats our [], so we need to use [ and ] instead.
39386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39387  if test "x$has_forbidden_chars" != x; then
39388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39390  fi
39391
39392    # Output is in $new_path
39393
39394  windows_path="$new_path"
39395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39396    unix_path=`$CYGPATH -u "$windows_path"`
39397    new_path="$unix_path"
39398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39400    new_path="$unix_path"
39401  fi
39402
39403    # remove trailing .exe if any
39404    new_path="${new_path/%.exe/}"
39405
39406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39408  fi
39409
39410    else
39411      # We're on a unix platform. Hooray! :)
39412      # First separate the path from the arguments. This will split at the first
39413      # space.
39414      complete="$LIPO"
39415      path="${complete%% *}"
39416      tmp="$complete EOL"
39417      arguments="${tmp#* }"
39418
39419      # Cannot rely on the command "which" here since it doesn't always work.
39420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39421      if test -z "$is_absolute_path"; then
39422        # Path to executable is not absolute. Find it.
39423        IFS_save="$IFS"
39424        IFS=:
39425        for p in $PATH; do
39426          if test -f "$p/$path" && test -x "$p/$path"; then
39427            new_path="$p/$path"
39428            break
39429          fi
39430        done
39431        IFS="$IFS_save"
39432      else
39433        # This is an absolute path, we can use it without further modifications.
39434        new_path="$path"
39435      fi
39436
39437      if test "x$new_path" = x; then
39438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39439$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39440        has_space=`$ECHO "$complete" | $GREP " "`
39441        if test "x$has_space" != x; then
39442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39444        fi
39445        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39446      fi
39447    fi
39448
39449    # Now join together the path and the arguments once again
39450    if test "x$arguments" != xEOL; then
39451      new_complete="$new_path ${arguments% *}"
39452    else
39453      new_complete="$new_path"
39454    fi
39455
39456    if test "x$complete" != "x$new_complete"; then
39457      LIPO="$new_complete"
39458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39459$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39460    fi
39461  fi
39462
39463  fi
39464
39465  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39466    # Extract the first word of "mt", so it can be a program name with args.
39467set dummy mt; ac_word=$2
39468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39469$as_echo_n "checking for $ac_word... " >&6; }
39470if ${ac_cv_prog_MT+:} false; then :
39471  $as_echo_n "(cached) " >&6
39472else
39473  if test -n "$MT"; then
39474  ac_cv_prog_MT="$MT" # Let the user override the test.
39475else
39476  ac_prog_rejected=no
39477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39478for as_dir in $PATH
39479do
39480  IFS=$as_save_IFS
39481  test -z "$as_dir" && as_dir=.
39482    for ac_exec_ext in '' $ac_executable_extensions; do
39483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39484    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39485       ac_prog_rejected=yes
39486       continue
39487     fi
39488    ac_cv_prog_MT="mt"
39489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39490    break 2
39491  fi
39492done
39493  done
39494IFS=$as_save_IFS
39495
39496if test $ac_prog_rejected = yes; then
39497  # We found a bogon in the path, so make sure we never use it.
39498  set dummy $ac_cv_prog_MT
39499  shift
39500  if test $# != 0; then
39501    # We chose a different compiler from the bogus one.
39502    # However, it has the same basename, so the bogon will be chosen
39503    # first if we set MT to just the basename; use the full file name.
39504    shift
39505    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39506  fi
39507fi
39508fi
39509fi
39510MT=$ac_cv_prog_MT
39511if test -n "$MT"; then
39512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39513$as_echo "$MT" >&6; }
39514else
39515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39516$as_echo "no" >&6; }
39517fi
39518
39519
39520
39521  # Only process if variable expands to non-empty
39522
39523  if test "x$MT" != x; then
39524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39525
39526  # First separate the path from the arguments. This will split at the first
39527  # space.
39528  complete="$MT"
39529  path="${complete%% *}"
39530  tmp="$complete EOL"
39531  arguments="${tmp#* }"
39532
39533  # Input might be given as Windows format, start by converting to
39534  # unix format.
39535  new_path=`$CYGPATH -u "$path"`
39536
39537  # Now try to locate executable using which
39538  new_path=`$WHICH "$new_path" 2> /dev/null`
39539  # bat and cmd files are not always considered executable in cygwin causing which
39540  # to not find them
39541  if test "x$new_path" = x \
39542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39544    new_path=`$CYGPATH -u "$path"`
39545  fi
39546  if test "x$new_path" = x; then
39547    # Oops. Which didn't find the executable.
39548    # The splitting of arguments from the executable at a space might have been incorrect,
39549    # since paths with space are more likely in Windows. Give it another try with the whole
39550    # argument.
39551    path="$complete"
39552    arguments="EOL"
39553    new_path=`$CYGPATH -u "$path"`
39554    new_path=`$WHICH "$new_path" 2> /dev/null`
39555    # bat and cmd files are not always considered executable in cygwin causing which
39556    # to not find them
39557    if test "x$new_path" = x \
39558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39560      new_path=`$CYGPATH -u "$path"`
39561    fi
39562    if test "x$new_path" = x; then
39563      # It's still not found. Now this is an unrecoverable error.
39564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39565$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39566      has_space=`$ECHO "$complete" | $GREP " "`
39567      if test "x$has_space" != x; then
39568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39570      fi
39571      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39572    fi
39573  fi
39574
39575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39578  # "foo.exe" is OK but "foo" is an error.
39579  #
39580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39581  # It is also a way to make sure we got the proper file name for the real test later on.
39582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39583  if test "x$test_shortpath" = x; then
39584    # Short path failed, file does not exist as specified.
39585    # Try adding .exe or .cmd
39586    if test -f "${new_path}.exe"; then
39587      input_to_shortpath="${new_path}.exe"
39588    elif test -f "${new_path}.cmd"; then
39589      input_to_shortpath="${new_path}.cmd"
39590    else
39591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39592$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39595      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39596    fi
39597  else
39598    input_to_shortpath="$new_path"
39599  fi
39600
39601  # Call helper function which possibly converts this using DOS-style short mode.
39602  # If so, the updated path is stored in $new_path.
39603  new_path="$input_to_shortpath"
39604
39605  input_path="$input_to_shortpath"
39606  # Check if we need to convert this using DOS-style short mode. If the path
39607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39608  # take no chances and rewrite it.
39609  # Note: m4 eats our [], so we need to use [ and ] instead.
39610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39611  if test "x$has_forbidden_chars" != x; then
39612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39616      # Going to short mode and back again did indeed matter. Since short mode is
39617      # case insensitive, let's make it lowercase to improve readability.
39618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39619      # Now convert it back to Unix-style (cygpath)
39620      input_path=`$CYGPATH -u "$shortmode_path"`
39621      new_path="$input_path"
39622    fi
39623  fi
39624
39625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39626  if test "x$test_cygdrive_prefix" = x; then
39627    # As a simple fix, exclude /usr/bin since it's not a real path.
39628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39630      # a path prefixed by /cygdrive for fixpath to work.
39631      new_path="$CYGWIN_ROOT_PATH$input_path"
39632    fi
39633  fi
39634
39635  # remove trailing .exe if any
39636  new_path="${new_path/%.exe/}"
39637
39638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39639
39640  # First separate the path from the arguments. This will split at the first
39641  # space.
39642  complete="$MT"
39643  path="${complete%% *}"
39644  tmp="$complete EOL"
39645  arguments="${tmp#* }"
39646
39647  # Input might be given as Windows format, start by converting to
39648  # unix format.
39649  new_path="$path"
39650
39651  windows_path="$new_path"
39652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39653    unix_path=`$CYGPATH -u "$windows_path"`
39654    new_path="$unix_path"
39655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39657    new_path="$unix_path"
39658  fi
39659
39660
39661  # Now try to locate executable using which
39662  new_path=`$WHICH "$new_path" 2> /dev/null`
39663
39664  if test "x$new_path" = x; then
39665    # Oops. Which didn't find the executable.
39666    # The splitting of arguments from the executable at a space might have been incorrect,
39667    # since paths with space are more likely in Windows. Give it another try with the whole
39668    # argument.
39669    path="$complete"
39670    arguments="EOL"
39671    new_path="$path"
39672
39673  windows_path="$new_path"
39674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39675    unix_path=`$CYGPATH -u "$windows_path"`
39676    new_path="$unix_path"
39677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39679    new_path="$unix_path"
39680  fi
39681
39682
39683    new_path=`$WHICH "$new_path" 2> /dev/null`
39684    # bat and cmd files are not always considered executable in MSYS causing which
39685    # to not find them
39686    if test "x$new_path" = x \
39687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39689      new_path="$path"
39690
39691  windows_path="$new_path"
39692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39693    unix_path=`$CYGPATH -u "$windows_path"`
39694    new_path="$unix_path"
39695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39697    new_path="$unix_path"
39698  fi
39699
39700    fi
39701
39702    if test "x$new_path" = x; then
39703      # It's still not found. Now this is an unrecoverable error.
39704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39705$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39706      has_space=`$ECHO "$complete" | $GREP " "`
39707      if test "x$has_space" != x; then
39708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39710      fi
39711      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39712    fi
39713  fi
39714
39715  # Now new_path has a complete unix path to the binary
39716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39717    # Keep paths in /bin as-is, but remove trailing .exe if any
39718    new_path="${new_path/%.exe/}"
39719    # Do not save /bin paths to all_fixpath_prefixes!
39720  else
39721    # Not in mixed or Windows style, start by that.
39722    new_path=`cmd //c echo $new_path`
39723
39724  input_path="$new_path"
39725  # Check if we need to convert this using DOS-style short mode. If the path
39726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39727  # take no chances and rewrite it.
39728  # Note: m4 eats our [], so we need to use [ and ] instead.
39729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39730  if test "x$has_forbidden_chars" != x; then
39731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39733  fi
39734
39735    # Output is in $new_path
39736
39737  windows_path="$new_path"
39738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39739    unix_path=`$CYGPATH -u "$windows_path"`
39740    new_path="$unix_path"
39741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39743    new_path="$unix_path"
39744  fi
39745
39746    # remove trailing .exe if any
39747    new_path="${new_path/%.exe/}"
39748
39749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39751  fi
39752
39753    else
39754      # We're on a unix platform. Hooray! :)
39755      # First separate the path from the arguments. This will split at the first
39756      # space.
39757      complete="$MT"
39758      path="${complete%% *}"
39759      tmp="$complete EOL"
39760      arguments="${tmp#* }"
39761
39762      # Cannot rely on the command "which" here since it doesn't always work.
39763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39764      if test -z "$is_absolute_path"; then
39765        # Path to executable is not absolute. Find it.
39766        IFS_save="$IFS"
39767        IFS=:
39768        for p in $PATH; do
39769          if test -f "$p/$path" && test -x "$p/$path"; then
39770            new_path="$p/$path"
39771            break
39772          fi
39773        done
39774        IFS="$IFS_save"
39775      else
39776        # This is an absolute path, we can use it without further modifications.
39777        new_path="$path"
39778      fi
39779
39780      if test "x$new_path" = x; then
39781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39782$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39783        has_space=`$ECHO "$complete" | $GREP " "`
39784        if test "x$has_space" != x; then
39785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39787        fi
39788        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39789      fi
39790    fi
39791
39792    # Now join together the path and the arguments once again
39793    if test "x$arguments" != xEOL; then
39794      new_complete="$new_path ${arguments% *}"
39795    else
39796      new_complete="$new_path"
39797    fi
39798
39799    if test "x$complete" != "x$new_complete"; then
39800      MT="$new_complete"
39801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39802$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39803    fi
39804  fi
39805
39806    # Setup the resource compiler (RC)
39807    # Extract the first word of "rc", so it can be a program name with args.
39808set dummy rc; ac_word=$2
39809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39810$as_echo_n "checking for $ac_word... " >&6; }
39811if ${ac_cv_prog_RC+:} false; then :
39812  $as_echo_n "(cached) " >&6
39813else
39814  if test -n "$RC"; then
39815  ac_cv_prog_RC="$RC" # Let the user override the test.
39816else
39817  ac_prog_rejected=no
39818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39819for as_dir in $PATH
39820do
39821  IFS=$as_save_IFS
39822  test -z "$as_dir" && as_dir=.
39823    for ac_exec_ext in '' $ac_executable_extensions; do
39824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39825    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39826       ac_prog_rejected=yes
39827       continue
39828     fi
39829    ac_cv_prog_RC="rc"
39830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39831    break 2
39832  fi
39833done
39834  done
39835IFS=$as_save_IFS
39836
39837if test $ac_prog_rejected = yes; then
39838  # We found a bogon in the path, so make sure we never use it.
39839  set dummy $ac_cv_prog_RC
39840  shift
39841  if test $# != 0; then
39842    # We chose a different compiler from the bogus one.
39843    # However, it has the same basename, so the bogon will be chosen
39844    # first if we set RC to just the basename; use the full file name.
39845    shift
39846    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39847  fi
39848fi
39849fi
39850fi
39851RC=$ac_cv_prog_RC
39852if test -n "$RC"; then
39853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39854$as_echo "$RC" >&6; }
39855else
39856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39857$as_echo "no" >&6; }
39858fi
39859
39860
39861
39862  # Only process if variable expands to non-empty
39863
39864  if test "x$RC" != x; then
39865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39866
39867  # First separate the path from the arguments. This will split at the first
39868  # space.
39869  complete="$RC"
39870  path="${complete%% *}"
39871  tmp="$complete EOL"
39872  arguments="${tmp#* }"
39873
39874  # Input might be given as Windows format, start by converting to
39875  # unix format.
39876  new_path=`$CYGPATH -u "$path"`
39877
39878  # Now try to locate executable using which
39879  new_path=`$WHICH "$new_path" 2> /dev/null`
39880  # bat and cmd files are not always considered executable in cygwin causing which
39881  # to not find them
39882  if test "x$new_path" = x \
39883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39885    new_path=`$CYGPATH -u "$path"`
39886  fi
39887  if test "x$new_path" = x; then
39888    # Oops. Which didn't find the executable.
39889    # The splitting of arguments from the executable at a space might have been incorrect,
39890    # since paths with space are more likely in Windows. Give it another try with the whole
39891    # argument.
39892    path="$complete"
39893    arguments="EOL"
39894    new_path=`$CYGPATH -u "$path"`
39895    new_path=`$WHICH "$new_path" 2> /dev/null`
39896    # bat and cmd files are not always considered executable in cygwin causing which
39897    # to not find them
39898    if test "x$new_path" = x \
39899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39901      new_path=`$CYGPATH -u "$path"`
39902    fi
39903    if test "x$new_path" = x; then
39904      # It's still not found. Now this is an unrecoverable error.
39905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39906$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39907      has_space=`$ECHO "$complete" | $GREP " "`
39908      if test "x$has_space" != x; then
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39911      fi
39912      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39913    fi
39914  fi
39915
39916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39919  # "foo.exe" is OK but "foo" is an error.
39920  #
39921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39922  # It is also a way to make sure we got the proper file name for the real test later on.
39923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39924  if test "x$test_shortpath" = x; then
39925    # Short path failed, file does not exist as specified.
39926    # Try adding .exe or .cmd
39927    if test -f "${new_path}.exe"; then
39928      input_to_shortpath="${new_path}.exe"
39929    elif test -f "${new_path}.cmd"; then
39930      input_to_shortpath="${new_path}.cmd"
39931    else
39932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39933$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39936      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39937    fi
39938  else
39939    input_to_shortpath="$new_path"
39940  fi
39941
39942  # Call helper function which possibly converts this using DOS-style short mode.
39943  # If so, the updated path is stored in $new_path.
39944  new_path="$input_to_shortpath"
39945
39946  input_path="$input_to_shortpath"
39947  # Check if we need to convert this using DOS-style short mode. If the path
39948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39949  # take no chances and rewrite it.
39950  # Note: m4 eats our [], so we need to use [ and ] instead.
39951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39952  if test "x$has_forbidden_chars" != x; then
39953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39957      # Going to short mode and back again did indeed matter. Since short mode is
39958      # case insensitive, let's make it lowercase to improve readability.
39959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39960      # Now convert it back to Unix-style (cygpath)
39961      input_path=`$CYGPATH -u "$shortmode_path"`
39962      new_path="$input_path"
39963    fi
39964  fi
39965
39966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39967  if test "x$test_cygdrive_prefix" = x; then
39968    # As a simple fix, exclude /usr/bin since it's not a real path.
39969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39971      # a path prefixed by /cygdrive for fixpath to work.
39972      new_path="$CYGWIN_ROOT_PATH$input_path"
39973    fi
39974  fi
39975
39976  # remove trailing .exe if any
39977  new_path="${new_path/%.exe/}"
39978
39979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39980
39981  # First separate the path from the arguments. This will split at the first
39982  # space.
39983  complete="$RC"
39984  path="${complete%% *}"
39985  tmp="$complete EOL"
39986  arguments="${tmp#* }"
39987
39988  # Input might be given as Windows format, start by converting to
39989  # unix format.
39990  new_path="$path"
39991
39992  windows_path="$new_path"
39993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39994    unix_path=`$CYGPATH -u "$windows_path"`
39995    new_path="$unix_path"
39996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39998    new_path="$unix_path"
39999  fi
40000
40001
40002  # Now try to locate executable using which
40003  new_path=`$WHICH "$new_path" 2> /dev/null`
40004
40005  if test "x$new_path" = x; then
40006    # Oops. Which didn't find the executable.
40007    # The splitting of arguments from the executable at a space might have been incorrect,
40008    # since paths with space are more likely in Windows. Give it another try with the whole
40009    # argument.
40010    path="$complete"
40011    arguments="EOL"
40012    new_path="$path"
40013
40014  windows_path="$new_path"
40015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40016    unix_path=`$CYGPATH -u "$windows_path"`
40017    new_path="$unix_path"
40018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40020    new_path="$unix_path"
40021  fi
40022
40023
40024    new_path=`$WHICH "$new_path" 2> /dev/null`
40025    # bat and cmd files are not always considered executable in MSYS causing which
40026    # to not find them
40027    if test "x$new_path" = x \
40028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40030      new_path="$path"
40031
40032  windows_path="$new_path"
40033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40034    unix_path=`$CYGPATH -u "$windows_path"`
40035    new_path="$unix_path"
40036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40038    new_path="$unix_path"
40039  fi
40040
40041    fi
40042
40043    if test "x$new_path" = x; then
40044      # It's still not found. Now this is an unrecoverable error.
40045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40046$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40047      has_space=`$ECHO "$complete" | $GREP " "`
40048      if test "x$has_space" != x; then
40049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40051      fi
40052      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40053    fi
40054  fi
40055
40056  # Now new_path has a complete unix path to the binary
40057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40058    # Keep paths in /bin as-is, but remove trailing .exe if any
40059    new_path="${new_path/%.exe/}"
40060    # Do not save /bin paths to all_fixpath_prefixes!
40061  else
40062    # Not in mixed or Windows style, start by that.
40063    new_path=`cmd //c echo $new_path`
40064
40065  input_path="$new_path"
40066  # Check if we need to convert this using DOS-style short mode. If the path
40067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40068  # take no chances and rewrite it.
40069  # Note: m4 eats our [], so we need to use [ and ] instead.
40070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40071  if test "x$has_forbidden_chars" != x; then
40072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40074  fi
40075
40076    # Output is in $new_path
40077
40078  windows_path="$new_path"
40079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40080    unix_path=`$CYGPATH -u "$windows_path"`
40081    new_path="$unix_path"
40082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40084    new_path="$unix_path"
40085  fi
40086
40087    # remove trailing .exe if any
40088    new_path="${new_path/%.exe/}"
40089
40090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40092  fi
40093
40094    else
40095      # We're on a unix platform. Hooray! :)
40096      # First separate the path from the arguments. This will split at the first
40097      # space.
40098      complete="$RC"
40099      path="${complete%% *}"
40100      tmp="$complete EOL"
40101      arguments="${tmp#* }"
40102
40103      # Cannot rely on the command "which" here since it doesn't always work.
40104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40105      if test -z "$is_absolute_path"; then
40106        # Path to executable is not absolute. Find it.
40107        IFS_save="$IFS"
40108        IFS=:
40109        for p in $PATH; do
40110          if test -f "$p/$path" && test -x "$p/$path"; then
40111            new_path="$p/$path"
40112            break
40113          fi
40114        done
40115        IFS="$IFS_save"
40116      else
40117        # This is an absolute path, we can use it without further modifications.
40118        new_path="$path"
40119      fi
40120
40121      if test "x$new_path" = x; then
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40123$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40124        has_space=`$ECHO "$complete" | $GREP " "`
40125        if test "x$has_space" != x; then
40126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40128        fi
40129        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40130      fi
40131    fi
40132
40133    # Now join together the path and the arguments once again
40134    if test "x$arguments" != xEOL; then
40135      new_complete="$new_path ${arguments% *}"
40136    else
40137      new_complete="$new_path"
40138    fi
40139
40140    if test "x$complete" != "x$new_complete"; then
40141      RC="$new_complete"
40142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40143$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40144    fi
40145  fi
40146
40147    # Extract the first word of "dumpbin", so it can be a program name with args.
40148set dummy dumpbin; ac_word=$2
40149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40150$as_echo_n "checking for $ac_word... " >&6; }
40151if ${ac_cv_prog_DUMPBIN+:} false; then :
40152  $as_echo_n "(cached) " >&6
40153else
40154  if test -n "$DUMPBIN"; then
40155  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40156else
40157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40158for as_dir in $PATH
40159do
40160  IFS=$as_save_IFS
40161  test -z "$as_dir" && as_dir=.
40162    for ac_exec_ext in '' $ac_executable_extensions; do
40163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40164    ac_cv_prog_DUMPBIN="dumpbin"
40165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40166    break 2
40167  fi
40168done
40169  done
40170IFS=$as_save_IFS
40171
40172fi
40173fi
40174DUMPBIN=$ac_cv_prog_DUMPBIN
40175if test -n "$DUMPBIN"; then
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40177$as_echo "$DUMPBIN" >&6; }
40178else
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40180$as_echo "no" >&6; }
40181fi
40182
40183
40184
40185  # Only process if variable expands to non-empty
40186
40187  if test "x$DUMPBIN" != x; then
40188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40189
40190  # First separate the path from the arguments. This will split at the first
40191  # space.
40192  complete="$DUMPBIN"
40193  path="${complete%% *}"
40194  tmp="$complete EOL"
40195  arguments="${tmp#* }"
40196
40197  # Input might be given as Windows format, start by converting to
40198  # unix format.
40199  new_path=`$CYGPATH -u "$path"`
40200
40201  # Now try to locate executable using which
40202  new_path=`$WHICH "$new_path" 2> /dev/null`
40203  # bat and cmd files are not always considered executable in cygwin causing which
40204  # to not find them
40205  if test "x$new_path" = x \
40206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40208    new_path=`$CYGPATH -u "$path"`
40209  fi
40210  if test "x$new_path" = x; then
40211    # Oops. Which didn't find the executable.
40212    # The splitting of arguments from the executable at a space might have been incorrect,
40213    # since paths with space are more likely in Windows. Give it another try with the whole
40214    # argument.
40215    path="$complete"
40216    arguments="EOL"
40217    new_path=`$CYGPATH -u "$path"`
40218    new_path=`$WHICH "$new_path" 2> /dev/null`
40219    # bat and cmd files are not always considered executable in cygwin causing which
40220    # to not find them
40221    if test "x$new_path" = x \
40222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40224      new_path=`$CYGPATH -u "$path"`
40225    fi
40226    if test "x$new_path" = x; then
40227      # It's still not found. Now this is an unrecoverable error.
40228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40229$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40230      has_space=`$ECHO "$complete" | $GREP " "`
40231      if test "x$has_space" != x; then
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40234      fi
40235      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40236    fi
40237  fi
40238
40239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40242  # "foo.exe" is OK but "foo" is an error.
40243  #
40244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40245  # It is also a way to make sure we got the proper file name for the real test later on.
40246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40247  if test "x$test_shortpath" = x; then
40248    # Short path failed, file does not exist as specified.
40249    # Try adding .exe or .cmd
40250    if test -f "${new_path}.exe"; then
40251      input_to_shortpath="${new_path}.exe"
40252    elif test -f "${new_path}.cmd"; then
40253      input_to_shortpath="${new_path}.cmd"
40254    else
40255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40256$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40259      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40260    fi
40261  else
40262    input_to_shortpath="$new_path"
40263  fi
40264
40265  # Call helper function which possibly converts this using DOS-style short mode.
40266  # If so, the updated path is stored in $new_path.
40267  new_path="$input_to_shortpath"
40268
40269  input_path="$input_to_shortpath"
40270  # Check if we need to convert this using DOS-style short mode. If the path
40271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40272  # take no chances and rewrite it.
40273  # Note: m4 eats our [], so we need to use [ and ] instead.
40274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40275  if test "x$has_forbidden_chars" != x; then
40276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40280      # Going to short mode and back again did indeed matter. Since short mode is
40281      # case insensitive, let's make it lowercase to improve readability.
40282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40283      # Now convert it back to Unix-style (cygpath)
40284      input_path=`$CYGPATH -u "$shortmode_path"`
40285      new_path="$input_path"
40286    fi
40287  fi
40288
40289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40290  if test "x$test_cygdrive_prefix" = x; then
40291    # As a simple fix, exclude /usr/bin since it's not a real path.
40292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40294      # a path prefixed by /cygdrive for fixpath to work.
40295      new_path="$CYGWIN_ROOT_PATH$input_path"
40296    fi
40297  fi
40298
40299  # remove trailing .exe if any
40300  new_path="${new_path/%.exe/}"
40301
40302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40303
40304  # First separate the path from the arguments. This will split at the first
40305  # space.
40306  complete="$DUMPBIN"
40307  path="${complete%% *}"
40308  tmp="$complete EOL"
40309  arguments="${tmp#* }"
40310
40311  # Input might be given as Windows format, start by converting to
40312  # unix format.
40313  new_path="$path"
40314
40315  windows_path="$new_path"
40316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40317    unix_path=`$CYGPATH -u "$windows_path"`
40318    new_path="$unix_path"
40319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40321    new_path="$unix_path"
40322  fi
40323
40324
40325  # Now try to locate executable using which
40326  new_path=`$WHICH "$new_path" 2> /dev/null`
40327
40328  if test "x$new_path" = x; then
40329    # Oops. Which didn't find the executable.
40330    # The splitting of arguments from the executable at a space might have been incorrect,
40331    # since paths with space are more likely in Windows. Give it another try with the whole
40332    # argument.
40333    path="$complete"
40334    arguments="EOL"
40335    new_path="$path"
40336
40337  windows_path="$new_path"
40338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40339    unix_path=`$CYGPATH -u "$windows_path"`
40340    new_path="$unix_path"
40341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40343    new_path="$unix_path"
40344  fi
40345
40346
40347    new_path=`$WHICH "$new_path" 2> /dev/null`
40348    # bat and cmd files are not always considered executable in MSYS causing which
40349    # to not find them
40350    if test "x$new_path" = x \
40351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40353      new_path="$path"
40354
40355  windows_path="$new_path"
40356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40357    unix_path=`$CYGPATH -u "$windows_path"`
40358    new_path="$unix_path"
40359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40361    new_path="$unix_path"
40362  fi
40363
40364    fi
40365
40366    if test "x$new_path" = x; then
40367      # It's still not found. Now this is an unrecoverable error.
40368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40369$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40370      has_space=`$ECHO "$complete" | $GREP " "`
40371      if test "x$has_space" != x; then
40372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40374      fi
40375      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40376    fi
40377  fi
40378
40379  # Now new_path has a complete unix path to the binary
40380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40381    # Keep paths in /bin as-is, but remove trailing .exe if any
40382    new_path="${new_path/%.exe/}"
40383    # Do not save /bin paths to all_fixpath_prefixes!
40384  else
40385    # Not in mixed or Windows style, start by that.
40386    new_path=`cmd //c echo $new_path`
40387
40388  input_path="$new_path"
40389  # Check if we need to convert this using DOS-style short mode. If the path
40390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40391  # take no chances and rewrite it.
40392  # Note: m4 eats our [], so we need to use [ and ] instead.
40393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40394  if test "x$has_forbidden_chars" != x; then
40395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40397  fi
40398
40399    # Output is in $new_path
40400
40401  windows_path="$new_path"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    unix_path=`$CYGPATH -u "$windows_path"`
40404    new_path="$unix_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40407    new_path="$unix_path"
40408  fi
40409
40410    # remove trailing .exe if any
40411    new_path="${new_path/%.exe/}"
40412
40413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40415  fi
40416
40417    else
40418      # We're on a unix platform. Hooray! :)
40419      # First separate the path from the arguments. This will split at the first
40420      # space.
40421      complete="$DUMPBIN"
40422      path="${complete%% *}"
40423      tmp="$complete EOL"
40424      arguments="${tmp#* }"
40425
40426      # Cannot rely on the command "which" here since it doesn't always work.
40427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40428      if test -z "$is_absolute_path"; then
40429        # Path to executable is not absolute. Find it.
40430        IFS_save="$IFS"
40431        IFS=:
40432        for p in $PATH; do
40433          if test -f "$p/$path" && test -x "$p/$path"; then
40434            new_path="$p/$path"
40435            break
40436          fi
40437        done
40438        IFS="$IFS_save"
40439      else
40440        # This is an absolute path, we can use it without further modifications.
40441        new_path="$path"
40442      fi
40443
40444      if test "x$new_path" = x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40446$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40447        has_space=`$ECHO "$complete" | $GREP " "`
40448        if test "x$has_space" != x; then
40449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40451        fi
40452        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40453      fi
40454    fi
40455
40456    # Now join together the path and the arguments once again
40457    if test "x$arguments" != xEOL; then
40458      new_complete="$new_path ${arguments% *}"
40459    else
40460      new_complete="$new_path"
40461    fi
40462
40463    if test "x$complete" != "x$new_complete"; then
40464      DUMPBIN="$new_complete"
40465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40466$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40467    fi
40468  fi
40469
40470    # We need to check for 'msbuild.exe' because at the place where we expect to
40471    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40472    # won't find the 'msbuild.exe' executable in that case (and the
40473    # 'ac_executable_extensions' is unusable due to performance reasons).
40474    # Notice that we intentionally don't fix up the path to MSBUILD because we
40475    # will call it in a DOS shell during freetype detection on Windows (see
40476    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40477    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40478set dummy msbuild.exe; ac_word=$2
40479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40480$as_echo_n "checking for $ac_word... " >&6; }
40481if ${ac_cv_prog_MSBUILD+:} false; then :
40482  $as_echo_n "(cached) " >&6
40483else
40484  if test -n "$MSBUILD"; then
40485  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40486else
40487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40488for as_dir in $PATH
40489do
40490  IFS=$as_save_IFS
40491  test -z "$as_dir" && as_dir=.
40492    for ac_exec_ext in '' $ac_executable_extensions; do
40493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40494    ac_cv_prog_MSBUILD="msbuild.exe"
40495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40496    break 2
40497  fi
40498done
40499  done
40500IFS=$as_save_IFS
40501
40502fi
40503fi
40504MSBUILD=$ac_cv_prog_MSBUILD
40505if test -n "$MSBUILD"; then
40506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40507$as_echo "$MSBUILD" >&6; }
40508else
40509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40510$as_echo "no" >&6; }
40511fi
40512
40513
40514  fi
40515
40516  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40517
40518
40519  # Publish this variable in the help.
40520
40521
40522  if [ -z "${STRIP+x}" ]; then
40523    # The variable is not set by user, try to locate tool using the code snippet
40524    for ac_prog in strip
40525do
40526  # Extract the first word of "$ac_prog", so it can be a program name with args.
40527set dummy $ac_prog; ac_word=$2
40528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40529$as_echo_n "checking for $ac_word... " >&6; }
40530if ${ac_cv_path_STRIP+:} false; then :
40531  $as_echo_n "(cached) " >&6
40532else
40533  case $STRIP in
40534  [\\/]* | ?:[\\/]*)
40535  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40536  ;;
40537  *)
40538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40539for as_dir in $PATH
40540do
40541  IFS=$as_save_IFS
40542  test -z "$as_dir" && as_dir=.
40543    for ac_exec_ext in '' $ac_executable_extensions; do
40544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40545    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40547    break 2
40548  fi
40549done
40550  done
40551IFS=$as_save_IFS
40552
40553  ;;
40554esac
40555fi
40556STRIP=$ac_cv_path_STRIP
40557if test -n "$STRIP"; then
40558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40559$as_echo "$STRIP" >&6; }
40560else
40561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40562$as_echo "no" >&6; }
40563fi
40564
40565
40566  test -n "$STRIP" && break
40567done
40568
40569  else
40570    # The variable is set, but is it from the command line or the environment?
40571
40572    # Try to remove the string !STRIP! from our list.
40573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40575      # If it failed, the variable was not from the command line. Ignore it,
40576      # but warn the user (except for BASH, which is always set by the calling BASH).
40577      if test "xSTRIP" != xBASH; then
40578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40579$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40580      fi
40581      # Try to locate tool using the code snippet
40582      for ac_prog in strip
40583do
40584  # Extract the first word of "$ac_prog", so it can be a program name with args.
40585set dummy $ac_prog; ac_word=$2
40586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40587$as_echo_n "checking for $ac_word... " >&6; }
40588if ${ac_cv_path_STRIP+:} false; then :
40589  $as_echo_n "(cached) " >&6
40590else
40591  case $STRIP in
40592  [\\/]* | ?:[\\/]*)
40593  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40594  ;;
40595  *)
40596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597for as_dir in $PATH
40598do
40599  IFS=$as_save_IFS
40600  test -z "$as_dir" && as_dir=.
40601    for ac_exec_ext in '' $ac_executable_extensions; do
40602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605    break 2
40606  fi
40607done
40608  done
40609IFS=$as_save_IFS
40610
40611  ;;
40612esac
40613fi
40614STRIP=$ac_cv_path_STRIP
40615if test -n "$STRIP"; then
40616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40617$as_echo "$STRIP" >&6; }
40618else
40619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40620$as_echo "no" >&6; }
40621fi
40622
40623
40624  test -n "$STRIP" && break
40625done
40626
40627    else
40628      # If it succeeded, then it was overridden by the user. We will use it
40629      # for the tool.
40630
40631      # First remove it from the list of overridden variables, so we can test
40632      # for unknown variables in the end.
40633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40634
40635      # Check if we try to supply an empty value
40636      if test "x$STRIP" = x; then
40637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40638$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40640$as_echo_n "checking for STRIP... " >&6; }
40641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40642$as_echo "disabled" >&6; }
40643      else
40644        # Check if the provided tool contains a complete path.
40645        tool_specified="$STRIP"
40646        tool_basename="${tool_specified##*/}"
40647        if test "x$tool_basename" = "x$tool_specified"; then
40648          # A command without a complete path is provided, search $PATH.
40649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40650$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40651          # Extract the first word of "$tool_basename", so it can be a program name with args.
40652set dummy $tool_basename; ac_word=$2
40653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40654$as_echo_n "checking for $ac_word... " >&6; }
40655if ${ac_cv_path_STRIP+:} false; then :
40656  $as_echo_n "(cached) " >&6
40657else
40658  case $STRIP in
40659  [\\/]* | ?:[\\/]*)
40660  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40661  ;;
40662  *)
40663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40664for as_dir in $PATH
40665do
40666  IFS=$as_save_IFS
40667  test -z "$as_dir" && as_dir=.
40668    for ac_exec_ext in '' $ac_executable_extensions; do
40669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40670    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40672    break 2
40673  fi
40674done
40675  done
40676IFS=$as_save_IFS
40677
40678  ;;
40679esac
40680fi
40681STRIP=$ac_cv_path_STRIP
40682if test -n "$STRIP"; then
40683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40684$as_echo "$STRIP" >&6; }
40685else
40686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40687$as_echo "no" >&6; }
40688fi
40689
40690
40691          if test "x$STRIP" = x; then
40692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40693          fi
40694        else
40695          # Otherwise we believe it is a complete path. Use it as it is.
40696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40697$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40699$as_echo_n "checking for STRIP... " >&6; }
40700          if test ! -x "$tool_specified"; then
40701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40702$as_echo "not found" >&6; }
40703            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40704          fi
40705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40706$as_echo "$tool_specified" >&6; }
40707        fi
40708      fi
40709    fi
40710
40711  fi
40712
40713
40714
40715  # Only process if variable expands to non-empty
40716
40717  if test "x$STRIP" != x; then
40718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40719
40720  # First separate the path from the arguments. This will split at the first
40721  # space.
40722  complete="$STRIP"
40723  path="${complete%% *}"
40724  tmp="$complete EOL"
40725  arguments="${tmp#* }"
40726
40727  # Input might be given as Windows format, start by converting to
40728  # unix format.
40729  new_path=`$CYGPATH -u "$path"`
40730
40731  # Now try to locate executable using which
40732  new_path=`$WHICH "$new_path" 2> /dev/null`
40733  # bat and cmd files are not always considered executable in cygwin causing which
40734  # to not find them
40735  if test "x$new_path" = x \
40736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40738    new_path=`$CYGPATH -u "$path"`
40739  fi
40740  if test "x$new_path" = x; then
40741    # Oops. Which didn't find the executable.
40742    # The splitting of arguments from the executable at a space might have been incorrect,
40743    # since paths with space are more likely in Windows. Give it another try with the whole
40744    # argument.
40745    path="$complete"
40746    arguments="EOL"
40747    new_path=`$CYGPATH -u "$path"`
40748    new_path=`$WHICH "$new_path" 2> /dev/null`
40749    # bat and cmd files are not always considered executable in cygwin causing which
40750    # to not find them
40751    if test "x$new_path" = x \
40752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40754      new_path=`$CYGPATH -u "$path"`
40755    fi
40756    if test "x$new_path" = x; then
40757      # It's still not found. Now this is an unrecoverable error.
40758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40759$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40760      has_space=`$ECHO "$complete" | $GREP " "`
40761      if test "x$has_space" != x; then
40762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40764      fi
40765      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40766    fi
40767  fi
40768
40769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40772  # "foo.exe" is OK but "foo" is an error.
40773  #
40774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40775  # It is also a way to make sure we got the proper file name for the real test later on.
40776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40777  if test "x$test_shortpath" = x; then
40778    # Short path failed, file does not exist as specified.
40779    # Try adding .exe or .cmd
40780    if test -f "${new_path}.exe"; then
40781      input_to_shortpath="${new_path}.exe"
40782    elif test -f "${new_path}.cmd"; then
40783      input_to_shortpath="${new_path}.cmd"
40784    else
40785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40786$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40789      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40790    fi
40791  else
40792    input_to_shortpath="$new_path"
40793  fi
40794
40795  # Call helper function which possibly converts this using DOS-style short mode.
40796  # If so, the updated path is stored in $new_path.
40797  new_path="$input_to_shortpath"
40798
40799  input_path="$input_to_shortpath"
40800  # Check if we need to convert this using DOS-style short mode. If the path
40801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40802  # take no chances and rewrite it.
40803  # Note: m4 eats our [], so we need to use [ and ] instead.
40804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40805  if test "x$has_forbidden_chars" != x; then
40806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40810      # Going to short mode and back again did indeed matter. Since short mode is
40811      # case insensitive, let's make it lowercase to improve readability.
40812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40813      # Now convert it back to Unix-style (cygpath)
40814      input_path=`$CYGPATH -u "$shortmode_path"`
40815      new_path="$input_path"
40816    fi
40817  fi
40818
40819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40820  if test "x$test_cygdrive_prefix" = x; then
40821    # As a simple fix, exclude /usr/bin since it's not a real path.
40822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40824      # a path prefixed by /cygdrive for fixpath to work.
40825      new_path="$CYGWIN_ROOT_PATH$input_path"
40826    fi
40827  fi
40828
40829  # remove trailing .exe if any
40830  new_path="${new_path/%.exe/}"
40831
40832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40833
40834  # First separate the path from the arguments. This will split at the first
40835  # space.
40836  complete="$STRIP"
40837  path="${complete%% *}"
40838  tmp="$complete EOL"
40839  arguments="${tmp#* }"
40840
40841  # Input might be given as Windows format, start by converting to
40842  # unix format.
40843  new_path="$path"
40844
40845  windows_path="$new_path"
40846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40847    unix_path=`$CYGPATH -u "$windows_path"`
40848    new_path="$unix_path"
40849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40851    new_path="$unix_path"
40852  fi
40853
40854
40855  # Now try to locate executable using which
40856  new_path=`$WHICH "$new_path" 2> /dev/null`
40857
40858  if test "x$new_path" = x; then
40859    # Oops. Which didn't find the executable.
40860    # The splitting of arguments from the executable at a space might have been incorrect,
40861    # since paths with space are more likely in Windows. Give it another try with the whole
40862    # argument.
40863    path="$complete"
40864    arguments="EOL"
40865    new_path="$path"
40866
40867  windows_path="$new_path"
40868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40869    unix_path=`$CYGPATH -u "$windows_path"`
40870    new_path="$unix_path"
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40873    new_path="$unix_path"
40874  fi
40875
40876
40877    new_path=`$WHICH "$new_path" 2> /dev/null`
40878    # bat and cmd files are not always considered executable in MSYS causing which
40879    # to not find them
40880    if test "x$new_path" = x \
40881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40883      new_path="$path"
40884
40885  windows_path="$new_path"
40886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40887    unix_path=`$CYGPATH -u "$windows_path"`
40888    new_path="$unix_path"
40889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40891    new_path="$unix_path"
40892  fi
40893
40894    fi
40895
40896    if test "x$new_path" = x; then
40897      # It's still not found. Now this is an unrecoverable error.
40898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40899$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40900      has_space=`$ECHO "$complete" | $GREP " "`
40901      if test "x$has_space" != x; then
40902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40904      fi
40905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40906    fi
40907  fi
40908
40909  # Now new_path has a complete unix path to the binary
40910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40911    # Keep paths in /bin as-is, but remove trailing .exe if any
40912    new_path="${new_path/%.exe/}"
40913    # Do not save /bin paths to all_fixpath_prefixes!
40914  else
40915    # Not in mixed or Windows style, start by that.
40916    new_path=`cmd //c echo $new_path`
40917
40918  input_path="$new_path"
40919  # Check if we need to convert this using DOS-style short mode. If the path
40920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40921  # take no chances and rewrite it.
40922  # Note: m4 eats our [], so we need to use [ and ] instead.
40923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40924  if test "x$has_forbidden_chars" != x; then
40925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40927  fi
40928
40929    # Output is in $new_path
40930
40931  windows_path="$new_path"
40932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40933    unix_path=`$CYGPATH -u "$windows_path"`
40934    new_path="$unix_path"
40935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40937    new_path="$unix_path"
40938  fi
40939
40940    # remove trailing .exe if any
40941    new_path="${new_path/%.exe/}"
40942
40943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40945  fi
40946
40947    else
40948      # We're on a unix platform. Hooray! :)
40949      # First separate the path from the arguments. This will split at the first
40950      # space.
40951      complete="$STRIP"
40952      path="${complete%% *}"
40953      tmp="$complete EOL"
40954      arguments="${tmp#* }"
40955
40956      # Cannot rely on the command "which" here since it doesn't always work.
40957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40958      if test -z "$is_absolute_path"; then
40959        # Path to executable is not absolute. Find it.
40960        IFS_save="$IFS"
40961        IFS=:
40962        for p in $PATH; do
40963          if test -f "$p/$path" && test -x "$p/$path"; then
40964            new_path="$p/$path"
40965            break
40966          fi
40967        done
40968        IFS="$IFS_save"
40969      else
40970        # This is an absolute path, we can use it without further modifications.
40971        new_path="$path"
40972      fi
40973
40974      if test "x$new_path" = x; then
40975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40976$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40977        has_space=`$ECHO "$complete" | $GREP " "`
40978        if test "x$has_space" != x; then
40979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40981        fi
40982        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40983      fi
40984    fi
40985
40986    # Now join together the path and the arguments once again
40987    if test "x$arguments" != xEOL; then
40988      new_complete="$new_path ${arguments% *}"
40989    else
40990      new_complete="$new_path"
40991    fi
40992
40993    if test "x$complete" != "x$new_complete"; then
40994      STRIP="$new_complete"
40995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40996$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40997    fi
40998  fi
40999
41000
41001
41002  # Publish this variable in the help.
41003
41004
41005  if [ -z "${NM+x}" ]; then
41006    # The variable is not set by user, try to locate tool using the code snippet
41007    for ac_prog in nm
41008do
41009  # Extract the first word of "$ac_prog", so it can be a program name with args.
41010set dummy $ac_prog; ac_word=$2
41011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41012$as_echo_n "checking for $ac_word... " >&6; }
41013if ${ac_cv_path_NM+:} false; then :
41014  $as_echo_n "(cached) " >&6
41015else
41016  case $NM in
41017  [\\/]* | ?:[\\/]*)
41018  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41019  ;;
41020  *)
41021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41022for as_dir in $PATH
41023do
41024  IFS=$as_save_IFS
41025  test -z "$as_dir" && as_dir=.
41026    for ac_exec_ext in '' $ac_executable_extensions; do
41027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41028    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41030    break 2
41031  fi
41032done
41033  done
41034IFS=$as_save_IFS
41035
41036  ;;
41037esac
41038fi
41039NM=$ac_cv_path_NM
41040if test -n "$NM"; then
41041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41042$as_echo "$NM" >&6; }
41043else
41044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41045$as_echo "no" >&6; }
41046fi
41047
41048
41049  test -n "$NM" && break
41050done
41051
41052  else
41053    # The variable is set, but is it from the command line or the environment?
41054
41055    # Try to remove the string !NM! from our list.
41056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41058      # If it failed, the variable was not from the command line. Ignore it,
41059      # but warn the user (except for BASH, which is always set by the calling BASH).
41060      if test "xNM" != xBASH; then
41061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41062$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41063      fi
41064      # Try to locate tool using the code snippet
41065      for ac_prog in nm
41066do
41067  # Extract the first word of "$ac_prog", so it can be a program name with args.
41068set dummy $ac_prog; 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_NM+:} false; then :
41072  $as_echo_n "(cached) " >&6
41073else
41074  case $NM in
41075  [\\/]* | ?:[\\/]*)
41076  ac_cv_path_NM="$NM" # 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_NM="$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
41097NM=$ac_cv_path_NM
41098if test -n "$NM"; then
41099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41100$as_echo "$NM" >&6; }
41101else
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41103$as_echo "no" >&6; }
41104fi
41105
41106
41107  test -n "$NM" && break
41108done
41109
41110    else
41111      # If it succeeded, then it was overridden by the user. We will use it
41112      # for the tool.
41113
41114      # First remove it from the list of overridden variables, so we can test
41115      # for unknown variables in the end.
41116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41117
41118      # Check if we try to supply an empty value
41119      if test "x$NM" = x; then
41120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41121$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41123$as_echo_n "checking for NM... " >&6; }
41124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41125$as_echo "disabled" >&6; }
41126      else
41127        # Check if the provided tool contains a complete path.
41128        tool_specified="$NM"
41129        tool_basename="${tool_specified##*/}"
41130        if test "x$tool_basename" = "x$tool_specified"; then
41131          # A command without a complete path is provided, search $PATH.
41132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41133$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41134          # Extract the first word of "$tool_basename", so it can be a program name with args.
41135set dummy $tool_basename; ac_word=$2
41136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41137$as_echo_n "checking for $ac_word... " >&6; }
41138if ${ac_cv_path_NM+:} false; then :
41139  $as_echo_n "(cached) " >&6
41140else
41141  case $NM in
41142  [\\/]* | ?:[\\/]*)
41143  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41144  ;;
41145  *)
41146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41147for as_dir in $PATH
41148do
41149  IFS=$as_save_IFS
41150  test -z "$as_dir" && as_dir=.
41151    for ac_exec_ext in '' $ac_executable_extensions; do
41152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41153    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41155    break 2
41156  fi
41157done
41158  done
41159IFS=$as_save_IFS
41160
41161  ;;
41162esac
41163fi
41164NM=$ac_cv_path_NM
41165if test -n "$NM"; then
41166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41167$as_echo "$NM" >&6; }
41168else
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41170$as_echo "no" >&6; }
41171fi
41172
41173
41174          if test "x$NM" = x; then
41175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41176          fi
41177        else
41178          # Otherwise we believe it is a complete path. Use it as it is.
41179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41180$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41182$as_echo_n "checking for NM... " >&6; }
41183          if test ! -x "$tool_specified"; then
41184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41185$as_echo "not found" >&6; }
41186            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41187          fi
41188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41189$as_echo "$tool_specified" >&6; }
41190        fi
41191      fi
41192    fi
41193
41194  fi
41195
41196
41197
41198  # Only process if variable expands to non-empty
41199
41200  if test "x$NM" != x; then
41201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41202
41203  # First separate the path from the arguments. This will split at the first
41204  # space.
41205  complete="$NM"
41206  path="${complete%% *}"
41207  tmp="$complete EOL"
41208  arguments="${tmp#* }"
41209
41210  # Input might be given as Windows format, start by converting to
41211  # unix format.
41212  new_path=`$CYGPATH -u "$path"`
41213
41214  # Now try to locate executable using which
41215  new_path=`$WHICH "$new_path" 2> /dev/null`
41216  # bat and cmd files are not always considered executable in cygwin causing which
41217  # to not find them
41218  if test "x$new_path" = x \
41219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41221    new_path=`$CYGPATH -u "$path"`
41222  fi
41223  if test "x$new_path" = x; then
41224    # Oops. Which didn't find the executable.
41225    # The splitting of arguments from the executable at a space might have been incorrect,
41226    # since paths with space are more likely in Windows. Give it another try with the whole
41227    # argument.
41228    path="$complete"
41229    arguments="EOL"
41230    new_path=`$CYGPATH -u "$path"`
41231    new_path=`$WHICH "$new_path" 2> /dev/null`
41232    # bat and cmd files are not always considered executable in cygwin causing which
41233    # to not find them
41234    if test "x$new_path" = x \
41235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41237      new_path=`$CYGPATH -u "$path"`
41238    fi
41239    if test "x$new_path" = x; then
41240      # It's still not found. Now this is an unrecoverable error.
41241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41242$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41243      has_space=`$ECHO "$complete" | $GREP " "`
41244      if test "x$has_space" != x; then
41245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41247      fi
41248      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41249    fi
41250  fi
41251
41252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41255  # "foo.exe" is OK but "foo" is an error.
41256  #
41257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41258  # It is also a way to make sure we got the proper file name for the real test later on.
41259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41260  if test "x$test_shortpath" = x; then
41261    # Short path failed, file does not exist as specified.
41262    # Try adding .exe or .cmd
41263    if test -f "${new_path}.exe"; then
41264      input_to_shortpath="${new_path}.exe"
41265    elif test -f "${new_path}.cmd"; then
41266      input_to_shortpath="${new_path}.cmd"
41267    else
41268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41269$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41272      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41273    fi
41274  else
41275    input_to_shortpath="$new_path"
41276  fi
41277
41278  # Call helper function which possibly converts this using DOS-style short mode.
41279  # If so, the updated path is stored in $new_path.
41280  new_path="$input_to_shortpath"
41281
41282  input_path="$input_to_shortpath"
41283  # Check if we need to convert this using DOS-style short mode. If the path
41284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41285  # take no chances and rewrite it.
41286  # Note: m4 eats our [], so we need to use [ and ] instead.
41287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41288  if test "x$has_forbidden_chars" != x; then
41289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41293      # Going to short mode and back again did indeed matter. Since short mode is
41294      # case insensitive, let's make it lowercase to improve readability.
41295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41296      # Now convert it back to Unix-style (cygpath)
41297      input_path=`$CYGPATH -u "$shortmode_path"`
41298      new_path="$input_path"
41299    fi
41300  fi
41301
41302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41303  if test "x$test_cygdrive_prefix" = x; then
41304    # As a simple fix, exclude /usr/bin since it's not a real path.
41305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41307      # a path prefixed by /cygdrive for fixpath to work.
41308      new_path="$CYGWIN_ROOT_PATH$input_path"
41309    fi
41310  fi
41311
41312  # remove trailing .exe if any
41313  new_path="${new_path/%.exe/}"
41314
41315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41316
41317  # First separate the path from the arguments. This will split at the first
41318  # space.
41319  complete="$NM"
41320  path="${complete%% *}"
41321  tmp="$complete EOL"
41322  arguments="${tmp#* }"
41323
41324  # Input might be given as Windows format, start by converting to
41325  # unix format.
41326  new_path="$path"
41327
41328  windows_path="$new_path"
41329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41330    unix_path=`$CYGPATH -u "$windows_path"`
41331    new_path="$unix_path"
41332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41334    new_path="$unix_path"
41335  fi
41336
41337
41338  # Now try to locate executable using which
41339  new_path=`$WHICH "$new_path" 2> /dev/null`
41340
41341  if test "x$new_path" = x; then
41342    # Oops. Which didn't find the executable.
41343    # The splitting of arguments from the executable at a space might have been incorrect,
41344    # since paths with space are more likely in Windows. Give it another try with the whole
41345    # argument.
41346    path="$complete"
41347    arguments="EOL"
41348    new_path="$path"
41349
41350  windows_path="$new_path"
41351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41352    unix_path=`$CYGPATH -u "$windows_path"`
41353    new_path="$unix_path"
41354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41356    new_path="$unix_path"
41357  fi
41358
41359
41360    new_path=`$WHICH "$new_path" 2> /dev/null`
41361    # bat and cmd files are not always considered executable in MSYS causing which
41362    # to not find them
41363    if test "x$new_path" = x \
41364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41366      new_path="$path"
41367
41368  windows_path="$new_path"
41369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41370    unix_path=`$CYGPATH -u "$windows_path"`
41371    new_path="$unix_path"
41372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41374    new_path="$unix_path"
41375  fi
41376
41377    fi
41378
41379    if test "x$new_path" = x; then
41380      # It's still not found. Now this is an unrecoverable error.
41381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41382$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41383      has_space=`$ECHO "$complete" | $GREP " "`
41384      if test "x$has_space" != x; then
41385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41387      fi
41388      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41389    fi
41390  fi
41391
41392  # Now new_path has a complete unix path to the binary
41393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41394    # Keep paths in /bin as-is, but remove trailing .exe if any
41395    new_path="${new_path/%.exe/}"
41396    # Do not save /bin paths to all_fixpath_prefixes!
41397  else
41398    # Not in mixed or Windows style, start by that.
41399    new_path=`cmd //c echo $new_path`
41400
41401  input_path="$new_path"
41402  # Check if we need to convert this using DOS-style short mode. If the path
41403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41404  # take no chances and rewrite it.
41405  # Note: m4 eats our [], so we need to use [ and ] instead.
41406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41407  if test "x$has_forbidden_chars" != x; then
41408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41410  fi
41411
41412    # Output is in $new_path
41413
41414  windows_path="$new_path"
41415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41416    unix_path=`$CYGPATH -u "$windows_path"`
41417    new_path="$unix_path"
41418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41420    new_path="$unix_path"
41421  fi
41422
41423    # remove trailing .exe if any
41424    new_path="${new_path/%.exe/}"
41425
41426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41428  fi
41429
41430    else
41431      # We're on a unix platform. Hooray! :)
41432      # First separate the path from the arguments. This will split at the first
41433      # space.
41434      complete="$NM"
41435      path="${complete%% *}"
41436      tmp="$complete EOL"
41437      arguments="${tmp#* }"
41438
41439      # Cannot rely on the command "which" here since it doesn't always work.
41440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41441      if test -z "$is_absolute_path"; then
41442        # Path to executable is not absolute. Find it.
41443        IFS_save="$IFS"
41444        IFS=:
41445        for p in $PATH; do
41446          if test -f "$p/$path" && test -x "$p/$path"; then
41447            new_path="$p/$path"
41448            break
41449          fi
41450        done
41451        IFS="$IFS_save"
41452      else
41453        # This is an absolute path, we can use it without further modifications.
41454        new_path="$path"
41455      fi
41456
41457      if test "x$new_path" = x; then
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41459$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41460        has_space=`$ECHO "$complete" | $GREP " "`
41461        if test "x$has_space" != x; then
41462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41464        fi
41465        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41466      fi
41467    fi
41468
41469    # Now join together the path and the arguments once again
41470    if test "x$arguments" != xEOL; then
41471      new_complete="$new_path ${arguments% *}"
41472    else
41473      new_complete="$new_path"
41474    fi
41475
41476    if test "x$complete" != "x$new_complete"; then
41477      NM="$new_complete"
41478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41479$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41480    fi
41481  fi
41482
41483
41484
41485  # Publish this variable in the help.
41486
41487
41488  if [ -z "${GNM+x}" ]; then
41489    # The variable is not set by user, try to locate tool using the code snippet
41490    for ac_prog in gnm
41491do
41492  # Extract the first word of "$ac_prog", so it can be a program name with args.
41493set dummy $ac_prog; ac_word=$2
41494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41495$as_echo_n "checking for $ac_word... " >&6; }
41496if ${ac_cv_path_GNM+:} false; then :
41497  $as_echo_n "(cached) " >&6
41498else
41499  case $GNM in
41500  [\\/]* | ?:[\\/]*)
41501  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41502  ;;
41503  *)
41504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41505for as_dir in $PATH
41506do
41507  IFS=$as_save_IFS
41508  test -z "$as_dir" && as_dir=.
41509    for ac_exec_ext in '' $ac_executable_extensions; do
41510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41511    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41513    break 2
41514  fi
41515done
41516  done
41517IFS=$as_save_IFS
41518
41519  ;;
41520esac
41521fi
41522GNM=$ac_cv_path_GNM
41523if test -n "$GNM"; then
41524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41525$as_echo "$GNM" >&6; }
41526else
41527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41528$as_echo "no" >&6; }
41529fi
41530
41531
41532  test -n "$GNM" && break
41533done
41534
41535  else
41536    # The variable is set, but is it from the command line or the environment?
41537
41538    # Try to remove the string !GNM! from our list.
41539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41541      # If it failed, the variable was not from the command line. Ignore it,
41542      # but warn the user (except for BASH, which is always set by the calling BASH).
41543      if test "xGNM" != xBASH; then
41544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41545$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41546      fi
41547      # Try to locate tool using the code snippet
41548      for ac_prog in gnm
41549do
41550  # Extract the first word of "$ac_prog", so it can be a program name with args.
41551set dummy $ac_prog; ac_word=$2
41552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41553$as_echo_n "checking for $ac_word... " >&6; }
41554if ${ac_cv_path_GNM+:} false; then :
41555  $as_echo_n "(cached) " >&6
41556else
41557  case $GNM in
41558  [\\/]* | ?:[\\/]*)
41559  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41560  ;;
41561  *)
41562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41563for as_dir in $PATH
41564do
41565  IFS=$as_save_IFS
41566  test -z "$as_dir" && as_dir=.
41567    for ac_exec_ext in '' $ac_executable_extensions; do
41568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41569    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41571    break 2
41572  fi
41573done
41574  done
41575IFS=$as_save_IFS
41576
41577  ;;
41578esac
41579fi
41580GNM=$ac_cv_path_GNM
41581if test -n "$GNM"; then
41582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41583$as_echo "$GNM" >&6; }
41584else
41585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41586$as_echo "no" >&6; }
41587fi
41588
41589
41590  test -n "$GNM" && break
41591done
41592
41593    else
41594      # If it succeeded, then it was overridden by the user. We will use it
41595      # for the tool.
41596
41597      # First remove it from the list of overridden variables, so we can test
41598      # for unknown variables in the end.
41599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41600
41601      # Check if we try to supply an empty value
41602      if test "x$GNM" = x; then
41603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41604$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41606$as_echo_n "checking for GNM... " >&6; }
41607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41608$as_echo "disabled" >&6; }
41609      else
41610        # Check if the provided tool contains a complete path.
41611        tool_specified="$GNM"
41612        tool_basename="${tool_specified##*/}"
41613        if test "x$tool_basename" = "x$tool_specified"; then
41614          # A command without a complete path is provided, search $PATH.
41615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41616$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41617          # Extract the first word of "$tool_basename", so it can be a program name with args.
41618set dummy $tool_basename; ac_word=$2
41619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41620$as_echo_n "checking for $ac_word... " >&6; }
41621if ${ac_cv_path_GNM+:} false; then :
41622  $as_echo_n "(cached) " >&6
41623else
41624  case $GNM in
41625  [\\/]* | ?:[\\/]*)
41626  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41627  ;;
41628  *)
41629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41630for as_dir in $PATH
41631do
41632  IFS=$as_save_IFS
41633  test -z "$as_dir" && as_dir=.
41634    for ac_exec_ext in '' $ac_executable_extensions; do
41635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41636    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41638    break 2
41639  fi
41640done
41641  done
41642IFS=$as_save_IFS
41643
41644  ;;
41645esac
41646fi
41647GNM=$ac_cv_path_GNM
41648if test -n "$GNM"; then
41649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41650$as_echo "$GNM" >&6; }
41651else
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41653$as_echo "no" >&6; }
41654fi
41655
41656
41657          if test "x$GNM" = x; then
41658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41659          fi
41660        else
41661          # Otherwise we believe it is a complete path. Use it as it is.
41662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41663$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41665$as_echo_n "checking for GNM... " >&6; }
41666          if test ! -x "$tool_specified"; then
41667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41668$as_echo "not found" >&6; }
41669            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41670          fi
41671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41672$as_echo "$tool_specified" >&6; }
41673        fi
41674      fi
41675    fi
41676
41677  fi
41678
41679
41680
41681  # Only process if variable expands to non-empty
41682
41683  if test "x$GNM" != x; then
41684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41685
41686  # First separate the path from the arguments. This will split at the first
41687  # space.
41688  complete="$GNM"
41689  path="${complete%% *}"
41690  tmp="$complete EOL"
41691  arguments="${tmp#* }"
41692
41693  # Input might be given as Windows format, start by converting to
41694  # unix format.
41695  new_path=`$CYGPATH -u "$path"`
41696
41697  # Now try to locate executable using which
41698  new_path=`$WHICH "$new_path" 2> /dev/null`
41699  # bat and cmd files are not always considered executable in cygwin causing which
41700  # to not find them
41701  if test "x$new_path" = x \
41702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41704    new_path=`$CYGPATH -u "$path"`
41705  fi
41706  if test "x$new_path" = x; then
41707    # Oops. Which didn't find the executable.
41708    # The splitting of arguments from the executable at a space might have been incorrect,
41709    # since paths with space are more likely in Windows. Give it another try with the whole
41710    # argument.
41711    path="$complete"
41712    arguments="EOL"
41713    new_path=`$CYGPATH -u "$path"`
41714    new_path=`$WHICH "$new_path" 2> /dev/null`
41715    # bat and cmd files are not always considered executable in cygwin causing which
41716    # to not find them
41717    if test "x$new_path" = x \
41718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41720      new_path=`$CYGPATH -u "$path"`
41721    fi
41722    if test "x$new_path" = x; then
41723      # It's still not found. Now this is an unrecoverable error.
41724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41725$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41726      has_space=`$ECHO "$complete" | $GREP " "`
41727      if test "x$has_space" != x; then
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41730      fi
41731      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41732    fi
41733  fi
41734
41735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41738  # "foo.exe" is OK but "foo" is an error.
41739  #
41740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41741  # It is also a way to make sure we got the proper file name for the real test later on.
41742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41743  if test "x$test_shortpath" = x; then
41744    # Short path failed, file does not exist as specified.
41745    # Try adding .exe or .cmd
41746    if test -f "${new_path}.exe"; then
41747      input_to_shortpath="${new_path}.exe"
41748    elif test -f "${new_path}.cmd"; then
41749      input_to_shortpath="${new_path}.cmd"
41750    else
41751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41752$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41755      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41756    fi
41757  else
41758    input_to_shortpath="$new_path"
41759  fi
41760
41761  # Call helper function which possibly converts this using DOS-style short mode.
41762  # If so, the updated path is stored in $new_path.
41763  new_path="$input_to_shortpath"
41764
41765  input_path="$input_to_shortpath"
41766  # Check if we need to convert this using DOS-style short mode. If the path
41767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41768  # take no chances and rewrite it.
41769  # Note: m4 eats our [], so we need to use [ and ] instead.
41770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41771  if test "x$has_forbidden_chars" != x; then
41772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41776      # Going to short mode and back again did indeed matter. Since short mode is
41777      # case insensitive, let's make it lowercase to improve readability.
41778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41779      # Now convert it back to Unix-style (cygpath)
41780      input_path=`$CYGPATH -u "$shortmode_path"`
41781      new_path="$input_path"
41782    fi
41783  fi
41784
41785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41786  if test "x$test_cygdrive_prefix" = x; then
41787    # As a simple fix, exclude /usr/bin since it's not a real path.
41788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41790      # a path prefixed by /cygdrive for fixpath to work.
41791      new_path="$CYGWIN_ROOT_PATH$input_path"
41792    fi
41793  fi
41794
41795  # remove trailing .exe if any
41796  new_path="${new_path/%.exe/}"
41797
41798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41799
41800  # First separate the path from the arguments. This will split at the first
41801  # space.
41802  complete="$GNM"
41803  path="${complete%% *}"
41804  tmp="$complete EOL"
41805  arguments="${tmp#* }"
41806
41807  # Input might be given as Windows format, start by converting to
41808  # unix format.
41809  new_path="$path"
41810
41811  windows_path="$new_path"
41812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41813    unix_path=`$CYGPATH -u "$windows_path"`
41814    new_path="$unix_path"
41815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41817    new_path="$unix_path"
41818  fi
41819
41820
41821  # Now try to locate executable using which
41822  new_path=`$WHICH "$new_path" 2> /dev/null`
41823
41824  if test "x$new_path" = x; then
41825    # Oops. Which didn't find the executable.
41826    # The splitting of arguments from the executable at a space might have been incorrect,
41827    # since paths with space are more likely in Windows. Give it another try with the whole
41828    # argument.
41829    path="$complete"
41830    arguments="EOL"
41831    new_path="$path"
41832
41833  windows_path="$new_path"
41834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41835    unix_path=`$CYGPATH -u "$windows_path"`
41836    new_path="$unix_path"
41837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41839    new_path="$unix_path"
41840  fi
41841
41842
41843    new_path=`$WHICH "$new_path" 2> /dev/null`
41844    # bat and cmd files are not always considered executable in MSYS causing which
41845    # to not find them
41846    if test "x$new_path" = x \
41847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41849      new_path="$path"
41850
41851  windows_path="$new_path"
41852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41853    unix_path=`$CYGPATH -u "$windows_path"`
41854    new_path="$unix_path"
41855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41857    new_path="$unix_path"
41858  fi
41859
41860    fi
41861
41862    if test "x$new_path" = x; then
41863      # It's still not found. Now this is an unrecoverable error.
41864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41865$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41866      has_space=`$ECHO "$complete" | $GREP " "`
41867      if test "x$has_space" != x; then
41868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41870      fi
41871      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41872    fi
41873  fi
41874
41875  # Now new_path has a complete unix path to the binary
41876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41877    # Keep paths in /bin as-is, but remove trailing .exe if any
41878    new_path="${new_path/%.exe/}"
41879    # Do not save /bin paths to all_fixpath_prefixes!
41880  else
41881    # Not in mixed or Windows style, start by that.
41882    new_path=`cmd //c echo $new_path`
41883
41884  input_path="$new_path"
41885  # Check if we need to convert this using DOS-style short mode. If the path
41886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41887  # take no chances and rewrite it.
41888  # Note: m4 eats our [], so we need to use [ and ] instead.
41889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41890  if test "x$has_forbidden_chars" != x; then
41891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41893  fi
41894
41895    # Output is in $new_path
41896
41897  windows_path="$new_path"
41898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41899    unix_path=`$CYGPATH -u "$windows_path"`
41900    new_path="$unix_path"
41901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41903    new_path="$unix_path"
41904  fi
41905
41906    # remove trailing .exe if any
41907    new_path="${new_path/%.exe/}"
41908
41909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41911  fi
41912
41913    else
41914      # We're on a unix platform. Hooray! :)
41915      # First separate the path from the arguments. This will split at the first
41916      # space.
41917      complete="$GNM"
41918      path="${complete%% *}"
41919      tmp="$complete EOL"
41920      arguments="${tmp#* }"
41921
41922      # Cannot rely on the command "which" here since it doesn't always work.
41923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41924      if test -z "$is_absolute_path"; then
41925        # Path to executable is not absolute. Find it.
41926        IFS_save="$IFS"
41927        IFS=:
41928        for p in $PATH; do
41929          if test -f "$p/$path" && test -x "$p/$path"; then
41930            new_path="$p/$path"
41931            break
41932          fi
41933        done
41934        IFS="$IFS_save"
41935      else
41936        # This is an absolute path, we can use it without further modifications.
41937        new_path="$path"
41938      fi
41939
41940      if test "x$new_path" = x; then
41941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41942$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41943        has_space=`$ECHO "$complete" | $GREP " "`
41944        if test "x$has_space" != x; then
41945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41947        fi
41948        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41949      fi
41950    fi
41951
41952    # Now join together the path and the arguments once again
41953    if test "x$arguments" != xEOL; then
41954      new_complete="$new_path ${arguments% *}"
41955    else
41956      new_complete="$new_path"
41957    fi
41958
41959    if test "x$complete" != "x$new_complete"; then
41960      GNM="$new_complete"
41961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41962$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41963    fi
41964  fi
41965
41966  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41967    # FIXME: we should unify this with the solaris case above.
41968
41969
41970  # Publish this variable in the help.
41971
41972
41973  if [ -z "${STRIP+x}" ]; then
41974    # The variable is not set by user, try to locate tool using the code snippet
41975    if test -n "$ac_tool_prefix"; then
41976  for ac_prog in strip
41977  do
41978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41981$as_echo_n "checking for $ac_word... " >&6; }
41982if ${ac_cv_prog_STRIP+:} false; then :
41983  $as_echo_n "(cached) " >&6
41984else
41985  if test -n "$STRIP"; then
41986  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41987else
41988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41989for as_dir in $PATH
41990do
41991  IFS=$as_save_IFS
41992  test -z "$as_dir" && as_dir=.
41993    for ac_exec_ext in '' $ac_executable_extensions; do
41994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41995    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41997    break 2
41998  fi
41999done
42000  done
42001IFS=$as_save_IFS
42002
42003fi
42004fi
42005STRIP=$ac_cv_prog_STRIP
42006if test -n "$STRIP"; then
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42008$as_echo "$STRIP" >&6; }
42009else
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42011$as_echo "no" >&6; }
42012fi
42013
42014
42015    test -n "$STRIP" && break
42016  done
42017fi
42018if test -z "$STRIP"; then
42019  ac_ct_STRIP=$STRIP
42020  for ac_prog in strip
42021do
42022  # Extract the first word of "$ac_prog", so it can be a program name with args.
42023set dummy $ac_prog; ac_word=$2
42024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42025$as_echo_n "checking for $ac_word... " >&6; }
42026if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42027  $as_echo_n "(cached) " >&6
42028else
42029  if test -n "$ac_ct_STRIP"; then
42030  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42031else
42032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42033for as_dir in $PATH
42034do
42035  IFS=$as_save_IFS
42036  test -z "$as_dir" && as_dir=.
42037    for ac_exec_ext in '' $ac_executable_extensions; do
42038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42039    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42041    break 2
42042  fi
42043done
42044  done
42045IFS=$as_save_IFS
42046
42047fi
42048fi
42049ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42050if test -n "$ac_ct_STRIP"; then
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42052$as_echo "$ac_ct_STRIP" >&6; }
42053else
42054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42055$as_echo "no" >&6; }
42056fi
42057
42058
42059  test -n "$ac_ct_STRIP" && break
42060done
42061
42062  if test "x$ac_ct_STRIP" = x; then
42063    STRIP=""
42064  else
42065    case $cross_compiling:$ac_tool_warned in
42066yes:)
42067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42069ac_tool_warned=yes ;;
42070esac
42071    STRIP=$ac_ct_STRIP
42072  fi
42073fi
42074
42075  else
42076    # The variable is set, but is it from the command line or the environment?
42077
42078    # Try to remove the string !STRIP! from our list.
42079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42081      # If it failed, the variable was not from the command line. Ignore it,
42082      # but warn the user (except for BASH, which is always set by the calling BASH).
42083      if test "xSTRIP" != xBASH; then
42084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42085$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42086      fi
42087      # Try to locate tool using the code snippet
42088      if test -n "$ac_tool_prefix"; then
42089  for ac_prog in strip
42090  do
42091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42094$as_echo_n "checking for $ac_word... " >&6; }
42095if ${ac_cv_prog_STRIP+:} false; then :
42096  $as_echo_n "(cached) " >&6
42097else
42098  if test -n "$STRIP"; then
42099  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42100else
42101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42102for as_dir in $PATH
42103do
42104  IFS=$as_save_IFS
42105  test -z "$as_dir" && as_dir=.
42106    for ac_exec_ext in '' $ac_executable_extensions; do
42107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42108    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42110    break 2
42111  fi
42112done
42113  done
42114IFS=$as_save_IFS
42115
42116fi
42117fi
42118STRIP=$ac_cv_prog_STRIP
42119if test -n "$STRIP"; then
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42121$as_echo "$STRIP" >&6; }
42122else
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42124$as_echo "no" >&6; }
42125fi
42126
42127
42128    test -n "$STRIP" && break
42129  done
42130fi
42131if test -z "$STRIP"; then
42132  ac_ct_STRIP=$STRIP
42133  for ac_prog in strip
42134do
42135  # Extract the first word of "$ac_prog", so it can be a program name with args.
42136set dummy $ac_prog; ac_word=$2
42137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42138$as_echo_n "checking for $ac_word... " >&6; }
42139if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42140  $as_echo_n "(cached) " >&6
42141else
42142  if test -n "$ac_ct_STRIP"; then
42143  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42144else
42145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42146for as_dir in $PATH
42147do
42148  IFS=$as_save_IFS
42149  test -z "$as_dir" && as_dir=.
42150    for ac_exec_ext in '' $ac_executable_extensions; do
42151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42152    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42154    break 2
42155  fi
42156done
42157  done
42158IFS=$as_save_IFS
42159
42160fi
42161fi
42162ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42163if test -n "$ac_ct_STRIP"; then
42164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42165$as_echo "$ac_ct_STRIP" >&6; }
42166else
42167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42168$as_echo "no" >&6; }
42169fi
42170
42171
42172  test -n "$ac_ct_STRIP" && break
42173done
42174
42175  if test "x$ac_ct_STRIP" = x; then
42176    STRIP=""
42177  else
42178    case $cross_compiling:$ac_tool_warned in
42179yes:)
42180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42182ac_tool_warned=yes ;;
42183esac
42184    STRIP=$ac_ct_STRIP
42185  fi
42186fi
42187
42188    else
42189      # If it succeeded, then it was overridden by the user. We will use it
42190      # for the tool.
42191
42192      # First remove it from the list of overridden variables, so we can test
42193      # for unknown variables in the end.
42194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42195
42196      # Check if we try to supply an empty value
42197      if test "x$STRIP" = x; then
42198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42199$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42201$as_echo_n "checking for STRIP... " >&6; }
42202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42203$as_echo "disabled" >&6; }
42204      else
42205        # Check if the provided tool contains a complete path.
42206        tool_specified="$STRIP"
42207        tool_basename="${tool_specified##*/}"
42208        if test "x$tool_basename" = "x$tool_specified"; then
42209          # A command without a complete path is provided, search $PATH.
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42211$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42212          # Extract the first word of "$tool_basename", so it can be a program name with args.
42213set dummy $tool_basename; ac_word=$2
42214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42215$as_echo_n "checking for $ac_word... " >&6; }
42216if ${ac_cv_path_STRIP+:} false; then :
42217  $as_echo_n "(cached) " >&6
42218else
42219  case $STRIP in
42220  [\\/]* | ?:[\\/]*)
42221  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42222  ;;
42223  *)
42224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42225for as_dir in $PATH
42226do
42227  IFS=$as_save_IFS
42228  test -z "$as_dir" && as_dir=.
42229    for ac_exec_ext in '' $ac_executable_extensions; do
42230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42231    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42233    break 2
42234  fi
42235done
42236  done
42237IFS=$as_save_IFS
42238
42239  ;;
42240esac
42241fi
42242STRIP=$ac_cv_path_STRIP
42243if test -n "$STRIP"; then
42244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42245$as_echo "$STRIP" >&6; }
42246else
42247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42248$as_echo "no" >&6; }
42249fi
42250
42251
42252          if test "x$STRIP" = x; then
42253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42254          fi
42255        else
42256          # Otherwise we believe it is a complete path. Use it as it is.
42257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42258$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42260$as_echo_n "checking for STRIP... " >&6; }
42261          if test ! -x "$tool_specified"; then
42262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42263$as_echo "not found" >&6; }
42264            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42265          fi
42266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42267$as_echo "$tool_specified" >&6; }
42268        fi
42269      fi
42270    fi
42271
42272  fi
42273
42274
42275
42276  # Only process if variable expands to non-empty
42277
42278  if test "x$STRIP" != x; then
42279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42280
42281  # First separate the path from the arguments. This will split at the first
42282  # space.
42283  complete="$STRIP"
42284  path="${complete%% *}"
42285  tmp="$complete EOL"
42286  arguments="${tmp#* }"
42287
42288  # Input might be given as Windows format, start by converting to
42289  # unix format.
42290  new_path=`$CYGPATH -u "$path"`
42291
42292  # Now try to locate executable using which
42293  new_path=`$WHICH "$new_path" 2> /dev/null`
42294  # bat and cmd files are not always considered executable in cygwin causing which
42295  # to not find them
42296  if test "x$new_path" = x \
42297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42299    new_path=`$CYGPATH -u "$path"`
42300  fi
42301  if test "x$new_path" = x; then
42302    # Oops. Which didn't find the executable.
42303    # The splitting of arguments from the executable at a space might have been incorrect,
42304    # since paths with space are more likely in Windows. Give it another try with the whole
42305    # argument.
42306    path="$complete"
42307    arguments="EOL"
42308    new_path=`$CYGPATH -u "$path"`
42309    new_path=`$WHICH "$new_path" 2> /dev/null`
42310    # bat and cmd files are not always considered executable in cygwin causing which
42311    # to not find them
42312    if test "x$new_path" = x \
42313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42315      new_path=`$CYGPATH -u "$path"`
42316    fi
42317    if test "x$new_path" = x; then
42318      # It's still not found. Now this is an unrecoverable error.
42319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42320$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42321      has_space=`$ECHO "$complete" | $GREP " "`
42322      if test "x$has_space" != x; then
42323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42325      fi
42326      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42327    fi
42328  fi
42329
42330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42333  # "foo.exe" is OK but "foo" is an error.
42334  #
42335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42336  # It is also a way to make sure we got the proper file name for the real test later on.
42337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42338  if test "x$test_shortpath" = x; then
42339    # Short path failed, file does not exist as specified.
42340    # Try adding .exe or .cmd
42341    if test -f "${new_path}.exe"; then
42342      input_to_shortpath="${new_path}.exe"
42343    elif test -f "${new_path}.cmd"; then
42344      input_to_shortpath="${new_path}.cmd"
42345    else
42346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42347$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42350      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42351    fi
42352  else
42353    input_to_shortpath="$new_path"
42354  fi
42355
42356  # Call helper function which possibly converts this using DOS-style short mode.
42357  # If so, the updated path is stored in $new_path.
42358  new_path="$input_to_shortpath"
42359
42360  input_path="$input_to_shortpath"
42361  # Check if we need to convert this using DOS-style short mode. If the path
42362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42363  # take no chances and rewrite it.
42364  # Note: m4 eats our [], so we need to use [ and ] instead.
42365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42366  if test "x$has_forbidden_chars" != x; then
42367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42371      # Going to short mode and back again did indeed matter. Since short mode is
42372      # case insensitive, let's make it lowercase to improve readability.
42373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42374      # Now convert it back to Unix-style (cygpath)
42375      input_path=`$CYGPATH -u "$shortmode_path"`
42376      new_path="$input_path"
42377    fi
42378  fi
42379
42380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42381  if test "x$test_cygdrive_prefix" = x; then
42382    # As a simple fix, exclude /usr/bin since it's not a real path.
42383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42385      # a path prefixed by /cygdrive for fixpath to work.
42386      new_path="$CYGWIN_ROOT_PATH$input_path"
42387    fi
42388  fi
42389
42390  # remove trailing .exe if any
42391  new_path="${new_path/%.exe/}"
42392
42393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42394
42395  # First separate the path from the arguments. This will split at the first
42396  # space.
42397  complete="$STRIP"
42398  path="${complete%% *}"
42399  tmp="$complete EOL"
42400  arguments="${tmp#* }"
42401
42402  # Input might be given as Windows format, start by converting to
42403  # unix format.
42404  new_path="$path"
42405
42406  windows_path="$new_path"
42407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42408    unix_path=`$CYGPATH -u "$windows_path"`
42409    new_path="$unix_path"
42410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42412    new_path="$unix_path"
42413  fi
42414
42415
42416  # Now try to locate executable using which
42417  new_path=`$WHICH "$new_path" 2> /dev/null`
42418
42419  if test "x$new_path" = x; then
42420    # Oops. Which didn't find the executable.
42421    # The splitting of arguments from the executable at a space might have been incorrect,
42422    # since paths with space are more likely in Windows. Give it another try with the whole
42423    # argument.
42424    path="$complete"
42425    arguments="EOL"
42426    new_path="$path"
42427
42428  windows_path="$new_path"
42429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42430    unix_path=`$CYGPATH -u "$windows_path"`
42431    new_path="$unix_path"
42432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42434    new_path="$unix_path"
42435  fi
42436
42437
42438    new_path=`$WHICH "$new_path" 2> /dev/null`
42439    # bat and cmd files are not always considered executable in MSYS causing which
42440    # to not find them
42441    if test "x$new_path" = x \
42442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42444      new_path="$path"
42445
42446  windows_path="$new_path"
42447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42448    unix_path=`$CYGPATH -u "$windows_path"`
42449    new_path="$unix_path"
42450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42452    new_path="$unix_path"
42453  fi
42454
42455    fi
42456
42457    if test "x$new_path" = x; then
42458      # It's still not found. Now this is an unrecoverable error.
42459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42460$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42461      has_space=`$ECHO "$complete" | $GREP " "`
42462      if test "x$has_space" != x; then
42463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42465      fi
42466      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42467    fi
42468  fi
42469
42470  # Now new_path has a complete unix path to the binary
42471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42472    # Keep paths in /bin as-is, but remove trailing .exe if any
42473    new_path="${new_path/%.exe/}"
42474    # Do not save /bin paths to all_fixpath_prefixes!
42475  else
42476    # Not in mixed or Windows style, start by that.
42477    new_path=`cmd //c echo $new_path`
42478
42479  input_path="$new_path"
42480  # Check if we need to convert this using DOS-style short mode. If the path
42481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42482  # take no chances and rewrite it.
42483  # Note: m4 eats our [], so we need to use [ and ] instead.
42484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42485  if test "x$has_forbidden_chars" != x; then
42486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42488  fi
42489
42490    # Output is in $new_path
42491
42492  windows_path="$new_path"
42493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42494    unix_path=`$CYGPATH -u "$windows_path"`
42495    new_path="$unix_path"
42496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42498    new_path="$unix_path"
42499  fi
42500
42501    # remove trailing .exe if any
42502    new_path="${new_path/%.exe/}"
42503
42504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42506  fi
42507
42508    else
42509      # We're on a unix platform. Hooray! :)
42510      # First separate the path from the arguments. This will split at the first
42511      # space.
42512      complete="$STRIP"
42513      path="${complete%% *}"
42514      tmp="$complete EOL"
42515      arguments="${tmp#* }"
42516
42517      # Cannot rely on the command "which" here since it doesn't always work.
42518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42519      if test -z "$is_absolute_path"; then
42520        # Path to executable is not absolute. Find it.
42521        IFS_save="$IFS"
42522        IFS=:
42523        for p in $PATH; do
42524          if test -f "$p/$path" && test -x "$p/$path"; then
42525            new_path="$p/$path"
42526            break
42527          fi
42528        done
42529        IFS="$IFS_save"
42530      else
42531        # This is an absolute path, we can use it without further modifications.
42532        new_path="$path"
42533      fi
42534
42535      if test "x$new_path" = x; then
42536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42537$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42538        has_space=`$ECHO "$complete" | $GREP " "`
42539        if test "x$has_space" != x; then
42540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42542        fi
42543        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42544      fi
42545    fi
42546
42547    # Now join together the path and the arguments once again
42548    if test "x$arguments" != xEOL; then
42549      new_complete="$new_path ${arguments% *}"
42550    else
42551      new_complete="$new_path"
42552    fi
42553
42554    if test "x$complete" != "x$new_complete"; then
42555      STRIP="$new_complete"
42556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42557$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42558    fi
42559  fi
42560
42561    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42562
42563
42564  # Publish this variable in the help.
42565
42566
42567  if [ -z "${NM+x}" ]; then
42568    # The variable is not set by user, try to locate tool using the code snippet
42569    if test -n "$ac_tool_prefix"; then
42570  for ac_prog in nm gcc-nm
42571  do
42572    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42575$as_echo_n "checking for $ac_word... " >&6; }
42576if ${ac_cv_prog_NM+:} false; then :
42577  $as_echo_n "(cached) " >&6
42578else
42579  if test -n "$NM"; then
42580  ac_cv_prog_NM="$NM" # Let the user override the test.
42581else
42582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42583for as_dir in $PATH
42584do
42585  IFS=$as_save_IFS
42586  test -z "$as_dir" && as_dir=.
42587    for ac_exec_ext in '' $ac_executable_extensions; do
42588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42589    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42591    break 2
42592  fi
42593done
42594  done
42595IFS=$as_save_IFS
42596
42597fi
42598fi
42599NM=$ac_cv_prog_NM
42600if test -n "$NM"; then
42601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42602$as_echo "$NM" >&6; }
42603else
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42605$as_echo "no" >&6; }
42606fi
42607
42608
42609    test -n "$NM" && break
42610  done
42611fi
42612if test -z "$NM"; then
42613  ac_ct_NM=$NM
42614  for ac_prog in nm gcc-nm
42615do
42616  # Extract the first word of "$ac_prog", so it can be a program name with args.
42617set dummy $ac_prog; ac_word=$2
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619$as_echo_n "checking for $ac_word... " >&6; }
42620if ${ac_cv_prog_ac_ct_NM+:} false; then :
42621  $as_echo_n "(cached) " >&6
42622else
42623  if test -n "$ac_ct_NM"; then
42624  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42625else
42626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627for as_dir in $PATH
42628do
42629  IFS=$as_save_IFS
42630  test -z "$as_dir" && as_dir=.
42631    for ac_exec_ext in '' $ac_executable_extensions; do
42632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633    ac_cv_prog_ac_ct_NM="$ac_prog"
42634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635    break 2
42636  fi
42637done
42638  done
42639IFS=$as_save_IFS
42640
42641fi
42642fi
42643ac_ct_NM=$ac_cv_prog_ac_ct_NM
42644if test -n "$ac_ct_NM"; then
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42646$as_echo "$ac_ct_NM" >&6; }
42647else
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649$as_echo "no" >&6; }
42650fi
42651
42652
42653  test -n "$ac_ct_NM" && break
42654done
42655
42656  if test "x$ac_ct_NM" = x; then
42657    NM=""
42658  else
42659    case $cross_compiling:$ac_tool_warned in
42660yes:)
42661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42663ac_tool_warned=yes ;;
42664esac
42665    NM=$ac_ct_NM
42666  fi
42667fi
42668
42669  else
42670    # The variable is set, but is it from the command line or the environment?
42671
42672    # Try to remove the string !NM! from our list.
42673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42675      # If it failed, the variable was not from the command line. Ignore it,
42676      # but warn the user (except for BASH, which is always set by the calling BASH).
42677      if test "xNM" != xBASH; then
42678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42679$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42680      fi
42681      # Try to locate tool using the code snippet
42682      if test -n "$ac_tool_prefix"; then
42683  for ac_prog in nm gcc-nm
42684  do
42685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688$as_echo_n "checking for $ac_word... " >&6; }
42689if ${ac_cv_prog_NM+:} false; then :
42690  $as_echo_n "(cached) " >&6
42691else
42692  if test -n "$NM"; then
42693  ac_cv_prog_NM="$NM" # Let the user override the test.
42694else
42695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696for as_dir in $PATH
42697do
42698  IFS=$as_save_IFS
42699  test -z "$as_dir" && as_dir=.
42700    for ac_exec_ext in '' $ac_executable_extensions; do
42701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704    break 2
42705  fi
42706done
42707  done
42708IFS=$as_save_IFS
42709
42710fi
42711fi
42712NM=$ac_cv_prog_NM
42713if test -n "$NM"; then
42714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42715$as_echo "$NM" >&6; }
42716else
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718$as_echo "no" >&6; }
42719fi
42720
42721
42722    test -n "$NM" && break
42723  done
42724fi
42725if test -z "$NM"; then
42726  ac_ct_NM=$NM
42727  for ac_prog in nm gcc-nm
42728do
42729  # Extract the first word of "$ac_prog", so it can be a program name with args.
42730set dummy $ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_ac_ct_NM+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$ac_ct_NM"; then
42737  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_ac_ct_NM="$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756ac_ct_NM=$ac_cv_prog_ac_ct_NM
42757if test -n "$ac_ct_NM"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42759$as_echo "$ac_ct_NM" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766  test -n "$ac_ct_NM" && break
42767done
42768
42769  if test "x$ac_ct_NM" = x; then
42770    NM=""
42771  else
42772    case $cross_compiling:$ac_tool_warned in
42773yes:)
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42776ac_tool_warned=yes ;;
42777esac
42778    NM=$ac_ct_NM
42779  fi
42780fi
42781
42782    else
42783      # If it succeeded, then it was overridden by the user. We will use it
42784      # for the tool.
42785
42786      # First remove it from the list of overridden variables, so we can test
42787      # for unknown variables in the end.
42788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42789
42790      # Check if we try to supply an empty value
42791      if test "x$NM" = x; then
42792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42793$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42795$as_echo_n "checking for NM... " >&6; }
42796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42797$as_echo "disabled" >&6; }
42798      else
42799        # Check if the provided tool contains a complete path.
42800        tool_specified="$NM"
42801        tool_basename="${tool_specified##*/}"
42802        if test "x$tool_basename" = "x$tool_specified"; then
42803          # A command without a complete path is provided, search $PATH.
42804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42805$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42806          # Extract the first word of "$tool_basename", so it can be a program name with args.
42807set dummy $tool_basename; ac_word=$2
42808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42809$as_echo_n "checking for $ac_word... " >&6; }
42810if ${ac_cv_path_NM+:} false; then :
42811  $as_echo_n "(cached) " >&6
42812else
42813  case $NM in
42814  [\\/]* | ?:[\\/]*)
42815  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42816  ;;
42817  *)
42818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42819for as_dir in $PATH
42820do
42821  IFS=$as_save_IFS
42822  test -z "$as_dir" && as_dir=.
42823    for ac_exec_ext in '' $ac_executable_extensions; do
42824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42825    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42827    break 2
42828  fi
42829done
42830  done
42831IFS=$as_save_IFS
42832
42833  ;;
42834esac
42835fi
42836NM=$ac_cv_path_NM
42837if test -n "$NM"; then
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42839$as_echo "$NM" >&6; }
42840else
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42842$as_echo "no" >&6; }
42843fi
42844
42845
42846          if test "x$NM" = x; then
42847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42848          fi
42849        else
42850          # Otherwise we believe it is a complete path. Use it as it is.
42851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42852$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42854$as_echo_n "checking for NM... " >&6; }
42855          if test ! -x "$tool_specified"; then
42856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42857$as_echo "not found" >&6; }
42858            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42859          fi
42860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42861$as_echo "$tool_specified" >&6; }
42862        fi
42863      fi
42864    fi
42865
42866  fi
42867
42868
42869    else
42870
42871
42872  # Publish this variable in the help.
42873
42874
42875  if [ -z "${NM+x}" ]; then
42876    # The variable is not set by user, try to locate tool using the code snippet
42877    if test -n "$ac_tool_prefix"; then
42878  for ac_prog in nm
42879  do
42880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42883$as_echo_n "checking for $ac_word... " >&6; }
42884if ${ac_cv_prog_NM+:} false; then :
42885  $as_echo_n "(cached) " >&6
42886else
42887  if test -n "$NM"; then
42888  ac_cv_prog_NM="$NM" # Let the user override the test.
42889else
42890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42891for as_dir in $PATH
42892do
42893  IFS=$as_save_IFS
42894  test -z "$as_dir" && as_dir=.
42895    for ac_exec_ext in '' $ac_executable_extensions; do
42896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42897    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42899    break 2
42900  fi
42901done
42902  done
42903IFS=$as_save_IFS
42904
42905fi
42906fi
42907NM=$ac_cv_prog_NM
42908if test -n "$NM"; then
42909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42910$as_echo "$NM" >&6; }
42911else
42912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42913$as_echo "no" >&6; }
42914fi
42915
42916
42917    test -n "$NM" && break
42918  done
42919fi
42920if test -z "$NM"; then
42921  ac_ct_NM=$NM
42922  for ac_prog in nm
42923do
42924  # Extract the first word of "$ac_prog", so it can be a program name with args.
42925set dummy $ac_prog; ac_word=$2
42926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42927$as_echo_n "checking for $ac_word... " >&6; }
42928if ${ac_cv_prog_ac_ct_NM+:} false; then :
42929  $as_echo_n "(cached) " >&6
42930else
42931  if test -n "$ac_ct_NM"; then
42932  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42933else
42934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42935for as_dir in $PATH
42936do
42937  IFS=$as_save_IFS
42938  test -z "$as_dir" && as_dir=.
42939    for ac_exec_ext in '' $ac_executable_extensions; do
42940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42941    ac_cv_prog_ac_ct_NM="$ac_prog"
42942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42943    break 2
42944  fi
42945done
42946  done
42947IFS=$as_save_IFS
42948
42949fi
42950fi
42951ac_ct_NM=$ac_cv_prog_ac_ct_NM
42952if test -n "$ac_ct_NM"; then
42953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42954$as_echo "$ac_ct_NM" >&6; }
42955else
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42957$as_echo "no" >&6; }
42958fi
42959
42960
42961  test -n "$ac_ct_NM" && break
42962done
42963
42964  if test "x$ac_ct_NM" = x; then
42965    NM=""
42966  else
42967    case $cross_compiling:$ac_tool_warned in
42968yes:)
42969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42971ac_tool_warned=yes ;;
42972esac
42973    NM=$ac_ct_NM
42974  fi
42975fi
42976
42977  else
42978    # The variable is set, but is it from the command line or the environment?
42979
42980    # Try to remove the string !NM! from our list.
42981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42983      # If it failed, the variable was not from the command line. Ignore it,
42984      # but warn the user (except for BASH, which is always set by the calling BASH).
42985      if test "xNM" != xBASH; then
42986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42987$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42988      fi
42989      # Try to locate tool using the code snippet
42990      if test -n "$ac_tool_prefix"; then
42991  for ac_prog in nm
42992  do
42993    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42994set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42996$as_echo_n "checking for $ac_word... " >&6; }
42997if ${ac_cv_prog_NM+:} false; then :
42998  $as_echo_n "(cached) " >&6
42999else
43000  if test -n "$NM"; then
43001  ac_cv_prog_NM="$NM" # Let the user override the test.
43002else
43003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43004for as_dir in $PATH
43005do
43006  IFS=$as_save_IFS
43007  test -z "$as_dir" && as_dir=.
43008    for ac_exec_ext in '' $ac_executable_extensions; do
43009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43010    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43012    break 2
43013  fi
43014done
43015  done
43016IFS=$as_save_IFS
43017
43018fi
43019fi
43020NM=$ac_cv_prog_NM
43021if test -n "$NM"; then
43022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43023$as_echo "$NM" >&6; }
43024else
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43026$as_echo "no" >&6; }
43027fi
43028
43029
43030    test -n "$NM" && break
43031  done
43032fi
43033if test -z "$NM"; then
43034  ac_ct_NM=$NM
43035  for ac_prog in nm
43036do
43037  # Extract the first word of "$ac_prog", so it can be a program name with args.
43038set dummy $ac_prog; ac_word=$2
43039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43040$as_echo_n "checking for $ac_word... " >&6; }
43041if ${ac_cv_prog_ac_ct_NM+:} false; then :
43042  $as_echo_n "(cached) " >&6
43043else
43044  if test -n "$ac_ct_NM"; then
43045  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43046else
43047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43048for as_dir in $PATH
43049do
43050  IFS=$as_save_IFS
43051  test -z "$as_dir" && as_dir=.
43052    for ac_exec_ext in '' $ac_executable_extensions; do
43053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43054    ac_cv_prog_ac_ct_NM="$ac_prog"
43055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43056    break 2
43057  fi
43058done
43059  done
43060IFS=$as_save_IFS
43061
43062fi
43063fi
43064ac_ct_NM=$ac_cv_prog_ac_ct_NM
43065if test -n "$ac_ct_NM"; then
43066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43067$as_echo "$ac_ct_NM" >&6; }
43068else
43069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43070$as_echo "no" >&6; }
43071fi
43072
43073
43074  test -n "$ac_ct_NM" && break
43075done
43076
43077  if test "x$ac_ct_NM" = x; then
43078    NM=""
43079  else
43080    case $cross_compiling:$ac_tool_warned in
43081yes:)
43082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43084ac_tool_warned=yes ;;
43085esac
43086    NM=$ac_ct_NM
43087  fi
43088fi
43089
43090    else
43091      # If it succeeded, then it was overridden by the user. We will use it
43092      # for the tool.
43093
43094      # First remove it from the list of overridden variables, so we can test
43095      # for unknown variables in the end.
43096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43097
43098      # Check if we try to supply an empty value
43099      if test "x$NM" = x; then
43100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43101$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43103$as_echo_n "checking for NM... " >&6; }
43104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43105$as_echo "disabled" >&6; }
43106      else
43107        # Check if the provided tool contains a complete path.
43108        tool_specified="$NM"
43109        tool_basename="${tool_specified##*/}"
43110        if test "x$tool_basename" = "x$tool_specified"; then
43111          # A command without a complete path is provided, search $PATH.
43112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43113$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43114          # Extract the first word of "$tool_basename", so it can be a program name with args.
43115set dummy $tool_basename; ac_word=$2
43116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43117$as_echo_n "checking for $ac_word... " >&6; }
43118if ${ac_cv_path_NM+:} false; then :
43119  $as_echo_n "(cached) " >&6
43120else
43121  case $NM in
43122  [\\/]* | ?:[\\/]*)
43123  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43124  ;;
43125  *)
43126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43127for as_dir in $PATH
43128do
43129  IFS=$as_save_IFS
43130  test -z "$as_dir" && as_dir=.
43131    for ac_exec_ext in '' $ac_executable_extensions; do
43132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43133    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43135    break 2
43136  fi
43137done
43138  done
43139IFS=$as_save_IFS
43140
43141  ;;
43142esac
43143fi
43144NM=$ac_cv_path_NM
43145if test -n "$NM"; then
43146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43147$as_echo "$NM" >&6; }
43148else
43149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43150$as_echo "no" >&6; }
43151fi
43152
43153
43154          if test "x$NM" = x; then
43155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43156          fi
43157        else
43158          # Otherwise we believe it is a complete path. Use it as it is.
43159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43160$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43162$as_echo_n "checking for NM... " >&6; }
43163          if test ! -x "$tool_specified"; then
43164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43165$as_echo "not found" >&6; }
43166            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43167          fi
43168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43169$as_echo "$tool_specified" >&6; }
43170        fi
43171      fi
43172    fi
43173
43174  fi
43175
43176
43177    fi
43178
43179  # Only process if variable expands to non-empty
43180
43181  if test "x$NM" != x; then
43182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43183
43184  # First separate the path from the arguments. This will split at the first
43185  # space.
43186  complete="$NM"
43187  path="${complete%% *}"
43188  tmp="$complete EOL"
43189  arguments="${tmp#* }"
43190
43191  # Input might be given as Windows format, start by converting to
43192  # unix format.
43193  new_path=`$CYGPATH -u "$path"`
43194
43195  # Now try to locate executable using which
43196  new_path=`$WHICH "$new_path" 2> /dev/null`
43197  # bat and cmd files are not always considered executable in cygwin causing which
43198  # to not find them
43199  if test "x$new_path" = x \
43200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43202    new_path=`$CYGPATH -u "$path"`
43203  fi
43204  if test "x$new_path" = x; then
43205    # Oops. Which didn't find the executable.
43206    # The splitting of arguments from the executable at a space might have been incorrect,
43207    # since paths with space are more likely in Windows. Give it another try with the whole
43208    # argument.
43209    path="$complete"
43210    arguments="EOL"
43211    new_path=`$CYGPATH -u "$path"`
43212    new_path=`$WHICH "$new_path" 2> /dev/null`
43213    # bat and cmd files are not always considered executable in cygwin causing which
43214    # to not find them
43215    if test "x$new_path" = x \
43216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43218      new_path=`$CYGPATH -u "$path"`
43219    fi
43220    if test "x$new_path" = x; then
43221      # It's still not found. Now this is an unrecoverable error.
43222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43223$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43224      has_space=`$ECHO "$complete" | $GREP " "`
43225      if test "x$has_space" != x; then
43226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43228      fi
43229      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43230    fi
43231  fi
43232
43233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43236  # "foo.exe" is OK but "foo" is an error.
43237  #
43238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43239  # It is also a way to make sure we got the proper file name for the real test later on.
43240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43241  if test "x$test_shortpath" = x; then
43242    # Short path failed, file does not exist as specified.
43243    # Try adding .exe or .cmd
43244    if test -f "${new_path}.exe"; then
43245      input_to_shortpath="${new_path}.exe"
43246    elif test -f "${new_path}.cmd"; then
43247      input_to_shortpath="${new_path}.cmd"
43248    else
43249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43250$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43253      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43254    fi
43255  else
43256    input_to_shortpath="$new_path"
43257  fi
43258
43259  # Call helper function which possibly converts this using DOS-style short mode.
43260  # If so, the updated path is stored in $new_path.
43261  new_path="$input_to_shortpath"
43262
43263  input_path="$input_to_shortpath"
43264  # Check if we need to convert this using DOS-style short mode. If the path
43265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43266  # take no chances and rewrite it.
43267  # Note: m4 eats our [], so we need to use [ and ] instead.
43268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43269  if test "x$has_forbidden_chars" != x; then
43270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43274      # Going to short mode and back again did indeed matter. Since short mode is
43275      # case insensitive, let's make it lowercase to improve readability.
43276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43277      # Now convert it back to Unix-style (cygpath)
43278      input_path=`$CYGPATH -u "$shortmode_path"`
43279      new_path="$input_path"
43280    fi
43281  fi
43282
43283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43284  if test "x$test_cygdrive_prefix" = x; then
43285    # As a simple fix, exclude /usr/bin since it's not a real path.
43286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43288      # a path prefixed by /cygdrive for fixpath to work.
43289      new_path="$CYGWIN_ROOT_PATH$input_path"
43290    fi
43291  fi
43292
43293  # remove trailing .exe if any
43294  new_path="${new_path/%.exe/}"
43295
43296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43297
43298  # First separate the path from the arguments. This will split at the first
43299  # space.
43300  complete="$NM"
43301  path="${complete%% *}"
43302  tmp="$complete EOL"
43303  arguments="${tmp#* }"
43304
43305  # Input might be given as Windows format, start by converting to
43306  # unix format.
43307  new_path="$path"
43308
43309  windows_path="$new_path"
43310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43311    unix_path=`$CYGPATH -u "$windows_path"`
43312    new_path="$unix_path"
43313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43315    new_path="$unix_path"
43316  fi
43317
43318
43319  # Now try to locate executable using which
43320  new_path=`$WHICH "$new_path" 2> /dev/null`
43321
43322  if test "x$new_path" = x; then
43323    # Oops. Which didn't find the executable.
43324    # The splitting of arguments from the executable at a space might have been incorrect,
43325    # since paths with space are more likely in Windows. Give it another try with the whole
43326    # argument.
43327    path="$complete"
43328    arguments="EOL"
43329    new_path="$path"
43330
43331  windows_path="$new_path"
43332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43333    unix_path=`$CYGPATH -u "$windows_path"`
43334    new_path="$unix_path"
43335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43337    new_path="$unix_path"
43338  fi
43339
43340
43341    new_path=`$WHICH "$new_path" 2> /dev/null`
43342    # bat and cmd files are not always considered executable in MSYS causing which
43343    # to not find them
43344    if test "x$new_path" = x \
43345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43347      new_path="$path"
43348
43349  windows_path="$new_path"
43350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43351    unix_path=`$CYGPATH -u "$windows_path"`
43352    new_path="$unix_path"
43353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43355    new_path="$unix_path"
43356  fi
43357
43358    fi
43359
43360    if test "x$new_path" = x; then
43361      # It's still not found. Now this is an unrecoverable error.
43362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43363$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43364      has_space=`$ECHO "$complete" | $GREP " "`
43365      if test "x$has_space" != x; then
43366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43368      fi
43369      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43370    fi
43371  fi
43372
43373  # Now new_path has a complete unix path to the binary
43374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43375    # Keep paths in /bin as-is, but remove trailing .exe if any
43376    new_path="${new_path/%.exe/}"
43377    # Do not save /bin paths to all_fixpath_prefixes!
43378  else
43379    # Not in mixed or Windows style, start by that.
43380    new_path=`cmd //c echo $new_path`
43381
43382  input_path="$new_path"
43383  # Check if we need to convert this using DOS-style short mode. If the path
43384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43385  # take no chances and rewrite it.
43386  # Note: m4 eats our [], so we need to use [ and ] instead.
43387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43388  if test "x$has_forbidden_chars" != x; then
43389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43391  fi
43392
43393    # Output is in $new_path
43394
43395  windows_path="$new_path"
43396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43397    unix_path=`$CYGPATH -u "$windows_path"`
43398    new_path="$unix_path"
43399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43401    new_path="$unix_path"
43402  fi
43403
43404    # remove trailing .exe if any
43405    new_path="${new_path/%.exe/}"
43406
43407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43409  fi
43410
43411    else
43412      # We're on a unix platform. Hooray! :)
43413      # First separate the path from the arguments. This will split at the first
43414      # space.
43415      complete="$NM"
43416      path="${complete%% *}"
43417      tmp="$complete EOL"
43418      arguments="${tmp#* }"
43419
43420      # Cannot rely on the command "which" here since it doesn't always work.
43421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43422      if test -z "$is_absolute_path"; then
43423        # Path to executable is not absolute. Find it.
43424        IFS_save="$IFS"
43425        IFS=:
43426        for p in $PATH; do
43427          if test -f "$p/$path" && test -x "$p/$path"; then
43428            new_path="$p/$path"
43429            break
43430          fi
43431        done
43432        IFS="$IFS_save"
43433      else
43434        # This is an absolute path, we can use it without further modifications.
43435        new_path="$path"
43436      fi
43437
43438      if test "x$new_path" = x; then
43439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43440$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43441        has_space=`$ECHO "$complete" | $GREP " "`
43442        if test "x$has_space" != x; then
43443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43445        fi
43446        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43447      fi
43448    fi
43449
43450    # Now join together the path and the arguments once again
43451    if test "x$arguments" != xEOL; then
43452      new_complete="$new_path ${arguments% *}"
43453    else
43454      new_complete="$new_path"
43455    fi
43456
43457    if test "x$complete" != "x$new_complete"; then
43458      NM="$new_complete"
43459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43460$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43461    fi
43462  fi
43463
43464    GNM="$NM"
43465
43466  fi
43467
43468  # objcopy is used for moving debug symbols to separate files when
43469  # full debug symbols are enabled.
43470  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43471
43472
43473  # Publish this variable in the help.
43474
43475
43476  if [ -z "${OBJCOPY+x}" ]; then
43477    # The variable is not set by user, try to locate tool using the code snippet
43478    if test -n "$ac_tool_prefix"; then
43479  for ac_prog in gobjcopy objcopy
43480  do
43481    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43482set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43484$as_echo_n "checking for $ac_word... " >&6; }
43485if ${ac_cv_prog_OBJCOPY+:} false; then :
43486  $as_echo_n "(cached) " >&6
43487else
43488  if test -n "$OBJCOPY"; then
43489  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43490else
43491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43492for as_dir in $PATH
43493do
43494  IFS=$as_save_IFS
43495  test -z "$as_dir" && as_dir=.
43496    for ac_exec_ext in '' $ac_executable_extensions; do
43497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43498    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43500    break 2
43501  fi
43502done
43503  done
43504IFS=$as_save_IFS
43505
43506fi
43507fi
43508OBJCOPY=$ac_cv_prog_OBJCOPY
43509if test -n "$OBJCOPY"; then
43510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43511$as_echo "$OBJCOPY" >&6; }
43512else
43513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43514$as_echo "no" >&6; }
43515fi
43516
43517
43518    test -n "$OBJCOPY" && break
43519  done
43520fi
43521if test -z "$OBJCOPY"; then
43522  ac_ct_OBJCOPY=$OBJCOPY
43523  for ac_prog in gobjcopy objcopy
43524do
43525  # Extract the first word of "$ac_prog", so it can be a program name with args.
43526set dummy $ac_prog; ac_word=$2
43527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43528$as_echo_n "checking for $ac_word... " >&6; }
43529if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43530  $as_echo_n "(cached) " >&6
43531else
43532  if test -n "$ac_ct_OBJCOPY"; then
43533  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43534else
43535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43536for as_dir in $PATH
43537do
43538  IFS=$as_save_IFS
43539  test -z "$as_dir" && as_dir=.
43540    for ac_exec_ext in '' $ac_executable_extensions; do
43541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43542    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43544    break 2
43545  fi
43546done
43547  done
43548IFS=$as_save_IFS
43549
43550fi
43551fi
43552ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43553if test -n "$ac_ct_OBJCOPY"; then
43554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43555$as_echo "$ac_ct_OBJCOPY" >&6; }
43556else
43557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43558$as_echo "no" >&6; }
43559fi
43560
43561
43562  test -n "$ac_ct_OBJCOPY" && break
43563done
43564
43565  if test "x$ac_ct_OBJCOPY" = x; then
43566    OBJCOPY=""
43567  else
43568    case $cross_compiling:$ac_tool_warned in
43569yes:)
43570{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43571$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43572ac_tool_warned=yes ;;
43573esac
43574    OBJCOPY=$ac_ct_OBJCOPY
43575  fi
43576fi
43577
43578  else
43579    # The variable is set, but is it from the command line or the environment?
43580
43581    # Try to remove the string !OBJCOPY! from our list.
43582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43584      # If it failed, the variable was not from the command line. Ignore it,
43585      # but warn the user (except for BASH, which is always set by the calling BASH).
43586      if test "xOBJCOPY" != xBASH; then
43587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43588$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43589      fi
43590      # Try to locate tool using the code snippet
43591      if test -n "$ac_tool_prefix"; then
43592  for ac_prog in gobjcopy objcopy
43593  do
43594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43597$as_echo_n "checking for $ac_word... " >&6; }
43598if ${ac_cv_prog_OBJCOPY+:} false; then :
43599  $as_echo_n "(cached) " >&6
43600else
43601  if test -n "$OBJCOPY"; then
43602  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43603else
43604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43605for as_dir in $PATH
43606do
43607  IFS=$as_save_IFS
43608  test -z "$as_dir" && as_dir=.
43609    for ac_exec_ext in '' $ac_executable_extensions; do
43610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43611    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43613    break 2
43614  fi
43615done
43616  done
43617IFS=$as_save_IFS
43618
43619fi
43620fi
43621OBJCOPY=$ac_cv_prog_OBJCOPY
43622if test -n "$OBJCOPY"; then
43623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43624$as_echo "$OBJCOPY" >&6; }
43625else
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43627$as_echo "no" >&6; }
43628fi
43629
43630
43631    test -n "$OBJCOPY" && break
43632  done
43633fi
43634if test -z "$OBJCOPY"; then
43635  ac_ct_OBJCOPY=$OBJCOPY
43636  for ac_prog in gobjcopy objcopy
43637do
43638  # Extract the first word of "$ac_prog", so it can be a program name with args.
43639set dummy $ac_prog; ac_word=$2
43640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43641$as_echo_n "checking for $ac_word... " >&6; }
43642if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43643  $as_echo_n "(cached) " >&6
43644else
43645  if test -n "$ac_ct_OBJCOPY"; then
43646  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43647else
43648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43649for as_dir in $PATH
43650do
43651  IFS=$as_save_IFS
43652  test -z "$as_dir" && as_dir=.
43653    for ac_exec_ext in '' $ac_executable_extensions; do
43654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43655    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43657    break 2
43658  fi
43659done
43660  done
43661IFS=$as_save_IFS
43662
43663fi
43664fi
43665ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43666if test -n "$ac_ct_OBJCOPY"; then
43667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43668$as_echo "$ac_ct_OBJCOPY" >&6; }
43669else
43670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43671$as_echo "no" >&6; }
43672fi
43673
43674
43675  test -n "$ac_ct_OBJCOPY" && break
43676done
43677
43678  if test "x$ac_ct_OBJCOPY" = x; then
43679    OBJCOPY=""
43680  else
43681    case $cross_compiling:$ac_tool_warned in
43682yes:)
43683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43685ac_tool_warned=yes ;;
43686esac
43687    OBJCOPY=$ac_ct_OBJCOPY
43688  fi
43689fi
43690
43691    else
43692      # If it succeeded, then it was overridden by the user. We will use it
43693      # for the tool.
43694
43695      # First remove it from the list of overridden variables, so we can test
43696      # for unknown variables in the end.
43697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43698
43699      # Check if we try to supply an empty value
43700      if test "x$OBJCOPY" = x; then
43701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43702$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43704$as_echo_n "checking for OBJCOPY... " >&6; }
43705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43706$as_echo "disabled" >&6; }
43707      else
43708        # Check if the provided tool contains a complete path.
43709        tool_specified="$OBJCOPY"
43710        tool_basename="${tool_specified##*/}"
43711        if test "x$tool_basename" = "x$tool_specified"; then
43712          # A command without a complete path is provided, search $PATH.
43713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43714$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43715          # Extract the first word of "$tool_basename", so it can be a program name with args.
43716set dummy $tool_basename; ac_word=$2
43717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43718$as_echo_n "checking for $ac_word... " >&6; }
43719if ${ac_cv_path_OBJCOPY+:} false; then :
43720  $as_echo_n "(cached) " >&6
43721else
43722  case $OBJCOPY in
43723  [\\/]* | ?:[\\/]*)
43724  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43725  ;;
43726  *)
43727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43728for as_dir in $PATH
43729do
43730  IFS=$as_save_IFS
43731  test -z "$as_dir" && as_dir=.
43732    for ac_exec_ext in '' $ac_executable_extensions; do
43733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43734    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43736    break 2
43737  fi
43738done
43739  done
43740IFS=$as_save_IFS
43741
43742  ;;
43743esac
43744fi
43745OBJCOPY=$ac_cv_path_OBJCOPY
43746if test -n "$OBJCOPY"; then
43747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43748$as_echo "$OBJCOPY" >&6; }
43749else
43750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43751$as_echo "no" >&6; }
43752fi
43753
43754
43755          if test "x$OBJCOPY" = x; then
43756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43757          fi
43758        else
43759          # Otherwise we believe it is a complete path. Use it as it is.
43760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43761$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43763$as_echo_n "checking for OBJCOPY... " >&6; }
43764          if test ! -x "$tool_specified"; then
43765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43766$as_echo "not found" >&6; }
43767            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43768          fi
43769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43770$as_echo "$tool_specified" >&6; }
43771        fi
43772      fi
43773    fi
43774
43775  fi
43776
43777
43778    # Only call fixup if objcopy was found.
43779    if test -n "$OBJCOPY"; then
43780
43781  # Only process if variable expands to non-empty
43782
43783  if test "x$OBJCOPY" != x; then
43784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43785
43786  # First separate the path from the arguments. This will split at the first
43787  # space.
43788  complete="$OBJCOPY"
43789  path="${complete%% *}"
43790  tmp="$complete EOL"
43791  arguments="${tmp#* }"
43792
43793  # Input might be given as Windows format, start by converting to
43794  # unix format.
43795  new_path=`$CYGPATH -u "$path"`
43796
43797  # Now try to locate executable using which
43798  new_path=`$WHICH "$new_path" 2> /dev/null`
43799  # bat and cmd files are not always considered executable in cygwin causing which
43800  # to not find them
43801  if test "x$new_path" = x \
43802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43804    new_path=`$CYGPATH -u "$path"`
43805  fi
43806  if test "x$new_path" = x; then
43807    # Oops. Which didn't find the executable.
43808    # The splitting of arguments from the executable at a space might have been incorrect,
43809    # since paths with space are more likely in Windows. Give it another try with the whole
43810    # argument.
43811    path="$complete"
43812    arguments="EOL"
43813    new_path=`$CYGPATH -u "$path"`
43814    new_path=`$WHICH "$new_path" 2> /dev/null`
43815    # bat and cmd files are not always considered executable in cygwin causing which
43816    # to not find them
43817    if test "x$new_path" = x \
43818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43820      new_path=`$CYGPATH -u "$path"`
43821    fi
43822    if test "x$new_path" = x; then
43823      # It's still not found. Now this is an unrecoverable error.
43824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43825$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43826      has_space=`$ECHO "$complete" | $GREP " "`
43827      if test "x$has_space" != x; then
43828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43830      fi
43831      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43832    fi
43833  fi
43834
43835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43838  # "foo.exe" is OK but "foo" is an error.
43839  #
43840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43841  # It is also a way to make sure we got the proper file name for the real test later on.
43842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43843  if test "x$test_shortpath" = x; then
43844    # Short path failed, file does not exist as specified.
43845    # Try adding .exe or .cmd
43846    if test -f "${new_path}.exe"; then
43847      input_to_shortpath="${new_path}.exe"
43848    elif test -f "${new_path}.cmd"; then
43849      input_to_shortpath="${new_path}.cmd"
43850    else
43851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43852$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43855      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43856    fi
43857  else
43858    input_to_shortpath="$new_path"
43859  fi
43860
43861  # Call helper function which possibly converts this using DOS-style short mode.
43862  # If so, the updated path is stored in $new_path.
43863  new_path="$input_to_shortpath"
43864
43865  input_path="$input_to_shortpath"
43866  # Check if we need to convert this using DOS-style short mode. If the path
43867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43868  # take no chances and rewrite it.
43869  # Note: m4 eats our [], so we need to use [ and ] instead.
43870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43871  if test "x$has_forbidden_chars" != x; then
43872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43876      # Going to short mode and back again did indeed matter. Since short mode is
43877      # case insensitive, let's make it lowercase to improve readability.
43878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879      # Now convert it back to Unix-style (cygpath)
43880      input_path=`$CYGPATH -u "$shortmode_path"`
43881      new_path="$input_path"
43882    fi
43883  fi
43884
43885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43886  if test "x$test_cygdrive_prefix" = x; then
43887    # As a simple fix, exclude /usr/bin since it's not a real path.
43888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43890      # a path prefixed by /cygdrive for fixpath to work.
43891      new_path="$CYGWIN_ROOT_PATH$input_path"
43892    fi
43893  fi
43894
43895  # remove trailing .exe if any
43896  new_path="${new_path/%.exe/}"
43897
43898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899
43900  # First separate the path from the arguments. This will split at the first
43901  # space.
43902  complete="$OBJCOPY"
43903  path="${complete%% *}"
43904  tmp="$complete EOL"
43905  arguments="${tmp#* }"
43906
43907  # Input might be given as Windows format, start by converting to
43908  # unix format.
43909  new_path="$path"
43910
43911  windows_path="$new_path"
43912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43913    unix_path=`$CYGPATH -u "$windows_path"`
43914    new_path="$unix_path"
43915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43917    new_path="$unix_path"
43918  fi
43919
43920
43921  # Now try to locate executable using which
43922  new_path=`$WHICH "$new_path" 2> /dev/null`
43923
43924  if test "x$new_path" = x; then
43925    # Oops. Which didn't find the executable.
43926    # The splitting of arguments from the executable at a space might have been incorrect,
43927    # since paths with space are more likely in Windows. Give it another try with the whole
43928    # argument.
43929    path="$complete"
43930    arguments="EOL"
43931    new_path="$path"
43932
43933  windows_path="$new_path"
43934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43935    unix_path=`$CYGPATH -u "$windows_path"`
43936    new_path="$unix_path"
43937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43939    new_path="$unix_path"
43940  fi
43941
43942
43943    new_path=`$WHICH "$new_path" 2> /dev/null`
43944    # bat and cmd files are not always considered executable in MSYS causing which
43945    # to not find them
43946    if test "x$new_path" = x \
43947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43949      new_path="$path"
43950
43951  windows_path="$new_path"
43952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43953    unix_path=`$CYGPATH -u "$windows_path"`
43954    new_path="$unix_path"
43955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43957    new_path="$unix_path"
43958  fi
43959
43960    fi
43961
43962    if test "x$new_path" = x; then
43963      # It's still not found. Now this is an unrecoverable error.
43964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43965$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43966      has_space=`$ECHO "$complete" | $GREP " "`
43967      if test "x$has_space" != x; then
43968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43970      fi
43971      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43972    fi
43973  fi
43974
43975  # Now new_path has a complete unix path to the binary
43976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43977    # Keep paths in /bin as-is, but remove trailing .exe if any
43978    new_path="${new_path/%.exe/}"
43979    # Do not save /bin paths to all_fixpath_prefixes!
43980  else
43981    # Not in mixed or Windows style, start by that.
43982    new_path=`cmd //c echo $new_path`
43983
43984  input_path="$new_path"
43985  # Check if we need to convert this using DOS-style short mode. If the path
43986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43987  # take no chances and rewrite it.
43988  # Note: m4 eats our [], so we need to use [ and ] instead.
43989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43990  if test "x$has_forbidden_chars" != x; then
43991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43993  fi
43994
43995    # Output is in $new_path
43996
43997  windows_path="$new_path"
43998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43999    unix_path=`$CYGPATH -u "$windows_path"`
44000    new_path="$unix_path"
44001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44003    new_path="$unix_path"
44004  fi
44005
44006    # remove trailing .exe if any
44007    new_path="${new_path/%.exe/}"
44008
44009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44011  fi
44012
44013    else
44014      # We're on a unix platform. Hooray! :)
44015      # First separate the path from the arguments. This will split at the first
44016      # space.
44017      complete="$OBJCOPY"
44018      path="${complete%% *}"
44019      tmp="$complete EOL"
44020      arguments="${tmp#* }"
44021
44022      # Cannot rely on the command "which" here since it doesn't always work.
44023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44024      if test -z "$is_absolute_path"; then
44025        # Path to executable is not absolute. Find it.
44026        IFS_save="$IFS"
44027        IFS=:
44028        for p in $PATH; do
44029          if test -f "$p/$path" && test -x "$p/$path"; then
44030            new_path="$p/$path"
44031            break
44032          fi
44033        done
44034        IFS="$IFS_save"
44035      else
44036        # This is an absolute path, we can use it without further modifications.
44037        new_path="$path"
44038      fi
44039
44040      if test "x$new_path" = x; then
44041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44042$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44043        has_space=`$ECHO "$complete" | $GREP " "`
44044        if test "x$has_space" != x; then
44045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44047        fi
44048        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44049      fi
44050    fi
44051
44052    # Now join together the path and the arguments once again
44053    if test "x$arguments" != xEOL; then
44054      new_complete="$new_path ${arguments% *}"
44055    else
44056      new_complete="$new_path"
44057    fi
44058
44059    if test "x$complete" != "x$new_complete"; then
44060      OBJCOPY="$new_complete"
44061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44062$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44063    fi
44064  fi
44065
44066      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44067        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44068        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44069        # - version number is last blank separate word on first line
44070        # - version number formats that have been seen:
44071        #   - <major>.<minor>
44072        #   - <major>.<minor>.<micro>
44073        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44074        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44075         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44076              -e 's/.* //' \
44077              -e '/^[01]\./b bad' \
44078              -e '/^2\./{' \
44079              -e '  s/^2\.//' \
44080              -e '  /^[0-9]$/b bad' \
44081              -e '  /^[0-9]\./b bad' \
44082              -e '  /^1[0-9]$/b bad' \
44083              -e '  /^1[0-9]\./b bad' \
44084              -e '  /^20\./b bad' \
44085              -e '  /^21\.0$/b bad' \
44086              -e '  /^21\.0\./b bad' \
44087              -e '}' \
44088              -e ':good' \
44089              -e 's/.*/VALID_VERSION/p' \
44090              -e 'q' \
44091              -e ':bad' \
44092              -e 's/.*/BAD_VERSION/p' \
44093              -e 'q'`
44094        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44095          OBJCOPY=
44096          { $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
44097$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44098          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44099$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44100          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44101$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44102          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44103$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44104          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44105$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44106        fi
44107      fi
44108    fi
44109  fi
44110
44111
44112
44113  # Publish this variable in the help.
44114
44115
44116  if [ -z "${OBJDUMP+x}" ]; then
44117    # The variable is not set by user, try to locate tool using the code snippet
44118    if test -n "$ac_tool_prefix"; then
44119  for ac_prog in gobjdump objdump
44120  do
44121    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44122set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44124$as_echo_n "checking for $ac_word... " >&6; }
44125if ${ac_cv_prog_OBJDUMP+:} false; then :
44126  $as_echo_n "(cached) " >&6
44127else
44128  if test -n "$OBJDUMP"; then
44129  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44130else
44131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44132for as_dir in $PATH
44133do
44134  IFS=$as_save_IFS
44135  test -z "$as_dir" && as_dir=.
44136    for ac_exec_ext in '' $ac_executable_extensions; do
44137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44138    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44140    break 2
44141  fi
44142done
44143  done
44144IFS=$as_save_IFS
44145
44146fi
44147fi
44148OBJDUMP=$ac_cv_prog_OBJDUMP
44149if test -n "$OBJDUMP"; then
44150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44151$as_echo "$OBJDUMP" >&6; }
44152else
44153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44154$as_echo "no" >&6; }
44155fi
44156
44157
44158    test -n "$OBJDUMP" && break
44159  done
44160fi
44161if test -z "$OBJDUMP"; then
44162  ac_ct_OBJDUMP=$OBJDUMP
44163  for ac_prog in gobjdump objdump
44164do
44165  # Extract the first word of "$ac_prog", so it can be a program name with args.
44166set dummy $ac_prog; ac_word=$2
44167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44168$as_echo_n "checking for $ac_word... " >&6; }
44169if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44170  $as_echo_n "(cached) " >&6
44171else
44172  if test -n "$ac_ct_OBJDUMP"; then
44173  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44174else
44175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44176for as_dir in $PATH
44177do
44178  IFS=$as_save_IFS
44179  test -z "$as_dir" && as_dir=.
44180    for ac_exec_ext in '' $ac_executable_extensions; do
44181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44182    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44184    break 2
44185  fi
44186done
44187  done
44188IFS=$as_save_IFS
44189
44190fi
44191fi
44192ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44193if test -n "$ac_ct_OBJDUMP"; then
44194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44195$as_echo "$ac_ct_OBJDUMP" >&6; }
44196else
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44198$as_echo "no" >&6; }
44199fi
44200
44201
44202  test -n "$ac_ct_OBJDUMP" && break
44203done
44204
44205  if test "x$ac_ct_OBJDUMP" = x; then
44206    OBJDUMP=""
44207  else
44208    case $cross_compiling:$ac_tool_warned in
44209yes:)
44210{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44211$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44212ac_tool_warned=yes ;;
44213esac
44214    OBJDUMP=$ac_ct_OBJDUMP
44215  fi
44216fi
44217
44218  else
44219    # The variable is set, but is it from the command line or the environment?
44220
44221    # Try to remove the string !OBJDUMP! from our list.
44222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44224      # If it failed, the variable was not from the command line. Ignore it,
44225      # but warn the user (except for BASH, which is always set by the calling BASH).
44226      if test "xOBJDUMP" != xBASH; then
44227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44228$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44229      fi
44230      # Try to locate tool using the code snippet
44231      if test -n "$ac_tool_prefix"; then
44232  for ac_prog in gobjdump objdump
44233  do
44234    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44237$as_echo_n "checking for $ac_word... " >&6; }
44238if ${ac_cv_prog_OBJDUMP+:} false; then :
44239  $as_echo_n "(cached) " >&6
44240else
44241  if test -n "$OBJDUMP"; then
44242  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44243else
44244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44245for as_dir in $PATH
44246do
44247  IFS=$as_save_IFS
44248  test -z "$as_dir" && as_dir=.
44249    for ac_exec_ext in '' $ac_executable_extensions; do
44250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44251    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44253    break 2
44254  fi
44255done
44256  done
44257IFS=$as_save_IFS
44258
44259fi
44260fi
44261OBJDUMP=$ac_cv_prog_OBJDUMP
44262if test -n "$OBJDUMP"; then
44263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44264$as_echo "$OBJDUMP" >&6; }
44265else
44266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44267$as_echo "no" >&6; }
44268fi
44269
44270
44271    test -n "$OBJDUMP" && break
44272  done
44273fi
44274if test -z "$OBJDUMP"; then
44275  ac_ct_OBJDUMP=$OBJDUMP
44276  for ac_prog in gobjdump objdump
44277do
44278  # Extract the first word of "$ac_prog", so it can be a program name with args.
44279set dummy $ac_prog; ac_word=$2
44280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44281$as_echo_n "checking for $ac_word... " >&6; }
44282if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44283  $as_echo_n "(cached) " >&6
44284else
44285  if test -n "$ac_ct_OBJDUMP"; then
44286  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44287else
44288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44289for as_dir in $PATH
44290do
44291  IFS=$as_save_IFS
44292  test -z "$as_dir" && as_dir=.
44293    for ac_exec_ext in '' $ac_executable_extensions; do
44294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44295    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44297    break 2
44298  fi
44299done
44300  done
44301IFS=$as_save_IFS
44302
44303fi
44304fi
44305ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44306if test -n "$ac_ct_OBJDUMP"; then
44307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44308$as_echo "$ac_ct_OBJDUMP" >&6; }
44309else
44310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44311$as_echo "no" >&6; }
44312fi
44313
44314
44315  test -n "$ac_ct_OBJDUMP" && break
44316done
44317
44318  if test "x$ac_ct_OBJDUMP" = x; then
44319    OBJDUMP=""
44320  else
44321    case $cross_compiling:$ac_tool_warned in
44322yes:)
44323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44325ac_tool_warned=yes ;;
44326esac
44327    OBJDUMP=$ac_ct_OBJDUMP
44328  fi
44329fi
44330
44331    else
44332      # If it succeeded, then it was overridden by the user. We will use it
44333      # for the tool.
44334
44335      # First remove it from the list of overridden variables, so we can test
44336      # for unknown variables in the end.
44337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44338
44339      # Check if we try to supply an empty value
44340      if test "x$OBJDUMP" = x; then
44341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44342$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44344$as_echo_n "checking for OBJDUMP... " >&6; }
44345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44346$as_echo "disabled" >&6; }
44347      else
44348        # Check if the provided tool contains a complete path.
44349        tool_specified="$OBJDUMP"
44350        tool_basename="${tool_specified##*/}"
44351        if test "x$tool_basename" = "x$tool_specified"; then
44352          # A command without a complete path is provided, search $PATH.
44353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44354$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44355          # Extract the first word of "$tool_basename", so it can be a program name with args.
44356set dummy $tool_basename; ac_word=$2
44357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44358$as_echo_n "checking for $ac_word... " >&6; }
44359if ${ac_cv_path_OBJDUMP+:} false; then :
44360  $as_echo_n "(cached) " >&6
44361else
44362  case $OBJDUMP in
44363  [\\/]* | ?:[\\/]*)
44364  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44365  ;;
44366  *)
44367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44368for as_dir in $PATH
44369do
44370  IFS=$as_save_IFS
44371  test -z "$as_dir" && as_dir=.
44372    for ac_exec_ext in '' $ac_executable_extensions; do
44373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44374    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44376    break 2
44377  fi
44378done
44379  done
44380IFS=$as_save_IFS
44381
44382  ;;
44383esac
44384fi
44385OBJDUMP=$ac_cv_path_OBJDUMP
44386if test -n "$OBJDUMP"; then
44387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44388$as_echo "$OBJDUMP" >&6; }
44389else
44390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44391$as_echo "no" >&6; }
44392fi
44393
44394
44395          if test "x$OBJDUMP" = x; then
44396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44397          fi
44398        else
44399          # Otherwise we believe it is a complete path. Use it as it is.
44400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44401$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44403$as_echo_n "checking for OBJDUMP... " >&6; }
44404          if test ! -x "$tool_specified"; then
44405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44406$as_echo "not found" >&6; }
44407            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44408          fi
44409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44410$as_echo "$tool_specified" >&6; }
44411        fi
44412      fi
44413    fi
44414
44415  fi
44416
44417
44418  if test "x$OBJDUMP" != x; then
44419    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44420    # bails if argument is missing.
44421
44422  # Only process if variable expands to non-empty
44423
44424  if test "x$OBJDUMP" != x; then
44425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426
44427  # First separate the path from the arguments. This will split at the first
44428  # space.
44429  complete="$OBJDUMP"
44430  path="${complete%% *}"
44431  tmp="$complete EOL"
44432  arguments="${tmp#* }"
44433
44434  # Input might be given as Windows format, start by converting to
44435  # unix format.
44436  new_path=`$CYGPATH -u "$path"`
44437
44438  # Now try to locate executable using which
44439  new_path=`$WHICH "$new_path" 2> /dev/null`
44440  # bat and cmd files are not always considered executable in cygwin causing which
44441  # to not find them
44442  if test "x$new_path" = x \
44443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44445    new_path=`$CYGPATH -u "$path"`
44446  fi
44447  if test "x$new_path" = x; then
44448    # Oops. Which didn't find the executable.
44449    # The splitting of arguments from the executable at a space might have been incorrect,
44450    # since paths with space are more likely in Windows. Give it another try with the whole
44451    # argument.
44452    path="$complete"
44453    arguments="EOL"
44454    new_path=`$CYGPATH -u "$path"`
44455    new_path=`$WHICH "$new_path" 2> /dev/null`
44456    # bat and cmd files are not always considered executable in cygwin causing which
44457    # to not find them
44458    if test "x$new_path" = x \
44459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44461      new_path=`$CYGPATH -u "$path"`
44462    fi
44463    if test "x$new_path" = x; then
44464      # It's still not found. Now this is an unrecoverable error.
44465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44466$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44467      has_space=`$ECHO "$complete" | $GREP " "`
44468      if test "x$has_space" != x; then
44469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44471      fi
44472      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44473    fi
44474  fi
44475
44476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44479  # "foo.exe" is OK but "foo" is an error.
44480  #
44481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44482  # It is also a way to make sure we got the proper file name for the real test later on.
44483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44484  if test "x$test_shortpath" = x; then
44485    # Short path failed, file does not exist as specified.
44486    # Try adding .exe or .cmd
44487    if test -f "${new_path}.exe"; then
44488      input_to_shortpath="${new_path}.exe"
44489    elif test -f "${new_path}.cmd"; then
44490      input_to_shortpath="${new_path}.cmd"
44491    else
44492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44493$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44496      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44497    fi
44498  else
44499    input_to_shortpath="$new_path"
44500  fi
44501
44502  # Call helper function which possibly converts this using DOS-style short mode.
44503  # If so, the updated path is stored in $new_path.
44504  new_path="$input_to_shortpath"
44505
44506  input_path="$input_to_shortpath"
44507  # Check if we need to convert this using DOS-style short mode. If the path
44508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44509  # take no chances and rewrite it.
44510  # Note: m4 eats our [], so we need to use [ and ] instead.
44511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44512  if test "x$has_forbidden_chars" != x; then
44513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44517      # Going to short mode and back again did indeed matter. Since short mode is
44518      # case insensitive, let's make it lowercase to improve readability.
44519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44520      # Now convert it back to Unix-style (cygpath)
44521      input_path=`$CYGPATH -u "$shortmode_path"`
44522      new_path="$input_path"
44523    fi
44524  fi
44525
44526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44527  if test "x$test_cygdrive_prefix" = x; then
44528    # As a simple fix, exclude /usr/bin since it's not a real path.
44529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44531      # a path prefixed by /cygdrive for fixpath to work.
44532      new_path="$CYGWIN_ROOT_PATH$input_path"
44533    fi
44534  fi
44535
44536  # remove trailing .exe if any
44537  new_path="${new_path/%.exe/}"
44538
44539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540
44541  # First separate the path from the arguments. This will split at the first
44542  # space.
44543  complete="$OBJDUMP"
44544  path="${complete%% *}"
44545  tmp="$complete EOL"
44546  arguments="${tmp#* }"
44547
44548  # Input might be given as Windows format, start by converting to
44549  # unix format.
44550  new_path="$path"
44551
44552  windows_path="$new_path"
44553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44554    unix_path=`$CYGPATH -u "$windows_path"`
44555    new_path="$unix_path"
44556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44558    new_path="$unix_path"
44559  fi
44560
44561
44562  # Now try to locate executable using which
44563  new_path=`$WHICH "$new_path" 2> /dev/null`
44564
44565  if test "x$new_path" = x; then
44566    # Oops. Which didn't find the executable.
44567    # The splitting of arguments from the executable at a space might have been incorrect,
44568    # since paths with space are more likely in Windows. Give it another try with the whole
44569    # argument.
44570    path="$complete"
44571    arguments="EOL"
44572    new_path="$path"
44573
44574  windows_path="$new_path"
44575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44576    unix_path=`$CYGPATH -u "$windows_path"`
44577    new_path="$unix_path"
44578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44580    new_path="$unix_path"
44581  fi
44582
44583
44584    new_path=`$WHICH "$new_path" 2> /dev/null`
44585    # bat and cmd files are not always considered executable in MSYS causing which
44586    # to not find them
44587    if test "x$new_path" = x \
44588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44590      new_path="$path"
44591
44592  windows_path="$new_path"
44593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44594    unix_path=`$CYGPATH -u "$windows_path"`
44595    new_path="$unix_path"
44596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44598    new_path="$unix_path"
44599  fi
44600
44601    fi
44602
44603    if test "x$new_path" = x; then
44604      # It's still not found. Now this is an unrecoverable error.
44605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44606$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44607      has_space=`$ECHO "$complete" | $GREP " "`
44608      if test "x$has_space" != x; then
44609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44611      fi
44612      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44613    fi
44614  fi
44615
44616  # Now new_path has a complete unix path to the binary
44617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44618    # Keep paths in /bin as-is, but remove trailing .exe if any
44619    new_path="${new_path/%.exe/}"
44620    # Do not save /bin paths to all_fixpath_prefixes!
44621  else
44622    # Not in mixed or Windows style, start by that.
44623    new_path=`cmd //c echo $new_path`
44624
44625  input_path="$new_path"
44626  # Check if we need to convert this using DOS-style short mode. If the path
44627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44628  # take no chances and rewrite it.
44629  # Note: m4 eats our [], so we need to use [ and ] instead.
44630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44631  if test "x$has_forbidden_chars" != x; then
44632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44634  fi
44635
44636    # Output is in $new_path
44637
44638  windows_path="$new_path"
44639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44640    unix_path=`$CYGPATH -u "$windows_path"`
44641    new_path="$unix_path"
44642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44644    new_path="$unix_path"
44645  fi
44646
44647    # remove trailing .exe if any
44648    new_path="${new_path/%.exe/}"
44649
44650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44652  fi
44653
44654    else
44655      # We're on a unix platform. Hooray! :)
44656      # First separate the path from the arguments. This will split at the first
44657      # space.
44658      complete="$OBJDUMP"
44659      path="${complete%% *}"
44660      tmp="$complete EOL"
44661      arguments="${tmp#* }"
44662
44663      # Cannot rely on the command "which" here since it doesn't always work.
44664      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44665      if test -z "$is_absolute_path"; then
44666        # Path to executable is not absolute. Find it.
44667        IFS_save="$IFS"
44668        IFS=:
44669        for p in $PATH; do
44670          if test -f "$p/$path" && test -x "$p/$path"; then
44671            new_path="$p/$path"
44672            break
44673          fi
44674        done
44675        IFS="$IFS_save"
44676      else
44677        # This is an absolute path, we can use it without further modifications.
44678        new_path="$path"
44679      fi
44680
44681      if test "x$new_path" = x; then
44682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44683$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44684        has_space=`$ECHO "$complete" | $GREP " "`
44685        if test "x$has_space" != x; then
44686          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44688        fi
44689        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44690      fi
44691    fi
44692
44693    # Now join together the path and the arguments once again
44694    if test "x$arguments" != xEOL; then
44695      new_complete="$new_path ${arguments% *}"
44696    else
44697      new_complete="$new_path"
44698    fi
44699
44700    if test "x$complete" != "x$new_complete"; then
44701      OBJDUMP="$new_complete"
44702      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44703$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44704    fi
44705  fi
44706
44707  fi
44708
44709
44710  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44711  # to remain in place. Otherwise the compiler will not work in some siutations
44712  # in later configure checks.
44713  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44714    PATH="$OLD_PATH"
44715  fi
44716
44717  # Restore the flags to the user specified values.
44718  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44719  CFLAGS="$ORG_CFLAGS"
44720  CXXFLAGS="$ORG_CXXFLAGS"
44721
44722
44723# Finally do some processing after the detection phase
44724
44725  if test "x$COMPILE_TYPE" = "xcross"; then
44726    # Now we need to find a C/C++ compiler that can build executables for the
44727    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44728    # used once. Also, we need to do this without adding a tools dir to the
44729    # path, otherwise we might pick up cross-compilers which don't use standard
44730    # naming.
44731
44732    OLDPATH="$PATH"
44733
44734
44735# Check whether --with-build-devkit was given.
44736if test "${with_build_devkit+set}" = set; then :
44737  withval=$with_build_devkit;
44738fi
44739
44740    if test "x$with_build_devkit" = "xyes"; then
44741      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44742    elif test -n "$with_build_devkit"; then
44743      if test ! -d "$with_build_devkit"; then
44744        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44745      else
44746
44747  # Only process if variable expands to non-empty
44748
44749  if test "x$with_build_devkit" != x; then
44750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44751
44752  # Input might be given as Windows format, start by converting to
44753  # unix format.
44754  path="$with_build_devkit"
44755  new_path=`$CYGPATH -u "$path"`
44756
44757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44760  # "foo.exe" is OK but "foo" is an error.
44761  #
44762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44763  # It is also a way to make sure we got the proper file name for the real test later on.
44764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44765  if test "x$test_shortpath" = x; then
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44767$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44768    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44769  fi
44770
44771  # Call helper function which possibly converts this using DOS-style short mode.
44772  # If so, the updated path is stored in $new_path.
44773
44774  input_path="$new_path"
44775  # Check if we need to convert this using DOS-style short mode. If the path
44776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44777  # take no chances and rewrite it.
44778  # Note: m4 eats our [], so we need to use [ and ] instead.
44779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44780  if test "x$has_forbidden_chars" != x; then
44781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44785      # Going to short mode and back again did indeed matter. Since short mode is
44786      # case insensitive, let's make it lowercase to improve readability.
44787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44788      # Now convert it back to Unix-style (cygpath)
44789      input_path=`$CYGPATH -u "$shortmode_path"`
44790      new_path="$input_path"
44791    fi
44792  fi
44793
44794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44795  if test "x$test_cygdrive_prefix" = x; then
44796    # As a simple fix, exclude /usr/bin since it's not a real path.
44797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44799      # a path prefixed by /cygdrive for fixpath to work.
44800      new_path="$CYGWIN_ROOT_PATH$input_path"
44801    fi
44802  fi
44803
44804
44805  if test "x$path" != "x$new_path"; then
44806    with_build_devkit="$new_path"
44807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44808$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44809  fi
44810
44811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44812
44813  path="$with_build_devkit"
44814  has_colon=`$ECHO $path | $GREP ^.:`
44815  new_path="$path"
44816  if test "x$has_colon" = x; then
44817    # Not in mixed or Windows style, start by that.
44818    new_path=`cmd //c echo $path`
44819  fi
44820
44821
44822  input_path="$new_path"
44823  # Check if we need to convert this using DOS-style short mode. If the path
44824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44825  # take no chances and rewrite it.
44826  # Note: m4 eats our [], so we need to use [ and ] instead.
44827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44828  if test "x$has_forbidden_chars" != x; then
44829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44831  fi
44832
44833
44834  windows_path="$new_path"
44835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44836    unix_path=`$CYGPATH -u "$windows_path"`
44837    new_path="$unix_path"
44838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44840    new_path="$unix_path"
44841  fi
44842
44843  if test "x$path" != "x$new_path"; then
44844    with_build_devkit="$new_path"
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44846$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44847  fi
44848
44849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44851
44852    else
44853      # We're on a unix platform. Hooray! :)
44854      path="$with_build_devkit"
44855      has_space=`$ECHO "$path" | $GREP " "`
44856      if test "x$has_space" != x; then
44857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44858$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44860      fi
44861
44862      # Use eval to expand a potential ~
44863      eval path="$path"
44864      if test ! -f "$path" && test ! -d "$path"; then
44865        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44866      fi
44867
44868      if test -d "$path"; then
44869        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44870      else
44871        dir="`$DIRNAME "$path"`"
44872        base="`$BASENAME "$path"`"
44873        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44874      fi
44875    fi
44876  fi
44877
44878        BUILD_DEVKIT_ROOT="$with_build_devkit"
44879        # Check for a meta data info file in the root of the devkit
44880        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44881          # Process devkit.info so that existing devkit variables are not
44882          # modified by this
44883          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44884              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44885              -e "s/\$host/\$build/g" \
44886              $BUILD_DEVKIT_ROOT/devkit.info \
44887              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44888          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44889          # This potentially sets the following:
44890          # A descriptive name of the devkit
44891
44892  if test "x$BUILD_DEVKIT_NAME" = x; then
44893    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44894  fi
44895
44896          # Corresponds to --with-extra-path
44897
44898  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44899    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44900  fi
44901
44902          # Corresponds to --with-toolchain-path
44903
44904  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44905    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44906  fi
44907
44908          # Corresponds to --with-sysroot
44909
44910  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44911    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44912  fi
44913
44914          # Skip the Window specific parts
44915        fi
44916
44917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44918$as_echo_n "checking for build platform devkit... " >&6; }
44919        if test "x$BUILD_DEVKIT_NAME" != x; then
44920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44921$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44922        else
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44924$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44925        fi
44926
44927        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44928
44929  if test "x$BUILD_SYSROOT" != "x"; then
44930    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44931      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44932        # Solaris Studio does not have a concept of sysroot. Instead we must
44933        # make sure the default include and lib dirs are appended to each
44934        # compile and link command line. Must also add -I-xbuiltin to enable
44935        # inlining of system functions and intrinsics.
44936        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44937        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44938            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44939      fi
44940    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44941      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44942      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44943    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44944      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44945      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44946    fi
44947    # The global CFLAGS and LDFLAGS variables need these for configure to function
44948    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44949    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44950    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44951    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44952  fi
44953
44954  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44955    # We also need -iframework<path>/System/Library/Frameworks
44956    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44957    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44958    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44959    # set this here so it doesn't have to be peppered throughout the forest
44960    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44961    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44962  fi
44963
44964
44965
44966
44967
44968         # Fallback default of just /bin if DEVKIT_PATH is not defined
44969        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44970          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44971        fi
44972        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44973      fi
44974    fi
44975
44976    # FIXME: we should list the discovered compilers as an exclude pattern!
44977    # If we do that, we can do this detection before POST_DETECTION, and still
44978    # find the build compilers in the tools dir, if needed.
44979
44980
44981
44982  # Publish this variable in the help.
44983
44984
44985  if [ -z "${BUILD_CC+x}" ]; then
44986    # The variable is not set by user, try to locate tool using the code snippet
44987    for ac_prog in cl cc gcc
44988do
44989  # Extract the first word of "$ac_prog", so it can be a program name with args.
44990set dummy $ac_prog; ac_word=$2
44991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44992$as_echo_n "checking for $ac_word... " >&6; }
44993if ${ac_cv_path_BUILD_CC+:} false; then :
44994  $as_echo_n "(cached) " >&6
44995else
44996  case $BUILD_CC in
44997  [\\/]* | ?:[\\/]*)
44998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44999  ;;
45000  *)
45001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45002for as_dir in $PATH
45003do
45004  IFS=$as_save_IFS
45005  test -z "$as_dir" && as_dir=.
45006    for ac_exec_ext in '' $ac_executable_extensions; do
45007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45010    break 2
45011  fi
45012done
45013  done
45014IFS=$as_save_IFS
45015
45016  ;;
45017esac
45018fi
45019BUILD_CC=$ac_cv_path_BUILD_CC
45020if test -n "$BUILD_CC"; then
45021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45022$as_echo "$BUILD_CC" >&6; }
45023else
45024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45025$as_echo "no" >&6; }
45026fi
45027
45028
45029  test -n "$BUILD_CC" && break
45030done
45031
45032  else
45033    # The variable is set, but is it from the command line or the environment?
45034
45035    # Try to remove the string !BUILD_CC! from our list.
45036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45038      # If it failed, the variable was not from the command line. Ignore it,
45039      # but warn the user (except for BASH, which is always set by the calling BASH).
45040      if test "xBUILD_CC" != xBASH; then
45041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45042$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45043      fi
45044      # Try to locate tool using the code snippet
45045      for ac_prog in cl cc gcc
45046do
45047  # Extract the first word of "$ac_prog", so it can be a program name with args.
45048set dummy $ac_prog; ac_word=$2
45049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45050$as_echo_n "checking for $ac_word... " >&6; }
45051if ${ac_cv_path_BUILD_CC+:} false; then :
45052  $as_echo_n "(cached) " >&6
45053else
45054  case $BUILD_CC in
45055  [\\/]* | ?:[\\/]*)
45056  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45057  ;;
45058  *)
45059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45060for as_dir in $PATH
45061do
45062  IFS=$as_save_IFS
45063  test -z "$as_dir" && as_dir=.
45064    for ac_exec_ext in '' $ac_executable_extensions; do
45065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45066    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45068    break 2
45069  fi
45070done
45071  done
45072IFS=$as_save_IFS
45073
45074  ;;
45075esac
45076fi
45077BUILD_CC=$ac_cv_path_BUILD_CC
45078if test -n "$BUILD_CC"; then
45079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45080$as_echo "$BUILD_CC" >&6; }
45081else
45082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45083$as_echo "no" >&6; }
45084fi
45085
45086
45087  test -n "$BUILD_CC" && break
45088done
45089
45090    else
45091      # If it succeeded, then it was overridden by the user. We will use it
45092      # for the tool.
45093
45094      # First remove it from the list of overridden variables, so we can test
45095      # for unknown variables in the end.
45096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45097
45098      # Check if we try to supply an empty value
45099      if test "x$BUILD_CC" = x; then
45100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45101$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45103$as_echo_n "checking for BUILD_CC... " >&6; }
45104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45105$as_echo "disabled" >&6; }
45106      else
45107        # Check if the provided tool contains a complete path.
45108        tool_specified="$BUILD_CC"
45109        tool_basename="${tool_specified##*/}"
45110        if test "x$tool_basename" = "x$tool_specified"; then
45111          # A command without a complete path is provided, search $PATH.
45112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45113$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45114          # Extract the first word of "$tool_basename", so it can be a program name with args.
45115set dummy $tool_basename; ac_word=$2
45116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45117$as_echo_n "checking for $ac_word... " >&6; }
45118if ${ac_cv_path_BUILD_CC+:} false; then :
45119  $as_echo_n "(cached) " >&6
45120else
45121  case $BUILD_CC in
45122  [\\/]* | ?:[\\/]*)
45123  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45124  ;;
45125  *)
45126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45127for as_dir in $PATH
45128do
45129  IFS=$as_save_IFS
45130  test -z "$as_dir" && as_dir=.
45131    for ac_exec_ext in '' $ac_executable_extensions; do
45132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45133    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45135    break 2
45136  fi
45137done
45138  done
45139IFS=$as_save_IFS
45140
45141  ;;
45142esac
45143fi
45144BUILD_CC=$ac_cv_path_BUILD_CC
45145if test -n "$BUILD_CC"; then
45146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45147$as_echo "$BUILD_CC" >&6; }
45148else
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45150$as_echo "no" >&6; }
45151fi
45152
45153
45154          if test "x$BUILD_CC" = x; then
45155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45156          fi
45157        else
45158          # Otherwise we believe it is a complete path. Use it as it is.
45159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45160$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45162$as_echo_n "checking for BUILD_CC... " >&6; }
45163          if test ! -x "$tool_specified"; then
45164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45165$as_echo "not found" >&6; }
45166            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45167          fi
45168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45169$as_echo "$tool_specified" >&6; }
45170        fi
45171      fi
45172    fi
45173
45174  fi
45175
45176
45177
45178  if test "x$BUILD_CC" = x; then
45179    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45180  fi
45181
45182
45183
45184  # Only process if variable expands to non-empty
45185
45186  if test "x$BUILD_CC" != x; then
45187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45188
45189  # First separate the path from the arguments. This will split at the first
45190  # space.
45191  complete="$BUILD_CC"
45192  path="${complete%% *}"
45193  tmp="$complete EOL"
45194  arguments="${tmp#* }"
45195
45196  # Input might be given as Windows format, start by converting to
45197  # unix format.
45198  new_path=`$CYGPATH -u "$path"`
45199
45200  # Now try to locate executable using which
45201  new_path=`$WHICH "$new_path" 2> /dev/null`
45202  # bat and cmd files are not always considered executable in cygwin causing which
45203  # to not find them
45204  if test "x$new_path" = x \
45205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45207    new_path=`$CYGPATH -u "$path"`
45208  fi
45209  if test "x$new_path" = x; then
45210    # Oops. Which didn't find the executable.
45211    # The splitting of arguments from the executable at a space might have been incorrect,
45212    # since paths with space are more likely in Windows. Give it another try with the whole
45213    # argument.
45214    path="$complete"
45215    arguments="EOL"
45216    new_path=`$CYGPATH -u "$path"`
45217    new_path=`$WHICH "$new_path" 2> /dev/null`
45218    # bat and cmd files are not always considered executable in cygwin causing which
45219    # to not find them
45220    if test "x$new_path" = x \
45221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45223      new_path=`$CYGPATH -u "$path"`
45224    fi
45225    if test "x$new_path" = x; then
45226      # It's still not found. Now this is an unrecoverable error.
45227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45228$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45229      has_space=`$ECHO "$complete" | $GREP " "`
45230      if test "x$has_space" != x; then
45231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45233      fi
45234      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45235    fi
45236  fi
45237
45238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45241  # "foo.exe" is OK but "foo" is an error.
45242  #
45243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45244  # It is also a way to make sure we got the proper file name for the real test later on.
45245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45246  if test "x$test_shortpath" = x; then
45247    # Short path failed, file does not exist as specified.
45248    # Try adding .exe or .cmd
45249    if test -f "${new_path}.exe"; then
45250      input_to_shortpath="${new_path}.exe"
45251    elif test -f "${new_path}.cmd"; then
45252      input_to_shortpath="${new_path}.cmd"
45253    else
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45255$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45258      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45259    fi
45260  else
45261    input_to_shortpath="$new_path"
45262  fi
45263
45264  # Call helper function which possibly converts this using DOS-style short mode.
45265  # If so, the updated path is stored in $new_path.
45266  new_path="$input_to_shortpath"
45267
45268  input_path="$input_to_shortpath"
45269  # Check if we need to convert this using DOS-style short mode. If the path
45270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45271  # take no chances and rewrite it.
45272  # Note: m4 eats our [], so we need to use [ and ] instead.
45273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45274  if test "x$has_forbidden_chars" != x; then
45275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45279      # Going to short mode and back again did indeed matter. Since short mode is
45280      # case insensitive, let's make it lowercase to improve readability.
45281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45282      # Now convert it back to Unix-style (cygpath)
45283      input_path=`$CYGPATH -u "$shortmode_path"`
45284      new_path="$input_path"
45285    fi
45286  fi
45287
45288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45289  if test "x$test_cygdrive_prefix" = x; then
45290    # As a simple fix, exclude /usr/bin since it's not a real path.
45291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45293      # a path prefixed by /cygdrive for fixpath to work.
45294      new_path="$CYGWIN_ROOT_PATH$input_path"
45295    fi
45296  fi
45297
45298  # remove trailing .exe if any
45299  new_path="${new_path/%.exe/}"
45300
45301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45302
45303  # First separate the path from the arguments. This will split at the first
45304  # space.
45305  complete="$BUILD_CC"
45306  path="${complete%% *}"
45307  tmp="$complete EOL"
45308  arguments="${tmp#* }"
45309
45310  # Input might be given as Windows format, start by converting to
45311  # unix format.
45312  new_path="$path"
45313
45314  windows_path="$new_path"
45315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45316    unix_path=`$CYGPATH -u "$windows_path"`
45317    new_path="$unix_path"
45318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45320    new_path="$unix_path"
45321  fi
45322
45323
45324  # Now try to locate executable using which
45325  new_path=`$WHICH "$new_path" 2> /dev/null`
45326
45327  if test "x$new_path" = x; then
45328    # Oops. Which didn't find the executable.
45329    # The splitting of arguments from the executable at a space might have been incorrect,
45330    # since paths with space are more likely in Windows. Give it another try with the whole
45331    # argument.
45332    path="$complete"
45333    arguments="EOL"
45334    new_path="$path"
45335
45336  windows_path="$new_path"
45337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45338    unix_path=`$CYGPATH -u "$windows_path"`
45339    new_path="$unix_path"
45340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45342    new_path="$unix_path"
45343  fi
45344
45345
45346    new_path=`$WHICH "$new_path" 2> /dev/null`
45347    # bat and cmd files are not always considered executable in MSYS causing which
45348    # to not find them
45349    if test "x$new_path" = x \
45350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45352      new_path="$path"
45353
45354  windows_path="$new_path"
45355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45356    unix_path=`$CYGPATH -u "$windows_path"`
45357    new_path="$unix_path"
45358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45360    new_path="$unix_path"
45361  fi
45362
45363    fi
45364
45365    if test "x$new_path" = x; then
45366      # It's still not found. Now this is an unrecoverable error.
45367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45368$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45369      has_space=`$ECHO "$complete" | $GREP " "`
45370      if test "x$has_space" != x; then
45371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45373      fi
45374      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45375    fi
45376  fi
45377
45378  # Now new_path has a complete unix path to the binary
45379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45380    # Keep paths in /bin as-is, but remove trailing .exe if any
45381    new_path="${new_path/%.exe/}"
45382    # Do not save /bin paths to all_fixpath_prefixes!
45383  else
45384    # Not in mixed or Windows style, start by that.
45385    new_path=`cmd //c echo $new_path`
45386
45387  input_path="$new_path"
45388  # Check if we need to convert this using DOS-style short mode. If the path
45389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45390  # take no chances and rewrite it.
45391  # Note: m4 eats our [], so we need to use [ and ] instead.
45392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45393  if test "x$has_forbidden_chars" != x; then
45394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45396  fi
45397
45398    # Output is in $new_path
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409    # remove trailing .exe if any
45410    new_path="${new_path/%.exe/}"
45411
45412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45414  fi
45415
45416    else
45417      # We're on a unix platform. Hooray! :)
45418      # First separate the path from the arguments. This will split at the first
45419      # space.
45420      complete="$BUILD_CC"
45421      path="${complete%% *}"
45422      tmp="$complete EOL"
45423      arguments="${tmp#* }"
45424
45425      # Cannot rely on the command "which" here since it doesn't always work.
45426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45427      if test -z "$is_absolute_path"; then
45428        # Path to executable is not absolute. Find it.
45429        IFS_save="$IFS"
45430        IFS=:
45431        for p in $PATH; do
45432          if test -f "$p/$path" && test -x "$p/$path"; then
45433            new_path="$p/$path"
45434            break
45435          fi
45436        done
45437        IFS="$IFS_save"
45438      else
45439        # This is an absolute path, we can use it without further modifications.
45440        new_path="$path"
45441      fi
45442
45443      if test "x$new_path" = x; then
45444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45445$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45446        has_space=`$ECHO "$complete" | $GREP " "`
45447        if test "x$has_space" != x; then
45448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45450        fi
45451        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45452      fi
45453    fi
45454
45455    # Now join together the path and the arguments once again
45456    if test "x$arguments" != xEOL; then
45457      new_complete="$new_path ${arguments% *}"
45458    else
45459      new_complete="$new_path"
45460    fi
45461
45462    if test "x$complete" != "x$new_complete"; then
45463      BUILD_CC="$new_complete"
45464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45465$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45466    fi
45467  fi
45468
45469
45470
45471
45472  # Publish this variable in the help.
45473
45474
45475  if [ -z "${BUILD_CXX+x}" ]; then
45476    # The variable is not set by user, try to locate tool using the code snippet
45477    for ac_prog in cl CC g++
45478do
45479  # Extract the first word of "$ac_prog", so it can be a program name with args.
45480set dummy $ac_prog; ac_word=$2
45481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45482$as_echo_n "checking for $ac_word... " >&6; }
45483if ${ac_cv_path_BUILD_CXX+:} false; then :
45484  $as_echo_n "(cached) " >&6
45485else
45486  case $BUILD_CXX in
45487  [\\/]* | ?:[\\/]*)
45488  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45489  ;;
45490  *)
45491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45492for as_dir in $PATH
45493do
45494  IFS=$as_save_IFS
45495  test -z "$as_dir" && as_dir=.
45496    for ac_exec_ext in '' $ac_executable_extensions; do
45497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45498    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45500    break 2
45501  fi
45502done
45503  done
45504IFS=$as_save_IFS
45505
45506  ;;
45507esac
45508fi
45509BUILD_CXX=$ac_cv_path_BUILD_CXX
45510if test -n "$BUILD_CXX"; then
45511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45512$as_echo "$BUILD_CXX" >&6; }
45513else
45514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45515$as_echo "no" >&6; }
45516fi
45517
45518
45519  test -n "$BUILD_CXX" && break
45520done
45521
45522  else
45523    # The variable is set, but is it from the command line or the environment?
45524
45525    # Try to remove the string !BUILD_CXX! from our list.
45526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45528      # If it failed, the variable was not from the command line. Ignore it,
45529      # but warn the user (except for BASH, which is always set by the calling BASH).
45530      if test "xBUILD_CXX" != xBASH; then
45531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45532$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45533      fi
45534      # Try to locate tool using the code snippet
45535      for ac_prog in cl CC g++
45536do
45537  # Extract the first word of "$ac_prog", so it can be a program name with args.
45538set dummy $ac_prog; ac_word=$2
45539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45540$as_echo_n "checking for $ac_word... " >&6; }
45541if ${ac_cv_path_BUILD_CXX+:} false; then :
45542  $as_echo_n "(cached) " >&6
45543else
45544  case $BUILD_CXX in
45545  [\\/]* | ?:[\\/]*)
45546  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45547  ;;
45548  *)
45549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45550for as_dir in $PATH
45551do
45552  IFS=$as_save_IFS
45553  test -z "$as_dir" && as_dir=.
45554    for ac_exec_ext in '' $ac_executable_extensions; do
45555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45556    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45558    break 2
45559  fi
45560done
45561  done
45562IFS=$as_save_IFS
45563
45564  ;;
45565esac
45566fi
45567BUILD_CXX=$ac_cv_path_BUILD_CXX
45568if test -n "$BUILD_CXX"; then
45569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45570$as_echo "$BUILD_CXX" >&6; }
45571else
45572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45573$as_echo "no" >&6; }
45574fi
45575
45576
45577  test -n "$BUILD_CXX" && break
45578done
45579
45580    else
45581      # If it succeeded, then it was overridden by the user. We will use it
45582      # for the tool.
45583
45584      # First remove it from the list of overridden variables, so we can test
45585      # for unknown variables in the end.
45586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45587
45588      # Check if we try to supply an empty value
45589      if test "x$BUILD_CXX" = x; then
45590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45591$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45593$as_echo_n "checking for BUILD_CXX... " >&6; }
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45595$as_echo "disabled" >&6; }
45596      else
45597        # Check if the provided tool contains a complete path.
45598        tool_specified="$BUILD_CXX"
45599        tool_basename="${tool_specified##*/}"
45600        if test "x$tool_basename" = "x$tool_specified"; then
45601          # A command without a complete path is provided, search $PATH.
45602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45603$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45604          # Extract the first word of "$tool_basename", so it can be a program name with args.
45605set dummy $tool_basename; ac_word=$2
45606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45607$as_echo_n "checking for $ac_word... " >&6; }
45608if ${ac_cv_path_BUILD_CXX+:} false; then :
45609  $as_echo_n "(cached) " >&6
45610else
45611  case $BUILD_CXX in
45612  [\\/]* | ?:[\\/]*)
45613  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45614  ;;
45615  *)
45616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45617for as_dir in $PATH
45618do
45619  IFS=$as_save_IFS
45620  test -z "$as_dir" && as_dir=.
45621    for ac_exec_ext in '' $ac_executable_extensions; do
45622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45623    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45625    break 2
45626  fi
45627done
45628  done
45629IFS=$as_save_IFS
45630
45631  ;;
45632esac
45633fi
45634BUILD_CXX=$ac_cv_path_BUILD_CXX
45635if test -n "$BUILD_CXX"; then
45636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45637$as_echo "$BUILD_CXX" >&6; }
45638else
45639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45640$as_echo "no" >&6; }
45641fi
45642
45643
45644          if test "x$BUILD_CXX" = x; then
45645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45646          fi
45647        else
45648          # Otherwise we believe it is a complete path. Use it as it is.
45649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45650$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45652$as_echo_n "checking for BUILD_CXX... " >&6; }
45653          if test ! -x "$tool_specified"; then
45654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45655$as_echo "not found" >&6; }
45656            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45657          fi
45658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45659$as_echo "$tool_specified" >&6; }
45660        fi
45661      fi
45662    fi
45663
45664  fi
45665
45666
45667
45668  if test "x$BUILD_CXX" = x; then
45669    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45670  fi
45671
45672
45673
45674  # Only process if variable expands to non-empty
45675
45676  if test "x$BUILD_CXX" != x; then
45677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45678
45679  # First separate the path from the arguments. This will split at the first
45680  # space.
45681  complete="$BUILD_CXX"
45682  path="${complete%% *}"
45683  tmp="$complete EOL"
45684  arguments="${tmp#* }"
45685
45686  # Input might be given as Windows format, start by converting to
45687  # unix format.
45688  new_path=`$CYGPATH -u "$path"`
45689
45690  # Now try to locate executable using which
45691  new_path=`$WHICH "$new_path" 2> /dev/null`
45692  # bat and cmd files are not always considered executable in cygwin causing which
45693  # to not find them
45694  if test "x$new_path" = x \
45695      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45696      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45697    new_path=`$CYGPATH -u "$path"`
45698  fi
45699  if test "x$new_path" = x; then
45700    # Oops. Which didn't find the executable.
45701    # The splitting of arguments from the executable at a space might have been incorrect,
45702    # since paths with space are more likely in Windows. Give it another try with the whole
45703    # argument.
45704    path="$complete"
45705    arguments="EOL"
45706    new_path=`$CYGPATH -u "$path"`
45707    new_path=`$WHICH "$new_path" 2> /dev/null`
45708    # bat and cmd files are not always considered executable in cygwin causing which
45709    # to not find them
45710    if test "x$new_path" = x \
45711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45713      new_path=`$CYGPATH -u "$path"`
45714    fi
45715    if test "x$new_path" = x; then
45716      # It's still not found. Now this is an unrecoverable error.
45717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45718$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45719      has_space=`$ECHO "$complete" | $GREP " "`
45720      if test "x$has_space" != x; then
45721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45723      fi
45724      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45725    fi
45726  fi
45727
45728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45731  # "foo.exe" is OK but "foo" is an error.
45732  #
45733  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45734  # It is also a way to make sure we got the proper file name for the real test later on.
45735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45736  if test "x$test_shortpath" = x; then
45737    # Short path failed, file does not exist as specified.
45738    # Try adding .exe or .cmd
45739    if test -f "${new_path}.exe"; then
45740      input_to_shortpath="${new_path}.exe"
45741    elif test -f "${new_path}.cmd"; then
45742      input_to_shortpath="${new_path}.cmd"
45743    else
45744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45745$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45748      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45749    fi
45750  else
45751    input_to_shortpath="$new_path"
45752  fi
45753
45754  # Call helper function which possibly converts this using DOS-style short mode.
45755  # If so, the updated path is stored in $new_path.
45756  new_path="$input_to_shortpath"
45757
45758  input_path="$input_to_shortpath"
45759  # Check if we need to convert this using DOS-style short mode. If the path
45760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45761  # take no chances and rewrite it.
45762  # Note: m4 eats our [], so we need to use [ and ] instead.
45763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45764  if test "x$has_forbidden_chars" != x; then
45765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45769      # Going to short mode and back again did indeed matter. Since short mode is
45770      # case insensitive, let's make it lowercase to improve readability.
45771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45772      # Now convert it back to Unix-style (cygpath)
45773      input_path=`$CYGPATH -u "$shortmode_path"`
45774      new_path="$input_path"
45775    fi
45776  fi
45777
45778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45779  if test "x$test_cygdrive_prefix" = x; then
45780    # As a simple fix, exclude /usr/bin since it's not a real path.
45781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45783      # a path prefixed by /cygdrive for fixpath to work.
45784      new_path="$CYGWIN_ROOT_PATH$input_path"
45785    fi
45786  fi
45787
45788  # remove trailing .exe if any
45789  new_path="${new_path/%.exe/}"
45790
45791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45792
45793  # First separate the path from the arguments. This will split at the first
45794  # space.
45795  complete="$BUILD_CXX"
45796  path="${complete%% *}"
45797  tmp="$complete EOL"
45798  arguments="${tmp#* }"
45799
45800  # Input might be given as Windows format, start by converting to
45801  # unix format.
45802  new_path="$path"
45803
45804  windows_path="$new_path"
45805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45806    unix_path=`$CYGPATH -u "$windows_path"`
45807    new_path="$unix_path"
45808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45810    new_path="$unix_path"
45811  fi
45812
45813
45814  # Now try to locate executable using which
45815  new_path=`$WHICH "$new_path" 2> /dev/null`
45816
45817  if test "x$new_path" = x; then
45818    # Oops. Which didn't find the executable.
45819    # The splitting of arguments from the executable at a space might have been incorrect,
45820    # since paths with space are more likely in Windows. Give it another try with the whole
45821    # argument.
45822    path="$complete"
45823    arguments="EOL"
45824    new_path="$path"
45825
45826  windows_path="$new_path"
45827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45828    unix_path=`$CYGPATH -u "$windows_path"`
45829    new_path="$unix_path"
45830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45832    new_path="$unix_path"
45833  fi
45834
45835
45836    new_path=`$WHICH "$new_path" 2> /dev/null`
45837    # bat and cmd files are not always considered executable in MSYS causing which
45838    # to not find them
45839    if test "x$new_path" = x \
45840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45842      new_path="$path"
45843
45844  windows_path="$new_path"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    unix_path=`$CYGPATH -u "$windows_path"`
45847    new_path="$unix_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45850    new_path="$unix_path"
45851  fi
45852
45853    fi
45854
45855    if test "x$new_path" = x; then
45856      # It's still not found. Now this is an unrecoverable error.
45857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45858$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45859      has_space=`$ECHO "$complete" | $GREP " "`
45860      if test "x$has_space" != x; then
45861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45863      fi
45864      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45865    fi
45866  fi
45867
45868  # Now new_path has a complete unix path to the binary
45869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45870    # Keep paths in /bin as-is, but remove trailing .exe if any
45871    new_path="${new_path/%.exe/}"
45872    # Do not save /bin paths to all_fixpath_prefixes!
45873  else
45874    # Not in mixed or Windows style, start by that.
45875    new_path=`cmd //c echo $new_path`
45876
45877  input_path="$new_path"
45878  # Check if we need to convert this using DOS-style short mode. If the path
45879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45880  # take no chances and rewrite it.
45881  # Note: m4 eats our [], so we need to use [ and ] instead.
45882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45883  if test "x$has_forbidden_chars" != x; then
45884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45886  fi
45887
45888    # Output is in $new_path
45889
45890  windows_path="$new_path"
45891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45892    unix_path=`$CYGPATH -u "$windows_path"`
45893    new_path="$unix_path"
45894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45896    new_path="$unix_path"
45897  fi
45898
45899    # remove trailing .exe if any
45900    new_path="${new_path/%.exe/}"
45901
45902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45904  fi
45905
45906    else
45907      # We're on a unix platform. Hooray! :)
45908      # First separate the path from the arguments. This will split at the first
45909      # space.
45910      complete="$BUILD_CXX"
45911      path="${complete%% *}"
45912      tmp="$complete EOL"
45913      arguments="${tmp#* }"
45914
45915      # Cannot rely on the command "which" here since it doesn't always work.
45916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45917      if test -z "$is_absolute_path"; then
45918        # Path to executable is not absolute. Find it.
45919        IFS_save="$IFS"
45920        IFS=:
45921        for p in $PATH; do
45922          if test -f "$p/$path" && test -x "$p/$path"; then
45923            new_path="$p/$path"
45924            break
45925          fi
45926        done
45927        IFS="$IFS_save"
45928      else
45929        # This is an absolute path, we can use it without further modifications.
45930        new_path="$path"
45931      fi
45932
45933      if test "x$new_path" = x; then
45934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45935$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45936        has_space=`$ECHO "$complete" | $GREP " "`
45937        if test "x$has_space" != x; then
45938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45940        fi
45941        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45942      fi
45943    fi
45944
45945    # Now join together the path and the arguments once again
45946    if test "x$arguments" != xEOL; then
45947      new_complete="$new_path ${arguments% *}"
45948    else
45949      new_complete="$new_path"
45950    fi
45951
45952    if test "x$complete" != "x$new_complete"; then
45953      BUILD_CXX="$new_complete"
45954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45955$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45956    fi
45957  fi
45958
45959
45960
45961  # Publish this variable in the help.
45962
45963
45964  if [ -z "${BUILD_NM+x}" ]; then
45965    # The variable is not set by user, try to locate tool using the code snippet
45966    for ac_prog in nm gcc-nm
45967do
45968  # Extract the first word of "$ac_prog", so it can be a program name with args.
45969set dummy $ac_prog; ac_word=$2
45970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45971$as_echo_n "checking for $ac_word... " >&6; }
45972if ${ac_cv_path_BUILD_NM+:} false; then :
45973  $as_echo_n "(cached) " >&6
45974else
45975  case $BUILD_NM in
45976  [\\/]* | ?:[\\/]*)
45977  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45978  ;;
45979  *)
45980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45981for as_dir in $PATH
45982do
45983  IFS=$as_save_IFS
45984  test -z "$as_dir" && as_dir=.
45985    for ac_exec_ext in '' $ac_executable_extensions; do
45986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45987    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45989    break 2
45990  fi
45991done
45992  done
45993IFS=$as_save_IFS
45994
45995  ;;
45996esac
45997fi
45998BUILD_NM=$ac_cv_path_BUILD_NM
45999if test -n "$BUILD_NM"; then
46000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46001$as_echo "$BUILD_NM" >&6; }
46002else
46003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46004$as_echo "no" >&6; }
46005fi
46006
46007
46008  test -n "$BUILD_NM" && break
46009done
46010
46011  else
46012    # The variable is set, but is it from the command line or the environment?
46013
46014    # Try to remove the string !BUILD_NM! from our list.
46015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46017      # If it failed, the variable was not from the command line. Ignore it,
46018      # but warn the user (except for BASH, which is always set by the calling BASH).
46019      if test "xBUILD_NM" != xBASH; then
46020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46021$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46022      fi
46023      # Try to locate tool using the code snippet
46024      for ac_prog in nm gcc-nm
46025do
46026  # Extract the first word of "$ac_prog", so it can be a program name with args.
46027set dummy $ac_prog; ac_word=$2
46028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46029$as_echo_n "checking for $ac_word... " >&6; }
46030if ${ac_cv_path_BUILD_NM+:} false; then :
46031  $as_echo_n "(cached) " >&6
46032else
46033  case $BUILD_NM in
46034  [\\/]* | ?:[\\/]*)
46035  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46036  ;;
46037  *)
46038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46039for as_dir in $PATH
46040do
46041  IFS=$as_save_IFS
46042  test -z "$as_dir" && as_dir=.
46043    for ac_exec_ext in '' $ac_executable_extensions; do
46044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46045    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46047    break 2
46048  fi
46049done
46050  done
46051IFS=$as_save_IFS
46052
46053  ;;
46054esac
46055fi
46056BUILD_NM=$ac_cv_path_BUILD_NM
46057if test -n "$BUILD_NM"; then
46058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46059$as_echo "$BUILD_NM" >&6; }
46060else
46061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46062$as_echo "no" >&6; }
46063fi
46064
46065
46066  test -n "$BUILD_NM" && break
46067done
46068
46069    else
46070      # If it succeeded, then it was overridden by the user. We will use it
46071      # for the tool.
46072
46073      # First remove it from the list of overridden variables, so we can test
46074      # for unknown variables in the end.
46075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46076
46077      # Check if we try to supply an empty value
46078      if test "x$BUILD_NM" = x; then
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46080$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46082$as_echo_n "checking for BUILD_NM... " >&6; }
46083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46084$as_echo "disabled" >&6; }
46085      else
46086        # Check if the provided tool contains a complete path.
46087        tool_specified="$BUILD_NM"
46088        tool_basename="${tool_specified##*/}"
46089        if test "x$tool_basename" = "x$tool_specified"; then
46090          # A command without a complete path is provided, search $PATH.
46091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46092$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46093          # Extract the first word of "$tool_basename", so it can be a program name with args.
46094set dummy $tool_basename; ac_word=$2
46095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46096$as_echo_n "checking for $ac_word... " >&6; }
46097if ${ac_cv_path_BUILD_NM+:} false; then :
46098  $as_echo_n "(cached) " >&6
46099else
46100  case $BUILD_NM in
46101  [\\/]* | ?:[\\/]*)
46102  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46103  ;;
46104  *)
46105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46106for as_dir in $PATH
46107do
46108  IFS=$as_save_IFS
46109  test -z "$as_dir" && as_dir=.
46110    for ac_exec_ext in '' $ac_executable_extensions; do
46111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46112    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46114    break 2
46115  fi
46116done
46117  done
46118IFS=$as_save_IFS
46119
46120  ;;
46121esac
46122fi
46123BUILD_NM=$ac_cv_path_BUILD_NM
46124if test -n "$BUILD_NM"; then
46125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46126$as_echo "$BUILD_NM" >&6; }
46127else
46128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46129$as_echo "no" >&6; }
46130fi
46131
46132
46133          if test "x$BUILD_NM" = x; then
46134            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46135          fi
46136        else
46137          # Otherwise we believe it is a complete path. Use it as it is.
46138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46139$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46140          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46141$as_echo_n "checking for BUILD_NM... " >&6; }
46142          if test ! -x "$tool_specified"; then
46143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46144$as_echo "not found" >&6; }
46145            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46146          fi
46147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46148$as_echo "$tool_specified" >&6; }
46149        fi
46150      fi
46151    fi
46152
46153  fi
46154
46155
46156
46157  # Only process if variable expands to non-empty
46158
46159  if test "x$BUILD_NM" != x; then
46160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46161
46162  # First separate the path from the arguments. This will split at the first
46163  # space.
46164  complete="$BUILD_NM"
46165  path="${complete%% *}"
46166  tmp="$complete EOL"
46167  arguments="${tmp#* }"
46168
46169  # Input might be given as Windows format, start by converting to
46170  # unix format.
46171  new_path=`$CYGPATH -u "$path"`
46172
46173  # Now try to locate executable using which
46174  new_path=`$WHICH "$new_path" 2> /dev/null`
46175  # bat and cmd files are not always considered executable in cygwin causing which
46176  # to not find them
46177  if test "x$new_path" = x \
46178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46180    new_path=`$CYGPATH -u "$path"`
46181  fi
46182  if test "x$new_path" = x; then
46183    # Oops. Which didn't find the executable.
46184    # The splitting of arguments from the executable at a space might have been incorrect,
46185    # since paths with space are more likely in Windows. Give it another try with the whole
46186    # argument.
46187    path="$complete"
46188    arguments="EOL"
46189    new_path=`$CYGPATH -u "$path"`
46190    new_path=`$WHICH "$new_path" 2> /dev/null`
46191    # bat and cmd files are not always considered executable in cygwin causing which
46192    # to not find them
46193    if test "x$new_path" = x \
46194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46196      new_path=`$CYGPATH -u "$path"`
46197    fi
46198    if test "x$new_path" = x; then
46199      # It's still not found. Now this is an unrecoverable error.
46200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46201$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46202      has_space=`$ECHO "$complete" | $GREP " "`
46203      if test "x$has_space" != x; then
46204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46206      fi
46207      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46208    fi
46209  fi
46210
46211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46214  # "foo.exe" is OK but "foo" is an error.
46215  #
46216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46217  # It is also a way to make sure we got the proper file name for the real test later on.
46218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46219  if test "x$test_shortpath" = x; then
46220    # Short path failed, file does not exist as specified.
46221    # Try adding .exe or .cmd
46222    if test -f "${new_path}.exe"; then
46223      input_to_shortpath="${new_path}.exe"
46224    elif test -f "${new_path}.cmd"; then
46225      input_to_shortpath="${new_path}.cmd"
46226    else
46227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46228$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46231      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46232    fi
46233  else
46234    input_to_shortpath="$new_path"
46235  fi
46236
46237  # Call helper function which possibly converts this using DOS-style short mode.
46238  # If so, the updated path is stored in $new_path.
46239  new_path="$input_to_shortpath"
46240
46241  input_path="$input_to_shortpath"
46242  # Check if we need to convert this using DOS-style short mode. If the path
46243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46244  # take no chances and rewrite it.
46245  # Note: m4 eats our [], so we need to use [ and ] instead.
46246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46247  if test "x$has_forbidden_chars" != x; then
46248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46252      # Going to short mode and back again did indeed matter. Since short mode is
46253      # case insensitive, let's make it lowercase to improve readability.
46254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46255      # Now convert it back to Unix-style (cygpath)
46256      input_path=`$CYGPATH -u "$shortmode_path"`
46257      new_path="$input_path"
46258    fi
46259  fi
46260
46261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46262  if test "x$test_cygdrive_prefix" = x; then
46263    # As a simple fix, exclude /usr/bin since it's not a real path.
46264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46266      # a path prefixed by /cygdrive for fixpath to work.
46267      new_path="$CYGWIN_ROOT_PATH$input_path"
46268    fi
46269  fi
46270
46271  # remove trailing .exe if any
46272  new_path="${new_path/%.exe/}"
46273
46274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46275
46276  # First separate the path from the arguments. This will split at the first
46277  # space.
46278  complete="$BUILD_NM"
46279  path="${complete%% *}"
46280  tmp="$complete EOL"
46281  arguments="${tmp#* }"
46282
46283  # Input might be given as Windows format, start by converting to
46284  # unix format.
46285  new_path="$path"
46286
46287  windows_path="$new_path"
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289    unix_path=`$CYGPATH -u "$windows_path"`
46290    new_path="$unix_path"
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46293    new_path="$unix_path"
46294  fi
46295
46296
46297  # Now try to locate executable using which
46298  new_path=`$WHICH "$new_path" 2> /dev/null`
46299
46300  if test "x$new_path" = x; then
46301    # Oops. Which didn't find the executable.
46302    # The splitting of arguments from the executable at a space might have been incorrect,
46303    # since paths with space are more likely in Windows. Give it another try with the whole
46304    # argument.
46305    path="$complete"
46306    arguments="EOL"
46307    new_path="$path"
46308
46309  windows_path="$new_path"
46310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46311    unix_path=`$CYGPATH -u "$windows_path"`
46312    new_path="$unix_path"
46313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46315    new_path="$unix_path"
46316  fi
46317
46318
46319    new_path=`$WHICH "$new_path" 2> /dev/null`
46320    # bat and cmd files are not always considered executable in MSYS causing which
46321    # to not find them
46322    if test "x$new_path" = x \
46323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46325      new_path="$path"
46326
46327  windows_path="$new_path"
46328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329    unix_path=`$CYGPATH -u "$windows_path"`
46330    new_path="$unix_path"
46331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46333    new_path="$unix_path"
46334  fi
46335
46336    fi
46337
46338    if test "x$new_path" = x; then
46339      # It's still not found. Now this is an unrecoverable error.
46340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46341$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46342      has_space=`$ECHO "$complete" | $GREP " "`
46343      if test "x$has_space" != x; then
46344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46346      fi
46347      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46348    fi
46349  fi
46350
46351  # Now new_path has a complete unix path to the binary
46352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46353    # Keep paths in /bin as-is, but remove trailing .exe if any
46354    new_path="${new_path/%.exe/}"
46355    # Do not save /bin paths to all_fixpath_prefixes!
46356  else
46357    # Not in mixed or Windows style, start by that.
46358    new_path=`cmd //c echo $new_path`
46359
46360  input_path="$new_path"
46361  # Check if we need to convert this using DOS-style short mode. If the path
46362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46363  # take no chances and rewrite it.
46364  # Note: m4 eats our [], so we need to use [ and ] instead.
46365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46366  if test "x$has_forbidden_chars" != x; then
46367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46369  fi
46370
46371    # Output is in $new_path
46372
46373  windows_path="$new_path"
46374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375    unix_path=`$CYGPATH -u "$windows_path"`
46376    new_path="$unix_path"
46377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46379    new_path="$unix_path"
46380  fi
46381
46382    # remove trailing .exe if any
46383    new_path="${new_path/%.exe/}"
46384
46385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46387  fi
46388
46389    else
46390      # We're on a unix platform. Hooray! :)
46391      # First separate the path from the arguments. This will split at the first
46392      # space.
46393      complete="$BUILD_NM"
46394      path="${complete%% *}"
46395      tmp="$complete EOL"
46396      arguments="${tmp#* }"
46397
46398      # Cannot rely on the command "which" here since it doesn't always work.
46399      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46400      if test -z "$is_absolute_path"; then
46401        # Path to executable is not absolute. Find it.
46402        IFS_save="$IFS"
46403        IFS=:
46404        for p in $PATH; do
46405          if test -f "$p/$path" && test -x "$p/$path"; then
46406            new_path="$p/$path"
46407            break
46408          fi
46409        done
46410        IFS="$IFS_save"
46411      else
46412        # This is an absolute path, we can use it without further modifications.
46413        new_path="$path"
46414      fi
46415
46416      if test "x$new_path" = x; then
46417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46418$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46419        has_space=`$ECHO "$complete" | $GREP " "`
46420        if test "x$has_space" != x; then
46421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46423        fi
46424        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46425      fi
46426    fi
46427
46428    # Now join together the path and the arguments once again
46429    if test "x$arguments" != xEOL; then
46430      new_complete="$new_path ${arguments% *}"
46431    else
46432      new_complete="$new_path"
46433    fi
46434
46435    if test "x$complete" != "x$new_complete"; then
46436      BUILD_NM="$new_complete"
46437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46438$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46439    fi
46440  fi
46441
46442
46443
46444  # Publish this variable in the help.
46445
46446
46447  if [ -z "${BUILD_AR+x}" ]; then
46448    # The variable is not set by user, try to locate tool using the code snippet
46449    for ac_prog in ar gcc-ar
46450do
46451  # Extract the first word of "$ac_prog", so it can be a program name with args.
46452set dummy $ac_prog; ac_word=$2
46453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46454$as_echo_n "checking for $ac_word... " >&6; }
46455if ${ac_cv_path_BUILD_AR+:} false; then :
46456  $as_echo_n "(cached) " >&6
46457else
46458  case $BUILD_AR in
46459  [\\/]* | ?:[\\/]*)
46460  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46461  ;;
46462  *)
46463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46464for as_dir in $PATH
46465do
46466  IFS=$as_save_IFS
46467  test -z "$as_dir" && as_dir=.
46468    for ac_exec_ext in '' $ac_executable_extensions; do
46469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46470    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46472    break 2
46473  fi
46474done
46475  done
46476IFS=$as_save_IFS
46477
46478  ;;
46479esac
46480fi
46481BUILD_AR=$ac_cv_path_BUILD_AR
46482if test -n "$BUILD_AR"; then
46483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46484$as_echo "$BUILD_AR" >&6; }
46485else
46486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46487$as_echo "no" >&6; }
46488fi
46489
46490
46491  test -n "$BUILD_AR" && break
46492done
46493
46494  else
46495    # The variable is set, but is it from the command line or the environment?
46496
46497    # Try to remove the string !BUILD_AR! from our list.
46498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46500      # If it failed, the variable was not from the command line. Ignore it,
46501      # but warn the user (except for BASH, which is always set by the calling BASH).
46502      if test "xBUILD_AR" != xBASH; then
46503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46504$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46505      fi
46506      # Try to locate tool using the code snippet
46507      for ac_prog in ar gcc-ar
46508do
46509  # Extract the first word of "$ac_prog", so it can be a program name with args.
46510set dummy $ac_prog; ac_word=$2
46511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46512$as_echo_n "checking for $ac_word... " >&6; }
46513if ${ac_cv_path_BUILD_AR+:} false; then :
46514  $as_echo_n "(cached) " >&6
46515else
46516  case $BUILD_AR in
46517  [\\/]* | ?:[\\/]*)
46518  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46519  ;;
46520  *)
46521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46522for as_dir in $PATH
46523do
46524  IFS=$as_save_IFS
46525  test -z "$as_dir" && as_dir=.
46526    for ac_exec_ext in '' $ac_executable_extensions; do
46527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46528    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46530    break 2
46531  fi
46532done
46533  done
46534IFS=$as_save_IFS
46535
46536  ;;
46537esac
46538fi
46539BUILD_AR=$ac_cv_path_BUILD_AR
46540if test -n "$BUILD_AR"; then
46541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46542$as_echo "$BUILD_AR" >&6; }
46543else
46544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46545$as_echo "no" >&6; }
46546fi
46547
46548
46549  test -n "$BUILD_AR" && break
46550done
46551
46552    else
46553      # If it succeeded, then it was overridden by the user. We will use it
46554      # for the tool.
46555
46556      # First remove it from the list of overridden variables, so we can test
46557      # for unknown variables in the end.
46558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46559
46560      # Check if we try to supply an empty value
46561      if test "x$BUILD_AR" = x; then
46562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46563$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46565$as_echo_n "checking for BUILD_AR... " >&6; }
46566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46567$as_echo "disabled" >&6; }
46568      else
46569        # Check if the provided tool contains a complete path.
46570        tool_specified="$BUILD_AR"
46571        tool_basename="${tool_specified##*/}"
46572        if test "x$tool_basename" = "x$tool_specified"; then
46573          # A command without a complete path is provided, search $PATH.
46574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46575$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46576          # Extract the first word of "$tool_basename", so it can be a program name with args.
46577set dummy $tool_basename; ac_word=$2
46578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46579$as_echo_n "checking for $ac_word... " >&6; }
46580if ${ac_cv_path_BUILD_AR+:} false; then :
46581  $as_echo_n "(cached) " >&6
46582else
46583  case $BUILD_AR in
46584  [\\/]* | ?:[\\/]*)
46585  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46586  ;;
46587  *)
46588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46589for as_dir in $PATH
46590do
46591  IFS=$as_save_IFS
46592  test -z "$as_dir" && as_dir=.
46593    for ac_exec_ext in '' $ac_executable_extensions; do
46594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46595    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46597    break 2
46598  fi
46599done
46600  done
46601IFS=$as_save_IFS
46602
46603  ;;
46604esac
46605fi
46606BUILD_AR=$ac_cv_path_BUILD_AR
46607if test -n "$BUILD_AR"; then
46608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46609$as_echo "$BUILD_AR" >&6; }
46610else
46611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46612$as_echo "no" >&6; }
46613fi
46614
46615
46616          if test "x$BUILD_AR" = x; then
46617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46618          fi
46619        else
46620          # Otherwise we believe it is a complete path. Use it as it is.
46621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46622$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46624$as_echo_n "checking for BUILD_AR... " >&6; }
46625          if test ! -x "$tool_specified"; then
46626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46627$as_echo "not found" >&6; }
46628            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46629          fi
46630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46631$as_echo "$tool_specified" >&6; }
46632        fi
46633      fi
46634    fi
46635
46636  fi
46637
46638
46639
46640  # Only process if variable expands to non-empty
46641
46642  if test "x$BUILD_AR" != x; then
46643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46644
46645  # First separate the path from the arguments. This will split at the first
46646  # space.
46647  complete="$BUILD_AR"
46648  path="${complete%% *}"
46649  tmp="$complete EOL"
46650  arguments="${tmp#* }"
46651
46652  # Input might be given as Windows format, start by converting to
46653  # unix format.
46654  new_path=`$CYGPATH -u "$path"`
46655
46656  # Now try to locate executable using which
46657  new_path=`$WHICH "$new_path" 2> /dev/null`
46658  # bat and cmd files are not always considered executable in cygwin causing which
46659  # to not find them
46660  if test "x$new_path" = x \
46661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46663    new_path=`$CYGPATH -u "$path"`
46664  fi
46665  if test "x$new_path" = x; then
46666    # Oops. Which didn't find the executable.
46667    # The splitting of arguments from the executable at a space might have been incorrect,
46668    # since paths with space are more likely in Windows. Give it another try with the whole
46669    # argument.
46670    path="$complete"
46671    arguments="EOL"
46672    new_path=`$CYGPATH -u "$path"`
46673    new_path=`$WHICH "$new_path" 2> /dev/null`
46674    # bat and cmd files are not always considered executable in cygwin causing which
46675    # to not find them
46676    if test "x$new_path" = x \
46677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46679      new_path=`$CYGPATH -u "$path"`
46680    fi
46681    if test "x$new_path" = x; then
46682      # It's still not found. Now this is an unrecoverable error.
46683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46684$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46685      has_space=`$ECHO "$complete" | $GREP " "`
46686      if test "x$has_space" != x; then
46687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46689      fi
46690      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46691    fi
46692  fi
46693
46694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46697  # "foo.exe" is OK but "foo" is an error.
46698  #
46699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46700  # It is also a way to make sure we got the proper file name for the real test later on.
46701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46702  if test "x$test_shortpath" = x; then
46703    # Short path failed, file does not exist as specified.
46704    # Try adding .exe or .cmd
46705    if test -f "${new_path}.exe"; then
46706      input_to_shortpath="${new_path}.exe"
46707    elif test -f "${new_path}.cmd"; then
46708      input_to_shortpath="${new_path}.cmd"
46709    else
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46711$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46714      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46715    fi
46716  else
46717    input_to_shortpath="$new_path"
46718  fi
46719
46720  # Call helper function which possibly converts this using DOS-style short mode.
46721  # If so, the updated path is stored in $new_path.
46722  new_path="$input_to_shortpath"
46723
46724  input_path="$input_to_shortpath"
46725  # Check if we need to convert this using DOS-style short mode. If the path
46726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46727  # take no chances and rewrite it.
46728  # Note: m4 eats our [], so we need to use [ and ] instead.
46729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46730  if test "x$has_forbidden_chars" != x; then
46731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46735      # Going to short mode and back again did indeed matter. Since short mode is
46736      # case insensitive, let's make it lowercase to improve readability.
46737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46738      # Now convert it back to Unix-style (cygpath)
46739      input_path=`$CYGPATH -u "$shortmode_path"`
46740      new_path="$input_path"
46741    fi
46742  fi
46743
46744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46745  if test "x$test_cygdrive_prefix" = x; then
46746    # As a simple fix, exclude /usr/bin since it's not a real path.
46747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46749      # a path prefixed by /cygdrive for fixpath to work.
46750      new_path="$CYGWIN_ROOT_PATH$input_path"
46751    fi
46752  fi
46753
46754  # remove trailing .exe if any
46755  new_path="${new_path/%.exe/}"
46756
46757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46758
46759  # First separate the path from the arguments. This will split at the first
46760  # space.
46761  complete="$BUILD_AR"
46762  path="${complete%% *}"
46763  tmp="$complete EOL"
46764  arguments="${tmp#* }"
46765
46766  # Input might be given as Windows format, start by converting to
46767  # unix format.
46768  new_path="$path"
46769
46770  windows_path="$new_path"
46771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46772    unix_path=`$CYGPATH -u "$windows_path"`
46773    new_path="$unix_path"
46774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46776    new_path="$unix_path"
46777  fi
46778
46779
46780  # Now try to locate executable using which
46781  new_path=`$WHICH "$new_path" 2> /dev/null`
46782
46783  if test "x$new_path" = x; then
46784    # Oops. Which didn't find the executable.
46785    # The splitting of arguments from the executable at a space might have been incorrect,
46786    # since paths with space are more likely in Windows. Give it another try with the whole
46787    # argument.
46788    path="$complete"
46789    arguments="EOL"
46790    new_path="$path"
46791
46792  windows_path="$new_path"
46793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46794    unix_path=`$CYGPATH -u "$windows_path"`
46795    new_path="$unix_path"
46796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46798    new_path="$unix_path"
46799  fi
46800
46801
46802    new_path=`$WHICH "$new_path" 2> /dev/null`
46803    # bat and cmd files are not always considered executable in MSYS causing which
46804    # to not find them
46805    if test "x$new_path" = x \
46806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46808      new_path="$path"
46809
46810  windows_path="$new_path"
46811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46812    unix_path=`$CYGPATH -u "$windows_path"`
46813    new_path="$unix_path"
46814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46816    new_path="$unix_path"
46817  fi
46818
46819    fi
46820
46821    if test "x$new_path" = x; then
46822      # It's still not found. Now this is an unrecoverable error.
46823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46824$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46825      has_space=`$ECHO "$complete" | $GREP " "`
46826      if test "x$has_space" != x; then
46827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46829      fi
46830      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46831    fi
46832  fi
46833
46834  # Now new_path has a complete unix path to the binary
46835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46836    # Keep paths in /bin as-is, but remove trailing .exe if any
46837    new_path="${new_path/%.exe/}"
46838    # Do not save /bin paths to all_fixpath_prefixes!
46839  else
46840    # Not in mixed or Windows style, start by that.
46841    new_path=`cmd //c echo $new_path`
46842
46843  input_path="$new_path"
46844  # Check if we need to convert this using DOS-style short mode. If the path
46845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46846  # take no chances and rewrite it.
46847  # Note: m4 eats our [], so we need to use [ and ] instead.
46848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46849  if test "x$has_forbidden_chars" != x; then
46850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46852  fi
46853
46854    # Output is in $new_path
46855
46856  windows_path="$new_path"
46857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46858    unix_path=`$CYGPATH -u "$windows_path"`
46859    new_path="$unix_path"
46860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46862    new_path="$unix_path"
46863  fi
46864
46865    # remove trailing .exe if any
46866    new_path="${new_path/%.exe/}"
46867
46868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46870  fi
46871
46872    else
46873      # We're on a unix platform. Hooray! :)
46874      # First separate the path from the arguments. This will split at the first
46875      # space.
46876      complete="$BUILD_AR"
46877      path="${complete%% *}"
46878      tmp="$complete EOL"
46879      arguments="${tmp#* }"
46880
46881      # Cannot rely on the command "which" here since it doesn't always work.
46882      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46883      if test -z "$is_absolute_path"; then
46884        # Path to executable is not absolute. Find it.
46885        IFS_save="$IFS"
46886        IFS=:
46887        for p in $PATH; do
46888          if test -f "$p/$path" && test -x "$p/$path"; then
46889            new_path="$p/$path"
46890            break
46891          fi
46892        done
46893        IFS="$IFS_save"
46894      else
46895        # This is an absolute path, we can use it without further modifications.
46896        new_path="$path"
46897      fi
46898
46899      if test "x$new_path" = x; then
46900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46901$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46902        has_space=`$ECHO "$complete" | $GREP " "`
46903        if test "x$has_space" != x; then
46904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46906        fi
46907        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46908      fi
46909    fi
46910
46911    # Now join together the path and the arguments once again
46912    if test "x$arguments" != xEOL; then
46913      new_complete="$new_path ${arguments% *}"
46914    else
46915      new_complete="$new_path"
46916    fi
46917
46918    if test "x$complete" != "x$new_complete"; then
46919      BUILD_AR="$new_complete"
46920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46921$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46922    fi
46923  fi
46924
46925
46926
46927  # Publish this variable in the help.
46928
46929
46930  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46931    # The variable is not set by user, try to locate tool using the code snippet
46932    for ac_prog in objcopy
46933do
46934  # Extract the first word of "$ac_prog", so it can be a program name with args.
46935set dummy $ac_prog; ac_word=$2
46936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46937$as_echo_n "checking for $ac_word... " >&6; }
46938if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46939  $as_echo_n "(cached) " >&6
46940else
46941  case $BUILD_OBJCOPY in
46942  [\\/]* | ?:[\\/]*)
46943  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46944  ;;
46945  *)
46946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46947for as_dir in $PATH
46948do
46949  IFS=$as_save_IFS
46950  test -z "$as_dir" && as_dir=.
46951    for ac_exec_ext in '' $ac_executable_extensions; do
46952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46953    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46955    break 2
46956  fi
46957done
46958  done
46959IFS=$as_save_IFS
46960
46961  ;;
46962esac
46963fi
46964BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46965if test -n "$BUILD_OBJCOPY"; then
46966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46967$as_echo "$BUILD_OBJCOPY" >&6; }
46968else
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46970$as_echo "no" >&6; }
46971fi
46972
46973
46974  test -n "$BUILD_OBJCOPY" && break
46975done
46976
46977  else
46978    # The variable is set, but is it from the command line or the environment?
46979
46980    # Try to remove the string !BUILD_OBJCOPY! from our list.
46981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46983      # If it failed, the variable was not from the command line. Ignore it,
46984      # but warn the user (except for BASH, which is always set by the calling BASH).
46985      if test "xBUILD_OBJCOPY" != xBASH; then
46986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46987$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46988      fi
46989      # Try to locate tool using the code snippet
46990      for ac_prog in objcopy
46991do
46992  # Extract the first word of "$ac_prog", so it can be a program name with args.
46993set dummy $ac_prog; ac_word=$2
46994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46995$as_echo_n "checking for $ac_word... " >&6; }
46996if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46997  $as_echo_n "(cached) " >&6
46998else
46999  case $BUILD_OBJCOPY in
47000  [\\/]* | ?:[\\/]*)
47001  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47002  ;;
47003  *)
47004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47005for as_dir in $PATH
47006do
47007  IFS=$as_save_IFS
47008  test -z "$as_dir" && as_dir=.
47009    for ac_exec_ext in '' $ac_executable_extensions; do
47010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47011    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47013    break 2
47014  fi
47015done
47016  done
47017IFS=$as_save_IFS
47018
47019  ;;
47020esac
47021fi
47022BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47023if test -n "$BUILD_OBJCOPY"; then
47024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47025$as_echo "$BUILD_OBJCOPY" >&6; }
47026else
47027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47028$as_echo "no" >&6; }
47029fi
47030
47031
47032  test -n "$BUILD_OBJCOPY" && break
47033done
47034
47035    else
47036      # If it succeeded, then it was overridden by the user. We will use it
47037      # for the tool.
47038
47039      # First remove it from the list of overridden variables, so we can test
47040      # for unknown variables in the end.
47041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47042
47043      # Check if we try to supply an empty value
47044      if test "x$BUILD_OBJCOPY" = x; then
47045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47046$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47048$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47050$as_echo "disabled" >&6; }
47051      else
47052        # Check if the provided tool contains a complete path.
47053        tool_specified="$BUILD_OBJCOPY"
47054        tool_basename="${tool_specified##*/}"
47055        if test "x$tool_basename" = "x$tool_specified"; then
47056          # A command without a complete path is provided, search $PATH.
47057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47058$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47059          # Extract the first word of "$tool_basename", so it can be a program name with args.
47060set dummy $tool_basename; ac_word=$2
47061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47062$as_echo_n "checking for $ac_word... " >&6; }
47063if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47064  $as_echo_n "(cached) " >&6
47065else
47066  case $BUILD_OBJCOPY in
47067  [\\/]* | ?:[\\/]*)
47068  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47069  ;;
47070  *)
47071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47072for as_dir in $PATH
47073do
47074  IFS=$as_save_IFS
47075  test -z "$as_dir" && as_dir=.
47076    for ac_exec_ext in '' $ac_executable_extensions; do
47077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47078    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47080    break 2
47081  fi
47082done
47083  done
47084IFS=$as_save_IFS
47085
47086  ;;
47087esac
47088fi
47089BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47090if test -n "$BUILD_OBJCOPY"; then
47091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47092$as_echo "$BUILD_OBJCOPY" >&6; }
47093else
47094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47095$as_echo "no" >&6; }
47096fi
47097
47098
47099          if test "x$BUILD_OBJCOPY" = x; then
47100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47101          fi
47102        else
47103          # Otherwise we believe it is a complete path. Use it as it is.
47104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47105$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47107$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47108          if test ! -x "$tool_specified"; then
47109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47110$as_echo "not found" >&6; }
47111            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47112          fi
47113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47114$as_echo "$tool_specified" >&6; }
47115        fi
47116      fi
47117    fi
47118
47119  fi
47120
47121
47122
47123  # Only process if variable expands to non-empty
47124
47125  if test "x$BUILD_OBJCOPY" != x; then
47126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47127
47128  # First separate the path from the arguments. This will split at the first
47129  # space.
47130  complete="$BUILD_OBJCOPY"
47131  path="${complete%% *}"
47132  tmp="$complete EOL"
47133  arguments="${tmp#* }"
47134
47135  # Input might be given as Windows format, start by converting to
47136  # unix format.
47137  new_path=`$CYGPATH -u "$path"`
47138
47139  # Now try to locate executable using which
47140  new_path=`$WHICH "$new_path" 2> /dev/null`
47141  # bat and cmd files are not always considered executable in cygwin causing which
47142  # to not find them
47143  if test "x$new_path" = x \
47144      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47145      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47146    new_path=`$CYGPATH -u "$path"`
47147  fi
47148  if test "x$new_path" = x; then
47149    # Oops. Which didn't find the executable.
47150    # The splitting of arguments from the executable at a space might have been incorrect,
47151    # since paths with space are more likely in Windows. Give it another try with the whole
47152    # argument.
47153    path="$complete"
47154    arguments="EOL"
47155    new_path=`$CYGPATH -u "$path"`
47156    new_path=`$WHICH "$new_path" 2> /dev/null`
47157    # bat and cmd files are not always considered executable in cygwin causing which
47158    # to not find them
47159    if test "x$new_path" = x \
47160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47162      new_path=`$CYGPATH -u "$path"`
47163    fi
47164    if test "x$new_path" = x; then
47165      # It's still not found. Now this is an unrecoverable error.
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47167$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47168      has_space=`$ECHO "$complete" | $GREP " "`
47169      if test "x$has_space" != x; then
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47172      fi
47173      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47174    fi
47175  fi
47176
47177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47180  # "foo.exe" is OK but "foo" is an error.
47181  #
47182  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47183  # It is also a way to make sure we got the proper file name for the real test later on.
47184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47185  if test "x$test_shortpath" = x; then
47186    # Short path failed, file does not exist as specified.
47187    # Try adding .exe or .cmd
47188    if test -f "${new_path}.exe"; then
47189      input_to_shortpath="${new_path}.exe"
47190    elif test -f "${new_path}.cmd"; then
47191      input_to_shortpath="${new_path}.cmd"
47192    else
47193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47194$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47195      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47196$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47197      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47198    fi
47199  else
47200    input_to_shortpath="$new_path"
47201  fi
47202
47203  # Call helper function which possibly converts this using DOS-style short mode.
47204  # If so, the updated path is stored in $new_path.
47205  new_path="$input_to_shortpath"
47206
47207  input_path="$input_to_shortpath"
47208  # Check if we need to convert this using DOS-style short mode. If the path
47209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47210  # take no chances and rewrite it.
47211  # Note: m4 eats our [], so we need to use [ and ] instead.
47212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47213  if test "x$has_forbidden_chars" != x; then
47214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47218      # Going to short mode and back again did indeed matter. Since short mode is
47219      # case insensitive, let's make it lowercase to improve readability.
47220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47221      # Now convert it back to Unix-style (cygpath)
47222      input_path=`$CYGPATH -u "$shortmode_path"`
47223      new_path="$input_path"
47224    fi
47225  fi
47226
47227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47228  if test "x$test_cygdrive_prefix" = x; then
47229    # As a simple fix, exclude /usr/bin since it's not a real path.
47230    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47232      # a path prefixed by /cygdrive for fixpath to work.
47233      new_path="$CYGWIN_ROOT_PATH$input_path"
47234    fi
47235  fi
47236
47237  # remove trailing .exe if any
47238  new_path="${new_path/%.exe/}"
47239
47240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47241
47242  # First separate the path from the arguments. This will split at the first
47243  # space.
47244  complete="$BUILD_OBJCOPY"
47245  path="${complete%% *}"
47246  tmp="$complete EOL"
47247  arguments="${tmp#* }"
47248
47249  # Input might be given as Windows format, start by converting to
47250  # unix format.
47251  new_path="$path"
47252
47253  windows_path="$new_path"
47254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47255    unix_path=`$CYGPATH -u "$windows_path"`
47256    new_path="$unix_path"
47257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47259    new_path="$unix_path"
47260  fi
47261
47262
47263  # Now try to locate executable using which
47264  new_path=`$WHICH "$new_path" 2> /dev/null`
47265
47266  if test "x$new_path" = x; then
47267    # Oops. Which didn't find the executable.
47268    # The splitting of arguments from the executable at a space might have been incorrect,
47269    # since paths with space are more likely in Windows. Give it another try with the whole
47270    # argument.
47271    path="$complete"
47272    arguments="EOL"
47273    new_path="$path"
47274
47275  windows_path="$new_path"
47276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47277    unix_path=`$CYGPATH -u "$windows_path"`
47278    new_path="$unix_path"
47279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47281    new_path="$unix_path"
47282  fi
47283
47284
47285    new_path=`$WHICH "$new_path" 2> /dev/null`
47286    # bat and cmd files are not always considered executable in MSYS causing which
47287    # to not find them
47288    if test "x$new_path" = x \
47289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47291      new_path="$path"
47292
47293  windows_path="$new_path"
47294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47295    unix_path=`$CYGPATH -u "$windows_path"`
47296    new_path="$unix_path"
47297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47299    new_path="$unix_path"
47300  fi
47301
47302    fi
47303
47304    if test "x$new_path" = x; then
47305      # It's still not found. Now this is an unrecoverable error.
47306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47307$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47308      has_space=`$ECHO "$complete" | $GREP " "`
47309      if test "x$has_space" != x; then
47310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47312      fi
47313      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47314    fi
47315  fi
47316
47317  # Now new_path has a complete unix path to the binary
47318  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47319    # Keep paths in /bin as-is, but remove trailing .exe if any
47320    new_path="${new_path/%.exe/}"
47321    # Do not save /bin paths to all_fixpath_prefixes!
47322  else
47323    # Not in mixed or Windows style, start by that.
47324    new_path=`cmd //c echo $new_path`
47325
47326  input_path="$new_path"
47327  # Check if we need to convert this using DOS-style short mode. If the path
47328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47329  # take no chances and rewrite it.
47330  # Note: m4 eats our [], so we need to use [ and ] instead.
47331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47332  if test "x$has_forbidden_chars" != x; then
47333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47335  fi
47336
47337    # Output is in $new_path
47338
47339  windows_path="$new_path"
47340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47341    unix_path=`$CYGPATH -u "$windows_path"`
47342    new_path="$unix_path"
47343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47345    new_path="$unix_path"
47346  fi
47347
47348    # remove trailing .exe if any
47349    new_path="${new_path/%.exe/}"
47350
47351    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47352    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47353  fi
47354
47355    else
47356      # We're on a unix platform. Hooray! :)
47357      # First separate the path from the arguments. This will split at the first
47358      # space.
47359      complete="$BUILD_OBJCOPY"
47360      path="${complete%% *}"
47361      tmp="$complete EOL"
47362      arguments="${tmp#* }"
47363
47364      # Cannot rely on the command "which" here since it doesn't always work.
47365      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47366      if test -z "$is_absolute_path"; then
47367        # Path to executable is not absolute. Find it.
47368        IFS_save="$IFS"
47369        IFS=:
47370        for p in $PATH; do
47371          if test -f "$p/$path" && test -x "$p/$path"; then
47372            new_path="$p/$path"
47373            break
47374          fi
47375        done
47376        IFS="$IFS_save"
47377      else
47378        # This is an absolute path, we can use it without further modifications.
47379        new_path="$path"
47380      fi
47381
47382      if test "x$new_path" = x; then
47383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47384$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47385        has_space=`$ECHO "$complete" | $GREP " "`
47386        if test "x$has_space" != x; then
47387          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47388$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47389        fi
47390        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47391      fi
47392    fi
47393
47394    # Now join together the path and the arguments once again
47395    if test "x$arguments" != xEOL; then
47396      new_complete="$new_path ${arguments% *}"
47397    else
47398      new_complete="$new_path"
47399    fi
47400
47401    if test "x$complete" != "x$new_complete"; then
47402      BUILD_OBJCOPY="$new_complete"
47403      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47404$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47405    fi
47406  fi
47407
47408
47409
47410  # Publish this variable in the help.
47411
47412
47413  if [ -z "${BUILD_STRIP+x}" ]; then
47414    # The variable is not set by user, try to locate tool using the code snippet
47415    for ac_prog in strip
47416do
47417  # Extract the first word of "$ac_prog", so it can be a program name with args.
47418set dummy $ac_prog; ac_word=$2
47419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47420$as_echo_n "checking for $ac_word... " >&6; }
47421if ${ac_cv_path_BUILD_STRIP+:} false; then :
47422  $as_echo_n "(cached) " >&6
47423else
47424  case $BUILD_STRIP in
47425  [\\/]* | ?:[\\/]*)
47426  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47427  ;;
47428  *)
47429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47430for as_dir in $PATH
47431do
47432  IFS=$as_save_IFS
47433  test -z "$as_dir" && as_dir=.
47434    for ac_exec_ext in '' $ac_executable_extensions; do
47435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47436    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47438    break 2
47439  fi
47440done
47441  done
47442IFS=$as_save_IFS
47443
47444  ;;
47445esac
47446fi
47447BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47448if test -n "$BUILD_STRIP"; then
47449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47450$as_echo "$BUILD_STRIP" >&6; }
47451else
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47453$as_echo "no" >&6; }
47454fi
47455
47456
47457  test -n "$BUILD_STRIP" && break
47458done
47459
47460  else
47461    # The variable is set, but is it from the command line or the environment?
47462
47463    # Try to remove the string !BUILD_STRIP! from our list.
47464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47466      # If it failed, the variable was not from the command line. Ignore it,
47467      # but warn the user (except for BASH, which is always set by the calling BASH).
47468      if test "xBUILD_STRIP" != xBASH; then
47469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47470$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47471      fi
47472      # Try to locate tool using the code snippet
47473      for ac_prog in strip
47474do
47475  # Extract the first word of "$ac_prog", so it can be a program name with args.
47476set dummy $ac_prog; ac_word=$2
47477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47478$as_echo_n "checking for $ac_word... " >&6; }
47479if ${ac_cv_path_BUILD_STRIP+:} false; then :
47480  $as_echo_n "(cached) " >&6
47481else
47482  case $BUILD_STRIP in
47483  [\\/]* | ?:[\\/]*)
47484  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47485  ;;
47486  *)
47487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47488for as_dir in $PATH
47489do
47490  IFS=$as_save_IFS
47491  test -z "$as_dir" && as_dir=.
47492    for ac_exec_ext in '' $ac_executable_extensions; do
47493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47494    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47496    break 2
47497  fi
47498done
47499  done
47500IFS=$as_save_IFS
47501
47502  ;;
47503esac
47504fi
47505BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47506if test -n "$BUILD_STRIP"; then
47507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47508$as_echo "$BUILD_STRIP" >&6; }
47509else
47510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47511$as_echo "no" >&6; }
47512fi
47513
47514
47515  test -n "$BUILD_STRIP" && break
47516done
47517
47518    else
47519      # If it succeeded, then it was overridden by the user. We will use it
47520      # for the tool.
47521
47522      # First remove it from the list of overridden variables, so we can test
47523      # for unknown variables in the end.
47524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47525
47526      # Check if we try to supply an empty value
47527      if test "x$BUILD_STRIP" = x; then
47528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47529$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47531$as_echo_n "checking for BUILD_STRIP... " >&6; }
47532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47533$as_echo "disabled" >&6; }
47534      else
47535        # Check if the provided tool contains a complete path.
47536        tool_specified="$BUILD_STRIP"
47537        tool_basename="${tool_specified##*/}"
47538        if test "x$tool_basename" = "x$tool_specified"; then
47539          # A command without a complete path is provided, search $PATH.
47540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47541$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47542          # Extract the first word of "$tool_basename", so it can be a program name with args.
47543set dummy $tool_basename; ac_word=$2
47544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47545$as_echo_n "checking for $ac_word... " >&6; }
47546if ${ac_cv_path_BUILD_STRIP+:} false; then :
47547  $as_echo_n "(cached) " >&6
47548else
47549  case $BUILD_STRIP in
47550  [\\/]* | ?:[\\/]*)
47551  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47552  ;;
47553  *)
47554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47555for as_dir in $PATH
47556do
47557  IFS=$as_save_IFS
47558  test -z "$as_dir" && as_dir=.
47559    for ac_exec_ext in '' $ac_executable_extensions; do
47560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47561    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47563    break 2
47564  fi
47565done
47566  done
47567IFS=$as_save_IFS
47568
47569  ;;
47570esac
47571fi
47572BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47573if test -n "$BUILD_STRIP"; then
47574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47575$as_echo "$BUILD_STRIP" >&6; }
47576else
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47578$as_echo "no" >&6; }
47579fi
47580
47581
47582          if test "x$BUILD_STRIP" = x; then
47583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47584          fi
47585        else
47586          # Otherwise we believe it is a complete path. Use it as it is.
47587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47588$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47590$as_echo_n "checking for BUILD_STRIP... " >&6; }
47591          if test ! -x "$tool_specified"; then
47592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47593$as_echo "not found" >&6; }
47594            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47595          fi
47596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47597$as_echo "$tool_specified" >&6; }
47598        fi
47599      fi
47600    fi
47601
47602  fi
47603
47604
47605
47606  # Only process if variable expands to non-empty
47607
47608  if test "x$BUILD_STRIP" != x; then
47609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47610
47611  # First separate the path from the arguments. This will split at the first
47612  # space.
47613  complete="$BUILD_STRIP"
47614  path="${complete%% *}"
47615  tmp="$complete EOL"
47616  arguments="${tmp#* }"
47617
47618  # Input might be given as Windows format, start by converting to
47619  # unix format.
47620  new_path=`$CYGPATH -u "$path"`
47621
47622  # Now try to locate executable using which
47623  new_path=`$WHICH "$new_path" 2> /dev/null`
47624  # bat and cmd files are not always considered executable in cygwin causing which
47625  # to not find them
47626  if test "x$new_path" = x \
47627      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47628      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47629    new_path=`$CYGPATH -u "$path"`
47630  fi
47631  if test "x$new_path" = x; then
47632    # Oops. Which didn't find the executable.
47633    # The splitting of arguments from the executable at a space might have been incorrect,
47634    # since paths with space are more likely in Windows. Give it another try with the whole
47635    # argument.
47636    path="$complete"
47637    arguments="EOL"
47638    new_path=`$CYGPATH -u "$path"`
47639    new_path=`$WHICH "$new_path" 2> /dev/null`
47640    # bat and cmd files are not always considered executable in cygwin causing which
47641    # to not find them
47642    if test "x$new_path" = x \
47643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47645      new_path=`$CYGPATH -u "$path"`
47646    fi
47647    if test "x$new_path" = x; then
47648      # It's still not found. Now this is an unrecoverable error.
47649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47650$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47651      has_space=`$ECHO "$complete" | $GREP " "`
47652      if test "x$has_space" != x; then
47653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47655      fi
47656      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47657    fi
47658  fi
47659
47660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47663  # "foo.exe" is OK but "foo" is an error.
47664  #
47665  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47666  # It is also a way to make sure we got the proper file name for the real test later on.
47667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47668  if test "x$test_shortpath" = x; then
47669    # Short path failed, file does not exist as specified.
47670    # Try adding .exe or .cmd
47671    if test -f "${new_path}.exe"; then
47672      input_to_shortpath="${new_path}.exe"
47673    elif test -f "${new_path}.cmd"; then
47674      input_to_shortpath="${new_path}.cmd"
47675    else
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47677$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47678      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47679$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47680      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47681    fi
47682  else
47683    input_to_shortpath="$new_path"
47684  fi
47685
47686  # Call helper function which possibly converts this using DOS-style short mode.
47687  # If so, the updated path is stored in $new_path.
47688  new_path="$input_to_shortpath"
47689
47690  input_path="$input_to_shortpath"
47691  # Check if we need to convert this using DOS-style short mode. If the path
47692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47693  # take no chances and rewrite it.
47694  # Note: m4 eats our [], so we need to use [ and ] instead.
47695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47696  if test "x$has_forbidden_chars" != x; then
47697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47701      # Going to short mode and back again did indeed matter. Since short mode is
47702      # case insensitive, let's make it lowercase to improve readability.
47703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47704      # Now convert it back to Unix-style (cygpath)
47705      input_path=`$CYGPATH -u "$shortmode_path"`
47706      new_path="$input_path"
47707    fi
47708  fi
47709
47710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47711  if test "x$test_cygdrive_prefix" = x; then
47712    # As a simple fix, exclude /usr/bin since it's not a real path.
47713    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47715      # a path prefixed by /cygdrive for fixpath to work.
47716      new_path="$CYGWIN_ROOT_PATH$input_path"
47717    fi
47718  fi
47719
47720  # remove trailing .exe if any
47721  new_path="${new_path/%.exe/}"
47722
47723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47724
47725  # First separate the path from the arguments. This will split at the first
47726  # space.
47727  complete="$BUILD_STRIP"
47728  path="${complete%% *}"
47729  tmp="$complete EOL"
47730  arguments="${tmp#* }"
47731
47732  # Input might be given as Windows format, start by converting to
47733  # unix format.
47734  new_path="$path"
47735
47736  windows_path="$new_path"
47737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47738    unix_path=`$CYGPATH -u "$windows_path"`
47739    new_path="$unix_path"
47740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47742    new_path="$unix_path"
47743  fi
47744
47745
47746  # Now try to locate executable using which
47747  new_path=`$WHICH "$new_path" 2> /dev/null`
47748
47749  if test "x$new_path" = x; then
47750    # Oops. Which didn't find the executable.
47751    # The splitting of arguments from the executable at a space might have been incorrect,
47752    # since paths with space are more likely in Windows. Give it another try with the whole
47753    # argument.
47754    path="$complete"
47755    arguments="EOL"
47756    new_path="$path"
47757
47758  windows_path="$new_path"
47759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47760    unix_path=`$CYGPATH -u "$windows_path"`
47761    new_path="$unix_path"
47762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47764    new_path="$unix_path"
47765  fi
47766
47767
47768    new_path=`$WHICH "$new_path" 2> /dev/null`
47769    # bat and cmd files are not always considered executable in MSYS causing which
47770    # to not find them
47771    if test "x$new_path" = x \
47772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47774      new_path="$path"
47775
47776  windows_path="$new_path"
47777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47778    unix_path=`$CYGPATH -u "$windows_path"`
47779    new_path="$unix_path"
47780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47782    new_path="$unix_path"
47783  fi
47784
47785    fi
47786
47787    if test "x$new_path" = x; then
47788      # It's still not found. Now this is an unrecoverable error.
47789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47790$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47791      has_space=`$ECHO "$complete" | $GREP " "`
47792      if test "x$has_space" != x; then
47793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47795      fi
47796      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47797    fi
47798  fi
47799
47800  # Now new_path has a complete unix path to the binary
47801  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47802    # Keep paths in /bin as-is, but remove trailing .exe if any
47803    new_path="${new_path/%.exe/}"
47804    # Do not save /bin paths to all_fixpath_prefixes!
47805  else
47806    # Not in mixed or Windows style, start by that.
47807    new_path=`cmd //c echo $new_path`
47808
47809  input_path="$new_path"
47810  # Check if we need to convert this using DOS-style short mode. If the path
47811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47812  # take no chances and rewrite it.
47813  # Note: m4 eats our [], so we need to use [ and ] instead.
47814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47815  if test "x$has_forbidden_chars" != x; then
47816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47818  fi
47819
47820    # Output is in $new_path
47821
47822  windows_path="$new_path"
47823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47824    unix_path=`$CYGPATH -u "$windows_path"`
47825    new_path="$unix_path"
47826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47828    new_path="$unix_path"
47829  fi
47830
47831    # remove trailing .exe if any
47832    new_path="${new_path/%.exe/}"
47833
47834    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47835    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47836  fi
47837
47838    else
47839      # We're on a unix platform. Hooray! :)
47840      # First separate the path from the arguments. This will split at the first
47841      # space.
47842      complete="$BUILD_STRIP"
47843      path="${complete%% *}"
47844      tmp="$complete EOL"
47845      arguments="${tmp#* }"
47846
47847      # Cannot rely on the command "which" here since it doesn't always work.
47848      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47849      if test -z "$is_absolute_path"; then
47850        # Path to executable is not absolute. Find it.
47851        IFS_save="$IFS"
47852        IFS=:
47853        for p in $PATH; do
47854          if test -f "$p/$path" && test -x "$p/$path"; then
47855            new_path="$p/$path"
47856            break
47857          fi
47858        done
47859        IFS="$IFS_save"
47860      else
47861        # This is an absolute path, we can use it without further modifications.
47862        new_path="$path"
47863      fi
47864
47865      if test "x$new_path" = x; then
47866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47867$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47868        has_space=`$ECHO "$complete" | $GREP " "`
47869        if test "x$has_space" != x; then
47870          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47872        fi
47873        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47874      fi
47875    fi
47876
47877    # Now join together the path and the arguments once again
47878    if test "x$arguments" != xEOL; then
47879      new_complete="$new_path ${arguments% *}"
47880    else
47881      new_complete="$new_path"
47882    fi
47883
47884    if test "x$complete" != "x$new_complete"; then
47885      BUILD_STRIP="$new_complete"
47886      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47887$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47888    fi
47889  fi
47890
47891    # Assume the C compiler is the assembler
47892    BUILD_AS="$BUILD_CC -c"
47893    # Just like for the target compiler, use the compiler as linker
47894    BUILD_LD="$BUILD_CC"
47895    BUILD_LDCXX="$BUILD_CXX"
47896
47897    PATH="$OLDPATH"
47898
47899
47900  COMPILER=$BUILD_CC
47901  COMPILER_NAME=BuildC
47902
47903  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47904    # cc -V output typically looks like
47905    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47906    # or
47907    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47908    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47909    # Check that this is likely to be the Solaris Studio cc.
47910    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47911    if test $? -ne 0; then
47912      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47913      { $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
47914$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47916$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47917      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47918$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47919      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47920    fi
47921    # Remove usage instructions (if present), and
47922    # collapse compiler output into a single line
47923    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47924        $SED -e 's/ *[Uu]sage:.*//'`
47925    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47926        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47927  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47928    # xlc -qversion output typically looks like
47929    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47930    #     Version: 11.01.0000.0015
47931    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47932    # Check that this is likely to be the IBM XL C compiler.
47933    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47934    if test $? -ne 0; then
47935      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47936      { $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
47937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47939$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47941$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47943    fi
47944    # Collapse compiler output into a single line
47945    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47947        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47948  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47949    # There is no specific version flag, but all output starts with a version string.
47950    # First line typically looks something like:
47951    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47952    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47953    # Check that this is likely to be Microsoft CL.EXE.
47954    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47955    if test $? -ne 0; then
47956      { $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
47957$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47958      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47959$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47960      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47961    fi
47962    # Collapse compiler output into a single line
47963    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47964    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47965        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47966  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47967    # gcc --version output typically looks like
47968    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47969    #     Copyright (C) 2013 Free Software Foundation, Inc.
47970    #     This is free software; see the source for copying conditions.  There is NO
47971    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47972    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47973    # Check that this is likely to be GCC.
47974    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47975    if test $? -ne 0; then
47976      { $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
47977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47979$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47980      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47981    fi
47982    # Remove Copyright and legalese from version string, and
47983    # collapse into a single line
47984    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47985        $SED -e 's/ *Copyright .*//'`
47986    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47987        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47988  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47989    # clang --version output typically looks like
47990    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47991    #    clang version 3.3 (tags/RELEASE_33/final)
47992    # or
47993    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47994    #    Target: x86_64-pc-linux-gnu
47995    #    Thread model: posix
47996    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47997    # Check that this is likely to be clang
47998    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47999    if test $? -ne 0; then
48000      { $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
48001$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48002      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48003$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48004      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48005    fi
48006    # Collapse compiler output into a single line
48007    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48008    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48009        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48010  else
48011      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48012  fi
48013  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48014  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48015  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48016  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48017
48018  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48019$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48020
48021
48022  COMPILER=$BUILD_CXX
48023  COMPILER_NAME=BuildC++
48024
48025  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48026    # cc -V output typically looks like
48027    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48028    # or
48029    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48030    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48031    # Check that this is likely to be the Solaris Studio cc.
48032    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48033    if test $? -ne 0; then
48034      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48035      { $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
48036$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48037      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48038$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48039      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48040$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48041      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48042    fi
48043    # Remove usage instructions (if present), and
48044    # collapse compiler output into a single line
48045    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48046        $SED -e 's/ *[Uu]sage:.*//'`
48047    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48048        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48049  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48050    # xlc -qversion output typically looks like
48051    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48052    #     Version: 11.01.0000.0015
48053    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48054    # Check that this is likely to be the IBM XL C compiler.
48055    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48056    if test $? -ne 0; then
48057      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48058      { $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
48059$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48060      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48061$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48063$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48064      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48065    fi
48066    # Collapse compiler output into a single line
48067    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48068    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48069        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48070  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48071    # There is no specific version flag, but all output starts with a version string.
48072    # First line typically looks something like:
48073    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48074    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48075    # Check that this is likely to be Microsoft CL.EXE.
48076    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48077    if test $? -ne 0; then
48078      { $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
48079$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48081$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48083    fi
48084    # Collapse compiler output into a single line
48085    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48086    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48087        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48088  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48089    # gcc --version output typically looks like
48090    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48091    #     Copyright (C) 2013 Free Software Foundation, Inc.
48092    #     This is free software; see the source for copying conditions.  There is NO
48093    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48094    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48095    # Check that this is likely to be GCC.
48096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48097    if test $? -ne 0; then
48098      { $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
48099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48101$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48103    fi
48104    # Remove Copyright and legalese from version string, and
48105    # collapse into a single line
48106    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48107        $SED -e 's/ *Copyright .*//'`
48108    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48109        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48110  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48111    # clang --version output typically looks like
48112    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48113    #    clang version 3.3 (tags/RELEASE_33/final)
48114    # or
48115    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48116    #    Target: x86_64-pc-linux-gnu
48117    #    Thread model: posix
48118    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48119    # Check that this is likely to be clang
48120    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48121    if test $? -ne 0; then
48122      { $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
48123$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48124      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48125$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48126      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48127    fi
48128    # Collapse compiler output into a single line
48129    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48130    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48131        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48132  else
48133      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48134  fi
48135  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48136  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48137  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48138  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48139
48140  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48141$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48142
48143
48144  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
48146$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48148$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48149  fi
48150
48151  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48152  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48154$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48155  fi
48156
48157  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48159$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48160  fi
48161
48162  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48163
48164  else
48165    # If we are not cross compiling, use the normal target compilers for
48166    # building the build platform executables.
48167    BUILD_CC="$CC"
48168    BUILD_CXX="$CXX"
48169    BUILD_LD="$LD"
48170    BUILD_LDCXX="$LDCXX"
48171    BUILD_NM="$NM"
48172    BUILD_AS="$AS"
48173    BUILD_OBJCOPY="$OBJCOPY"
48174    BUILD_STRIP="$STRIP"
48175    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48176    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48177    BUILD_AR="$AR"
48178
48179
48180  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48181    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48182$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48184$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48185  fi
48186
48187  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48188  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48190$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48191  fi
48192
48193  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48195$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48196  fi
48197
48198  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48199
48200  fi
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215  # The package path is used only on macosx?
48216  # FIXME: clean this up, and/or move it elsewhere.
48217  PACKAGE_PATH=/opt/local
48218
48219
48220  # Check for extra potential brokenness.
48221  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48222    # On Windows, double-check that we got the right compiler.
48223    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48224    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48225    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48226      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48227        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
48228      fi
48229    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48230      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48231        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48232      fi
48233    fi
48234  fi
48235
48236  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48237    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48238    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48239    # This is later checked when setting flags.
48240
48241    # "-Og" suppported for GCC 4.8 and later
48242    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290    # Execute function body
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339    # Execute function body
48340
48341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48342$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48343  supports=yes
48344
48345  saved_cflags="$CFLAGS"
48346  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48347  ac_ext=c
48348ac_cpp='$CPP $CPPFLAGS'
48349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48351ac_compiler_gnu=$ac_cv_c_compiler_gnu
48352
48353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48354/* end confdefs.h.  */
48355int i;
48356_ACEOF
48357if ac_fn_c_try_compile "$LINENO"; then :
48358
48359else
48360  supports=no
48361fi
48362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48363  ac_ext=cpp
48364ac_cpp='$CXXCPP $CPPFLAGS'
48365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48368
48369  CFLAGS="$saved_cflags"
48370
48371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48372$as_echo "$supports" >&6; }
48373  if test "x$supports" = "xyes" ; then
48374    :
48375    C_COMP_SUPPORTS="yes"
48376  else
48377    :
48378    C_COMP_SUPPORTS="no"
48379  fi
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439    # Execute function body
48440
48441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48442$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48443  supports=yes
48444
48445  saved_cxxflags="$CXXFLAGS"
48446  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48447  ac_ext=cpp
48448ac_cpp='$CXXCPP $CPPFLAGS'
48449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48452
48453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48454/* end confdefs.h.  */
48455int i;
48456_ACEOF
48457if ac_fn_cxx_try_compile "$LINENO"; then :
48458
48459else
48460  supports=no
48461fi
48462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48463  ac_ext=cpp
48464ac_cpp='$CXXCPP $CPPFLAGS'
48465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48468
48469  CXXFLAGS="$saved_cxxflags"
48470
48471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48472$as_echo "$supports" >&6; }
48473  if test "x$supports" = "xyes" ; then
48474    :
48475    CXX_COMP_SUPPORTS="yes"
48476  else
48477    :
48478    CXX_COMP_SUPPORTS="no"
48479  fi
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48494$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48495  supports=no
48496  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48497
48498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48499$as_echo "$supports" >&6; }
48500  if test "x$supports" = "xyes" ; then
48501    :
48502    HAS_CFLAG_OPTIMIZE_DEBUG=true
48503  else
48504    :
48505    HAS_CFLAG_OPTIMIZE_DEBUG=false
48506  fi
48507
48508
48509
48510
48511
48512
48513
48514    # "-z relro" supported in GNU binutils 2.17 and later
48515    LINKER_RELRO_FLAG="-Wl,-z,relro"
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563    # Execute function body
48564
48565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48566$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48567  supports=yes
48568
48569  saved_ldflags="$LDFLAGS"
48570  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48571  ac_ext=c
48572ac_cpp='$CPP $CPPFLAGS'
48573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48575ac_compiler_gnu=$ac_cv_c_compiler_gnu
48576
48577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48578/* end confdefs.h.  */
48579
48580int
48581main ()
48582{
48583
48584  ;
48585  return 0;
48586}
48587_ACEOF
48588if ac_fn_c_try_link "$LINENO"; then :
48589
48590else
48591  supports=no
48592fi
48593rm -f core conftest.err conftest.$ac_objext \
48594    conftest$ac_exeext conftest.$ac_ext
48595  ac_ext=cpp
48596ac_cpp='$CXXCPP $CPPFLAGS'
48597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48600
48601  LDFLAGS="$saved_ldflags"
48602
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48604$as_echo "$supports" >&6; }
48605  if test "x$supports" = "xyes" ; then
48606    :
48607    HAS_LINKER_RELRO=true
48608  else
48609    :
48610    HAS_LINKER_RELRO=false
48611  fi
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625    # "-z now" supported in GNU binutils 2.11 and later
48626    LINKER_NOW_FLAG="-Wl,-z,now"
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674    # Execute function body
48675
48676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48677$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48678  supports=yes
48679
48680  saved_ldflags="$LDFLAGS"
48681  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48682  ac_ext=c
48683ac_cpp='$CPP $CPPFLAGS'
48684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48686ac_compiler_gnu=$ac_cv_c_compiler_gnu
48687
48688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48689/* end confdefs.h.  */
48690
48691int
48692main ()
48693{
48694
48695  ;
48696  return 0;
48697}
48698_ACEOF
48699if ac_fn_c_try_link "$LINENO"; then :
48700
48701else
48702  supports=no
48703fi
48704rm -f core conftest.err conftest.$ac_objext \
48705    conftest$ac_exeext conftest.$ac_ext
48706  ac_ext=cpp
48707ac_cpp='$CXXCPP $CPPFLAGS'
48708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48711
48712  LDFLAGS="$saved_ldflags"
48713
48714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48715$as_echo "$supports" >&6; }
48716  if test "x$supports" = "xyes" ; then
48717    :
48718    HAS_LINKER_NOW=true
48719  else
48720    :
48721    HAS_LINKER_NOW=false
48722  fi
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735  fi
48736
48737  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48738  # in executable.'
48739  USING_BROKEN_SUSE_LD=no
48740  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48742$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48743    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48744    $ECHO "int main() { }" > main.c
48745    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48747$as_echo "no" >&6; }
48748      USING_BROKEN_SUSE_LD=no
48749    else
48750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48751$as_echo "yes" >&6; }
48752      USING_BROKEN_SUSE_LD=yes
48753    fi
48754    $RM version-script.map main.c a.out
48755  fi
48756
48757
48758  # Setup hotspot lecagy names for toolchains
48759  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48760  if test "x$TOOLCHAIN_TYPE" = xclang; then
48761    HOTSPOT_TOOLCHAIN_TYPE=gcc
48762  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48763    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48764  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48765    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48766  fi
48767
48768
48769
48770# Setup the JTReg Regression Test Harness.
48771
48772
48773# Check whether --with-jtreg was given.
48774if test "${with_jtreg+set}" = set; then :
48775  withval=$with_jtreg;
48776fi
48777
48778
48779  if test "x$with_jtreg" = xno; then
48780    # jtreg disabled
48781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48782$as_echo_n "checking for jtreg test harness... " >&6; }
48783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48784$as_echo "no, disabled" >&6; }
48785  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48786    # An explicit path is specified, use it.
48787    JT_HOME="$with_jtreg"
48788    if test ! -d "$JT_HOME"; then
48789      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48790    fi
48791
48792    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48793      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48794    fi
48795
48796    JTREGEXE="$JT_HOME/bin/jtreg"
48797    if test ! -x "$JTREGEXE"; then
48798      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48799    fi
48800
48801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48802$as_echo_n "checking for jtreg test harness... " >&6; }
48803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48804$as_echo "$JT_HOME" >&6; }
48805  else
48806    # Try to locate jtreg
48807    if test "x$JT_HOME" != x; then
48808      # JT_HOME set in environment, use it
48809      if test ! -d "$JT_HOME"; then
48810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48811$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48812        JT_HOME=
48813      else
48814        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48815          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48816$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48817          JT_HOME=
48818        elif test ! -x "$JT_HOME/bin/jtreg"; then
48819          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48820$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48821          JT_HOME=
48822        else
48823          JTREGEXE="$JT_HOME/bin/jtreg"
48824          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48825$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48826        fi
48827      fi
48828    fi
48829
48830    if test "x$JT_HOME" = x; then
48831      # JT_HOME is not set in environment, or was deemed invalid.
48832      # Try to find jtreg on path
48833
48834
48835  # Publish this variable in the help.
48836
48837
48838  if [ -z "${JTREGEXE+x}" ]; then
48839    # The variable is not set by user, try to locate tool using the code snippet
48840    for ac_prog in jtreg
48841do
48842  # Extract the first word of "$ac_prog", so it can be a program name with args.
48843set dummy $ac_prog; ac_word=$2
48844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48845$as_echo_n "checking for $ac_word... " >&6; }
48846if ${ac_cv_path_JTREGEXE+:} false; then :
48847  $as_echo_n "(cached) " >&6
48848else
48849  case $JTREGEXE in
48850  [\\/]* | ?:[\\/]*)
48851  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48852  ;;
48853  *)
48854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48855for as_dir in $PATH
48856do
48857  IFS=$as_save_IFS
48858  test -z "$as_dir" && as_dir=.
48859    for ac_exec_ext in '' $ac_executable_extensions; do
48860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48861    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48863    break 2
48864  fi
48865done
48866  done
48867IFS=$as_save_IFS
48868
48869  ;;
48870esac
48871fi
48872JTREGEXE=$ac_cv_path_JTREGEXE
48873if test -n "$JTREGEXE"; then
48874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48875$as_echo "$JTREGEXE" >&6; }
48876else
48877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48878$as_echo "no" >&6; }
48879fi
48880
48881
48882  test -n "$JTREGEXE" && break
48883done
48884
48885  else
48886    # The variable is set, but is it from the command line or the environment?
48887
48888    # Try to remove the string !JTREGEXE! from our list.
48889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48891      # If it failed, the variable was not from the command line. Ignore it,
48892      # but warn the user (except for BASH, which is always set by the calling BASH).
48893      if test "xJTREGEXE" != xBASH; then
48894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48895$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48896      fi
48897      # Try to locate tool using the code snippet
48898      for ac_prog in jtreg
48899do
48900  # Extract the first word of "$ac_prog", so it can be a program name with args.
48901set dummy $ac_prog; ac_word=$2
48902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48903$as_echo_n "checking for $ac_word... " >&6; }
48904if ${ac_cv_path_JTREGEXE+:} false; then :
48905  $as_echo_n "(cached) " >&6
48906else
48907  case $JTREGEXE in
48908  [\\/]* | ?:[\\/]*)
48909  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48910  ;;
48911  *)
48912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48913for as_dir in $PATH
48914do
48915  IFS=$as_save_IFS
48916  test -z "$as_dir" && as_dir=.
48917    for ac_exec_ext in '' $ac_executable_extensions; do
48918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48919    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48921    break 2
48922  fi
48923done
48924  done
48925IFS=$as_save_IFS
48926
48927  ;;
48928esac
48929fi
48930JTREGEXE=$ac_cv_path_JTREGEXE
48931if test -n "$JTREGEXE"; then
48932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48933$as_echo "$JTREGEXE" >&6; }
48934else
48935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48936$as_echo "no" >&6; }
48937fi
48938
48939
48940  test -n "$JTREGEXE" && break
48941done
48942
48943    else
48944      # If it succeeded, then it was overridden by the user. We will use it
48945      # for the tool.
48946
48947      # First remove it from the list of overridden variables, so we can test
48948      # for unknown variables in the end.
48949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48950
48951      # Check if we try to supply an empty value
48952      if test "x$JTREGEXE" = x; then
48953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48954$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48956$as_echo_n "checking for JTREGEXE... " >&6; }
48957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48958$as_echo "disabled" >&6; }
48959      else
48960        # Check if the provided tool contains a complete path.
48961        tool_specified="$JTREGEXE"
48962        tool_basename="${tool_specified##*/}"
48963        if test "x$tool_basename" = "x$tool_specified"; then
48964          # A command without a complete path is provided, search $PATH.
48965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48966$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48967          # Extract the first word of "$tool_basename", so it can be a program name with args.
48968set dummy $tool_basename; ac_word=$2
48969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48970$as_echo_n "checking for $ac_word... " >&6; }
48971if ${ac_cv_path_JTREGEXE+:} false; then :
48972  $as_echo_n "(cached) " >&6
48973else
48974  case $JTREGEXE in
48975  [\\/]* | ?:[\\/]*)
48976  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48977  ;;
48978  *)
48979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48980for as_dir in $PATH
48981do
48982  IFS=$as_save_IFS
48983  test -z "$as_dir" && as_dir=.
48984    for ac_exec_ext in '' $ac_executable_extensions; do
48985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48986    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48988    break 2
48989  fi
48990done
48991  done
48992IFS=$as_save_IFS
48993
48994  ;;
48995esac
48996fi
48997JTREGEXE=$ac_cv_path_JTREGEXE
48998if test -n "$JTREGEXE"; then
48999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49000$as_echo "$JTREGEXE" >&6; }
49001else
49002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49003$as_echo "no" >&6; }
49004fi
49005
49006
49007          if test "x$JTREGEXE" = x; then
49008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49009          fi
49010        else
49011          # Otherwise we believe it is a complete path. Use it as it is.
49012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49013$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49015$as_echo_n "checking for JTREGEXE... " >&6; }
49016          if test ! -x "$tool_specified"; then
49017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49018$as_echo "not found" >&6; }
49019            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49020          fi
49021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49022$as_echo "$tool_specified" >&6; }
49023        fi
49024      fi
49025    fi
49026
49027  fi
49028
49029
49030      if test "x$JTREGEXE" != x; then
49031        # That's good, now try to derive JT_HOME
49032        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49033        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49034          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49035$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49036          JT_HOME=
49037          JTREGEXE=
49038        else
49039          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49040$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49041        fi
49042      fi
49043    fi
49044
49045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49046$as_echo_n "checking for jtreg test harness... " >&6; }
49047    if test "x$JT_HOME" != x; then
49048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49049$as_echo "$JT_HOME" >&6; }
49050    else
49051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49052$as_echo "no, not found" >&6; }
49053
49054      if test "x$with_jtreg" = xyes; then
49055        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49056      fi
49057    fi
49058  fi
49059
49060
49061  # Only process if variable expands to non-empty
49062
49063  if test "x$JTREGEXE" != x; then
49064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49065
49066  # First separate the path from the arguments. This will split at the first
49067  # space.
49068  complete="$JTREGEXE"
49069  path="${complete%% *}"
49070  tmp="$complete EOL"
49071  arguments="${tmp#* }"
49072
49073  # Input might be given as Windows format, start by converting to
49074  # unix format.
49075  new_path=`$CYGPATH -u "$path"`
49076
49077  # Now try to locate executable using which
49078  new_path=`$WHICH "$new_path" 2> /dev/null`
49079  # bat and cmd files are not always considered executable in cygwin causing which
49080  # to not find them
49081  if test "x$new_path" = x \
49082      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49083      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49084    new_path=`$CYGPATH -u "$path"`
49085  fi
49086  if test "x$new_path" = x; then
49087    # Oops. Which didn't find the executable.
49088    # The splitting of arguments from the executable at a space might have been incorrect,
49089    # since paths with space are more likely in Windows. Give it another try with the whole
49090    # argument.
49091    path="$complete"
49092    arguments="EOL"
49093    new_path=`$CYGPATH -u "$path"`
49094    new_path=`$WHICH "$new_path" 2> /dev/null`
49095    # bat and cmd files are not always considered executable in cygwin causing which
49096    # to not find them
49097    if test "x$new_path" = x \
49098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49100      new_path=`$CYGPATH -u "$path"`
49101    fi
49102    if test "x$new_path" = x; then
49103      # It's still not found. Now this is an unrecoverable error.
49104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49105$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49106      has_space=`$ECHO "$complete" | $GREP " "`
49107      if test "x$has_space" != x; then
49108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49110      fi
49111      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49112    fi
49113  fi
49114
49115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49118  # "foo.exe" is OK but "foo" is an error.
49119  #
49120  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49121  # It is also a way to make sure we got the proper file name for the real test later on.
49122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49123  if test "x$test_shortpath" = x; then
49124    # Short path failed, file does not exist as specified.
49125    # Try adding .exe or .cmd
49126    if test -f "${new_path}.exe"; then
49127      input_to_shortpath="${new_path}.exe"
49128    elif test -f "${new_path}.cmd"; then
49129      input_to_shortpath="${new_path}.cmd"
49130    else
49131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49132$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49133      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49134$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49135      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49136    fi
49137  else
49138    input_to_shortpath="$new_path"
49139  fi
49140
49141  # Call helper function which possibly converts this using DOS-style short mode.
49142  # If so, the updated path is stored in $new_path.
49143  new_path="$input_to_shortpath"
49144
49145  input_path="$input_to_shortpath"
49146  # Check if we need to convert this using DOS-style short mode. If the path
49147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49148  # take no chances and rewrite it.
49149  # Note: m4 eats our [], so we need to use [ and ] instead.
49150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49151  if test "x$has_forbidden_chars" != x; then
49152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49156      # Going to short mode and back again did indeed matter. Since short mode is
49157      # case insensitive, let's make it lowercase to improve readability.
49158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49159      # Now convert it back to Unix-style (cygpath)
49160      input_path=`$CYGPATH -u "$shortmode_path"`
49161      new_path="$input_path"
49162    fi
49163  fi
49164
49165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49166  if test "x$test_cygdrive_prefix" = x; then
49167    # As a simple fix, exclude /usr/bin since it's not a real path.
49168    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49170      # a path prefixed by /cygdrive for fixpath to work.
49171      new_path="$CYGWIN_ROOT_PATH$input_path"
49172    fi
49173  fi
49174
49175  # remove trailing .exe if any
49176  new_path="${new_path/%.exe/}"
49177
49178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49179
49180  # First separate the path from the arguments. This will split at the first
49181  # space.
49182  complete="$JTREGEXE"
49183  path="${complete%% *}"
49184  tmp="$complete EOL"
49185  arguments="${tmp#* }"
49186
49187  # Input might be given as Windows format, start by converting to
49188  # unix format.
49189  new_path="$path"
49190
49191  windows_path="$new_path"
49192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49193    unix_path=`$CYGPATH -u "$windows_path"`
49194    new_path="$unix_path"
49195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49197    new_path="$unix_path"
49198  fi
49199
49200
49201  # Now try to locate executable using which
49202  new_path=`$WHICH "$new_path" 2> /dev/null`
49203
49204  if test "x$new_path" = x; then
49205    # Oops. Which didn't find the executable.
49206    # The splitting of arguments from the executable at a space might have been incorrect,
49207    # since paths with space are more likely in Windows. Give it another try with the whole
49208    # argument.
49209    path="$complete"
49210    arguments="EOL"
49211    new_path="$path"
49212
49213  windows_path="$new_path"
49214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49215    unix_path=`$CYGPATH -u "$windows_path"`
49216    new_path="$unix_path"
49217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49219    new_path="$unix_path"
49220  fi
49221
49222
49223    new_path=`$WHICH "$new_path" 2> /dev/null`
49224    # bat and cmd files are not always considered executable in MSYS causing which
49225    # to not find them
49226    if test "x$new_path" = x \
49227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49229      new_path="$path"
49230
49231  windows_path="$new_path"
49232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49233    unix_path=`$CYGPATH -u "$windows_path"`
49234    new_path="$unix_path"
49235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49237    new_path="$unix_path"
49238  fi
49239
49240    fi
49241
49242    if test "x$new_path" = x; then
49243      # It's still not found. Now this is an unrecoverable error.
49244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49245$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49246      has_space=`$ECHO "$complete" | $GREP " "`
49247      if test "x$has_space" != x; then
49248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49250      fi
49251      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49252    fi
49253  fi
49254
49255  # Now new_path has a complete unix path to the binary
49256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49257    # Keep paths in /bin as-is, but remove trailing .exe if any
49258    new_path="${new_path/%.exe/}"
49259    # Do not save /bin paths to all_fixpath_prefixes!
49260  else
49261    # Not in mixed or Windows style, start by that.
49262    new_path=`cmd //c echo $new_path`
49263
49264  input_path="$new_path"
49265  # Check if we need to convert this using DOS-style short mode. If the path
49266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49267  # take no chances and rewrite it.
49268  # Note: m4 eats our [], so we need to use [ and ] instead.
49269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49270  if test "x$has_forbidden_chars" != x; then
49271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49273  fi
49274
49275    # Output is in $new_path
49276
49277  windows_path="$new_path"
49278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49279    unix_path=`$CYGPATH -u "$windows_path"`
49280    new_path="$unix_path"
49281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49283    new_path="$unix_path"
49284  fi
49285
49286    # remove trailing .exe if any
49287    new_path="${new_path/%.exe/}"
49288
49289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49291  fi
49292
49293    else
49294      # We're on a unix platform. Hooray! :)
49295      # First separate the path from the arguments. This will split at the first
49296      # space.
49297      complete="$JTREGEXE"
49298      path="${complete%% *}"
49299      tmp="$complete EOL"
49300      arguments="${tmp#* }"
49301
49302      # Cannot rely on the command "which" here since it doesn't always work.
49303      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49304      if test -z "$is_absolute_path"; then
49305        # Path to executable is not absolute. Find it.
49306        IFS_save="$IFS"
49307        IFS=:
49308        for p in $PATH; do
49309          if test -f "$p/$path" && test -x "$p/$path"; then
49310            new_path="$p/$path"
49311            break
49312          fi
49313        done
49314        IFS="$IFS_save"
49315      else
49316        # This is an absolute path, we can use it without further modifications.
49317        new_path="$path"
49318      fi
49319
49320      if test "x$new_path" = x; then
49321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49322$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49323        has_space=`$ECHO "$complete" | $GREP " "`
49324        if test "x$has_space" != x; then
49325          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49327        fi
49328        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49329      fi
49330    fi
49331
49332    # Now join together the path and the arguments once again
49333    if test "x$arguments" != xEOL; then
49334      new_complete="$new_path ${arguments% *}"
49335    else
49336      new_complete="$new_path"
49337    fi
49338
49339    if test "x$complete" != "x$new_complete"; then
49340      JTREGEXE="$new_complete"
49341      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49342$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49343    fi
49344  fi
49345
49346
49347  # Only process if variable expands to non-empty
49348
49349  if test "x$JT_HOME" != x; then
49350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49351
49352  # Input might be given as Windows format, start by converting to
49353  # unix format.
49354  path="$JT_HOME"
49355  new_path=`$CYGPATH -u "$path"`
49356
49357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49360  # "foo.exe" is OK but "foo" is an error.
49361  #
49362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49363  # It is also a way to make sure we got the proper file name for the real test later on.
49364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49365  if test "x$test_shortpath" = x; then
49366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49367$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49368    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49369  fi
49370
49371  # Call helper function which possibly converts this using DOS-style short mode.
49372  # If so, the updated path is stored in $new_path.
49373
49374  input_path="$new_path"
49375  # Check if we need to convert this using DOS-style short mode. If the path
49376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49377  # take no chances and rewrite it.
49378  # Note: m4 eats our [], so we need to use [ and ] instead.
49379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49380  if test "x$has_forbidden_chars" != x; then
49381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49385      # Going to short mode and back again did indeed matter. Since short mode is
49386      # case insensitive, let's make it lowercase to improve readability.
49387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49388      # Now convert it back to Unix-style (cygpath)
49389      input_path=`$CYGPATH -u "$shortmode_path"`
49390      new_path="$input_path"
49391    fi
49392  fi
49393
49394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49395  if test "x$test_cygdrive_prefix" = x; then
49396    # As a simple fix, exclude /usr/bin since it's not a real path.
49397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49399      # a path prefixed by /cygdrive for fixpath to work.
49400      new_path="$CYGWIN_ROOT_PATH$input_path"
49401    fi
49402  fi
49403
49404
49405  if test "x$path" != "x$new_path"; then
49406    JT_HOME="$new_path"
49407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49408$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49409  fi
49410
49411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49412
49413  path="$JT_HOME"
49414  has_colon=`$ECHO $path | $GREP ^.:`
49415  new_path="$path"
49416  if test "x$has_colon" = x; then
49417    # Not in mixed or Windows style, start by that.
49418    new_path=`cmd //c echo $path`
49419  fi
49420
49421
49422  input_path="$new_path"
49423  # Check if we need to convert this using DOS-style short mode. If the path
49424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49425  # take no chances and rewrite it.
49426  # Note: m4 eats our [], so we need to use [ and ] instead.
49427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49428  if test "x$has_forbidden_chars" != x; then
49429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49431  fi
49432
49433
49434  windows_path="$new_path"
49435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49436    unix_path=`$CYGPATH -u "$windows_path"`
49437    new_path="$unix_path"
49438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49440    new_path="$unix_path"
49441  fi
49442
49443  if test "x$path" != "x$new_path"; then
49444    JT_HOME="$new_path"
49445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49446$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49447  fi
49448
49449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49451
49452    else
49453      # We're on a unix platform. Hooray! :)
49454      path="$JT_HOME"
49455      has_space=`$ECHO "$path" | $GREP " "`
49456      if test "x$has_space" != x; then
49457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49458$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49460      fi
49461
49462      # Use eval to expand a potential ~
49463      eval path="$path"
49464      if test ! -f "$path" && test ! -d "$path"; then
49465        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49466      fi
49467
49468      if test -d "$path"; then
49469        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49470      else
49471        dir="`$DIRNAME "$path"`"
49472        base="`$BASENAME "$path"`"
49473        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49474      fi
49475    fi
49476  fi
49477
49478
49479
49480
49481
49482# Setup Jib dependency tool
49483
49484
49485# Check whether --with-jib was given.
49486if test "${with_jib+set}" = set; then :
49487  withval=$with_jib;
49488fi
49489
49490
49491  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49492    # jib disabled
49493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49494$as_echo_n "checking for jib... " >&6; }
49495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49496$as_echo "no" >&6; }
49497  elif test "x$with_jib" = xyes; then
49498    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49499  else
49500    JIB_HOME="${with_jib}"
49501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49502$as_echo_n "checking for jib... " >&6; }
49503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49504$as_echo "${JIB_HOME}" >&6; }
49505    if test ! -d "${JIB_HOME}"; then
49506      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49507    fi
49508    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49509    if test ! -f "${JIB_JAR}"; then
49510      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49511    fi
49512  fi
49513
49514
49515
49516
49517
49518  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49519  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49520  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49521  #                              commands produced by the link step (currently AIX only)
49522  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49523    COMPILER_TARGET_BITS_FLAG="-q"
49524    COMPILER_COMMAND_FILE_FLAG="-f"
49525    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49526  else
49527    COMPILER_TARGET_BITS_FLAG="-m"
49528    COMPILER_COMMAND_FILE_FLAG="@"
49529    COMPILER_BINDCMD_FILE_FLAG=""
49530
49531    # The solstudio linker does not support @-files.
49532    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49533      COMPILER_COMMAND_FILE_FLAG=
49534    fi
49535
49536    # Check if @file is supported by gcc
49537    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49539$as_echo_n "checking if @file is supported by gcc... " >&6; }
49540      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49541      $ECHO "" "--version" > command.file
49542      if $CXX @command.file 2>&5 >&5; then
49543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49544$as_echo "yes" >&6; }
49545        COMPILER_COMMAND_FILE_FLAG="@"
49546      else
49547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49548$as_echo "no" >&6; }
49549        COMPILER_COMMAND_FILE_FLAG=
49550      fi
49551      $RM command.file
49552    fi
49553  fi
49554
49555
49556
49557
49558  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49559  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49560    ARFLAGS="-r"
49561  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49562    ARFLAGS="-X64"
49563  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49564    # lib.exe is used as AR to create static libraries.
49565    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49566  else
49567    ARFLAGS=""
49568  fi
49569
49570
49571  ## Setup strip.
49572  # FIXME: should this really be per platform, or should it be per toolchain type?
49573  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49574  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49575  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49576    STRIPFLAGS="-g"
49577  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49578    STRIPFLAGS="-x"
49579  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49580    STRIPFLAGS="-S"
49581  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49582    STRIPFLAGS="-X32_64"
49583  fi
49584
49585
49586
49587  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49588    CC_OUT_OPTION=-Fo
49589    EXE_OUT_OPTION=-out:
49590    LD_OUT_OPTION=-out:
49591    AR_OUT_OPTION=-out:
49592  else
49593    # The option used to specify the target .o,.a or .so file.
49594    # When compiling, how to specify the to be created object file.
49595    CC_OUT_OPTION='-o$(SPACE)'
49596    # When linking, how to specify the to be created executable.
49597    EXE_OUT_OPTION='-o$(SPACE)'
49598    # When linking, how to specify the to be created dynamically linkable library.
49599    LD_OUT_OPTION='-o$(SPACE)'
49600    # When archiving, how to specify the to be create static archive for object files.
49601    AR_OUT_OPTION='rcs$(SPACE)'
49602  fi
49603
49604
49605
49606
49607
49608  # On Windows, we need to set RC flags.
49609  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49610    RC_FLAGS="-nologo -l0x409"
49611    JVM_RCFLAGS="-nologo"
49612    if test "x$DEBUG_LEVEL" = xrelease; then
49613      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49614      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49615    fi
49616
49617    # The version variables used to create RC_FLAGS may be overridden
49618    # in a custom configure script, or possibly the command line.
49619    # Let those variables be expanded at make time in spec.gmk.
49620    # The \$ are escaped to the shell, and the $(...) variables
49621    # are evaluated by make.
49622    RC_FLAGS="$RC_FLAGS \
49623        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49624        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49625        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49626        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49627        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49628        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49629        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49630
49631    JVM_RCFLAGS="$JVM_RCFLAGS \
49632        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49633        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49634        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49635        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49636        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49637        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49638        -D\"HS_FNAME=jvm.dll\" \
49639        -D\"HS_INTERNAL_NAME=jvm\""
49640  fi
49641
49642
49643
49644  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49645    # silence copyright notice and other headers.
49646    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49647  fi
49648
49649
49650# Now we can test some aspects on the target using configure macros.
49651
49652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49653$as_echo_n "checking for ANSI C header files... " >&6; }
49654if ${ac_cv_header_stdc+:} false; then :
49655  $as_echo_n "(cached) " >&6
49656else
49657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49658/* end confdefs.h.  */
49659#include <stdlib.h>
49660#include <stdarg.h>
49661#include <string.h>
49662#include <float.h>
49663
49664int
49665main ()
49666{
49667
49668  ;
49669  return 0;
49670}
49671_ACEOF
49672if ac_fn_cxx_try_compile "$LINENO"; then :
49673  ac_cv_header_stdc=yes
49674else
49675  ac_cv_header_stdc=no
49676fi
49677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49678
49679if test $ac_cv_header_stdc = yes; then
49680  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49682/* end confdefs.h.  */
49683#include <string.h>
49684
49685_ACEOF
49686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49687  $EGREP "memchr" >/dev/null 2>&1; then :
49688
49689else
49690  ac_cv_header_stdc=no
49691fi
49692rm -f conftest*
49693
49694fi
49695
49696if test $ac_cv_header_stdc = yes; then
49697  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49699/* end confdefs.h.  */
49700#include <stdlib.h>
49701
49702_ACEOF
49703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49704  $EGREP "free" >/dev/null 2>&1; then :
49705
49706else
49707  ac_cv_header_stdc=no
49708fi
49709rm -f conftest*
49710
49711fi
49712
49713if test $ac_cv_header_stdc = yes; then
49714  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49715  if test "$cross_compiling" = yes; then :
49716  :
49717else
49718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49719/* end confdefs.h.  */
49720#include <ctype.h>
49721#include <stdlib.h>
49722#if ((' ' & 0x0FF) == 0x020)
49723# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49724# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49725#else
49726# define ISLOWER(c) \
49727		   (('a' <= (c) && (c) <= 'i') \
49728		     || ('j' <= (c) && (c) <= 'r') \
49729		     || ('s' <= (c) && (c) <= 'z'))
49730# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49731#endif
49732
49733#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49734int
49735main ()
49736{
49737  int i;
49738  for (i = 0; i < 256; i++)
49739    if (XOR (islower (i), ISLOWER (i))
49740	|| toupper (i) != TOUPPER (i))
49741      return 2;
49742  return 0;
49743}
49744_ACEOF
49745if ac_fn_cxx_try_run "$LINENO"; then :
49746
49747else
49748  ac_cv_header_stdc=no
49749fi
49750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49751  conftest.$ac_objext conftest.beam conftest.$ac_ext
49752fi
49753
49754fi
49755fi
49756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49757$as_echo "$ac_cv_header_stdc" >&6; }
49758if test $ac_cv_header_stdc = yes; then
49759
49760$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49761
49762fi
49763
49764# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49765for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49766		  inttypes.h stdint.h unistd.h
49767do :
49768  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49769ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49770"
49771if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49772  cat >>confdefs.h <<_ACEOF
49773#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49774_ACEOF
49775
49776fi
49777
49778done
49779
49780
49781
49782  ###############################################################################
49783  #
49784  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49785  # (The JVM can use 32 or 64 bit Java pointers but that decision
49786  # is made at runtime.)
49787  #
49788
49789  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49790    # Always specify -m flag on Solaris
49791    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49792
49793  # When we add flags to the "official" CFLAGS etc, we need to
49794  # keep track of these additions in ADDED_CFLAGS etc. These
49795  # will later be checked to make sure only controlled additions
49796  # have been made to CFLAGS etc.
49797  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49798  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49799  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49800
49801  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49802  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49803  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49804
49805  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49806  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49807  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49808
49809  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49810  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49811  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49812
49813  elif test "x$COMPILE_TYPE" = xreduced; then
49814    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49815      # Specify -m if running reduced on unix platforms
49816
49817  # When we add flags to the "official" CFLAGS etc, we need to
49818  # keep track of these additions in ADDED_CFLAGS etc. These
49819  # will later be checked to make sure only controlled additions
49820  # have been made to CFLAGS etc.
49821  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49822  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49823  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49824
49825  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49826  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49827  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49828
49829  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49830  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49831  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49832
49833  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49834  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49835  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49836
49837    fi
49838  fi
49839  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49840    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49841    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49842    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49843  fi
49844
49845  # Make compilation sanity check
49846  for ac_header in stdio.h
49847do :
49848  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49849if test "x$ac_cv_header_stdio_h" = xyes; then :
49850  cat >>confdefs.h <<_ACEOF
49851#define HAVE_STDIO_H 1
49852_ACEOF
49853
49854else
49855
49856    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49857$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49858    if test "x$COMPILE_TYPE" = xreduced; then
49859
49860  # Print a helpful message on how to acquire the necessary build dependency.
49861  # reduced is the help tag: freetype, cups, alsa etc
49862  MISSING_DEPENDENCY=reduced
49863
49864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49865    cygwin_help $MISSING_DEPENDENCY
49866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49867    msys_help $MISSING_DEPENDENCY
49868  else
49869    PKGHANDLER_COMMAND=
49870
49871    case $PKGHANDLER in
49872      apt-get)
49873        apt_help     $MISSING_DEPENDENCY ;;
49874      yum)
49875        yum_help     $MISSING_DEPENDENCY ;;
49876      brew)
49877        brew_help    $MISSING_DEPENDENCY ;;
49878      port)
49879        port_help    $MISSING_DEPENDENCY ;;
49880      pkgutil)
49881        pkgutil_help $MISSING_DEPENDENCY ;;
49882      pkgadd)
49883        pkgadd_help  $MISSING_DEPENDENCY ;;
49884    esac
49885
49886    if test "x$PKGHANDLER_COMMAND" != x; then
49887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49888    fi
49889  fi
49890
49891      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49892$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49893    elif test "x$COMPILE_TYPE" = xcross; then
49894      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49895$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49896    fi
49897    as_fn_error $? "Cannot continue." "$LINENO" 5
49898
49899fi
49900
49901done
49902
49903
49904  # The cast to long int works around a bug in the HP C Compiler
49905# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49906# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49907# This bug is HP SR number 8606223364.
49908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49909$as_echo_n "checking size of int *... " >&6; }
49910if ${ac_cv_sizeof_int_p+:} false; then :
49911  $as_echo_n "(cached) " >&6
49912else
49913  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49914
49915else
49916  if test "$ac_cv_type_int_p" = yes; then
49917     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49919as_fn_error 77 "cannot compute sizeof (int *)
49920See \`config.log' for more details" "$LINENO" 5; }
49921   else
49922     ac_cv_sizeof_int_p=0
49923   fi
49924fi
49925
49926fi
49927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49928$as_echo "$ac_cv_sizeof_int_p" >&6; }
49929
49930
49931
49932cat >>confdefs.h <<_ACEOF
49933#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49934_ACEOF
49935
49936
49937
49938  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49939  if test "x$ac_cv_sizeof_int_p" = x; then
49940    # The test failed, lets stick to the assumed value.
49941    { $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
49942$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49943  else
49944    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49945
49946    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49947      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49948      # Let's try to implicitely set the compilers target architecture and retry the test
49949      { $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
49950$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;}
49951      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49952$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49953
49954  # When we add flags to the "official" CFLAGS etc, we need to
49955  # keep track of these additions in ADDED_CFLAGS etc. These
49956  # will later be checked to make sure only controlled additions
49957  # have been made to CFLAGS etc.
49958  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49959  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49960  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49961
49962  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49963  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49964  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49965
49966  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49967  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49968  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49969
49970  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49971  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49972  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49973
49974
49975      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49976      unset ac_cv_sizeof_int_p
49977      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49978      cat >>confdefs.h <<_ACEOF
49979#undef SIZEOF_INT_P
49980_ACEOF
49981
49982      # The cast to long int works around a bug in the HP C Compiler
49983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49985# This bug is HP SR number 8606223364.
49986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49987$as_echo_n "checking size of int *... " >&6; }
49988if ${ac_cv_sizeof_int_p+:} false; then :
49989  $as_echo_n "(cached) " >&6
49990else
49991  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49992
49993else
49994  if test "$ac_cv_type_int_p" = yes; then
49995     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49997as_fn_error 77 "cannot compute sizeof (int *)
49998See \`config.log' for more details" "$LINENO" 5; }
49999   else
50000     ac_cv_sizeof_int_p=0
50001   fi
50002fi
50003
50004fi
50005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50006$as_echo "$ac_cv_sizeof_int_p" >&6; }
50007
50008
50009
50010cat >>confdefs.h <<_ACEOF
50011#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50012_ACEOF
50013
50014
50015
50016      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50017
50018      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50019        { $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
50020$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;}
50021        if test "x$COMPILE_TYPE" = xreduced; then
50022
50023  # Print a helpful message on how to acquire the necessary build dependency.
50024  # reduced is the help tag: freetype, cups, alsa etc
50025  MISSING_DEPENDENCY=reduced
50026
50027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50028    cygwin_help $MISSING_DEPENDENCY
50029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50030    msys_help $MISSING_DEPENDENCY
50031  else
50032    PKGHANDLER_COMMAND=
50033
50034    case $PKGHANDLER in
50035      apt-get)
50036        apt_help     $MISSING_DEPENDENCY ;;
50037      yum)
50038        yum_help     $MISSING_DEPENDENCY ;;
50039      brew)
50040        brew_help    $MISSING_DEPENDENCY ;;
50041      port)
50042        port_help    $MISSING_DEPENDENCY ;;
50043      pkgutil)
50044        pkgutil_help $MISSING_DEPENDENCY ;;
50045      pkgadd)
50046        pkgadd_help  $MISSING_DEPENDENCY ;;
50047    esac
50048
50049    if test "x$PKGHANDLER_COMMAND" != x; then
50050      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50051    fi
50052  fi
50053
50054          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50055$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50056        elif test "x$COMPILE_TYPE" = xcross; then
50057          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50058$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50059        fi
50060        as_fn_error $? "Cannot continue." "$LINENO" 5
50061      fi
50062    fi
50063  fi
50064
50065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50066$as_echo_n "checking for target address size... " >&6; }
50067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50068$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50069
50070
50071  ###############################################################################
50072  #
50073  # Is the target little of big endian?
50074  #
50075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50076$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50077if ${ac_cv_c_bigendian+:} false; then :
50078  $as_echo_n "(cached) " >&6
50079else
50080  ac_cv_c_bigendian=unknown
50081    # See if we're dealing with a universal compiler.
50082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50083/* end confdefs.h.  */
50084#ifndef __APPLE_CC__
50085	       not a universal capable compiler
50086	     #endif
50087	     typedef int dummy;
50088
50089_ACEOF
50090if ac_fn_cxx_try_compile "$LINENO"; then :
50091
50092	# Check for potential -arch flags.  It is not universal unless
50093	# there are at least two -arch flags with different values.
50094	ac_arch=
50095	ac_prev=
50096	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50097	 if test -n "$ac_prev"; then
50098	   case $ac_word in
50099	     i?86 | x86_64 | ppc | ppc64)
50100	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50101		 ac_arch=$ac_word
50102	       else
50103		 ac_cv_c_bigendian=universal
50104		 break
50105	       fi
50106	       ;;
50107	   esac
50108	   ac_prev=
50109	 elif test "x$ac_word" = "x-arch"; then
50110	   ac_prev=arch
50111	 fi
50112       done
50113fi
50114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50115    if test $ac_cv_c_bigendian = unknown; then
50116      # See if sys/param.h defines the BYTE_ORDER macro.
50117      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50118/* end confdefs.h.  */
50119#include <sys/types.h>
50120	     #include <sys/param.h>
50121
50122int
50123main ()
50124{
50125#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50126		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50127		     && LITTLE_ENDIAN)
50128	      bogus endian macros
50129	     #endif
50130
50131  ;
50132  return 0;
50133}
50134_ACEOF
50135if ac_fn_cxx_try_compile "$LINENO"; then :
50136  # It does; now see whether it defined to BIG_ENDIAN or not.
50137	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50138/* end confdefs.h.  */
50139#include <sys/types.h>
50140		#include <sys/param.h>
50141
50142int
50143main ()
50144{
50145#if BYTE_ORDER != BIG_ENDIAN
50146		 not big endian
50147		#endif
50148
50149  ;
50150  return 0;
50151}
50152_ACEOF
50153if ac_fn_cxx_try_compile "$LINENO"; then :
50154  ac_cv_c_bigendian=yes
50155else
50156  ac_cv_c_bigendian=no
50157fi
50158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50159fi
50160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50161    fi
50162    if test $ac_cv_c_bigendian = unknown; then
50163      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50164      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50165/* end confdefs.h.  */
50166#include <limits.h>
50167
50168int
50169main ()
50170{
50171#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50172	      bogus endian macros
50173	     #endif
50174
50175  ;
50176  return 0;
50177}
50178_ACEOF
50179if ac_fn_cxx_try_compile "$LINENO"; then :
50180  # It does; now see whether it defined to _BIG_ENDIAN or not.
50181	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50182/* end confdefs.h.  */
50183#include <limits.h>
50184
50185int
50186main ()
50187{
50188#ifndef _BIG_ENDIAN
50189		 not big endian
50190		#endif
50191
50192  ;
50193  return 0;
50194}
50195_ACEOF
50196if ac_fn_cxx_try_compile "$LINENO"; then :
50197  ac_cv_c_bigendian=yes
50198else
50199  ac_cv_c_bigendian=no
50200fi
50201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50202fi
50203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50204    fi
50205    if test $ac_cv_c_bigendian = unknown; then
50206      # Compile a test program.
50207      if test "$cross_compiling" = yes; then :
50208  # Try to guess by grepping values from an object file.
50209	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50210/* end confdefs.h.  */
50211short int ascii_mm[] =
50212		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50213		short int ascii_ii[] =
50214		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50215		int use_ascii (int i) {
50216		  return ascii_mm[i] + ascii_ii[i];
50217		}
50218		short int ebcdic_ii[] =
50219		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50220		short int ebcdic_mm[] =
50221		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50222		int use_ebcdic (int i) {
50223		  return ebcdic_mm[i] + ebcdic_ii[i];
50224		}
50225		extern int foo;
50226
50227int
50228main ()
50229{
50230return use_ascii (foo) == use_ebcdic (foo);
50231  ;
50232  return 0;
50233}
50234_ACEOF
50235if ac_fn_cxx_try_compile "$LINENO"; then :
50236  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50237	      ac_cv_c_bigendian=yes
50238	    fi
50239	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50240	      if test "$ac_cv_c_bigendian" = unknown; then
50241		ac_cv_c_bigendian=no
50242	      else
50243		# finding both strings is unlikely to happen, but who knows?
50244		ac_cv_c_bigendian=unknown
50245	      fi
50246	    fi
50247fi
50248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50249else
50250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50251/* end confdefs.h.  */
50252$ac_includes_default
50253int
50254main ()
50255{
50256
50257	     /* Are we little or big endian?  From Harbison&Steele.  */
50258	     union
50259	     {
50260	       long int l;
50261	       char c[sizeof (long int)];
50262	     } u;
50263	     u.l = 1;
50264	     return u.c[sizeof (long int) - 1] == 1;
50265
50266  ;
50267  return 0;
50268}
50269_ACEOF
50270if ac_fn_cxx_try_run "$LINENO"; then :
50271  ac_cv_c_bigendian=no
50272else
50273  ac_cv_c_bigendian=yes
50274fi
50275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50276  conftest.$ac_objext conftest.beam conftest.$ac_ext
50277fi
50278
50279    fi
50280fi
50281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50282$as_echo "$ac_cv_c_bigendian" >&6; }
50283 case $ac_cv_c_bigendian in #(
50284   yes)
50285     ENDIAN="big";; #(
50286   no)
50287     ENDIAN="little" ;; #(
50288   universal)
50289     ENDIAN="universal_endianness"
50290     ;; #(
50291   *)
50292     ENDIAN="unknown" ;;
50293 esac
50294
50295
50296  if test "x$ENDIAN" = xuniversal_endianness; then
50297    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50298  fi
50299  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50300    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
50301  fi
50302
50303
50304# Configure flags for the tools
50305
50306  ###############################################################################
50307  #
50308  # How to compile shared libraries.
50309  #
50310
50311  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50312    PICFLAG="-fPIC"
50313    C_FLAG_REORDER=''
50314    CXX_FLAG_REORDER=''
50315
50316    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50317      # Linking is different on MacOSX
50318      if test "x$STATIC_BUILD" = xtrue; then
50319        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50320      else
50321        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50322        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50323      fi
50324      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50325      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50326      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50327      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50328    else
50329      # Default works for linux, might work on other platforms as well.
50330      SHARED_LIBRARY_FLAGS='-shared'
50331      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50332      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50333      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50334      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50335    fi
50336  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50337    C_FLAG_REORDER=''
50338    CXX_FLAG_REORDER=''
50339
50340    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50341      # Linking is different on MacOSX
50342      PICFLAG=''
50343      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50344      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50345      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50346      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50347      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50348
50349      if test "x$STATIC_BUILD" = xfalse; then
50350        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50351      fi
50352    else
50353      # Default works for linux, might work on other platforms as well.
50354      PICFLAG='-fPIC'
50355      SHARED_LIBRARY_FLAGS='-shared'
50356      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50357      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50358      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50359
50360      # arm specific settings
50361      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50362        # '-Wl,-z,origin' isn't used on arm.
50363        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50364      else
50365        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50366      fi
50367
50368    fi
50369  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50370    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50371      PICFLAG="-xcode=pic32"
50372    else
50373      PICFLAG="-KPIC"
50374    fi
50375    C_FLAG_REORDER='-xF'
50376    CXX_FLAG_REORDER='-xF'
50377    SHARED_LIBRARY_FLAGS="-G"
50378    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50379    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50380    SET_SHARED_LIBRARY_NAME='-h $1'
50381    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50382  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50383    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50384    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50385    # will have to patch this single instruction with a call to some out-of-order code which
50386    # does the load from the TOC. This is of course slow. But in that case we also would have
50387    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50388    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50389    # can be patched directly by the linker and does not require a jump to out-of-order code.
50390    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50391    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50392    # loads for accessing a global variable). But there are rumors that this may be seen as a
50393    # 'performance feature' because of improved code locality of the symbols used in a
50394    # compilation unit.
50395    PICFLAG="-qpic"
50396    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50397    C_FLAG_REORDER=''
50398    CXX_FLAG_REORDER=''
50399    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50400    SET_EXECUTABLE_ORIGIN=""
50401    SET_SHARED_LIBRARY_ORIGIN=''
50402    SET_SHARED_LIBRARY_NAME=''
50403    SET_SHARED_LIBRARY_MAPFILE=''
50404  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50405    PICFLAG=""
50406    C_FLAG_REORDER=''
50407    CXX_FLAG_REORDER=''
50408    SHARED_LIBRARY_FLAGS="-dll"
50409    SET_EXECUTABLE_ORIGIN=''
50410    SET_SHARED_LIBRARY_ORIGIN=''
50411    SET_SHARED_LIBRARY_NAME=''
50412    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50413  fi
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423  # The (cross) compiler is now configured, we can now test capabilities
50424  # of the target platform.
50425
50426
50427
50428  ###############################################################################
50429  #
50430  # Setup the opt flags for different compilers
50431  # and different operating systems.
50432  #
50433
50434  # FIXME: this was indirectly the old default, but just inherited.
50435  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50436  #   C_FLAG_DEPS="-MMD -MF"
50437  # fi
50438
50439  # Generate make dependency files
50440  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50441    C_FLAG_DEPS="-MMD -MF"
50442  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50443    C_FLAG_DEPS="-MMD -MF"
50444  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50445    C_FLAG_DEPS="-xMMD -xMF"
50446  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50447    C_FLAG_DEPS="-qmakedep=gcc -MF"
50448  fi
50449  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50450
50451
50452
50453  # Debug symbols
50454  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50455    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50456      # reduce from default "-g2" option to save space
50457      CFLAGS_DEBUG_SYMBOLS="-g1"
50458      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50459    else
50460      CFLAGS_DEBUG_SYMBOLS="-g"
50461      CXXFLAGS_DEBUG_SYMBOLS="-g"
50462    fi
50463  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50464    CFLAGS_DEBUG_SYMBOLS="-g"
50465    CXXFLAGS_DEBUG_SYMBOLS="-g"
50466  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50467    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50468    # -g0 enables debug symbols without disabling inlining.
50469    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50470  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50471    CFLAGS_DEBUG_SYMBOLS="-g"
50472    CXXFLAGS_DEBUG_SYMBOLS="-g"
50473  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50474    CFLAGS_DEBUG_SYMBOLS="-Zi"
50475    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50476  fi
50477
50478
50479
50480  # Debug symbols for JVM_CFLAGS
50481  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50482    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50483    if test "x$DEBUG_LEVEL" = xslowdebug; then
50484      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50485    else
50486      # -g0 does not disable inlining, which -g does.
50487      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50488    fi
50489  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50490    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50491  else
50492    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50493  fi
50494
50495
50496  # bounds, memory and behavior checking options
50497  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50498    case $DEBUG_LEVEL in
50499    release )
50500      # no adjustment
50501      ;;
50502    fastdebug )
50503      # no adjustment
50504      ;;
50505    slowdebug )
50506      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50507      # get's added conditionally on whether we produce debug symbols or not.
50508      # This is most likely not really correct.
50509
50510      # Add runtime stack smashing and undefined behavior checks.
50511      # Not all versions of gcc support -fstack-protector
50512      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555    # Execute function body
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604    # Execute function body
50605
50606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50607$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50608  supports=yes
50609
50610  saved_cflags="$CFLAGS"
50611  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50612  ac_ext=c
50613ac_cpp='$CPP $CPPFLAGS'
50614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50616ac_compiler_gnu=$ac_cv_c_compiler_gnu
50617
50618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50619/* end confdefs.h.  */
50620int i;
50621_ACEOF
50622if ac_fn_c_try_compile "$LINENO"; then :
50623
50624else
50625  supports=no
50626fi
50627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50628  ac_ext=cpp
50629ac_cpp='$CXXCPP $CPPFLAGS'
50630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50633
50634  CFLAGS="$saved_cflags"
50635
50636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50637$as_echo "$supports" >&6; }
50638  if test "x$supports" = "xyes" ; then
50639    :
50640    C_COMP_SUPPORTS="yes"
50641  else
50642    :
50643    C_COMP_SUPPORTS="no"
50644  fi
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704    # Execute function body
50705
50706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50707$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50708  supports=yes
50709
50710  saved_cxxflags="$CXXFLAGS"
50711  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50712  ac_ext=cpp
50713ac_cpp='$CXXCPP $CPPFLAGS'
50714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50717
50718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50719/* end confdefs.h.  */
50720int i;
50721_ACEOF
50722if ac_fn_cxx_try_compile "$LINENO"; then :
50723
50724else
50725  supports=no
50726fi
50727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50728  ac_ext=cpp
50729ac_cpp='$CXXCPP $CPPFLAGS'
50730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50733
50734  CXXFLAGS="$saved_cxxflags"
50735
50736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50737$as_echo "$supports" >&6; }
50738  if test "x$supports" = "xyes" ; then
50739    :
50740    CXX_COMP_SUPPORTS="yes"
50741  else
50742    :
50743    CXX_COMP_SUPPORTS="no"
50744  fi
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50759$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50760  supports=no
50761  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50762
50763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50764$as_echo "$supports" >&6; }
50765  if test "x$supports" = "xyes" ; then
50766    :
50767
50768  else
50769    :
50770    STACK_PROTECTOR_CFLAG=""
50771  fi
50772
50773
50774
50775
50776
50777
50778
50779      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50780      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50781      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50782        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50783      fi
50784      ;;
50785    esac
50786  fi
50787
50788  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50789    if test "x$DEBUG_LEVEL" != xrelease; then
50790      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50791        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50792      fi
50793    fi
50794  fi
50795
50796  # Optimization levels
50797  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50798    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50799
50800    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50801      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50802      C_O_FLAG_HIGHEST_JVM="-xO4"
50803      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50804      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50805      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50806      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50807      C_O_FLAG_DEBUG_JVM=""
50808      C_O_FLAG_NONE="-xregs=no%frameptr"
50809      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50810      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50811      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50812      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50813      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50814      CXX_O_FLAG_DEBUG_JVM=""
50815      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50816      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50817        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50818        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50819      fi
50820    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50821      C_O_FLAG_HIGHEST_JVM="-xO4"
50822      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50823      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50824      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50825      C_O_FLAG_DEBUG=""
50826      C_O_FLAG_DEBUG_JVM=""
50827      C_O_FLAG_NONE=""
50828      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50829      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50830      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50831      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50832      CXX_O_FLAG_DEBUG=""
50833      CXX_O_FLAG_DEBUG_JVM=""
50834      CXX_O_FLAG_NONE=""
50835    fi
50836  else
50837    # The remaining toolchains share opt flags between CC and CXX;
50838    # setup for C and duplicate afterwards.
50839    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50840      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50841        # On MacOSX we optimize for size, something
50842        # we should do for all platforms?
50843        C_O_FLAG_HIGHEST_JVM="-Os"
50844        C_O_FLAG_HIGHEST="-Os"
50845        C_O_FLAG_HI="-Os"
50846        C_O_FLAG_NORM="-Os"
50847        C_O_FLAG_SIZE="-Os"
50848      else
50849        C_O_FLAG_HIGHEST_JVM="-O3"
50850        C_O_FLAG_HIGHEST="-O3"
50851        C_O_FLAG_HI="-O3"
50852        C_O_FLAG_NORM="-O2"
50853        C_O_FLAG_SIZE="-Os"
50854      fi
50855      C_O_FLAG_DEBUG="-O0"
50856      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50857        C_O_FLAG_DEBUG_JVM=""
50858      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50859        C_O_FLAG_DEBUG_JVM="-O0"
50860      fi
50861      C_O_FLAG_NONE="-O0"
50862    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50863      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50864        # On MacOSX we optimize for size, something
50865        # we should do for all platforms?
50866        C_O_FLAG_HIGHEST_JVM="-Os"
50867        C_O_FLAG_HIGHEST="-Os"
50868        C_O_FLAG_HI="-Os"
50869        C_O_FLAG_NORM="-Os"
50870        C_O_FLAG_SIZE="-Os"
50871      else
50872        C_O_FLAG_HIGHEST_JVM="-O3"
50873        C_O_FLAG_HIGHEST="-O3"
50874        C_O_FLAG_HI="-O3"
50875        C_O_FLAG_NORM="-O2"
50876        C_O_FLAG_SIZE="-Os"
50877      fi
50878      C_O_FLAG_DEBUG="-O0"
50879      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50880        C_O_FLAG_DEBUG_JVM=""
50881      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50882        C_O_FLAG_DEBUG_JVM="-O0"
50883      fi
50884      C_O_FLAG_NONE="-O0"
50885    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50886      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50887      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50888      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50889      C_O_FLAG_NORM="-O2"
50890      C_O_FLAG_DEBUG="-qnoopt"
50891      # FIXME: Value below not verified.
50892      C_O_FLAG_DEBUG_JVM=""
50893      C_O_FLAG_NONE="-qnoopt"
50894    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50895      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50896      C_O_FLAG_HIGHEST="-O2"
50897      C_O_FLAG_HI="-O1"
50898      C_O_FLAG_NORM="-O1"
50899      C_O_FLAG_DEBUG="-Od"
50900      C_O_FLAG_DEBUG_JVM=""
50901      C_O_FLAG_NONE="-Od"
50902      C_O_FLAG_SIZE="-Os"
50903    fi
50904    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50905    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50906    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50907    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50908    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50909    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50910    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50911    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50912  fi
50913
50914  # Adjust optimization flags according to debug level.
50915  case $DEBUG_LEVEL in
50916    release )
50917      # no adjustment
50918      ;;
50919    fastdebug )
50920      # Not quite so much optimization
50921      C_O_FLAG_HI="$C_O_FLAG_NORM"
50922      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50923      ;;
50924    slowdebug )
50925      # Disable optimization
50926      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50927      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50928      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50929      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50930      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50931      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50932      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50933      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50934      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50935      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50936      ;;
50937  esac
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958# Check whether --with-abi-profile was given.
50959if test "${with_abi_profile+set}" = set; then :
50960  withval=$with_abi_profile;
50961fi
50962
50963
50964  if test "x$with_abi_profile" != x; then
50965    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50966        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50967      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50968    fi
50969
50970    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50972$as_echo_n "checking for ABI profle... " >&6; }
50973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50974$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50975
50976    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50977      ARM_FLOAT_TYPE=vfp-sflt
50978      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50979    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50980      ARM_FLOAT_TYPE=vfp-hflt
50981      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50982    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50983      ARM_FLOAT_TYPE=sflt
50984      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50985    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50986      ARM_FLOAT_TYPE=vfp-sflt
50987      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50988    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50989      ARM_FLOAT_TYPE=vfp-hflt
50990      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50991    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50992      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50993      ARM_FLOAT_TYPE=
50994      ARM_ARCH_TYPE_FLAGS=
50995    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50996      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50997      ARM_FLOAT_TYPE=
50998      ARM_ARCH_TYPE_FLAGS=
50999    else
51000      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51001    fi
51002
51003    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51004      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51005    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51006      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51007    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51008      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51009    fi
51010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51011$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51013$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51014
51015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51016$as_echo_n "checking for arch type flags... " >&6; }
51017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51018$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51019
51020    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51021    # autoconf target triplet.
51022     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51023    # Sanity check that it is a known ABI.
51024    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51025        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51026        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51027          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51028$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51029    fi
51030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51031$as_echo_n "checking for ABI property name... " >&6; }
51032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51033$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51034
51035
51036    # Pass these on to the open part of configure as if they were set using
51037    # --with-extra-c[xx]flags.
51038    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51039    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51040    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51041    # FIXME: This should not really be set using extra_cflags.
51042    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51043        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51044        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51045    fi
51046    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51047    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51048    # And pass the architecture flags to the linker as well
51049    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51050  fi
51051
51052  # When building with an abi profile, the name of that profile is appended on the
51053  # bundle platform, which is used in bundle names.
51054  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51055    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51056  fi
51057
51058
51059  # Special extras...
51060  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51061    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51062      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51063      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51064    fi
51065    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51066    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51067  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51068    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51069    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51070  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51071    CXXSTD_CXXFLAG="-std=gnu++98"
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114    # Execute function body
51115
51116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51117$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51118  supports=yes
51119
51120  saved_cxxflags="$CXXFLAGS"
51121  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51122  ac_ext=cpp
51123ac_cpp='$CXXCPP $CPPFLAGS'
51124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51127
51128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51129/* end confdefs.h.  */
51130int i;
51131_ACEOF
51132if ac_fn_cxx_try_compile "$LINENO"; then :
51133
51134else
51135  supports=no
51136fi
51137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51138  ac_ext=cpp
51139ac_cpp='$CXXCPP $CPPFLAGS'
51140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51143
51144  CXXFLAGS="$saved_cxxflags"
51145
51146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51147$as_echo "$supports" >&6; }
51148  if test "x$supports" = "xyes" ; then
51149    :
51150
51151  else
51152    :
51153    CXXSTD_CXXFLAG=""
51154  fi
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51168    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51169
51170  fi
51171  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51172    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51173    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51174  fi
51175
51176  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51177  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51178  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51179
51180  ###############################################################################
51181  #
51182  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51183  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51184  #
51185
51186  # Setup compiler/platform specific flags into
51187  #    CFLAGS_JDK    - C Compiler flags
51188  #    CXXFLAGS_JDK  - C++ Compiler flags
51189  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51190  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51191    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51192    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51193    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51194    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51195      # Force compatibility with i586 on 32 bit intel platforms.
51196      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51197      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51198    fi
51199    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51200        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51201    case $OPENJDK_TARGET_CPU_ARCH in
51202      arm )
51203        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51204        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51205        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51206        ;;
51207      ppc )
51208        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51209        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51210        ;;
51211      s390 )
51212        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51213        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51214        ;;
51215      * )
51216        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51217        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51218        ;;
51219    esac
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274    # Execute function body
51275
51276  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51277  REFERENCE_VERSION=6
51278
51279  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51280    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51281  fi
51282
51283  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51284    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51285  fi
51286
51287  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51288  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51289
51290  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51291    :
51292
51293  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51294  # runs afoul of the more aggressive versions of these optimisations.
51295  # Notably, value range propagation now assumes that the this pointer of C++
51296  # member functions is non-null.
51297  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51298        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51299        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51300$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51301  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51302  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51303
51304  else
51305    :
51306
51307  fi
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51323    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51324
51325    # Restrict the debug information created by Clang to avoid
51326    # too big object files and speed the build up a little bit
51327    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51328    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51329    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51330      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51331        # Force compatibility with i586 on 32 bit intel platforms.
51332        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51333        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51334      fi
51335      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51336      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51337          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51338      case $OPENJDK_TARGET_CPU_ARCH in
51339        ppc )
51340          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51341          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51342          ;;
51343        * )
51344          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51345          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51346          ;;
51347      esac
51348    fi
51349  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51350    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51351    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51352    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51353      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51354    fi
51355
51356    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51357    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51358  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51359    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51360    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51361    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51362  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51363    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51364        -MD -Zc:wchar_t- -W3 -wd4800 \
51365        -DWIN32_LEAN_AND_MEAN \
51366        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51367        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51368        -DWIN32 -DIAL"
51369    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51370      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51371    else
51372      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51373    fi
51374    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51375    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51376    # studio.
51377    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51378      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51379      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51380      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51381    fi
51382  fi
51383
51384  ###############################################################################
51385
51386  # Adjust flags according to debug level.
51387  case $DEBUG_LEVEL in
51388    fastdebug | slowdebug )
51389      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51390      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51391      ;;
51392    release )
51393      ;;
51394    * )
51395      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51396      ;;
51397  esac
51398
51399  # Set some common defines. These works for all compilers, but assume
51400  # -D is universally accepted.
51401
51402  # Setup endianness
51403  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51404    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51405    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51406    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51407    #   Note: -Dmacro         is the same as    #define macro 1
51408    #         -Dmacro=        is the same as    #define macro
51409    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51410      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51411    else
51412      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51413    fi
51414  else
51415    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51416    # are defined in the system?
51417    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51418      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51419    else
51420      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51421    fi
51422  fi
51423
51424  # Setup target OS define. Use OS target name but in upper case.
51425  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51426  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51427
51428  # Setup target CPU
51429  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51430      $OPENJDK_TARGET_ADD_LP64 \
51431      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51432
51433  # Setup debug/release defines
51434  if test "x$DEBUG_LEVEL" = xrelease; then
51435    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51436    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51437      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51438    fi
51439  else
51440    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51441  fi
51442
51443  # Set some additional per-OS defines.
51444  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51445    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51446    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51447        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51448  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51449    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51450    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51451        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51452  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51453    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51454    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51455    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51456    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51457        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51458        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51459        -fno-omit-frame-pointer"
51460  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51461    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51462    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51463    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51464        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51465        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51466  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51467    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51468  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51469    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51470    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51471  fi
51472
51473  # Set some additional per-CPU defines.
51474  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51475    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51476  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51477    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51478  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51479    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51480      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51481      # fixes `relocation truncated to fit' error for gcc 4.1.
51482      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51483      # Use ppc64 instructions, but schedule for power5
51484      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51485    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51486      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51487    fi
51488  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51489    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51490      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51491      # Little endian machine uses ELFv2 ABI.
51492      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51493      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51494      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51495    fi
51496  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51497    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51498      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51499    fi
51500  fi
51501
51502  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51503    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51504  fi
51505
51506  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51507    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51508      # Solaris does not have _LP64=1 in the old build.
51509      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51510      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51511    fi
51512  fi
51513
51514  # Set JVM_CFLAGS warning handling
51515  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51516    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51517        -Wunused-value -Woverloaded-virtual"
51518
51519    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574    # Execute function body
51575
51576  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51577  REFERENCE_VERSION=4.8
51578
51579  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51580    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51581  fi
51582
51583  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51584    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51585  fi
51586
51587  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51588  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51589
51590  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51591    :
51592
51593            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51594            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51595
51596
51597  else
51598    :
51599
51600  fi
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615    fi
51616    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51617      # Non-zero builds have stricter warnings
51618      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51619    else
51620      if test "x$TOOLCHAIN_TYPE" = xclang; then
51621        # Some versions of llvm do not like -Wundef
51622        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51623      fi
51624    fi
51625  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51626    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51627        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51628  fi
51629
51630  # Additional macosx handling
51631  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51632    # Setting these parameters makes it an error to link to macosx APIs that are
51633    # newer than the given OS version and makes the linked binaries compatible
51634    # even if built on a newer version of the OS.
51635    # The expected format is X.Y.Z
51636    MACOSX_VERSION_MIN=10.7.0
51637
51638
51639    # The macro takes the version with no dots, ex: 1070
51640    # Let the flags variables get resolved in make for easier override on make
51641    # command line.
51642    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51643    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51644  fi
51645
51646  # Setup some hard coded includes
51647  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51648      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51649      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51650      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51651      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51652      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51653      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51654
51655  # The shared libraries are compiled using the picflag.
51656  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51657      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51658  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51659      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51660
51661  # Executable flags
51662  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51663  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51664
51665
51666
51667
51668
51669
51670  # Setup LDFLAGS et al.
51671  #
51672
51673  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51674    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51675    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51676    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51677    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51678      LDFLAGS_SAFESH="-safeseh"
51679      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51680      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51681      # NOTE: Old build added -machine. Probably not needed.
51682      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51683    else
51684      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51685    fi
51686  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51687      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51688      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51689        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51690        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51691    fi
51692  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51693    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51694    # We have previously set HAS_GNU_HASH if this is the case
51695    if test -n "$HAS_GNU_HASH"; then
51696      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51697      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51698      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51699    fi
51700      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51701        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51702    fi
51703    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51704      # And since we now know that the linker is gnu, then add -z defs, to forbid
51705      # undefined symbols in object files.
51706      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51707      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51708      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51709      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51710      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51711      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51712        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51713      fi
51714      case $DEBUG_LEVEL in
51715        release )
51716          # tell linker to optimize libraries.
51717          # Should this be supplied to the OSS linker as well?
51718          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51719          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51720          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51721          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51722            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51723          fi
51724          ;;
51725        slowdebug )
51726          # Hotspot always let the linker optimize
51727          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51728          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51729            # do relocations at load
51730            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51731            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51732            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51733          fi
51734          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51735            # mark relocations read only
51736            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51737            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51738            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51739          fi
51740          ;;
51741        fastdebug )
51742          # Hotspot always let the linker optimize
51743          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51744          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51745            # mark relocations read only
51746            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51747            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51748            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51749          fi
51750          ;;
51751        * )
51752          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51753          ;;
51754        esac
51755    fi
51756  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51757    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51758    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51759    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51760    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51761    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51762    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51763      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51764    fi
51765  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51766    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51767    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51768    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51769  fi
51770
51771  # Customize LDFLAGS for executables
51772
51773  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51774
51775  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51776    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51777      LDFLAGS_STACK_SIZE=1048576
51778    else
51779      LDFLAGS_STACK_SIZE=327680
51780    fi
51781    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51782  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51783    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51784  fi
51785
51786  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51787
51788  # Customize LDFLAGS for libs
51789  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51790
51791  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51792  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51793    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51794        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51795    JDKLIB_LIBS=""
51796  else
51797    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51798        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51799
51800    if test "xTARGET" = "xTARGET"; then
51801      # On some platforms (mac) the linker warns about non existing -L dirs.
51802      # For any of the variants server, client or minimal, the dir matches the
51803      # variant name. The "main" variant should be used for linking. For the
51804      # rest, the dir is just server.
51805      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51806          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51807        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51808            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51809      else
51810        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51811            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51812      fi
51813    elif test "xTARGET" = "xBUILD"; then
51814      # When building a buildjdk, it's always only the server variant
51815      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51816          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51817    fi
51818
51819    JDKLIB_LIBS="-ljava -ljvm"
51820    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51821      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51822    fi
51823
51824  fi
51825
51826LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51827
51828  # Set JVM_LIBS (per os)
51829  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51830    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51831  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51832    # FIXME: This hard-coded path is not really proper.
51833    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51834      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51835    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51836      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51837    fi
51838    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51839        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51840  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51841    JVM_LIBS="$JVM_LIBS -lm"
51842  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51843    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51844  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51845    JVM_LIBS="$JVM_LIBS -lm"
51846  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51847    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51848        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51849        wsock32.lib winmm.lib version.lib psapi.lib"
51850    fi
51851
51852  # Set JVM_ASFLAGS
51853  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51854    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51855      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51856    fi
51857  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51858    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51859  fi
51860
51861  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877  # Special extras...
51878  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51879    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51880      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51881      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51882    fi
51883    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51884    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51885  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51886    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51887    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51888  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51889    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932    # Execute function body
51933
51934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51935$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51936  supports=yes
51937
51938  saved_cxxflags="$CXXFLAGS"
51939  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51940  ac_ext=cpp
51941ac_cpp='$CXXCPP $CPPFLAGS'
51942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51945
51946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51947/* end confdefs.h.  */
51948int i;
51949_ACEOF
51950if ac_fn_cxx_try_compile "$LINENO"; then :
51951
51952else
51953  supports=no
51954fi
51955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51956  ac_ext=cpp
51957ac_cpp='$CXXCPP $CPPFLAGS'
51958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51961
51962  CXXFLAGS="$saved_cxxflags"
51963
51964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51965$as_echo "$supports" >&6; }
51966  if test "x$supports" = "xyes" ; then
51967    :
51968
51969  else
51970    :
51971    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51972  fi
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51986    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51987
51988  fi
51989  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51990    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51991    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51992  fi
51993
51994  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51995  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51996  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51997
51998  ###############################################################################
51999  #
52000  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52001  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52002  #
52003
52004  # Setup compiler/platform specific flags into
52005  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52006  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52007  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52008  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52009    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52010    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52011    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52012    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52013      # Force compatibility with i586 on 32 bit intel platforms.
52014      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52015      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52016    fi
52017    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52018        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52019    case $OPENJDK_BUILD_CPU_ARCH in
52020      arm )
52021        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52022        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52023        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52024        ;;
52025      ppc )
52026        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52027        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52028        ;;
52029      s390 )
52030        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52031        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52032        ;;
52033      * )
52034        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52035        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52036        ;;
52037    esac
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092    # Execute function body
52093
52094  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52095  REFERENCE_VERSION=6
52096
52097  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52098    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52099  fi
52100
52101  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52102    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52103  fi
52104
52105  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52106  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52107
52108  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52109    :
52110
52111  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52112  # runs afoul of the more aggressive versions of these optimisations.
52113  # Notably, value range propagation now assumes that the this pointer of C++
52114  # member functions is non-null.
52115  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52116        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52117        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52118$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52119  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52120  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52121
52122  else
52123    :
52124
52125  fi
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52141    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52142
52143    # Restrict the debug information created by Clang to avoid
52144    # too big object files and speed the build up a little bit
52145    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52146    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52147    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52148      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52149        # Force compatibility with i586 on 32 bit intel platforms.
52150        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52151        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52152      fi
52153      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52154      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52155          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52156      case $OPENJDK_BUILD_CPU_ARCH in
52157        ppc )
52158          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52159          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52160          ;;
52161        * )
52162          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52163          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52164          ;;
52165      esac
52166    fi
52167  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52168    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52169    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52170    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52171      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52172    fi
52173
52174    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52175    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52176  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52177    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
52178    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52179    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52180  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52181    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52182        -MD -Zc:wchar_t- -W3 -wd4800 \
52183        -DWIN32_LEAN_AND_MEAN \
52184        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52185        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52186        -DWIN32 -DIAL"
52187    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52188      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52189    else
52190      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52191    fi
52192    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52193    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52194    # studio.
52195    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52196      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52197      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52198      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52199    fi
52200  fi
52201
52202  ###############################################################################
52203
52204  # Adjust flags according to debug level.
52205  case $DEBUG_LEVEL in
52206    fastdebug | slowdebug )
52207      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52208      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52209      ;;
52210    release )
52211      ;;
52212    * )
52213      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52214      ;;
52215  esac
52216
52217  # Set some common defines. These works for all compilers, but assume
52218  # -D is universally accepted.
52219
52220  # Setup endianness
52221  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52222    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52223    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52224    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52225    #   Note: -Dmacro         is the same as    #define macro 1
52226    #         -Dmacro=        is the same as    #define macro
52227    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52228      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52229    else
52230      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52231    fi
52232  else
52233    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52234    # are defined in the system?
52235    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52236      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52237    else
52238      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52239    fi
52240  fi
52241
52242  # Setup target OS define. Use OS target name but in upper case.
52243  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52244  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52245
52246  # Setup target CPU
52247  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52248      $OPENJDK_BUILD_ADD_LP64 \
52249      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52250
52251  # Setup debug/release defines
52252  if test "x$DEBUG_LEVEL" = xrelease; then
52253    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52254    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52255      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52256    fi
52257  else
52258    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52259  fi
52260
52261  # Set some additional per-OS defines.
52262  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52263    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52264    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52265        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52266  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52267    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52268    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52269        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
52270  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52271    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52272    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52273    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52274    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52275        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52276        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
52277        -fno-omit-frame-pointer"
52278  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52279    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52280    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52281    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52282        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52283        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52284  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52285    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52286  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52287    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52288    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52289  fi
52290
52291  # Set some additional per-CPU defines.
52292  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52293    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52294  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52295    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52296  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52297    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52298      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52299      # fixes `relocation truncated to fit' error for gcc 4.1.
52300      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52301      # Use ppc64 instructions, but schedule for power5
52302      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52303    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52304      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52305    fi
52306  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52307    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52308      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52309      # Little endian machine uses ELFv2 ABI.
52310      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52311      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52312      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52313    fi
52314  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52315    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52316      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52317    fi
52318  fi
52319
52320  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52321    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52322  fi
52323
52324  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52325    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52326      # Solaris does not have _LP64=1 in the old build.
52327      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52328      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52329    fi
52330  fi
52331
52332  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52333  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52334    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52335        -Wunused-value -Woverloaded-virtual"
52336
52337    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392    # Execute function body
52393
52394  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52395  REFERENCE_VERSION=4.8
52396
52397  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52398    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52399  fi
52400
52401  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52402    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52403  fi
52404
52405  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52406  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52407
52408  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52409    :
52410
52411            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52412            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52413
52414
52415  else
52416    :
52417
52418  fi
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433    fi
52434    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52435      # Non-zero builds have stricter warnings
52436      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52437    else
52438      if test "x$TOOLCHAIN_TYPE" = xclang; then
52439        # Some versions of llvm do not like -Wundef
52440        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52441      fi
52442    fi
52443  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52444    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52445        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52446  fi
52447
52448  # Additional macosx handling
52449  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52450    # Setting these parameters makes it an error to link to macosx APIs that are
52451    # newer than the given OS version and makes the linked binaries compatible
52452    # even if built on a newer version of the OS.
52453    # The expected format is X.Y.Z
52454    MACOSX_VERSION_MIN=10.7.0
52455
52456
52457    # The macro takes the version with no dots, ex: 1070
52458    # Let the flags variables get resolved in make for easier override on make
52459    # command line.
52460    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52461    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52462  fi
52463
52464  # Setup some hard coded includes
52465  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52466      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52467      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52468      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52469      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52470      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52471      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52472
52473  # The shared libraries are compiled using the picflag.
52474  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52475      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52476  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52477      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52478
52479  # Executable flags
52480  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52481  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52482
52483
52484
52485
52486
52487
52488  # Setup LDFLAGS et al.
52489  #
52490
52491  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52492    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52493    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52494    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52495    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52496      LDFLAGS_SAFESH="-safeseh"
52497      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52498      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52499      # NOTE: Old build added -machine. Probably not needed.
52500      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52501    else
52502      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52503    fi
52504  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52505      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52506      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52507        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52508        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52509    fi
52510  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52511    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52512    # We have previously set HAS_GNU_HASH if this is the case
52513    if test -n "$HAS_GNU_HASH"; then
52514      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52515      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52516      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52517    fi
52518      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52519        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52520    fi
52521    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52522      # And since we now know that the linker is gnu, then add -z defs, to forbid
52523      # undefined symbols in object files.
52524      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52525      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52526      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52527      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52528      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52529      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52530        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52531      fi
52532      case $DEBUG_LEVEL in
52533        release )
52534          # tell linker to optimize libraries.
52535          # Should this be supplied to the OSS linker as well?
52536          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52537          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52538          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52539          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52540            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52541          fi
52542          ;;
52543        slowdebug )
52544          # Hotspot always let the linker optimize
52545          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52546          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52547            # do relocations at load
52548            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52549            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52550            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52551          fi
52552          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52553            # mark relocations read only
52554            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52555            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52556            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52557          fi
52558          ;;
52559        fastdebug )
52560          # Hotspot always let the linker optimize
52561          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52562          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52563            # mark relocations read only
52564            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52565            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52566            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52567          fi
52568          ;;
52569        * )
52570          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52571          ;;
52572        esac
52573    fi
52574  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52575    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52576    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52577    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52578    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52579    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52580    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52581      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52582    fi
52583  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52584    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52585    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52586    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52587  fi
52588
52589  # Customize LDFLAGS for executables
52590
52591  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52592
52593  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52594    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52595      LDFLAGS_STACK_SIZE=1048576
52596    else
52597      LDFLAGS_STACK_SIZE=327680
52598    fi
52599    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52600  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52601    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52602  fi
52603
52604  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52605
52606  # Customize LDFLAGS for libs
52607  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52608
52609  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52610  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52611    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52612        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52613    OPENJDK_BUILD_JDKLIB_LIBS=""
52614  else
52615    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52616        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52617
52618    if test "xBUILD" = "xTARGET"; then
52619      # On some platforms (mac) the linker warns about non existing -L dirs.
52620      # For any of the variants server, client or minimal, the dir matches the
52621      # variant name. The "main" variant should be used for linking. For the
52622      # rest, the dir is just server.
52623      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52624          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52625        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52626            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52627      else
52628        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52629            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52630      fi
52631    elif test "xBUILD" = "xBUILD"; then
52632      # When building a buildjdk, it's always only the server variant
52633      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52634          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52635    fi
52636
52637    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52638    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52639      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52640    fi
52641
52642  fi
52643
52644OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52645
52646  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52647  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52648    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52649  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52650    # FIXME: This hard-coded path is not really proper.
52651    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52652      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52653    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52654      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52655    fi
52656    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52657        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52658  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52659    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52660  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52661    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52662  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52663    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52664  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52665    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52666        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52667        wsock32.lib winmm.lib version.lib psapi.lib"
52668    fi
52669
52670  # Set OPENJDK_BUILD_JVM_ASFLAGS
52671  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52672    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52673      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52674    fi
52675  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52676    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52677  fi
52678
52679  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695  # Tests are only ever compiled for TARGET
52696  # Flags for compiling test libraries
52697  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52698  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52699
52700  # Flags for compiling test executables
52701  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52702  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52703
52704
52705
52706
52707
52708
52709  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52710  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52711
52712
52713
52714
52715
52716
52717  # Check that the compiler supports -mX (or -qX on AIX) flags
52718  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766    # Execute function body
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815    # Execute function body
52816
52817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52818$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52819  supports=yes
52820
52821  saved_cflags="$CFLAGS"
52822  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52823  ac_ext=c
52824ac_cpp='$CPP $CPPFLAGS'
52825ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52826ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52827ac_compiler_gnu=$ac_cv_c_compiler_gnu
52828
52829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52830/* end confdefs.h.  */
52831int i;
52832_ACEOF
52833if ac_fn_c_try_compile "$LINENO"; then :
52834
52835else
52836  supports=no
52837fi
52838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52839  ac_ext=cpp
52840ac_cpp='$CXXCPP $CPPFLAGS'
52841ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52842ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52843ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52844
52845  CFLAGS="$saved_cflags"
52846
52847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52848$as_echo "$supports" >&6; }
52849  if test "x$supports" = "xyes" ; then
52850    :
52851    C_COMP_SUPPORTS="yes"
52852  else
52853    :
52854    C_COMP_SUPPORTS="no"
52855  fi
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915    # Execute function body
52916
52917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52918$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52919  supports=yes
52920
52921  saved_cxxflags="$CXXFLAGS"
52922  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52923  ac_ext=cpp
52924ac_cpp='$CXXCPP $CPPFLAGS'
52925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52928
52929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52930/* end confdefs.h.  */
52931int i;
52932_ACEOF
52933if ac_fn_cxx_try_compile "$LINENO"; then :
52934
52935else
52936  supports=no
52937fi
52938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52939  ac_ext=cpp
52940ac_cpp='$CXXCPP $CPPFLAGS'
52941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52944
52945  CXXFLAGS="$saved_cxxflags"
52946
52947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52948$as_echo "$supports" >&6; }
52949  if test "x$supports" = "xyes" ; then
52950    :
52951    CXX_COMP_SUPPORTS="yes"
52952  else
52953    :
52954    CXX_COMP_SUPPORTS="no"
52955  fi
52956
52957
52958
52959
52960
52961
52962
52963
52964
52965
52966
52967
52968
52969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52970$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52971  supports=no
52972  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52973
52974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52975$as_echo "$supports" >&6; }
52976  if test "x$supports" = "xyes" ; then
52977    :
52978    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52979  else
52980    :
52981    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52982  fi
52983
52984
52985
52986
52987
52988
52989
52990
52991  # Check whether --enable-warnings-as-errors was given.
52992if test "${enable_warnings_as_errors+set}" = set; then :
52993  enableval=$enable_warnings_as_errors;
52994fi
52995
52996
52997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52998$as_echo_n "checking if native warnings are errors... " >&6; }
52999  if test "x$enable_warnings_as_errors" = "xyes"; then
53000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53001$as_echo "yes (explicitly set)" >&6; }
53002    WARNINGS_AS_ERRORS=true
53003  elif test "x$enable_warnings_as_errors" = "xno"; then
53004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53005$as_echo "no" >&6; }
53006    WARNINGS_AS_ERRORS=false
53007  elif test "x$enable_warnings_as_errors" = "x"; then
53008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53009$as_echo "yes (default)" >&6; }
53010    WARNINGS_AS_ERRORS=true
53011  else
53012    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53013  fi
53014
53015
53016
53017  case "${TOOLCHAIN_TYPE}" in
53018    microsoft)
53019      DISABLE_WARNING_PREFIX="-wd"
53020      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53021      ;;
53022    solstudio)
53023      DISABLE_WARNING_PREFIX="-erroff="
53024      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53025      ;;
53026    gcc)
53027      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075    # Execute function body
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112
53113
53114
53115
53116
53117
53118
53119
53120
53121
53122
53123
53124    # Execute function body
53125
53126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53127$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53128  supports=yes
53129
53130  saved_cflags="$CFLAGS"
53131  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53132  ac_ext=c
53133ac_cpp='$CPP $CPPFLAGS'
53134ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53135ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53136ac_compiler_gnu=$ac_cv_c_compiler_gnu
53137
53138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53139/* end confdefs.h.  */
53140int i;
53141_ACEOF
53142if ac_fn_c_try_compile "$LINENO"; then :
53143
53144else
53145  supports=no
53146fi
53147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53148  ac_ext=cpp
53149ac_cpp='$CXXCPP $CPPFLAGS'
53150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53153
53154  CFLAGS="$saved_cflags"
53155
53156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53157$as_echo "$supports" >&6; }
53158  if test "x$supports" = "xyes" ; then
53159    :
53160    C_COMP_SUPPORTS="yes"
53161  else
53162    :
53163    C_COMP_SUPPORTS="no"
53164  fi
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215
53216
53217
53218
53219
53220
53221
53222
53223
53224    # Execute function body
53225
53226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53227$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53228  supports=yes
53229
53230  saved_cxxflags="$CXXFLAGS"
53231  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53232  ac_ext=cpp
53233ac_cpp='$CXXCPP $CPPFLAGS'
53234ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53235ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53236ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53237
53238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53239/* end confdefs.h.  */
53240int i;
53241_ACEOF
53242if ac_fn_cxx_try_compile "$LINENO"; then :
53243
53244else
53245  supports=no
53246fi
53247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53248  ac_ext=cpp
53249ac_cpp='$CXXCPP $CPPFLAGS'
53250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53253
53254  CXXFLAGS="$saved_cxxflags"
53255
53256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53257$as_echo "$supports" >&6; }
53258  if test "x$supports" = "xyes" ; then
53259    :
53260    CXX_COMP_SUPPORTS="yes"
53261  else
53262    :
53263    CXX_COMP_SUPPORTS="no"
53264  fi
53265
53266
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53279$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53280  supports=no
53281  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53282
53283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53284$as_echo "$supports" >&6; }
53285  if test "x$supports" = "xyes" ; then
53286    :
53287    GCC_CAN_DISABLE_WARNINGS=true
53288  else
53289    :
53290    GCC_CAN_DISABLE_WARNINGS=false
53291
53292  fi
53293
53294
53295
53296
53297
53298
53299      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53300        DISABLE_WARNING_PREFIX="-Wno-"
53301      else
53302        DISABLE_WARNING_PREFIX=
53303      fi
53304      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53305      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53306      # CFLAGS since any target specific flags will likely not work with the
53307      # build compiler
53308      CC_OLD="$CC"
53309      CXX_OLD="$CXX"
53310      CC="$BUILD_CC"
53311      CXX="$BUILD_CXX"
53312      CFLAGS_OLD="$CFLAGS"
53313      CFLAGS=""
53314
53315
53316
53317
53318
53319
53320
53321
53322
53323
53324
53325
53326
53327
53328
53329
53330
53331
53332
53333
53334
53335
53336
53337
53338
53339
53340
53341
53342
53343
53344
53345
53346
53347
53348
53349
53350
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361    # Execute function body
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410    # Execute function body
53411
53412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53413$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53414  supports=yes
53415
53416  saved_cflags="$CFLAGS"
53417  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53418  ac_ext=c
53419ac_cpp='$CPP $CPPFLAGS'
53420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53422ac_compiler_gnu=$ac_cv_c_compiler_gnu
53423
53424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53425/* end confdefs.h.  */
53426int i;
53427_ACEOF
53428if ac_fn_c_try_compile "$LINENO"; then :
53429
53430else
53431  supports=no
53432fi
53433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53434  ac_ext=cpp
53435ac_cpp='$CXXCPP $CPPFLAGS'
53436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53439
53440  CFLAGS="$saved_cflags"
53441
53442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53443$as_echo "$supports" >&6; }
53444  if test "x$supports" = "xyes" ; then
53445    :
53446    C_COMP_SUPPORTS="yes"
53447  else
53448    :
53449    C_COMP_SUPPORTS="no"
53450  fi
53451
53452
53453
53454
53455
53456
53457
53458
53459
53460
53461
53462
53463
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510    # Execute function body
53511
53512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53513$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53514  supports=yes
53515
53516  saved_cxxflags="$CXXFLAGS"
53517  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53518  ac_ext=cpp
53519ac_cpp='$CXXCPP $CPPFLAGS'
53520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53523
53524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53525/* end confdefs.h.  */
53526int i;
53527_ACEOF
53528if ac_fn_cxx_try_compile "$LINENO"; then :
53529
53530else
53531  supports=no
53532fi
53533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53534  ac_ext=cpp
53535ac_cpp='$CXXCPP $CPPFLAGS'
53536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53539
53540  CXXFLAGS="$saved_cxxflags"
53541
53542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53543$as_echo "$supports" >&6; }
53544  if test "x$supports" = "xyes" ; then
53545    :
53546    CXX_COMP_SUPPORTS="yes"
53547  else
53548    :
53549    CXX_COMP_SUPPORTS="no"
53550  fi
53551
53552
53553
53554
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53565$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53566  supports=no
53567  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53568
53569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53570$as_echo "$supports" >&6; }
53571  if test "x$supports" = "xyes" ; then
53572    :
53573    BUILD_CC_CAN_DISABLE_WARNINGS=true
53574  else
53575    :
53576    BUILD_CC_CAN_DISABLE_WARNINGS=false
53577
53578  fi
53579
53580
53581
53582
53583
53584
53585      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53586        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53587      else
53588        BUILD_CC_DISABLE_WARNING_PREFIX=
53589      fi
53590      CC="$CC_OLD"
53591      CXX="$CXX_OLD"
53592      CFLAGS="$CFLAGS_OLD"
53593      ;;
53594    clang)
53595      DISABLE_WARNING_PREFIX="-Wno-"
53596      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53597      ;;
53598    xlc)
53599      DISABLE_WARNING_PREFIX="-qsuppress="
53600      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53601      ;;
53602  esac
53603
53604
53605
53606
53607
53608# Setup debug symbols (need objcopy from the toolchain for that)
53609
53610  #
53611  # NATIVE_DEBUG_SYMBOLS
53612  # This must be done after the toolchain is setup, since we're looking at objcopy.
53613  #
53614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53615$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53616
53617# Check whether --with-native-debug-symbols was given.
53618if test "${with_native_debug_symbols+set}" = set; then :
53619  withval=$with_native_debug_symbols;
53620        if test "x$OPENJDK_TARGET_OS" = xaix; then
53621          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53622            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53623          fi
53624        fi
53625
53626else
53627
53628        if test "x$OPENJDK_TARGET_OS" = xaix; then
53629          # AIX doesn't support 'zipped' so use 'internal' as default
53630          with_native_debug_symbols="internal"
53631        else
53632          if test "x$STATIC_BUILD" = xtrue; then
53633            with_native_debug_symbols="none"
53634          else
53635            with_native_debug_symbols="zipped"
53636          fi
53637        fi
53638
53639fi
53640
53641  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53643$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53644
53645  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53646
53647    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53648      if test "x$OBJCOPY" = x; then
53649        # enabling of enable-debug-symbols and can't find objcopy
53650        # this is an error
53651        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53652      fi
53653    fi
53654
53655    COMPILE_WITH_DEBUG_SYMBOLS=true
53656    COPY_DEBUG_SYMBOLS=true
53657    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53658  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53659    COMPILE_WITH_DEBUG_SYMBOLS=false
53660    COPY_DEBUG_SYMBOLS=false
53661    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53662  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53663    COMPILE_WITH_DEBUG_SYMBOLS=true
53664    COPY_DEBUG_SYMBOLS=false
53665    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53666  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53667
53668    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53669      if test "x$OBJCOPY" = x; then
53670        # enabling of enable-debug-symbols and can't find objcopy
53671        # this is an error
53672        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53673      fi
53674    fi
53675
53676    COMPILE_WITH_DEBUG_SYMBOLS=true
53677    COPY_DEBUG_SYMBOLS=true
53678    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53679  else
53680    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53681  fi
53682
53683  # --enable-debug-symbols is deprecated.
53684  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53685
53686  # Check whether --enable-debug-symbols was given.
53687if test "${enable_debug_symbols+set}" = set; then :
53688  enableval=$enable_debug_symbols;
53689fi
53690
53691  if test "x$enable_debug_symbols" != x; then
53692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53693$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53694
53695    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53696      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53697$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53698    fi
53699
53700  fi
53701
53702
53703  # --enable-zip-debug-info is deprecated.
53704  # Please use --with-native-debug-symbols=zipped .
53705
53706  # Check whether --enable-zip-debug-info was given.
53707if test "${enable_zip_debug_info+set}" = set; then :
53708  enableval=$enable_zip_debug_info;
53709fi
53710
53711  if test "x$enable_zip_debug_info" != x; then
53712    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53713$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53714
53715    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53716      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53717$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53718    fi
53719
53720  fi
53721
53722
53723
53724
53725
53726
53727
53728  # Check whether --enable-native-coverage was given.
53729if test "${enable_native_coverage+set}" = set; then :
53730  enableval=$enable_native_coverage;
53731fi
53732
53733  GCOV_ENABLED="false"
53734  if test "x$enable_native_coverage" = "xyes"; then
53735    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53737$as_echo_n "checking if native coverage is enabled... " >&6; }
53738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53739$as_echo "yes" >&6; }
53740      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53741      GCOV_LDFLAGS="-fprofile-arcs"
53742      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53743      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53744      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53745      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53746      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53747      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53748      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53749      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53750      GCOV_ENABLED="true"
53751    else
53752      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53753    fi
53754  elif test "x$enable_native_coverage" = "xno"; then
53755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53756$as_echo_n "checking if native coverage is enabled... " >&6; }
53757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53758$as_echo "no" >&6; }
53759  elif test "x$enable_native_coverage" != "x"; then
53760    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53761  fi
53762
53763
53764
53765
53766# Need toolchain to setup dtrace
53767
53768  # Test for dtrace dependencies
53769  # Check whether --enable-dtrace was given.
53770if test "${enable_dtrace+set}" = set; then :
53771  enableval=$enable_dtrace;
53772fi
53773
53774
53775  DTRACE_DEP_MISSING=false
53776
53777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53778$as_echo_n "checking for dtrace tool... " >&6; }
53779  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53781$as_echo "$DTRACE" >&6; }
53782  else
53783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53784$as_echo "not found, cannot build dtrace" >&6; }
53785    DTRACE_DEP_MISSING=true
53786  fi
53787
53788  for ac_header in sys/sdt.h
53789do :
53790  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53791if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53792  cat >>confdefs.h <<_ACEOF
53793#define HAVE_SYS_SDT_H 1
53794_ACEOF
53795 DTRACE_HEADERS_OK=yes
53796else
53797  DTRACE_HEADERS_OK=no
53798fi
53799
53800done
53801
53802  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53803    DTRACE_DEP_MISSING=true
53804  fi
53805
53806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53807$as_echo_n "checking if dtrace should be built... " >&6; }
53808  if test "x$enable_dtrace" = "xyes"; then
53809    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53811$as_echo "no, missing dependencies" >&6; }
53812
53813  # Print a helpful message on how to acquire the necessary build dependency.
53814  # dtrace is the help tag: freetype, cups, alsa etc
53815  MISSING_DEPENDENCY=dtrace
53816
53817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53818    cygwin_help $MISSING_DEPENDENCY
53819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53820    msys_help $MISSING_DEPENDENCY
53821  else
53822    PKGHANDLER_COMMAND=
53823
53824    case $PKGHANDLER in
53825      apt-get)
53826        apt_help     $MISSING_DEPENDENCY ;;
53827      yum)
53828        yum_help     $MISSING_DEPENDENCY ;;
53829      brew)
53830        brew_help    $MISSING_DEPENDENCY ;;
53831      port)
53832        port_help    $MISSING_DEPENDENCY ;;
53833      pkgutil)
53834        pkgutil_help $MISSING_DEPENDENCY ;;
53835      pkgadd)
53836        pkgadd_help  $MISSING_DEPENDENCY ;;
53837    esac
53838
53839    if test "x$PKGHANDLER_COMMAND" != x; then
53840      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53841    fi
53842  fi
53843
53844      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53845    else
53846      INCLUDE_DTRACE=true
53847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53848$as_echo "yes, forced" >&6; }
53849    fi
53850  elif test "x$enable_dtrace" = "xno"; then
53851    INCLUDE_DTRACE=false
53852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53853$as_echo "no, forced" >&6; }
53854  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53855    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53856      INCLUDE_DTRACE=false
53857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53858$as_echo "no, missing dependencies" >&6; }
53859    else
53860      INCLUDE_DTRACE=true
53861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53862$as_echo "yes, dependencies present" >&6; }
53863    fi
53864  else
53865    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53866  fi
53867
53868
53869  # Check whether --enable-aot was given.
53870if test "${enable_aot+set}" = set; then :
53871  enableval=$enable_aot;
53872fi
53873
53874
53875  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53876    ENABLE_AOT="true"
53877  elif test "x$enable_aot" = "xyes"; then
53878    ENABLE_AOT="true"
53879  elif test "x$enable_aot" = "xno"; then
53880    ENABLE_AOT="false"
53881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53882$as_echo_n "checking if aot should be enabled... " >&6; }
53883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53884$as_echo "no, forced" >&6; }
53885  else
53886    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53887  fi
53888
53889  if test "x$ENABLE_AOT" = "xtrue"; then
53890    # Only enable AOT on X64 platforms.
53891    if test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
53892      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53893        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53894          ENABLE_AOT="true"
53895        else
53896          ENABLE_AOT="false"
53897          if test "x$enable_aot" = "xyes"; then
53898            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53899          fi
53900        fi
53901      else
53902        ENABLE_AOT="false"
53903        if test "x$enable_aot" = "xyes"; then
53904          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53905        fi
53906      fi
53907    else
53908      ENABLE_AOT="false"
53909      if test "x$enable_aot" = "xyes"; then
53910        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
53911      fi
53912    fi
53913  fi
53914
53915
53916
53917
53918  # Check whether --enable-hotspot-gtest was given.
53919if test "${enable_hotspot_gtest+set}" = set; then :
53920  enableval=$enable_hotspot_gtest;
53921fi
53922
53923
53924  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53925    GTEST_DIR_EXISTS="true"
53926  else
53927    GTEST_DIR_EXISTS="false"
53928  fi
53929
53930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53931$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53932  if test "x$enable_hotspot_gtest" = "xyes"; then
53933    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53935$as_echo "yes, forced" >&6; }
53936      BUILD_GTEST="true"
53937    else
53938      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53939    fi
53940  elif test "x$enable_hotspot_gtest" = "xno"; then
53941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53942$as_echo "no, forced" >&6; }
53943    BUILD_GTEST="false"
53944  elif test "x$enable_hotspot_gtest" = "x"; then
53945    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53947$as_echo "yes" >&6; }
53948      BUILD_GTEST="true"
53949    else
53950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53951$as_echo "no" >&6; }
53952      BUILD_GTEST="false"
53953    fi
53954  else
53955    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53956  fi
53957
53958
53959
53960
53961###############################################################################
53962#
53963# Check dependencies for external and internal libraries.
53964#
53965###############################################################################
53966
53967# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53968
53969  # When using cygwin or msys, we need a wrapper binary that renames
53970  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53971  # @files and rewrites these too! This wrapper binary is
53972  # called fixpath.
53973  FIXPATH=
53974  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53976$as_echo_n "checking if fixpath can be created... " >&6; }
53977    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53978    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53979    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53980    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53981      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53982      FIXPATH="$FIXPATH_BIN -c"
53983    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53984      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53985      # @ was chosen as separator to minimize risk of other tools messing around with it
53986      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53987          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53988      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53989      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53990    fi
53991    FIXPATH_SRC_W="$FIXPATH_SRC"
53992    FIXPATH_BIN_W="$FIXPATH_BIN"
53993
53994  unix_path="$FIXPATH_SRC_W"
53995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53996    windows_path=`$CYGPATH -m "$unix_path"`
53997    FIXPATH_SRC_W="$windows_path"
53998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53999    windows_path=`cmd //c echo $unix_path`
54000    FIXPATH_SRC_W="$windows_path"
54001  fi
54002
54003
54004  unix_path="$FIXPATH_BIN_W"
54005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54006    windows_path=`$CYGPATH -m "$unix_path"`
54007    FIXPATH_BIN_W="$windows_path"
54008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54009    windows_path=`cmd //c echo $unix_path`
54010    FIXPATH_BIN_W="$windows_path"
54011  fi
54012
54013    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54014    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54015    cd $FIXPATH_DIR
54016    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54017    cd $CURDIR
54018
54019    if test ! -x $FIXPATH_BIN; then
54020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54021$as_echo "no" >&6; }
54022      cat $FIXPATH_DIR/fixpath1.log
54023      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54024    fi
54025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54026$as_echo "yes" >&6; }
54027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54028$as_echo_n "checking if fixpath.exe works... " >&6; }
54029    cd $FIXPATH_DIR
54030    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54031        > $FIXPATH_DIR/fixpath2.log 2>&1
54032    cd $CURDIR
54033    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54035$as_echo "no" >&6; }
54036      cat $FIXPATH_DIR/fixpath2.log
54037      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54038    fi
54039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54040$as_echo "yes" >&6; }
54041
54042    FIXPATH_DETACH_FLAG="--detach"
54043  fi
54044
54045
54046
54047
54048
54049
54050  # Check if X11 is needed
54051  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54052    # No X11 support on windows or macosx
54053    NEEDS_LIB_X11=false
54054  else
54055    # All other instances need X11, even if building headless only, libawt still
54056    # needs X11 headers.
54057    NEEDS_LIB_X11=true
54058  fi
54059
54060  # Check if cups is needed
54061  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54062    # Windows have a separate print system
54063    NEEDS_LIB_CUPS=false
54064  else
54065    NEEDS_LIB_CUPS=true
54066  fi
54067
54068  # A custom hook may have set this already
54069  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54070    NEEDS_LIB_FREETYPE=true
54071  fi
54072
54073  # Check if alsa is needed
54074  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54075    NEEDS_LIB_ALSA=true
54076  else
54077    NEEDS_LIB_ALSA=false
54078  fi
54079
54080  # Check if ffi is needed
54081  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54082    NEEDS_LIB_FFI=true
54083  else
54084    NEEDS_LIB_FFI=false
54085  fi
54086
54087
54088  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54089  # dynamic build is configured on command line.
54090
54091# Check whether --with-stdc++lib was given.
54092if test "${with_stdc__lib+set}" = set; then :
54093  withval=$with_stdc__lib;
54094        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54095                && test "x$with_stdc__lib" != xdefault; then
54096          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54097        fi
54098
54099else
54100  with_stdc__lib=default
54101
54102fi
54103
54104
54105  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54106    # Test if stdc++ can be linked statically.
54107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54108$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54109    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54110    ac_ext=cpp
54111ac_cpp='$CXXCPP $CPPFLAGS'
54112ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54113ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54114ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54115
54116    OLD_LIBS="$LIBS"
54117    LIBS="$STATIC_STDCXX_FLAGS"
54118    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54119/* end confdefs.h.  */
54120
54121int
54122main ()
54123{
54124return 0;
54125  ;
54126  return 0;
54127}
54128_ACEOF
54129if ac_fn_cxx_try_link "$LINENO"; then :
54130  has_static_libstdcxx=yes
54131else
54132  has_static_libstdcxx=no
54133fi
54134rm -f core conftest.err conftest.$ac_objext \
54135    conftest$ac_exeext conftest.$ac_ext
54136    LIBS="$OLD_LIBS"
54137    ac_ext=cpp
54138ac_cpp='$CXXCPP $CPPFLAGS'
54139ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54140ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54141ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54142
54143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54144$as_echo "$has_static_libstdcxx" >&6; }
54145
54146    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54147      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54148    fi
54149
54150    # If dynamic was requested, it's available since it would fail above otherwise.
54151    # If dynamic wasn't requested, go with static unless it isn't available.
54152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54153$as_echo_n "checking how to link with libstdc++... " >&6; }
54154    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54155        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54157$as_echo "dynamic" >&6; }
54158    else
54159      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54160      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54161      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54162      # just use the same setting as for the TARGET toolchain.
54163      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54165$as_echo "static" >&6; }
54166    fi
54167  fi
54168
54169  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54170  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54171    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54172  fi
54173
54174
54175
54176  # Setup Windows runtime dlls
54177  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54178
54179
54180# Check whether --with-msvcr-dll was given.
54181if test "${with_msvcr_dll+set}" = set; then :
54182  withval=$with_msvcr_dll;
54183fi
54184
54185
54186  if test "x$with_msvcr_dll" != x; then
54187    # If given explicitly by user, do not probe. If not present, fail directly.
54188
54189  DLL_NAME="$MSVCR_NAME"
54190  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54191  METHOD="--with-msvcr-dll"
54192  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54193    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54194$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54195
54196    # Need to check if the found msvcr is correct architecture
54197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54198$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54199    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54201      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54202      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54203      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54204        CORRECT_MSVCR_ARCH="PE32 executable"
54205      else
54206        CORRECT_MSVCR_ARCH="PE32+ executable"
54207      fi
54208    else
54209      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54210        CORRECT_MSVCR_ARCH=386
54211      else
54212        CORRECT_MSVCR_ARCH=x86-64
54213      fi
54214    fi
54215    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54217$as_echo "ok" >&6; }
54218      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54219
54220  # Only process if variable expands to non-empty
54221
54222  if test "x$MSVC_DLL" != x; then
54223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54224
54225  # Input might be given as Windows format, start by converting to
54226  # unix format.
54227  path="$MSVC_DLL"
54228  new_path=`$CYGPATH -u "$path"`
54229
54230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54233  # "foo.exe" is OK but "foo" is an error.
54234  #
54235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54236  # It is also a way to make sure we got the proper file name for the real test later on.
54237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54238  if test "x$test_shortpath" = x; then
54239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54240$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54241    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54242  fi
54243
54244  # Call helper function which possibly converts this using DOS-style short mode.
54245  # If so, the updated path is stored in $new_path.
54246
54247  input_path="$new_path"
54248  # Check if we need to convert this using DOS-style short mode. If the path
54249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54250  # take no chances and rewrite it.
54251  # Note: m4 eats our [], so we need to use [ and ] instead.
54252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54253  if test "x$has_forbidden_chars" != x; then
54254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54258      # Going to short mode and back again did indeed matter. Since short mode is
54259      # case insensitive, let's make it lowercase to improve readability.
54260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54261      # Now convert it back to Unix-style (cygpath)
54262      input_path=`$CYGPATH -u "$shortmode_path"`
54263      new_path="$input_path"
54264    fi
54265  fi
54266
54267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54268  if test "x$test_cygdrive_prefix" = x; then
54269    # As a simple fix, exclude /usr/bin since it's not a real path.
54270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54272      # a path prefixed by /cygdrive for fixpath to work.
54273      new_path="$CYGWIN_ROOT_PATH$input_path"
54274    fi
54275  fi
54276
54277
54278  if test "x$path" != "x$new_path"; then
54279    MSVC_DLL="$new_path"
54280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54281$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54282  fi
54283
54284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54285
54286  path="$MSVC_DLL"
54287  has_colon=`$ECHO $path | $GREP ^.:`
54288  new_path="$path"
54289  if test "x$has_colon" = x; then
54290    # Not in mixed or Windows style, start by that.
54291    new_path=`cmd //c echo $path`
54292  fi
54293
54294
54295  input_path="$new_path"
54296  # Check if we need to convert this using DOS-style short mode. If the path
54297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54298  # take no chances and rewrite it.
54299  # Note: m4 eats our [], so we need to use [ and ] instead.
54300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54301  if test "x$has_forbidden_chars" != x; then
54302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54304  fi
54305
54306
54307  windows_path="$new_path"
54308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54309    unix_path=`$CYGPATH -u "$windows_path"`
54310    new_path="$unix_path"
54311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54313    new_path="$unix_path"
54314  fi
54315
54316  if test "x$path" != "x$new_path"; then
54317    MSVC_DLL="$new_path"
54318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54319$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54320  fi
54321
54322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54324
54325    else
54326      # We're on a unix platform. Hooray! :)
54327      path="$MSVC_DLL"
54328      has_space=`$ECHO "$path" | $GREP " "`
54329      if test "x$has_space" != x; then
54330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54331$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54333      fi
54334
54335      # Use eval to expand a potential ~
54336      eval path="$path"
54337      if test ! -f "$path" && test ! -d "$path"; then
54338        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54339      fi
54340
54341      if test -d "$path"; then
54342        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54343      else
54344        dir="`$DIRNAME "$path"`"
54345        base="`$BASENAME "$path"`"
54346        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54347      fi
54348    fi
54349  fi
54350
54351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54352$as_echo_n "checking for $DLL_NAME... " >&6; }
54353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54354$as_echo "$MSVC_DLL" >&6; }
54355    else
54356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54357$as_echo "incorrect, ignoring" >&6; }
54358      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54359$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54360    fi
54361  fi
54362
54363    if test "x$MSVC_DLL" = x; then
54364      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54365    fi
54366    MSVCR_DLL="$MSVC_DLL"
54367  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54368
54369  DLL_NAME="$MSVCR_NAME"
54370  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54371  METHOD="devkit"
54372  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54373    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54374$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54375
54376    # Need to check if the found msvcr is correct architecture
54377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54378$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54379    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54381      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54382      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54383      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54384        CORRECT_MSVCR_ARCH="PE32 executable"
54385      else
54386        CORRECT_MSVCR_ARCH="PE32+ executable"
54387      fi
54388    else
54389      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54390        CORRECT_MSVCR_ARCH=386
54391      else
54392        CORRECT_MSVCR_ARCH=x86-64
54393      fi
54394    fi
54395    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54397$as_echo "ok" >&6; }
54398      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54399
54400  # Only process if variable expands to non-empty
54401
54402  if test "x$MSVC_DLL" != x; then
54403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54404
54405  # Input might be given as Windows format, start by converting to
54406  # unix format.
54407  path="$MSVC_DLL"
54408  new_path=`$CYGPATH -u "$path"`
54409
54410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54413  # "foo.exe" is OK but "foo" is an error.
54414  #
54415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54416  # It is also a way to make sure we got the proper file name for the real test later on.
54417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54418  if test "x$test_shortpath" = x; then
54419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54420$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54421    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54422  fi
54423
54424  # Call helper function which possibly converts this using DOS-style short mode.
54425  # If so, the updated path is stored in $new_path.
54426
54427  input_path="$new_path"
54428  # Check if we need to convert this using DOS-style short mode. If the path
54429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54430  # take no chances and rewrite it.
54431  # Note: m4 eats our [], so we need to use [ and ] instead.
54432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54433  if test "x$has_forbidden_chars" != x; then
54434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54438      # Going to short mode and back again did indeed matter. Since short mode is
54439      # case insensitive, let's make it lowercase to improve readability.
54440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54441      # Now convert it back to Unix-style (cygpath)
54442      input_path=`$CYGPATH -u "$shortmode_path"`
54443      new_path="$input_path"
54444    fi
54445  fi
54446
54447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54448  if test "x$test_cygdrive_prefix" = x; then
54449    # As a simple fix, exclude /usr/bin since it's not a real path.
54450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54452      # a path prefixed by /cygdrive for fixpath to work.
54453      new_path="$CYGWIN_ROOT_PATH$input_path"
54454    fi
54455  fi
54456
54457
54458  if test "x$path" != "x$new_path"; then
54459    MSVC_DLL="$new_path"
54460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54461$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54462  fi
54463
54464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54465
54466  path="$MSVC_DLL"
54467  has_colon=`$ECHO $path | $GREP ^.:`
54468  new_path="$path"
54469  if test "x$has_colon" = x; then
54470    # Not in mixed or Windows style, start by that.
54471    new_path=`cmd //c echo $path`
54472  fi
54473
54474
54475  input_path="$new_path"
54476  # Check if we need to convert this using DOS-style short mode. If the path
54477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54478  # take no chances and rewrite it.
54479  # Note: m4 eats our [], so we need to use [ and ] instead.
54480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54481  if test "x$has_forbidden_chars" != x; then
54482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54484  fi
54485
54486
54487  windows_path="$new_path"
54488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54489    unix_path=`$CYGPATH -u "$windows_path"`
54490    new_path="$unix_path"
54491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54493    new_path="$unix_path"
54494  fi
54495
54496  if test "x$path" != "x$new_path"; then
54497    MSVC_DLL="$new_path"
54498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54499$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54500  fi
54501
54502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54504
54505    else
54506      # We're on a unix platform. Hooray! :)
54507      path="$MSVC_DLL"
54508      has_space=`$ECHO "$path" | $GREP " "`
54509      if test "x$has_space" != x; then
54510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54511$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54513      fi
54514
54515      # Use eval to expand a potential ~
54516      eval path="$path"
54517      if test ! -f "$path" && test ! -d "$path"; then
54518        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54519      fi
54520
54521      if test -d "$path"; then
54522        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54523      else
54524        dir="`$DIRNAME "$path"`"
54525        base="`$BASENAME "$path"`"
54526        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54527      fi
54528    fi
54529  fi
54530
54531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54532$as_echo_n "checking for $DLL_NAME... " >&6; }
54533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54534$as_echo "$MSVC_DLL" >&6; }
54535    else
54536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54537$as_echo "incorrect, ignoring" >&6; }
54538      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54539$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54540    fi
54541  fi
54542
54543    if test "x$MSVC_DLL" = x; then
54544      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54545    fi
54546    MSVCR_DLL="$MSVC_DLL"
54547  else
54548
54549  DLL_NAME="${MSVCR_NAME}"
54550  MSVC_DLL=
54551
54552  if test "x$MSVC_DLL" = x; then
54553    # Probe: Using well-known location from Visual Studio 10.0
54554    if test "x$VCINSTALLDIR" != x; then
54555      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54556
54557  windows_path="$CYGWIN_VC_INSTALL_DIR"
54558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54559    unix_path=`$CYGPATH -u "$windows_path"`
54560    CYGWIN_VC_INSTALL_DIR="$unix_path"
54561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54563    CYGWIN_VC_INSTALL_DIR="$unix_path"
54564  fi
54565
54566      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54567        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54568      else
54569        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54570      fi
54571      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54572
54573  DLL_NAME="$DLL_NAME"
54574  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54575  METHOD="well-known location in VCINSTALLDIR"
54576  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54578$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54579
54580    # Need to check if the found msvcr is correct architecture
54581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54582$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54583    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54585      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54586      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54587      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54588        CORRECT_MSVCR_ARCH="PE32 executable"
54589      else
54590        CORRECT_MSVCR_ARCH="PE32+ executable"
54591      fi
54592    else
54593      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54594        CORRECT_MSVCR_ARCH=386
54595      else
54596        CORRECT_MSVCR_ARCH=x86-64
54597      fi
54598    fi
54599    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54601$as_echo "ok" >&6; }
54602      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54603
54604  # Only process if variable expands to non-empty
54605
54606  if test "x$MSVC_DLL" != x; then
54607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54608
54609  # Input might be given as Windows format, start by converting to
54610  # unix format.
54611  path="$MSVC_DLL"
54612  new_path=`$CYGPATH -u "$path"`
54613
54614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54617  # "foo.exe" is OK but "foo" is an error.
54618  #
54619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54620  # It is also a way to make sure we got the proper file name for the real test later on.
54621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54622  if test "x$test_shortpath" = x; then
54623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54624$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54625    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54626  fi
54627
54628  # Call helper function which possibly converts this using DOS-style short mode.
54629  # If so, the updated path is stored in $new_path.
54630
54631  input_path="$new_path"
54632  # Check if we need to convert this using DOS-style short mode. If the path
54633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54634  # take no chances and rewrite it.
54635  # Note: m4 eats our [], so we need to use [ and ] instead.
54636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54637  if test "x$has_forbidden_chars" != x; then
54638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54642      # Going to short mode and back again did indeed matter. Since short mode is
54643      # case insensitive, let's make it lowercase to improve readability.
54644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54645      # Now convert it back to Unix-style (cygpath)
54646      input_path=`$CYGPATH -u "$shortmode_path"`
54647      new_path="$input_path"
54648    fi
54649  fi
54650
54651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54652  if test "x$test_cygdrive_prefix" = x; then
54653    # As a simple fix, exclude /usr/bin since it's not a real path.
54654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54656      # a path prefixed by /cygdrive for fixpath to work.
54657      new_path="$CYGWIN_ROOT_PATH$input_path"
54658    fi
54659  fi
54660
54661
54662  if test "x$path" != "x$new_path"; then
54663    MSVC_DLL="$new_path"
54664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54666  fi
54667
54668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54669
54670  path="$MSVC_DLL"
54671  has_colon=`$ECHO $path | $GREP ^.:`
54672  new_path="$path"
54673  if test "x$has_colon" = x; then
54674    # Not in mixed or Windows style, start by that.
54675    new_path=`cmd //c echo $path`
54676  fi
54677
54678
54679  input_path="$new_path"
54680  # Check if we need to convert this using DOS-style short mode. If the path
54681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54682  # take no chances and rewrite it.
54683  # Note: m4 eats our [], so we need to use [ and ] instead.
54684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54685  if test "x$has_forbidden_chars" != x; then
54686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54688  fi
54689
54690
54691  windows_path="$new_path"
54692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54693    unix_path=`$CYGPATH -u "$windows_path"`
54694    new_path="$unix_path"
54695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54697    new_path="$unix_path"
54698  fi
54699
54700  if test "x$path" != "x$new_path"; then
54701    MSVC_DLL="$new_path"
54702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54704  fi
54705
54706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54708
54709    else
54710      # We're on a unix platform. Hooray! :)
54711      path="$MSVC_DLL"
54712      has_space=`$ECHO "$path" | $GREP " "`
54713      if test "x$has_space" != x; then
54714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54715$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54717      fi
54718
54719      # Use eval to expand a potential ~
54720      eval path="$path"
54721      if test ! -f "$path" && test ! -d "$path"; then
54722        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54723      fi
54724
54725      if test -d "$path"; then
54726        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54727      else
54728        dir="`$DIRNAME "$path"`"
54729        base="`$BASENAME "$path"`"
54730        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54731      fi
54732    fi
54733  fi
54734
54735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54736$as_echo_n "checking for $DLL_NAME... " >&6; }
54737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54738$as_echo "$MSVC_DLL" >&6; }
54739    else
54740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54741$as_echo "incorrect, ignoring" >&6; }
54742      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54743$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54744    fi
54745  fi
54746
54747    fi
54748  fi
54749
54750  if test "x$MSVC_DLL" = x; then
54751    # Probe: Check in the Boot JDK directory.
54752    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54753
54754  DLL_NAME="$DLL_NAME"
54755  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54756  METHOD="well-known location in Boot JDK"
54757  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54759$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54760
54761    # Need to check if the found msvcr is correct architecture
54762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54763$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54764    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54766      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54767      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54769        CORRECT_MSVCR_ARCH="PE32 executable"
54770      else
54771        CORRECT_MSVCR_ARCH="PE32+ executable"
54772      fi
54773    else
54774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54775        CORRECT_MSVCR_ARCH=386
54776      else
54777        CORRECT_MSVCR_ARCH=x86-64
54778      fi
54779    fi
54780    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54782$as_echo "ok" >&6; }
54783      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54784
54785  # Only process if variable expands to non-empty
54786
54787  if test "x$MSVC_DLL" != x; then
54788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54789
54790  # Input might be given as Windows format, start by converting to
54791  # unix format.
54792  path="$MSVC_DLL"
54793  new_path=`$CYGPATH -u "$path"`
54794
54795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54798  # "foo.exe" is OK but "foo" is an error.
54799  #
54800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54801  # It is also a way to make sure we got the proper file name for the real test later on.
54802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54803  if test "x$test_shortpath" = x; then
54804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54806    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54807  fi
54808
54809  # Call helper function which possibly converts this using DOS-style short mode.
54810  # If so, the updated path is stored in $new_path.
54811
54812  input_path="$new_path"
54813  # Check if we need to convert this using DOS-style short mode. If the path
54814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54815  # take no chances and rewrite it.
54816  # Note: m4 eats our [], so we need to use [ and ] instead.
54817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54818  if test "x$has_forbidden_chars" != x; then
54819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54823      # Going to short mode and back again did indeed matter. Since short mode is
54824      # case insensitive, let's make it lowercase to improve readability.
54825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54826      # Now convert it back to Unix-style (cygpath)
54827      input_path=`$CYGPATH -u "$shortmode_path"`
54828      new_path="$input_path"
54829    fi
54830  fi
54831
54832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54833  if test "x$test_cygdrive_prefix" = x; then
54834    # As a simple fix, exclude /usr/bin since it's not a real path.
54835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54837      # a path prefixed by /cygdrive for fixpath to work.
54838      new_path="$CYGWIN_ROOT_PATH$input_path"
54839    fi
54840  fi
54841
54842
54843  if test "x$path" != "x$new_path"; then
54844    MSVC_DLL="$new_path"
54845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54847  fi
54848
54849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54850
54851  path="$MSVC_DLL"
54852  has_colon=`$ECHO $path | $GREP ^.:`
54853  new_path="$path"
54854  if test "x$has_colon" = x; then
54855    # Not in mixed or Windows style, start by that.
54856    new_path=`cmd //c echo $path`
54857  fi
54858
54859
54860  input_path="$new_path"
54861  # Check if we need to convert this using DOS-style short mode. If the path
54862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54863  # take no chances and rewrite it.
54864  # Note: m4 eats our [], so we need to use [ and ] instead.
54865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54866  if test "x$has_forbidden_chars" != x; then
54867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54869  fi
54870
54871
54872  windows_path="$new_path"
54873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54874    unix_path=`$CYGPATH -u "$windows_path"`
54875    new_path="$unix_path"
54876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54878    new_path="$unix_path"
54879  fi
54880
54881  if test "x$path" != "x$new_path"; then
54882    MSVC_DLL="$new_path"
54883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54885  fi
54886
54887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54889
54890    else
54891      # We're on a unix platform. Hooray! :)
54892      path="$MSVC_DLL"
54893      has_space=`$ECHO "$path" | $GREP " "`
54894      if test "x$has_space" != x; then
54895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54896$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54898      fi
54899
54900      # Use eval to expand a potential ~
54901      eval path="$path"
54902      if test ! -f "$path" && test ! -d "$path"; then
54903        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54904      fi
54905
54906      if test -d "$path"; then
54907        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54908      else
54909        dir="`$DIRNAME "$path"`"
54910        base="`$BASENAME "$path"`"
54911        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54912      fi
54913    fi
54914  fi
54915
54916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54917$as_echo_n "checking for $DLL_NAME... " >&6; }
54918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54919$as_echo "$MSVC_DLL" >&6; }
54920    else
54921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54922$as_echo "incorrect, ignoring" >&6; }
54923      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54924$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54925    fi
54926  fi
54927
54928  fi
54929
54930  if test "x$MSVC_DLL" = x; then
54931    # Probe: Look in the Windows system32 directory
54932    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54933
54934  windows_path="$CYGWIN_SYSTEMROOT"
54935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54936    unix_path=`$CYGPATH -u "$windows_path"`
54937    CYGWIN_SYSTEMROOT="$unix_path"
54938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54940    CYGWIN_SYSTEMROOT="$unix_path"
54941  fi
54942
54943    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54944
54945  DLL_NAME="$DLL_NAME"
54946  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54947  METHOD="well-known location in SYSTEMROOT"
54948  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54950$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54951
54952    # Need to check if the found msvcr is correct architecture
54953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54954$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54955    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54957      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54958      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54959      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54960        CORRECT_MSVCR_ARCH="PE32 executable"
54961      else
54962        CORRECT_MSVCR_ARCH="PE32+ executable"
54963      fi
54964    else
54965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54966        CORRECT_MSVCR_ARCH=386
54967      else
54968        CORRECT_MSVCR_ARCH=x86-64
54969      fi
54970    fi
54971    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54973$as_echo "ok" >&6; }
54974      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54975
54976  # Only process if variable expands to non-empty
54977
54978  if test "x$MSVC_DLL" != x; then
54979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54980
54981  # Input might be given as Windows format, start by converting to
54982  # unix format.
54983  path="$MSVC_DLL"
54984  new_path=`$CYGPATH -u "$path"`
54985
54986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54989  # "foo.exe" is OK but "foo" is an error.
54990  #
54991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54992  # It is also a way to make sure we got the proper file name for the real test later on.
54993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54994  if test "x$test_shortpath" = x; then
54995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54997    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54998  fi
54999
55000  # Call helper function which possibly converts this using DOS-style short mode.
55001  # If so, the updated path is stored in $new_path.
55002
55003  input_path="$new_path"
55004  # Check if we need to convert this using DOS-style short mode. If the path
55005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55006  # take no chances and rewrite it.
55007  # Note: m4 eats our [], so we need to use [ and ] instead.
55008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55009  if test "x$has_forbidden_chars" != x; then
55010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55014      # Going to short mode and back again did indeed matter. Since short mode is
55015      # case insensitive, let's make it lowercase to improve readability.
55016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55017      # Now convert it back to Unix-style (cygpath)
55018      input_path=`$CYGPATH -u "$shortmode_path"`
55019      new_path="$input_path"
55020    fi
55021  fi
55022
55023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55024  if test "x$test_cygdrive_prefix" = x; then
55025    # As a simple fix, exclude /usr/bin since it's not a real path.
55026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55028      # a path prefixed by /cygdrive for fixpath to work.
55029      new_path="$CYGWIN_ROOT_PATH$input_path"
55030    fi
55031  fi
55032
55033
55034  if test "x$path" != "x$new_path"; then
55035    MSVC_DLL="$new_path"
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55038  fi
55039
55040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55041
55042  path="$MSVC_DLL"
55043  has_colon=`$ECHO $path | $GREP ^.:`
55044  new_path="$path"
55045  if test "x$has_colon" = x; then
55046    # Not in mixed or Windows style, start by that.
55047    new_path=`cmd //c echo $path`
55048  fi
55049
55050
55051  input_path="$new_path"
55052  # Check if we need to convert this using DOS-style short mode. If the path
55053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55054  # take no chances and rewrite it.
55055  # Note: m4 eats our [], so we need to use [ and ] instead.
55056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55057  if test "x$has_forbidden_chars" != x; then
55058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55060  fi
55061
55062
55063  windows_path="$new_path"
55064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55065    unix_path=`$CYGPATH -u "$windows_path"`
55066    new_path="$unix_path"
55067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55069    new_path="$unix_path"
55070  fi
55071
55072  if test "x$path" != "x$new_path"; then
55073    MSVC_DLL="$new_path"
55074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55076  fi
55077
55078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55080
55081    else
55082      # We're on a unix platform. Hooray! :)
55083      path="$MSVC_DLL"
55084      has_space=`$ECHO "$path" | $GREP " "`
55085      if test "x$has_space" != x; then
55086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55087$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55089      fi
55090
55091      # Use eval to expand a potential ~
55092      eval path="$path"
55093      if test ! -f "$path" && test ! -d "$path"; then
55094        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55095      fi
55096
55097      if test -d "$path"; then
55098        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55099      else
55100        dir="`$DIRNAME "$path"`"
55101        base="`$BASENAME "$path"`"
55102        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55103      fi
55104    fi
55105  fi
55106
55107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55108$as_echo_n "checking for $DLL_NAME... " >&6; }
55109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55110$as_echo "$MSVC_DLL" >&6; }
55111    else
55112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55113$as_echo "incorrect, ignoring" >&6; }
55114      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55115$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55116    fi
55117  fi
55118
55119  fi
55120
55121  if test "x$MSVC_DLL" = x; then
55122    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55123    if test "x$VS100COMNTOOLS" != x; then
55124      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55125
55126  windows_path="$CYGWIN_VS_TOOLS_DIR"
55127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55128    unix_path=`$CYGPATH -u "$windows_path"`
55129    CYGWIN_VS_TOOLS_DIR="$unix_path"
55130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55132    CYGWIN_VS_TOOLS_DIR="$unix_path"
55133  fi
55134
55135      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55136        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55137	    | $GREP -i /x64/ | $HEAD --lines 1`
55138      else
55139        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55140	    | $GREP -i /x86/ | $HEAD --lines 1`
55141      fi
55142
55143  DLL_NAME="$DLL_NAME"
55144  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55145  METHOD="search of VS100COMNTOOLS"
55146  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55147    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55148$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55149
55150    # Need to check if the found msvcr is correct architecture
55151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55152$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55153    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55155      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55156      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55158        CORRECT_MSVCR_ARCH="PE32 executable"
55159      else
55160        CORRECT_MSVCR_ARCH="PE32+ executable"
55161      fi
55162    else
55163      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55164        CORRECT_MSVCR_ARCH=386
55165      else
55166        CORRECT_MSVCR_ARCH=x86-64
55167      fi
55168    fi
55169    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55171$as_echo "ok" >&6; }
55172      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55173
55174  # Only process if variable expands to non-empty
55175
55176  if test "x$MSVC_DLL" != x; then
55177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55178
55179  # Input might be given as Windows format, start by converting to
55180  # unix format.
55181  path="$MSVC_DLL"
55182  new_path=`$CYGPATH -u "$path"`
55183
55184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55187  # "foo.exe" is OK but "foo" is an error.
55188  #
55189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55190  # It is also a way to make sure we got the proper file name for the real test later on.
55191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55192  if test "x$test_shortpath" = x; then
55193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55195    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55196  fi
55197
55198  # Call helper function which possibly converts this using DOS-style short mode.
55199  # If so, the updated path is stored in $new_path.
55200
55201  input_path="$new_path"
55202  # Check if we need to convert this using DOS-style short mode. If the path
55203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55204  # take no chances and rewrite it.
55205  # Note: m4 eats our [], so we need to use [ and ] instead.
55206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55207  if test "x$has_forbidden_chars" != x; then
55208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55212      # Going to short mode and back again did indeed matter. Since short mode is
55213      # case insensitive, let's make it lowercase to improve readability.
55214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55215      # Now convert it back to Unix-style (cygpath)
55216      input_path=`$CYGPATH -u "$shortmode_path"`
55217      new_path="$input_path"
55218    fi
55219  fi
55220
55221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55222  if test "x$test_cygdrive_prefix" = x; then
55223    # As a simple fix, exclude /usr/bin since it's not a real path.
55224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55226      # a path prefixed by /cygdrive for fixpath to work.
55227      new_path="$CYGWIN_ROOT_PATH$input_path"
55228    fi
55229  fi
55230
55231
55232  if test "x$path" != "x$new_path"; then
55233    MSVC_DLL="$new_path"
55234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55236  fi
55237
55238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55239
55240  path="$MSVC_DLL"
55241  has_colon=`$ECHO $path | $GREP ^.:`
55242  new_path="$path"
55243  if test "x$has_colon" = x; then
55244    # Not in mixed or Windows style, start by that.
55245    new_path=`cmd //c echo $path`
55246  fi
55247
55248
55249  input_path="$new_path"
55250  # Check if we need to convert this using DOS-style short mode. If the path
55251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55252  # take no chances and rewrite it.
55253  # Note: m4 eats our [], so we need to use [ and ] instead.
55254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55255  if test "x$has_forbidden_chars" != x; then
55256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55258  fi
55259
55260
55261  windows_path="$new_path"
55262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55263    unix_path=`$CYGPATH -u "$windows_path"`
55264    new_path="$unix_path"
55265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55267    new_path="$unix_path"
55268  fi
55269
55270  if test "x$path" != "x$new_path"; then
55271    MSVC_DLL="$new_path"
55272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55274  fi
55275
55276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55278
55279    else
55280      # We're on a unix platform. Hooray! :)
55281      path="$MSVC_DLL"
55282      has_space=`$ECHO "$path" | $GREP " "`
55283      if test "x$has_space" != x; then
55284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55287      fi
55288
55289      # Use eval to expand a potential ~
55290      eval path="$path"
55291      if test ! -f "$path" && test ! -d "$path"; then
55292        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55293      fi
55294
55295      if test -d "$path"; then
55296        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55297      else
55298        dir="`$DIRNAME "$path"`"
55299        base="`$BASENAME "$path"`"
55300        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55301      fi
55302    fi
55303  fi
55304
55305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55306$as_echo_n "checking for $DLL_NAME... " >&6; }
55307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55308$as_echo "$MSVC_DLL" >&6; }
55309    else
55310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55311$as_echo "incorrect, ignoring" >&6; }
55312      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55313$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55314    fi
55315  fi
55316
55317    fi
55318  fi
55319
55320  if test "x$MSVC_DLL" = x; then
55321    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55322    # (This was the original behaviour; kept since it might turn something up)
55323    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55324      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55325        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55326	    | $GREP x64 | $HEAD --lines 1`
55327      else
55328        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55329	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55330        if test "x$POSSIBLE_MSVC_DLL" = x; then
55331          # We're grasping at straws now...
55332          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55333	      | $HEAD --lines 1`
55334        fi
55335      fi
55336
55337
55338  DLL_NAME="$DLL_NAME"
55339  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55340  METHOD="search of VCINSTALLDIR"
55341  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55342    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55343$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55344
55345    # Need to check if the found msvcr is correct architecture
55346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55347$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55348    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55350      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55351      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55352      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55353        CORRECT_MSVCR_ARCH="PE32 executable"
55354      else
55355        CORRECT_MSVCR_ARCH="PE32+ executable"
55356      fi
55357    else
55358      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55359        CORRECT_MSVCR_ARCH=386
55360      else
55361        CORRECT_MSVCR_ARCH=x86-64
55362      fi
55363    fi
55364    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55366$as_echo "ok" >&6; }
55367      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55368
55369  # Only process if variable expands to non-empty
55370
55371  if test "x$MSVC_DLL" != x; then
55372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55373
55374  # Input might be given as Windows format, start by converting to
55375  # unix format.
55376  path="$MSVC_DLL"
55377  new_path=`$CYGPATH -u "$path"`
55378
55379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55382  # "foo.exe" is OK but "foo" is an error.
55383  #
55384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55385  # It is also a way to make sure we got the proper file name for the real test later on.
55386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55387  if test "x$test_shortpath" = x; then
55388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55389$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55390    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55391  fi
55392
55393  # Call helper function which possibly converts this using DOS-style short mode.
55394  # If so, the updated path is stored in $new_path.
55395
55396  input_path="$new_path"
55397  # Check if we need to convert this using DOS-style short mode. If the path
55398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55399  # take no chances and rewrite it.
55400  # Note: m4 eats our [], so we need to use [ and ] instead.
55401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55402  if test "x$has_forbidden_chars" != x; then
55403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55407      # Going to short mode and back again did indeed matter. Since short mode is
55408      # case insensitive, let's make it lowercase to improve readability.
55409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55410      # Now convert it back to Unix-style (cygpath)
55411      input_path=`$CYGPATH -u "$shortmode_path"`
55412      new_path="$input_path"
55413    fi
55414  fi
55415
55416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55417  if test "x$test_cygdrive_prefix" = x; then
55418    # As a simple fix, exclude /usr/bin since it's not a real path.
55419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55421      # a path prefixed by /cygdrive for fixpath to work.
55422      new_path="$CYGWIN_ROOT_PATH$input_path"
55423    fi
55424  fi
55425
55426
55427  if test "x$path" != "x$new_path"; then
55428    MSVC_DLL="$new_path"
55429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55430$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55431  fi
55432
55433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55434
55435  path="$MSVC_DLL"
55436  has_colon=`$ECHO $path | $GREP ^.:`
55437  new_path="$path"
55438  if test "x$has_colon" = x; then
55439    # Not in mixed or Windows style, start by that.
55440    new_path=`cmd //c echo $path`
55441  fi
55442
55443
55444  input_path="$new_path"
55445  # Check if we need to convert this using DOS-style short mode. If the path
55446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55447  # take no chances and rewrite it.
55448  # Note: m4 eats our [], so we need to use [ and ] instead.
55449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55450  if test "x$has_forbidden_chars" != x; then
55451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55453  fi
55454
55455
55456  windows_path="$new_path"
55457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55458    unix_path=`$CYGPATH -u "$windows_path"`
55459    new_path="$unix_path"
55460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55462    new_path="$unix_path"
55463  fi
55464
55465  if test "x$path" != "x$new_path"; then
55466    MSVC_DLL="$new_path"
55467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55469  fi
55470
55471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55473
55474    else
55475      # We're on a unix platform. Hooray! :)
55476      path="$MSVC_DLL"
55477      has_space=`$ECHO "$path" | $GREP " "`
55478      if test "x$has_space" != x; then
55479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55480$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55482      fi
55483
55484      # Use eval to expand a potential ~
55485      eval path="$path"
55486      if test ! -f "$path" && test ! -d "$path"; then
55487        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55488      fi
55489
55490      if test -d "$path"; then
55491        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55492      else
55493        dir="`$DIRNAME "$path"`"
55494        base="`$BASENAME "$path"`"
55495        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55496      fi
55497    fi
55498  fi
55499
55500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55501$as_echo_n "checking for $DLL_NAME... " >&6; }
55502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55503$as_echo "$MSVC_DLL" >&6; }
55504    else
55505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55506$as_echo "incorrect, ignoring" >&6; }
55507      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55508$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55509    fi
55510  fi
55511
55512    fi
55513  fi
55514
55515  if test "x$MSVC_DLL" = x; then
55516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55517$as_echo_n "checking for $DLL_NAME... " >&6; }
55518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55519$as_echo "no" >&6; }
55520    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55521  fi
55522
55523    MSVCR_DLL="$MSVC_DLL"
55524  fi
55525
55526
55527
55528# Check whether --with-msvcp-dll was given.
55529if test "${with_msvcp_dll+set}" = set; then :
55530  withval=$with_msvcp_dll;
55531fi
55532
55533
55534  if test "x$MSVCP_NAME" != "x"; then
55535    if test "x$with_msvcp_dll" != x; then
55536      # If given explicitly by user, do not probe. If not present, fail directly.
55537
55538  DLL_NAME="$MSVCP_NAME"
55539  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55540  METHOD="--with-msvcp-dll"
55541  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55542    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55543$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55544
55545    # Need to check if the found msvcr is correct architecture
55546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55547$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55548    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55550      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55551      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55552      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55553        CORRECT_MSVCR_ARCH="PE32 executable"
55554      else
55555        CORRECT_MSVCR_ARCH="PE32+ executable"
55556      fi
55557    else
55558      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55559        CORRECT_MSVCR_ARCH=386
55560      else
55561        CORRECT_MSVCR_ARCH=x86-64
55562      fi
55563    fi
55564    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55566$as_echo "ok" >&6; }
55567      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55568
55569  # Only process if variable expands to non-empty
55570
55571  if test "x$MSVC_DLL" != x; then
55572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55573
55574  # Input might be given as Windows format, start by converting to
55575  # unix format.
55576  path="$MSVC_DLL"
55577  new_path=`$CYGPATH -u "$path"`
55578
55579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55582  # "foo.exe" is OK but "foo" is an error.
55583  #
55584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55585  # It is also a way to make sure we got the proper file name for the real test later on.
55586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55587  if test "x$test_shortpath" = x; then
55588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55589$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55590    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55591  fi
55592
55593  # Call helper function which possibly converts this using DOS-style short mode.
55594  # If so, the updated path is stored in $new_path.
55595
55596  input_path="$new_path"
55597  # Check if we need to convert this using DOS-style short mode. If the path
55598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55599  # take no chances and rewrite it.
55600  # Note: m4 eats our [], so we need to use [ and ] instead.
55601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55602  if test "x$has_forbidden_chars" != x; then
55603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55607      # Going to short mode and back again did indeed matter. Since short mode is
55608      # case insensitive, let's make it lowercase to improve readability.
55609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55610      # Now convert it back to Unix-style (cygpath)
55611      input_path=`$CYGPATH -u "$shortmode_path"`
55612      new_path="$input_path"
55613    fi
55614  fi
55615
55616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55617  if test "x$test_cygdrive_prefix" = x; then
55618    # As a simple fix, exclude /usr/bin since it's not a real path.
55619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55621      # a path prefixed by /cygdrive for fixpath to work.
55622      new_path="$CYGWIN_ROOT_PATH$input_path"
55623    fi
55624  fi
55625
55626
55627  if test "x$path" != "x$new_path"; then
55628    MSVC_DLL="$new_path"
55629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55630$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55631  fi
55632
55633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55634
55635  path="$MSVC_DLL"
55636  has_colon=`$ECHO $path | $GREP ^.:`
55637  new_path="$path"
55638  if test "x$has_colon" = x; then
55639    # Not in mixed or Windows style, start by that.
55640    new_path=`cmd //c echo $path`
55641  fi
55642
55643
55644  input_path="$new_path"
55645  # Check if we need to convert this using DOS-style short mode. If the path
55646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55647  # take no chances and rewrite it.
55648  # Note: m4 eats our [], so we need to use [ and ] instead.
55649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55650  if test "x$has_forbidden_chars" != x; then
55651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55653  fi
55654
55655
55656  windows_path="$new_path"
55657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55658    unix_path=`$CYGPATH -u "$windows_path"`
55659    new_path="$unix_path"
55660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55662    new_path="$unix_path"
55663  fi
55664
55665  if test "x$path" != "x$new_path"; then
55666    MSVC_DLL="$new_path"
55667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55668$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55669  fi
55670
55671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55673
55674    else
55675      # We're on a unix platform. Hooray! :)
55676      path="$MSVC_DLL"
55677      has_space=`$ECHO "$path" | $GREP " "`
55678      if test "x$has_space" != x; then
55679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55680$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55682      fi
55683
55684      # Use eval to expand a potential ~
55685      eval path="$path"
55686      if test ! -f "$path" && test ! -d "$path"; then
55687        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55688      fi
55689
55690      if test -d "$path"; then
55691        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55692      else
55693        dir="`$DIRNAME "$path"`"
55694        base="`$BASENAME "$path"`"
55695        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55696      fi
55697    fi
55698  fi
55699
55700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55701$as_echo_n "checking for $DLL_NAME... " >&6; }
55702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55703$as_echo "$MSVC_DLL" >&6; }
55704    else
55705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55706$as_echo "incorrect, ignoring" >&6; }
55707      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55708$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55709    fi
55710  fi
55711
55712      if test "x$MSVC_DLL" = x; then
55713        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55714      fi
55715      MSVCP_DLL="$MSVC_DLL"
55716    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55717
55718  DLL_NAME="$MSVCP_NAME"
55719  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55720  METHOD="devkit"
55721  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55722    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55723$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55724
55725    # Need to check if the found msvcr is correct architecture
55726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55727$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55728    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55730      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55731      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55732      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55733        CORRECT_MSVCR_ARCH="PE32 executable"
55734      else
55735        CORRECT_MSVCR_ARCH="PE32+ executable"
55736      fi
55737    else
55738      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55739        CORRECT_MSVCR_ARCH=386
55740      else
55741        CORRECT_MSVCR_ARCH=x86-64
55742      fi
55743    fi
55744    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55746$as_echo "ok" >&6; }
55747      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55748
55749  # Only process if variable expands to non-empty
55750
55751  if test "x$MSVC_DLL" != x; then
55752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55753
55754  # Input might be given as Windows format, start by converting to
55755  # unix format.
55756  path="$MSVC_DLL"
55757  new_path=`$CYGPATH -u "$path"`
55758
55759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55762  # "foo.exe" is OK but "foo" is an error.
55763  #
55764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55765  # It is also a way to make sure we got the proper file name for the real test later on.
55766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55767  if test "x$test_shortpath" = x; then
55768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55769$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55770    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55771  fi
55772
55773  # Call helper function which possibly converts this using DOS-style short mode.
55774  # If so, the updated path is stored in $new_path.
55775
55776  input_path="$new_path"
55777  # Check if we need to convert this using DOS-style short mode. If the path
55778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55779  # take no chances and rewrite it.
55780  # Note: m4 eats our [], so we need to use [ and ] instead.
55781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55782  if test "x$has_forbidden_chars" != x; then
55783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55787      # Going to short mode and back again did indeed matter. Since short mode is
55788      # case insensitive, let's make it lowercase to improve readability.
55789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55790      # Now convert it back to Unix-style (cygpath)
55791      input_path=`$CYGPATH -u "$shortmode_path"`
55792      new_path="$input_path"
55793    fi
55794  fi
55795
55796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55797  if test "x$test_cygdrive_prefix" = x; then
55798    # As a simple fix, exclude /usr/bin since it's not a real path.
55799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55801      # a path prefixed by /cygdrive for fixpath to work.
55802      new_path="$CYGWIN_ROOT_PATH$input_path"
55803    fi
55804  fi
55805
55806
55807  if test "x$path" != "x$new_path"; then
55808    MSVC_DLL="$new_path"
55809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55810$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55811  fi
55812
55813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55814
55815  path="$MSVC_DLL"
55816  has_colon=`$ECHO $path | $GREP ^.:`
55817  new_path="$path"
55818  if test "x$has_colon" = x; then
55819    # Not in mixed or Windows style, start by that.
55820    new_path=`cmd //c echo $path`
55821  fi
55822
55823
55824  input_path="$new_path"
55825  # Check if we need to convert this using DOS-style short mode. If the path
55826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55827  # take no chances and rewrite it.
55828  # Note: m4 eats our [], so we need to use [ and ] instead.
55829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55830  if test "x$has_forbidden_chars" != x; then
55831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55833  fi
55834
55835
55836  windows_path="$new_path"
55837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55838    unix_path=`$CYGPATH -u "$windows_path"`
55839    new_path="$unix_path"
55840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55842    new_path="$unix_path"
55843  fi
55844
55845  if test "x$path" != "x$new_path"; then
55846    MSVC_DLL="$new_path"
55847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55848$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55849  fi
55850
55851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55853
55854    else
55855      # We're on a unix platform. Hooray! :)
55856      path="$MSVC_DLL"
55857      has_space=`$ECHO "$path" | $GREP " "`
55858      if test "x$has_space" != x; then
55859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55860$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55862      fi
55863
55864      # Use eval to expand a potential ~
55865      eval path="$path"
55866      if test ! -f "$path" && test ! -d "$path"; then
55867        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55868      fi
55869
55870      if test -d "$path"; then
55871        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55872      else
55873        dir="`$DIRNAME "$path"`"
55874        base="`$BASENAME "$path"`"
55875        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55876      fi
55877    fi
55878  fi
55879
55880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55881$as_echo_n "checking for $DLL_NAME... " >&6; }
55882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55883$as_echo "$MSVC_DLL" >&6; }
55884    else
55885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55886$as_echo "incorrect, ignoring" >&6; }
55887      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55888$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55889    fi
55890  fi
55891
55892      if test "x$MSVC_DLL" = x; then
55893        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55894      fi
55895      MSVCP_DLL="$MSVC_DLL"
55896    else
55897
55898  DLL_NAME="${MSVCP_NAME}"
55899  MSVC_DLL=
55900
55901  if test "x$MSVC_DLL" = x; then
55902    # Probe: Using well-known location from Visual Studio 10.0
55903    if test "x$VCINSTALLDIR" != x; then
55904      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55905
55906  windows_path="$CYGWIN_VC_INSTALL_DIR"
55907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55908    unix_path=`$CYGPATH -u "$windows_path"`
55909    CYGWIN_VC_INSTALL_DIR="$unix_path"
55910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55912    CYGWIN_VC_INSTALL_DIR="$unix_path"
55913  fi
55914
55915      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55916        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55917      else
55918        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55919      fi
55920      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55921
55922  DLL_NAME="$DLL_NAME"
55923  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55924  METHOD="well-known location in VCINSTALLDIR"
55925  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55926    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55927$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55928
55929    # Need to check if the found msvcr is correct architecture
55930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55931$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55932    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55934      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55935      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55936      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55937        CORRECT_MSVCR_ARCH="PE32 executable"
55938      else
55939        CORRECT_MSVCR_ARCH="PE32+ executable"
55940      fi
55941    else
55942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55943        CORRECT_MSVCR_ARCH=386
55944      else
55945        CORRECT_MSVCR_ARCH=x86-64
55946      fi
55947    fi
55948    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55950$as_echo "ok" >&6; }
55951      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55952
55953  # Only process if variable expands to non-empty
55954
55955  if test "x$MSVC_DLL" != x; then
55956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55957
55958  # Input might be given as Windows format, start by converting to
55959  # unix format.
55960  path="$MSVC_DLL"
55961  new_path=`$CYGPATH -u "$path"`
55962
55963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55966  # "foo.exe" is OK but "foo" is an error.
55967  #
55968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55969  # It is also a way to make sure we got the proper file name for the real test later on.
55970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55971  if test "x$test_shortpath" = x; then
55972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55973$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55974    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55975  fi
55976
55977  # Call helper function which possibly converts this using DOS-style short mode.
55978  # If so, the updated path is stored in $new_path.
55979
55980  input_path="$new_path"
55981  # Check if we need to convert this using DOS-style short mode. If the path
55982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55983  # take no chances and rewrite it.
55984  # Note: m4 eats our [], so we need to use [ and ] instead.
55985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55986  if test "x$has_forbidden_chars" != x; then
55987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55991      # Going to short mode and back again did indeed matter. Since short mode is
55992      # case insensitive, let's make it lowercase to improve readability.
55993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55994      # Now convert it back to Unix-style (cygpath)
55995      input_path=`$CYGPATH -u "$shortmode_path"`
55996      new_path="$input_path"
55997    fi
55998  fi
55999
56000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56001  if test "x$test_cygdrive_prefix" = x; then
56002    # As a simple fix, exclude /usr/bin since it's not a real path.
56003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56005      # a path prefixed by /cygdrive for fixpath to work.
56006      new_path="$CYGWIN_ROOT_PATH$input_path"
56007    fi
56008  fi
56009
56010
56011  if test "x$path" != "x$new_path"; then
56012    MSVC_DLL="$new_path"
56013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56015  fi
56016
56017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56018
56019  path="$MSVC_DLL"
56020  has_colon=`$ECHO $path | $GREP ^.:`
56021  new_path="$path"
56022  if test "x$has_colon" = x; then
56023    # Not in mixed or Windows style, start by that.
56024    new_path=`cmd //c echo $path`
56025  fi
56026
56027
56028  input_path="$new_path"
56029  # Check if we need to convert this using DOS-style short mode. If the path
56030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56031  # take no chances and rewrite it.
56032  # Note: m4 eats our [], so we need to use [ and ] instead.
56033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56034  if test "x$has_forbidden_chars" != x; then
56035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56037  fi
56038
56039
56040  windows_path="$new_path"
56041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56042    unix_path=`$CYGPATH -u "$windows_path"`
56043    new_path="$unix_path"
56044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56046    new_path="$unix_path"
56047  fi
56048
56049  if test "x$path" != "x$new_path"; then
56050    MSVC_DLL="$new_path"
56051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56052$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56053  fi
56054
56055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56057
56058    else
56059      # We're on a unix platform. Hooray! :)
56060      path="$MSVC_DLL"
56061      has_space=`$ECHO "$path" | $GREP " "`
56062      if test "x$has_space" != x; then
56063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56064$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56066      fi
56067
56068      # Use eval to expand a potential ~
56069      eval path="$path"
56070      if test ! -f "$path" && test ! -d "$path"; then
56071        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56072      fi
56073
56074      if test -d "$path"; then
56075        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56076      else
56077        dir="`$DIRNAME "$path"`"
56078        base="`$BASENAME "$path"`"
56079        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56080      fi
56081    fi
56082  fi
56083
56084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56085$as_echo_n "checking for $DLL_NAME... " >&6; }
56086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56087$as_echo "$MSVC_DLL" >&6; }
56088    else
56089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56090$as_echo "incorrect, ignoring" >&6; }
56091      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56092$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56093    fi
56094  fi
56095
56096    fi
56097  fi
56098
56099  if test "x$MSVC_DLL" = x; then
56100    # Probe: Check in the Boot JDK directory.
56101    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56102
56103  DLL_NAME="$DLL_NAME"
56104  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56105  METHOD="well-known location in Boot JDK"
56106  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56108$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56109
56110    # Need to check if the found msvcr is correct architecture
56111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56112$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56113    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56115      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56116      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56118        CORRECT_MSVCR_ARCH="PE32 executable"
56119      else
56120        CORRECT_MSVCR_ARCH="PE32+ executable"
56121      fi
56122    else
56123      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56124        CORRECT_MSVCR_ARCH=386
56125      else
56126        CORRECT_MSVCR_ARCH=x86-64
56127      fi
56128    fi
56129    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56131$as_echo "ok" >&6; }
56132      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56133
56134  # Only process if variable expands to non-empty
56135
56136  if test "x$MSVC_DLL" != x; then
56137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56138
56139  # Input might be given as Windows format, start by converting to
56140  # unix format.
56141  path="$MSVC_DLL"
56142  new_path=`$CYGPATH -u "$path"`
56143
56144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56147  # "foo.exe" is OK but "foo" is an error.
56148  #
56149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56150  # It is also a way to make sure we got the proper file name for the real test later on.
56151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56152  if test "x$test_shortpath" = x; then
56153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56154$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56155    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56156  fi
56157
56158  # Call helper function which possibly converts this using DOS-style short mode.
56159  # If so, the updated path is stored in $new_path.
56160
56161  input_path="$new_path"
56162  # Check if we need to convert this using DOS-style short mode. If the path
56163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56164  # take no chances and rewrite it.
56165  # Note: m4 eats our [], so we need to use [ and ] instead.
56166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56167  if test "x$has_forbidden_chars" != x; then
56168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56172      # Going to short mode and back again did indeed matter. Since short mode is
56173      # case insensitive, let's make it lowercase to improve readability.
56174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56175      # Now convert it back to Unix-style (cygpath)
56176      input_path=`$CYGPATH -u "$shortmode_path"`
56177      new_path="$input_path"
56178    fi
56179  fi
56180
56181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56182  if test "x$test_cygdrive_prefix" = x; then
56183    # As a simple fix, exclude /usr/bin since it's not a real path.
56184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56186      # a path prefixed by /cygdrive for fixpath to work.
56187      new_path="$CYGWIN_ROOT_PATH$input_path"
56188    fi
56189  fi
56190
56191
56192  if test "x$path" != "x$new_path"; then
56193    MSVC_DLL="$new_path"
56194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56196  fi
56197
56198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56199
56200  path="$MSVC_DLL"
56201  has_colon=`$ECHO $path | $GREP ^.:`
56202  new_path="$path"
56203  if test "x$has_colon" = x; then
56204    # Not in mixed or Windows style, start by that.
56205    new_path=`cmd //c echo $path`
56206  fi
56207
56208
56209  input_path="$new_path"
56210  # Check if we need to convert this using DOS-style short mode. If the path
56211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56212  # take no chances and rewrite it.
56213  # Note: m4 eats our [], so we need to use [ and ] instead.
56214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56215  if test "x$has_forbidden_chars" != x; then
56216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56218  fi
56219
56220
56221  windows_path="$new_path"
56222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56223    unix_path=`$CYGPATH -u "$windows_path"`
56224    new_path="$unix_path"
56225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56227    new_path="$unix_path"
56228  fi
56229
56230  if test "x$path" != "x$new_path"; then
56231    MSVC_DLL="$new_path"
56232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56233$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56234  fi
56235
56236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56238
56239    else
56240      # We're on a unix platform. Hooray! :)
56241      path="$MSVC_DLL"
56242      has_space=`$ECHO "$path" | $GREP " "`
56243      if test "x$has_space" != x; then
56244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56245$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56246        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56247      fi
56248
56249      # Use eval to expand a potential ~
56250      eval path="$path"
56251      if test ! -f "$path" && test ! -d "$path"; then
56252        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56253      fi
56254
56255      if test -d "$path"; then
56256        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56257      else
56258        dir="`$DIRNAME "$path"`"
56259        base="`$BASENAME "$path"`"
56260        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56261      fi
56262    fi
56263  fi
56264
56265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56266$as_echo_n "checking for $DLL_NAME... " >&6; }
56267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56268$as_echo "$MSVC_DLL" >&6; }
56269    else
56270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56271$as_echo "incorrect, ignoring" >&6; }
56272      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56273$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56274    fi
56275  fi
56276
56277  fi
56278
56279  if test "x$MSVC_DLL" = x; then
56280    # Probe: Look in the Windows system32 directory
56281    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56282
56283  windows_path="$CYGWIN_SYSTEMROOT"
56284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56285    unix_path=`$CYGPATH -u "$windows_path"`
56286    CYGWIN_SYSTEMROOT="$unix_path"
56287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56289    CYGWIN_SYSTEMROOT="$unix_path"
56290  fi
56291
56292    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56293
56294  DLL_NAME="$DLL_NAME"
56295  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56296  METHOD="well-known location in SYSTEMROOT"
56297  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56298    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56299$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56300
56301    # Need to check if the found msvcr is correct architecture
56302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56303$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56304    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56306      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56307      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56308      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56309        CORRECT_MSVCR_ARCH="PE32 executable"
56310      else
56311        CORRECT_MSVCR_ARCH="PE32+ executable"
56312      fi
56313    else
56314      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56315        CORRECT_MSVCR_ARCH=386
56316      else
56317        CORRECT_MSVCR_ARCH=x86-64
56318      fi
56319    fi
56320    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56322$as_echo "ok" >&6; }
56323      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56324
56325  # Only process if variable expands to non-empty
56326
56327  if test "x$MSVC_DLL" != x; then
56328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56329
56330  # Input might be given as Windows format, start by converting to
56331  # unix format.
56332  path="$MSVC_DLL"
56333  new_path=`$CYGPATH -u "$path"`
56334
56335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56338  # "foo.exe" is OK but "foo" is an error.
56339  #
56340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56341  # It is also a way to make sure we got the proper file name for the real test later on.
56342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56343  if test "x$test_shortpath" = x; then
56344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56345$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56346    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56347  fi
56348
56349  # Call helper function which possibly converts this using DOS-style short mode.
56350  # If so, the updated path is stored in $new_path.
56351
56352  input_path="$new_path"
56353  # Check if we need to convert this using DOS-style short mode. If the path
56354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56355  # take no chances and rewrite it.
56356  # Note: m4 eats our [], so we need to use [ and ] instead.
56357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56358  if test "x$has_forbidden_chars" != x; then
56359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56363      # Going to short mode and back again did indeed matter. Since short mode is
56364      # case insensitive, let's make it lowercase to improve readability.
56365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56366      # Now convert it back to Unix-style (cygpath)
56367      input_path=`$CYGPATH -u "$shortmode_path"`
56368      new_path="$input_path"
56369    fi
56370  fi
56371
56372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56373  if test "x$test_cygdrive_prefix" = x; then
56374    # As a simple fix, exclude /usr/bin since it's not a real path.
56375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56377      # a path prefixed by /cygdrive for fixpath to work.
56378      new_path="$CYGWIN_ROOT_PATH$input_path"
56379    fi
56380  fi
56381
56382
56383  if test "x$path" != "x$new_path"; then
56384    MSVC_DLL="$new_path"
56385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56387  fi
56388
56389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56390
56391  path="$MSVC_DLL"
56392  has_colon=`$ECHO $path | $GREP ^.:`
56393  new_path="$path"
56394  if test "x$has_colon" = x; then
56395    # Not in mixed or Windows style, start by that.
56396    new_path=`cmd //c echo $path`
56397  fi
56398
56399
56400  input_path="$new_path"
56401  # Check if we need to convert this using DOS-style short mode. If the path
56402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56403  # take no chances and rewrite it.
56404  # Note: m4 eats our [], so we need to use [ and ] instead.
56405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56406  if test "x$has_forbidden_chars" != x; then
56407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56409  fi
56410
56411
56412  windows_path="$new_path"
56413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56414    unix_path=`$CYGPATH -u "$windows_path"`
56415    new_path="$unix_path"
56416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56418    new_path="$unix_path"
56419  fi
56420
56421  if test "x$path" != "x$new_path"; then
56422    MSVC_DLL="$new_path"
56423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56424$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56425  fi
56426
56427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56429
56430    else
56431      # We're on a unix platform. Hooray! :)
56432      path="$MSVC_DLL"
56433      has_space=`$ECHO "$path" | $GREP " "`
56434      if test "x$has_space" != x; then
56435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56436$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56438      fi
56439
56440      # Use eval to expand a potential ~
56441      eval path="$path"
56442      if test ! -f "$path" && test ! -d "$path"; then
56443        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56444      fi
56445
56446      if test -d "$path"; then
56447        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56448      else
56449        dir="`$DIRNAME "$path"`"
56450        base="`$BASENAME "$path"`"
56451        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56452      fi
56453    fi
56454  fi
56455
56456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56457$as_echo_n "checking for $DLL_NAME... " >&6; }
56458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56459$as_echo "$MSVC_DLL" >&6; }
56460    else
56461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56462$as_echo "incorrect, ignoring" >&6; }
56463      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56464$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56465    fi
56466  fi
56467
56468  fi
56469
56470  if test "x$MSVC_DLL" = x; then
56471    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56472    if test "x$VS100COMNTOOLS" != x; then
56473      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56474
56475  windows_path="$CYGWIN_VS_TOOLS_DIR"
56476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56477    unix_path=`$CYGPATH -u "$windows_path"`
56478    CYGWIN_VS_TOOLS_DIR="$unix_path"
56479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56481    CYGWIN_VS_TOOLS_DIR="$unix_path"
56482  fi
56483
56484      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56485        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56486	    | $GREP -i /x64/ | $HEAD --lines 1`
56487      else
56488        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56489	    | $GREP -i /x86/ | $HEAD --lines 1`
56490      fi
56491
56492  DLL_NAME="$DLL_NAME"
56493  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56494  METHOD="search of VS100COMNTOOLS"
56495  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56497$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56498
56499    # Need to check if the found msvcr is correct architecture
56500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56501$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56502    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56504      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56505      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56506      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56507        CORRECT_MSVCR_ARCH="PE32 executable"
56508      else
56509        CORRECT_MSVCR_ARCH="PE32+ executable"
56510      fi
56511    else
56512      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56513        CORRECT_MSVCR_ARCH=386
56514      else
56515        CORRECT_MSVCR_ARCH=x86-64
56516      fi
56517    fi
56518    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56520$as_echo "ok" >&6; }
56521      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56522
56523  # Only process if variable expands to non-empty
56524
56525  if test "x$MSVC_DLL" != x; then
56526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56527
56528  # Input might be given as Windows format, start by converting to
56529  # unix format.
56530  path="$MSVC_DLL"
56531  new_path=`$CYGPATH -u "$path"`
56532
56533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56536  # "foo.exe" is OK but "foo" is an error.
56537  #
56538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56539  # It is also a way to make sure we got the proper file name for the real test later on.
56540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56541  if test "x$test_shortpath" = x; then
56542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56543$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56544    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56545  fi
56546
56547  # Call helper function which possibly converts this using DOS-style short mode.
56548  # If so, the updated path is stored in $new_path.
56549
56550  input_path="$new_path"
56551  # Check if we need to convert this using DOS-style short mode. If the path
56552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56553  # take no chances and rewrite it.
56554  # Note: m4 eats our [], so we need to use [ and ] instead.
56555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56556  if test "x$has_forbidden_chars" != x; then
56557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56561      # Going to short mode and back again did indeed matter. Since short mode is
56562      # case insensitive, let's make it lowercase to improve readability.
56563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56564      # Now convert it back to Unix-style (cygpath)
56565      input_path=`$CYGPATH -u "$shortmode_path"`
56566      new_path="$input_path"
56567    fi
56568  fi
56569
56570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56571  if test "x$test_cygdrive_prefix" = x; then
56572    # As a simple fix, exclude /usr/bin since it's not a real path.
56573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56575      # a path prefixed by /cygdrive for fixpath to work.
56576      new_path="$CYGWIN_ROOT_PATH$input_path"
56577    fi
56578  fi
56579
56580
56581  if test "x$path" != "x$new_path"; then
56582    MSVC_DLL="$new_path"
56583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56584$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56585  fi
56586
56587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56588
56589  path="$MSVC_DLL"
56590  has_colon=`$ECHO $path | $GREP ^.:`
56591  new_path="$path"
56592  if test "x$has_colon" = x; then
56593    # Not in mixed or Windows style, start by that.
56594    new_path=`cmd //c echo $path`
56595  fi
56596
56597
56598  input_path="$new_path"
56599  # Check if we need to convert this using DOS-style short mode. If the path
56600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56601  # take no chances and rewrite it.
56602  # Note: m4 eats our [], so we need to use [ and ] instead.
56603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56604  if test "x$has_forbidden_chars" != x; then
56605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56607  fi
56608
56609
56610  windows_path="$new_path"
56611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56612    unix_path=`$CYGPATH -u "$windows_path"`
56613    new_path="$unix_path"
56614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56616    new_path="$unix_path"
56617  fi
56618
56619  if test "x$path" != "x$new_path"; then
56620    MSVC_DLL="$new_path"
56621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56622$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56623  fi
56624
56625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56627
56628    else
56629      # We're on a unix platform. Hooray! :)
56630      path="$MSVC_DLL"
56631      has_space=`$ECHO "$path" | $GREP " "`
56632      if test "x$has_space" != x; then
56633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56634$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56636      fi
56637
56638      # Use eval to expand a potential ~
56639      eval path="$path"
56640      if test ! -f "$path" && test ! -d "$path"; then
56641        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56642      fi
56643
56644      if test -d "$path"; then
56645        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56646      else
56647        dir="`$DIRNAME "$path"`"
56648        base="`$BASENAME "$path"`"
56649        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56650      fi
56651    fi
56652  fi
56653
56654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56655$as_echo_n "checking for $DLL_NAME... " >&6; }
56656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56657$as_echo "$MSVC_DLL" >&6; }
56658    else
56659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56660$as_echo "incorrect, ignoring" >&6; }
56661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56662$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56663    fi
56664  fi
56665
56666    fi
56667  fi
56668
56669  if test "x$MSVC_DLL" = x; then
56670    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56671    # (This was the original behaviour; kept since it might turn something up)
56672    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56673      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56674        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56675	    | $GREP x64 | $HEAD --lines 1`
56676      else
56677        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56678	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56679        if test "x$POSSIBLE_MSVC_DLL" = x; then
56680          # We're grasping at straws now...
56681          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56682	      | $HEAD --lines 1`
56683        fi
56684      fi
56685
56686
56687  DLL_NAME="$DLL_NAME"
56688  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56689  METHOD="search of VCINSTALLDIR"
56690  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56691    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56692$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56693
56694    # Need to check if the found msvcr is correct architecture
56695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56696$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56697    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56699      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56700      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56701      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56702        CORRECT_MSVCR_ARCH="PE32 executable"
56703      else
56704        CORRECT_MSVCR_ARCH="PE32+ executable"
56705      fi
56706    else
56707      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56708        CORRECT_MSVCR_ARCH=386
56709      else
56710        CORRECT_MSVCR_ARCH=x86-64
56711      fi
56712    fi
56713    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56715$as_echo "ok" >&6; }
56716      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56717
56718  # Only process if variable expands to non-empty
56719
56720  if test "x$MSVC_DLL" != x; then
56721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56722
56723  # Input might be given as Windows format, start by converting to
56724  # unix format.
56725  path="$MSVC_DLL"
56726  new_path=`$CYGPATH -u "$path"`
56727
56728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56731  # "foo.exe" is OK but "foo" is an error.
56732  #
56733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56734  # It is also a way to make sure we got the proper file name for the real test later on.
56735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56736  if test "x$test_shortpath" = x; then
56737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56738$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56739    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56740  fi
56741
56742  # Call helper function which possibly converts this using DOS-style short mode.
56743  # If so, the updated path is stored in $new_path.
56744
56745  input_path="$new_path"
56746  # Check if we need to convert this using DOS-style short mode. If the path
56747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56748  # take no chances and rewrite it.
56749  # Note: m4 eats our [], so we need to use [ and ] instead.
56750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56751  if test "x$has_forbidden_chars" != x; then
56752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56756      # Going to short mode and back again did indeed matter. Since short mode is
56757      # case insensitive, let's make it lowercase to improve readability.
56758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56759      # Now convert it back to Unix-style (cygpath)
56760      input_path=`$CYGPATH -u "$shortmode_path"`
56761      new_path="$input_path"
56762    fi
56763  fi
56764
56765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56766  if test "x$test_cygdrive_prefix" = x; then
56767    # As a simple fix, exclude /usr/bin since it's not a real path.
56768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56770      # a path prefixed by /cygdrive for fixpath to work.
56771      new_path="$CYGWIN_ROOT_PATH$input_path"
56772    fi
56773  fi
56774
56775
56776  if test "x$path" != "x$new_path"; then
56777    MSVC_DLL="$new_path"
56778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56779$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56780  fi
56781
56782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56783
56784  path="$MSVC_DLL"
56785  has_colon=`$ECHO $path | $GREP ^.:`
56786  new_path="$path"
56787  if test "x$has_colon" = x; then
56788    # Not in mixed or Windows style, start by that.
56789    new_path=`cmd //c echo $path`
56790  fi
56791
56792
56793  input_path="$new_path"
56794  # Check if we need to convert this using DOS-style short mode. If the path
56795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56796  # take no chances and rewrite it.
56797  # Note: m4 eats our [], so we need to use [ and ] instead.
56798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56799  if test "x$has_forbidden_chars" != x; then
56800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56802  fi
56803
56804
56805  windows_path="$new_path"
56806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56807    unix_path=`$CYGPATH -u "$windows_path"`
56808    new_path="$unix_path"
56809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56811    new_path="$unix_path"
56812  fi
56813
56814  if test "x$path" != "x$new_path"; then
56815    MSVC_DLL="$new_path"
56816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56818  fi
56819
56820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56822
56823    else
56824      # We're on a unix platform. Hooray! :)
56825      path="$MSVC_DLL"
56826      has_space=`$ECHO "$path" | $GREP " "`
56827      if test "x$has_space" != x; then
56828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56829$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56831      fi
56832
56833      # Use eval to expand a potential ~
56834      eval path="$path"
56835      if test ! -f "$path" && test ! -d "$path"; then
56836        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56837      fi
56838
56839      if test -d "$path"; then
56840        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56841      else
56842        dir="`$DIRNAME "$path"`"
56843        base="`$BASENAME "$path"`"
56844        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56845      fi
56846    fi
56847  fi
56848
56849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56850$as_echo_n "checking for $DLL_NAME... " >&6; }
56851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56852$as_echo "$MSVC_DLL" >&6; }
56853    else
56854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56855$as_echo "incorrect, ignoring" >&6; }
56856      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56857$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56858    fi
56859  fi
56860
56861    fi
56862  fi
56863
56864  if test "x$MSVC_DLL" = x; then
56865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56866$as_echo_n "checking for $DLL_NAME... " >&6; }
56867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56868$as_echo "no" >&6; }
56869    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56870  fi
56871
56872      MSVCP_DLL="$MSVC_DLL"
56873    fi
56874
56875  fi
56876
56877  fi
56878
56879
56880  if test "x$NEEDS_LIB_X11" = xfalse; then
56881    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56882      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56883$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56884    fi
56885    X_CFLAGS=
56886    X_LIBS=
56887  else
56888
56889    if test "x${with_x}" = xno; then
56890      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56891    fi
56892
56893    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56894      # The user has specified a X11 base directory. Use it for includes and
56895      # libraries, unless explicitly overridden.
56896      if test "x$x_includes" = xNONE; then
56897        x_includes="${with_x}/include"
56898      fi
56899      if test "x$x_libraries" = xNONE; then
56900        x_libraries="${with_x}/lib"
56901      fi
56902    else
56903      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56904      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56905      # --x-libraries for the sysroot, if that seems to be correct.
56906      if test "x$SYSROOT" != "x"; then
56907        if test "x$x_includes" = xNONE; then
56908          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56909            x_includes="$SYSROOT/usr/X11R6/include"
56910          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56911            x_includes="$SYSROOT/usr/include"
56912          fi
56913        fi
56914        if test "x$x_libraries" = xNONE; then
56915          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56916            x_libraries="$SYSROOT/usr/X11R6/lib"
56917          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56918            x_libraries="$SYSROOT/usr/lib64"
56919          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56920            x_libraries="$SYSROOT/usr/lib"
56921          fi
56922        fi
56923      fi
56924    fi
56925
56926    # Now let autoconf do it's magic
56927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56928$as_echo_n "checking for X... " >&6; }
56929
56930
56931# Check whether --with-x was given.
56932if test "${with_x+set}" = set; then :
56933  withval=$with_x;
56934fi
56935
56936# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56937if test "x$with_x" = xno; then
56938  # The user explicitly disabled X.
56939  have_x=disabled
56940else
56941  case $x_includes,$x_libraries in #(
56942    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56943    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56944  $as_echo_n "(cached) " >&6
56945else
56946  # One or both of the vars are not set, and there is no cached value.
56947ac_x_includes=no ac_x_libraries=no
56948rm -f -r conftest.dir
56949if mkdir conftest.dir; then
56950  cd conftest.dir
56951  cat >Imakefile <<'_ACEOF'
56952incroot:
56953	@echo incroot='${INCROOT}'
56954usrlibdir:
56955	@echo usrlibdir='${USRLIBDIR}'
56956libdir:
56957	@echo libdir='${LIBDIR}'
56958_ACEOF
56959  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56960    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56961    for ac_var in incroot usrlibdir libdir; do
56962      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56963    done
56964    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56965    for ac_extension in a so sl dylib la dll; do
56966      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56967	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56968	ac_im_usrlibdir=$ac_im_libdir; break
56969      fi
56970    done
56971    # Screen out bogus values from the imake configuration.  They are
56972    # bogus both because they are the default anyway, and because
56973    # using them would break gcc on systems where it needs fixed includes.
56974    case $ac_im_incroot in
56975	/usr/include) ac_x_includes= ;;
56976	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56977    esac
56978    case $ac_im_usrlibdir in
56979	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56980	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56981    esac
56982  fi
56983  cd ..
56984  rm -f -r conftest.dir
56985fi
56986
56987# Standard set of common directories for X headers.
56988# Check X11 before X11Rn because it is often a symlink to the current release.
56989ac_x_header_dirs='
56990/usr/X11/include
56991/usr/X11R7/include
56992/usr/X11R6/include
56993/usr/X11R5/include
56994/usr/X11R4/include
56995
56996/usr/include/X11
56997/usr/include/X11R7
56998/usr/include/X11R6
56999/usr/include/X11R5
57000/usr/include/X11R4
57001
57002/usr/local/X11/include
57003/usr/local/X11R7/include
57004/usr/local/X11R6/include
57005/usr/local/X11R5/include
57006/usr/local/X11R4/include
57007
57008/usr/local/include/X11
57009/usr/local/include/X11R7
57010/usr/local/include/X11R6
57011/usr/local/include/X11R5
57012/usr/local/include/X11R4
57013
57014/usr/X386/include
57015/usr/x386/include
57016/usr/XFree86/include/X11
57017
57018/usr/include
57019/usr/local/include
57020/usr/unsupported/include
57021/usr/athena/include
57022/usr/local/x11r5/include
57023/usr/lpp/Xamples/include
57024
57025/usr/openwin/include
57026/usr/openwin/share/include'
57027
57028if test "$ac_x_includes" = no; then
57029  # Guess where to find include files, by looking for Xlib.h.
57030  # First, try using that file with no special directory specified.
57031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57032/* end confdefs.h.  */
57033#include <X11/Xlib.h>
57034_ACEOF
57035if ac_fn_cxx_try_cpp "$LINENO"; then :
57036  # We can compile using X headers with no special include directory.
57037ac_x_includes=
57038else
57039  for ac_dir in $ac_x_header_dirs; do
57040  if test -r "$ac_dir/X11/Xlib.h"; then
57041    ac_x_includes=$ac_dir
57042    break
57043  fi
57044done
57045fi
57046rm -f conftest.err conftest.i conftest.$ac_ext
57047fi # $ac_x_includes = no
57048
57049if test "$ac_x_libraries" = no; then
57050  # Check for the libraries.
57051  # See if we find them without any special options.
57052  # Don't add to $LIBS permanently.
57053  ac_save_LIBS=$LIBS
57054  LIBS="-lX11 $LIBS"
57055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57056/* end confdefs.h.  */
57057#include <X11/Xlib.h>
57058int
57059main ()
57060{
57061XrmInitialize ()
57062  ;
57063  return 0;
57064}
57065_ACEOF
57066if ac_fn_cxx_try_link "$LINENO"; then :
57067  LIBS=$ac_save_LIBS
57068# We can link X programs with no special library path.
57069ac_x_libraries=
57070else
57071  LIBS=$ac_save_LIBS
57072for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57073do
57074  # Don't even attempt the hair of trying to link an X program!
57075  for ac_extension in a so sl dylib la dll; do
57076    if test -r "$ac_dir/libX11.$ac_extension"; then
57077      ac_x_libraries=$ac_dir
57078      break 2
57079    fi
57080  done
57081done
57082fi
57083rm -f core conftest.err conftest.$ac_objext \
57084    conftest$ac_exeext conftest.$ac_ext
57085fi # $ac_x_libraries = no
57086
57087case $ac_x_includes,$ac_x_libraries in #(
57088  no,* | *,no | *\'*)
57089    # Didn't find X, or a directory has "'" in its name.
57090    ac_cv_have_x="have_x=no";; #(
57091  *)
57092    # Record where we found X for the cache.
57093    ac_cv_have_x="have_x=yes\
57094	ac_x_includes='$ac_x_includes'\
57095	ac_x_libraries='$ac_x_libraries'"
57096esac
57097fi
57098;; #(
57099    *) have_x=yes;;
57100  esac
57101  eval "$ac_cv_have_x"
57102fi # $with_x != no
57103
57104if test "$have_x" != yes; then
57105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57106$as_echo "$have_x" >&6; }
57107  no_x=yes
57108else
57109  # If each of the values was on the command line, it overrides each guess.
57110  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57111  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57112  # Update the cache value to reflect the command line values.
57113  ac_cv_have_x="have_x=yes\
57114	ac_x_includes='$x_includes'\
57115	ac_x_libraries='$x_libraries'"
57116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57117$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57118fi
57119
57120    if test "$no_x" = yes; then
57121  # Not all programs may use this symbol, but it does not hurt to define it.
57122
57123$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57124
57125  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57126else
57127  if test -n "$x_includes"; then
57128    X_CFLAGS="$X_CFLAGS -I$x_includes"
57129  fi
57130
57131  # It would also be nice to do this for all -L options, not just this one.
57132  if test -n "$x_libraries"; then
57133    X_LIBS="$X_LIBS -L$x_libraries"
57134    # For Solaris; some versions of Sun CC require a space after -R and
57135    # others require no space.  Words are not sufficient . . . .
57136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57137$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57138    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57139    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57140    ac_cxx_werror_flag=yes
57141    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57142/* end confdefs.h.  */
57143
57144int
57145main ()
57146{
57147
57148  ;
57149  return 0;
57150}
57151_ACEOF
57152if ac_fn_cxx_try_link "$LINENO"; then :
57153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57154$as_echo "no" >&6; }
57155       X_LIBS="$X_LIBS -R$x_libraries"
57156else
57157  LIBS="$ac_xsave_LIBS -R $x_libraries"
57158       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57159/* end confdefs.h.  */
57160
57161int
57162main ()
57163{
57164
57165  ;
57166  return 0;
57167}
57168_ACEOF
57169if ac_fn_cxx_try_link "$LINENO"; then :
57170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57171$as_echo "yes" >&6; }
57172	  X_LIBS="$X_LIBS -R $x_libraries"
57173else
57174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57175$as_echo "neither works" >&6; }
57176fi
57177rm -f core conftest.err conftest.$ac_objext \
57178    conftest$ac_exeext conftest.$ac_ext
57179fi
57180rm -f core conftest.err conftest.$ac_objext \
57181    conftest$ac_exeext conftest.$ac_ext
57182    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57183    LIBS=$ac_xsave_LIBS
57184  fi
57185
57186  # Check for system-dependent libraries X programs must link with.
57187  # Do this before checking for the system-independent R6 libraries
57188  # (-lICE), since we may need -lsocket or whatever for X linking.
57189
57190  if test "$ISC" = yes; then
57191    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57192  else
57193    # Martyn Johnson says this is needed for Ultrix, if the X
57194    # libraries were built with DECnet support.  And Karl Berry says
57195    # the Alpha needs dnet_stub (dnet does not exist).
57196    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57197    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57198/* end confdefs.h.  */
57199
57200/* Override any GCC internal prototype to avoid an error.
57201   Use char because int might match the return type of a GCC
57202   builtin and then its argument prototype would still apply.  */
57203#ifdef __cplusplus
57204extern "C"
57205#endif
57206char XOpenDisplay ();
57207int
57208main ()
57209{
57210return XOpenDisplay ();
57211  ;
57212  return 0;
57213}
57214_ACEOF
57215if ac_fn_cxx_try_link "$LINENO"; then :
57216
57217else
57218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57219$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57220if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57221  $as_echo_n "(cached) " >&6
57222else
57223  ac_check_lib_save_LIBS=$LIBS
57224LIBS="-ldnet  $LIBS"
57225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57226/* end confdefs.h.  */
57227
57228/* Override any GCC internal prototype to avoid an error.
57229   Use char because int might match the return type of a GCC
57230   builtin and then its argument prototype would still apply.  */
57231#ifdef __cplusplus
57232extern "C"
57233#endif
57234char dnet_ntoa ();
57235int
57236main ()
57237{
57238return dnet_ntoa ();
57239  ;
57240  return 0;
57241}
57242_ACEOF
57243if ac_fn_cxx_try_link "$LINENO"; then :
57244  ac_cv_lib_dnet_dnet_ntoa=yes
57245else
57246  ac_cv_lib_dnet_dnet_ntoa=no
57247fi
57248rm -f core conftest.err conftest.$ac_objext \
57249    conftest$ac_exeext conftest.$ac_ext
57250LIBS=$ac_check_lib_save_LIBS
57251fi
57252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57253$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57254if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57255  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57256fi
57257
57258    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57260$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57261if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57262  $as_echo_n "(cached) " >&6
57263else
57264  ac_check_lib_save_LIBS=$LIBS
57265LIBS="-ldnet_stub  $LIBS"
57266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57267/* end confdefs.h.  */
57268
57269/* Override any GCC internal prototype to avoid an error.
57270   Use char because int might match the return type of a GCC
57271   builtin and then its argument prototype would still apply.  */
57272#ifdef __cplusplus
57273extern "C"
57274#endif
57275char dnet_ntoa ();
57276int
57277main ()
57278{
57279return dnet_ntoa ();
57280  ;
57281  return 0;
57282}
57283_ACEOF
57284if ac_fn_cxx_try_link "$LINENO"; then :
57285  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57286else
57287  ac_cv_lib_dnet_stub_dnet_ntoa=no
57288fi
57289rm -f core conftest.err conftest.$ac_objext \
57290    conftest$ac_exeext conftest.$ac_ext
57291LIBS=$ac_check_lib_save_LIBS
57292fi
57293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57294$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57295if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57296  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57297fi
57298
57299    fi
57300fi
57301rm -f core conftest.err conftest.$ac_objext \
57302    conftest$ac_exeext conftest.$ac_ext
57303    LIBS="$ac_xsave_LIBS"
57304
57305    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57306    # to get the SysV transport functions.
57307    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57308    # needs -lnsl.
57309    # The nsl library prevents programs from opening the X display
57310    # on Irix 5.2, according to T.E. Dickey.
57311    # The functions gethostbyname, getservbyname, and inet_addr are
57312    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57313    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57314if test "x$ac_cv_func_gethostbyname" = xyes; then :
57315
57316fi
57317
57318    if test $ac_cv_func_gethostbyname = no; then
57319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57320$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57321if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57322  $as_echo_n "(cached) " >&6
57323else
57324  ac_check_lib_save_LIBS=$LIBS
57325LIBS="-lnsl  $LIBS"
57326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57327/* end confdefs.h.  */
57328
57329/* Override any GCC internal prototype to avoid an error.
57330   Use char because int might match the return type of a GCC
57331   builtin and then its argument prototype would still apply.  */
57332#ifdef __cplusplus
57333extern "C"
57334#endif
57335char gethostbyname ();
57336int
57337main ()
57338{
57339return gethostbyname ();
57340  ;
57341  return 0;
57342}
57343_ACEOF
57344if ac_fn_cxx_try_link "$LINENO"; then :
57345  ac_cv_lib_nsl_gethostbyname=yes
57346else
57347  ac_cv_lib_nsl_gethostbyname=no
57348fi
57349rm -f core conftest.err conftest.$ac_objext \
57350    conftest$ac_exeext conftest.$ac_ext
57351LIBS=$ac_check_lib_save_LIBS
57352fi
57353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57354$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57355if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57356  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57357fi
57358
57359      if test $ac_cv_lib_nsl_gethostbyname = no; then
57360	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57361$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57362if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57363  $as_echo_n "(cached) " >&6
57364else
57365  ac_check_lib_save_LIBS=$LIBS
57366LIBS="-lbsd  $LIBS"
57367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57368/* end confdefs.h.  */
57369
57370/* Override any GCC internal prototype to avoid an error.
57371   Use char because int might match the return type of a GCC
57372   builtin and then its argument prototype would still apply.  */
57373#ifdef __cplusplus
57374extern "C"
57375#endif
57376char gethostbyname ();
57377int
57378main ()
57379{
57380return gethostbyname ();
57381  ;
57382  return 0;
57383}
57384_ACEOF
57385if ac_fn_cxx_try_link "$LINENO"; then :
57386  ac_cv_lib_bsd_gethostbyname=yes
57387else
57388  ac_cv_lib_bsd_gethostbyname=no
57389fi
57390rm -f core conftest.err conftest.$ac_objext \
57391    conftest$ac_exeext conftest.$ac_ext
57392LIBS=$ac_check_lib_save_LIBS
57393fi
57394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57395$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57396if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57397  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57398fi
57399
57400      fi
57401    fi
57402
57403    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57404    # socket/setsockopt and other routines are undefined under SCO ODT
57405    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57406    # on later versions), says Simon Leinen: it contains gethostby*
57407    # variants that don't use the name server (or something).  -lsocket
57408    # must be given before -lnsl if both are needed.  We assume that
57409    # if connect needs -lnsl, so does gethostbyname.
57410    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57411if test "x$ac_cv_func_connect" = xyes; then :
57412
57413fi
57414
57415    if test $ac_cv_func_connect = no; then
57416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57417$as_echo_n "checking for connect in -lsocket... " >&6; }
57418if ${ac_cv_lib_socket_connect+:} false; then :
57419  $as_echo_n "(cached) " >&6
57420else
57421  ac_check_lib_save_LIBS=$LIBS
57422LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57424/* end confdefs.h.  */
57425
57426/* Override any GCC internal prototype to avoid an error.
57427   Use char because int might match the return type of a GCC
57428   builtin and then its argument prototype would still apply.  */
57429#ifdef __cplusplus
57430extern "C"
57431#endif
57432char connect ();
57433int
57434main ()
57435{
57436return connect ();
57437  ;
57438  return 0;
57439}
57440_ACEOF
57441if ac_fn_cxx_try_link "$LINENO"; then :
57442  ac_cv_lib_socket_connect=yes
57443else
57444  ac_cv_lib_socket_connect=no
57445fi
57446rm -f core conftest.err conftest.$ac_objext \
57447    conftest$ac_exeext conftest.$ac_ext
57448LIBS=$ac_check_lib_save_LIBS
57449fi
57450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57451$as_echo "$ac_cv_lib_socket_connect" >&6; }
57452if test "x$ac_cv_lib_socket_connect" = xyes; then :
57453  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57454fi
57455
57456    fi
57457
57458    # Guillermo Gomez says -lposix is necessary on A/UX.
57459    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57460if test "x$ac_cv_func_remove" = xyes; then :
57461
57462fi
57463
57464    if test $ac_cv_func_remove = no; then
57465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57466$as_echo_n "checking for remove in -lposix... " >&6; }
57467if ${ac_cv_lib_posix_remove+:} false; then :
57468  $as_echo_n "(cached) " >&6
57469else
57470  ac_check_lib_save_LIBS=$LIBS
57471LIBS="-lposix  $LIBS"
57472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57473/* end confdefs.h.  */
57474
57475/* Override any GCC internal prototype to avoid an error.
57476   Use char because int might match the return type of a GCC
57477   builtin and then its argument prototype would still apply.  */
57478#ifdef __cplusplus
57479extern "C"
57480#endif
57481char remove ();
57482int
57483main ()
57484{
57485return remove ();
57486  ;
57487  return 0;
57488}
57489_ACEOF
57490if ac_fn_cxx_try_link "$LINENO"; then :
57491  ac_cv_lib_posix_remove=yes
57492else
57493  ac_cv_lib_posix_remove=no
57494fi
57495rm -f core conftest.err conftest.$ac_objext \
57496    conftest$ac_exeext conftest.$ac_ext
57497LIBS=$ac_check_lib_save_LIBS
57498fi
57499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57500$as_echo "$ac_cv_lib_posix_remove" >&6; }
57501if test "x$ac_cv_lib_posix_remove" = xyes; then :
57502  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57503fi
57504
57505    fi
57506
57507    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57508    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57509if test "x$ac_cv_func_shmat" = xyes; then :
57510
57511fi
57512
57513    if test $ac_cv_func_shmat = no; then
57514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57515$as_echo_n "checking for shmat in -lipc... " >&6; }
57516if ${ac_cv_lib_ipc_shmat+:} false; then :
57517  $as_echo_n "(cached) " >&6
57518else
57519  ac_check_lib_save_LIBS=$LIBS
57520LIBS="-lipc  $LIBS"
57521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57522/* end confdefs.h.  */
57523
57524/* Override any GCC internal prototype to avoid an error.
57525   Use char because int might match the return type of a GCC
57526   builtin and then its argument prototype would still apply.  */
57527#ifdef __cplusplus
57528extern "C"
57529#endif
57530char shmat ();
57531int
57532main ()
57533{
57534return shmat ();
57535  ;
57536  return 0;
57537}
57538_ACEOF
57539if ac_fn_cxx_try_link "$LINENO"; then :
57540  ac_cv_lib_ipc_shmat=yes
57541else
57542  ac_cv_lib_ipc_shmat=no
57543fi
57544rm -f core conftest.err conftest.$ac_objext \
57545    conftest$ac_exeext conftest.$ac_ext
57546LIBS=$ac_check_lib_save_LIBS
57547fi
57548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57549$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57550if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57551  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57552fi
57553
57554    fi
57555  fi
57556
57557  # Check for libraries that X11R6 Xt/Xaw programs need.
57558  ac_save_LDFLAGS=$LDFLAGS
57559  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57560  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57561  # check for ICE first), but we must link in the order -lSM -lICE or
57562  # we get undefined symbols.  So assume we have SM if we have ICE.
57563  # These have to be linked with before -lX11, unlike the other
57564  # libraries we check for below, so use a different variable.
57565  # John Interrante, Karl Berry
57566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57567$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57568if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57569  $as_echo_n "(cached) " >&6
57570else
57571  ac_check_lib_save_LIBS=$LIBS
57572LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57574/* end confdefs.h.  */
57575
57576/* Override any GCC internal prototype to avoid an error.
57577   Use char because int might match the return type of a GCC
57578   builtin and then its argument prototype would still apply.  */
57579#ifdef __cplusplus
57580extern "C"
57581#endif
57582char IceConnectionNumber ();
57583int
57584main ()
57585{
57586return IceConnectionNumber ();
57587  ;
57588  return 0;
57589}
57590_ACEOF
57591if ac_fn_cxx_try_link "$LINENO"; then :
57592  ac_cv_lib_ICE_IceConnectionNumber=yes
57593else
57594  ac_cv_lib_ICE_IceConnectionNumber=no
57595fi
57596rm -f core conftest.err conftest.$ac_objext \
57597    conftest$ac_exeext conftest.$ac_ext
57598LIBS=$ac_check_lib_save_LIBS
57599fi
57600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57601$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57602if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57603  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57604fi
57605
57606  LDFLAGS=$ac_save_LDFLAGS
57607
57608fi
57609
57610
57611    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57612    # this doesn't make sense so we remove it.
57613    if test "x$COMPILE_TYPE" = xcross; then
57614      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57615    fi
57616
57617    if test "x$no_x" = xyes; then
57618
57619  # Print a helpful message on how to acquire the necessary build dependency.
57620  # x11 is the help tag: freetype, cups, alsa etc
57621  MISSING_DEPENDENCY=x11
57622
57623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57624    cygwin_help $MISSING_DEPENDENCY
57625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57626    msys_help $MISSING_DEPENDENCY
57627  else
57628    PKGHANDLER_COMMAND=
57629
57630    case $PKGHANDLER in
57631      apt-get)
57632        apt_help     $MISSING_DEPENDENCY ;;
57633      yum)
57634        yum_help     $MISSING_DEPENDENCY ;;
57635      brew)
57636        brew_help    $MISSING_DEPENDENCY ;;
57637      port)
57638        port_help    $MISSING_DEPENDENCY ;;
57639      pkgutil)
57640        pkgutil_help $MISSING_DEPENDENCY ;;
57641      pkgadd)
57642        pkgadd_help  $MISSING_DEPENDENCY ;;
57643    esac
57644
57645    if test "x$PKGHANDLER_COMMAND" != x; then
57646      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57647    fi
57648  fi
57649
57650      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57651    fi
57652
57653    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57654      OPENWIN_HOME="/usr/openwin"
57655      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57656      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57657          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57658    fi
57659
57660    ac_ext=c
57661ac_cpp='$CPP $CPPFLAGS'
57662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57664ac_compiler_gnu=$ac_cv_c_compiler_gnu
57665
57666    OLD_CFLAGS="$CFLAGS"
57667    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57668
57669    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57670    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57671do :
57672  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57673ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57674          # include <X11/Xlib.h>
57675          # include <X11/Xutil.h>
57676
57677
57678"
57679if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57680  cat >>confdefs.h <<_ACEOF
57681#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57682_ACEOF
57683 X11_HEADERS_OK=yes
57684else
57685  X11_HEADERS_OK=no; break
57686fi
57687
57688done
57689
57690
57691    if test "x$X11_HEADERS_OK" = xno; then
57692
57693  # Print a helpful message on how to acquire the necessary build dependency.
57694  # x11 is the help tag: freetype, cups, alsa etc
57695  MISSING_DEPENDENCY=x11
57696
57697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57698    cygwin_help $MISSING_DEPENDENCY
57699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57700    msys_help $MISSING_DEPENDENCY
57701  else
57702    PKGHANDLER_COMMAND=
57703
57704    case $PKGHANDLER in
57705      apt-get)
57706        apt_help     $MISSING_DEPENDENCY ;;
57707      yum)
57708        yum_help     $MISSING_DEPENDENCY ;;
57709      brew)
57710        brew_help    $MISSING_DEPENDENCY ;;
57711      port)
57712        port_help    $MISSING_DEPENDENCY ;;
57713      pkgutil)
57714        pkgutil_help $MISSING_DEPENDENCY ;;
57715      pkgadd)
57716        pkgadd_help  $MISSING_DEPENDENCY ;;
57717    esac
57718
57719    if test "x$PKGHANDLER_COMMAND" != x; then
57720      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57721    fi
57722  fi
57723
57724      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57725    fi
57726
57727    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57728    # defined in libawt_xawt.
57729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57730$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57731    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57732/* end confdefs.h.  */
57733#include <X11/extensions/Xrender.h>
57734int
57735main ()
57736{
57737XLinearGradient x;
57738  ;
57739  return 0;
57740}
57741_ACEOF
57742if ac_fn_c_try_compile "$LINENO"; then :
57743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57744$as_echo "yes" >&6; }
57745else
57746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57747$as_echo "no" >&6; }
57748         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57749fi
57750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57751
57752    CFLAGS="$OLD_CFLAGS"
57753    ac_ext=cpp
57754ac_cpp='$CXXCPP $CPPFLAGS'
57755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57758
57759  fi # NEEDS_LIB_X11
57760
57761
57762
57763
57764
57765
57766# Check whether --with-cups was given.
57767if test "${with_cups+set}" = set; then :
57768  withval=$with_cups;
57769fi
57770
57771
57772# Check whether --with-cups-include was given.
57773if test "${with_cups_include+set}" = set; then :
57774  withval=$with_cups_include;
57775fi
57776
57777
57778  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57779    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57780        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57781      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57782$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57783    fi
57784    CUPS_CFLAGS=
57785  else
57786    CUPS_FOUND=no
57787
57788    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57789      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57790    fi
57791
57792    if test "x${with_cups}" != x; then
57793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57794$as_echo_n "checking for cups headers... " >&6; }
57795      if test -s "${with_cups}/include/cups/cups.h"; then
57796        CUPS_CFLAGS="-I${with_cups}/include"
57797        CUPS_FOUND=yes
57798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57799$as_echo "$CUPS_FOUND" >&6; }
57800      else
57801        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57802      fi
57803    fi
57804    if test "x${with_cups_include}" != x; then
57805      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57806$as_echo_n "checking for cups headers... " >&6; }
57807      if test -s "${with_cups_include}/cups/cups.h"; then
57808        CUPS_CFLAGS="-I${with_cups_include}"
57809        CUPS_FOUND=yes
57810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57811$as_echo "$CUPS_FOUND" >&6; }
57812      else
57813        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57814      fi
57815    fi
57816    if test "x$CUPS_FOUND" = xno; then
57817      # Are the cups headers installed in the default /usr/include location?
57818      for ac_header in cups/cups.h cups/ppd.h
57819do :
57820  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57821ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57822if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57823  cat >>confdefs.h <<_ACEOF
57824#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57825_ACEOF
57826
57827          CUPS_FOUND=yes
57828          CUPS_CFLAGS=
57829          DEFAULT_CUPS=yes
57830
57831fi
57832
57833done
57834
57835    fi
57836    if test "x$CUPS_FOUND" = xno; then
57837
57838  # Print a helpful message on how to acquire the necessary build dependency.
57839  # cups is the help tag: freetype, cups, alsa etc
57840  MISSING_DEPENDENCY=cups
57841
57842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57843    cygwin_help $MISSING_DEPENDENCY
57844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57845    msys_help $MISSING_DEPENDENCY
57846  else
57847    PKGHANDLER_COMMAND=
57848
57849    case $PKGHANDLER in
57850      apt-get)
57851        apt_help     $MISSING_DEPENDENCY ;;
57852      yum)
57853        yum_help     $MISSING_DEPENDENCY ;;
57854      brew)
57855        brew_help    $MISSING_DEPENDENCY ;;
57856      port)
57857        port_help    $MISSING_DEPENDENCY ;;
57858      pkgutil)
57859        pkgutil_help $MISSING_DEPENDENCY ;;
57860      pkgadd)
57861        pkgadd_help  $MISSING_DEPENDENCY ;;
57862    esac
57863
57864    if test "x$PKGHANDLER_COMMAND" != x; then
57865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57866    fi
57867  fi
57868
57869      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57870    fi
57871  fi
57872
57873
57874
57875
57876
57877# Check whether --with-freetype was given.
57878if test "${with_freetype+set}" = set; then :
57879  withval=$with_freetype;
57880fi
57881
57882
57883# Check whether --with-freetype-include was given.
57884if test "${with_freetype_include+set}" = set; then :
57885  withval=$with_freetype_include;
57886fi
57887
57888
57889# Check whether --with-freetype-lib was given.
57890if test "${with_freetype_lib+set}" = set; then :
57891  withval=$with_freetype_lib;
57892fi
57893
57894
57895# Check whether --with-freetype-src was given.
57896if test "${with_freetype_src+set}" = set; then :
57897  withval=$with_freetype_src;
57898fi
57899
57900  # Check whether --enable-freetype-bundling was given.
57901if test "${enable_freetype_bundling+set}" = set; then :
57902  enableval=$enable_freetype_bundling;
57903fi
57904
57905
57906  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57907  FREETYPE_BASE_NAME=freetype
57908  FREETYPE_CFLAGS=
57909  FREETYPE_LIBS=
57910  FREETYPE_BUNDLE_LIB_PATH=
57911
57912  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57913    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57914        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57915        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57916        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57917      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57918$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57919    fi
57920    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57921      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57922$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57923    fi
57924  else
57925    # freetype is needed to build; go get it!
57926
57927    BUNDLE_FREETYPE="$enable_freetype_bundling"
57928
57929    if  test "x$with_freetype_src" != x; then
57930      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57931        # Try to build freetype if --with-freetype-src was given on Windows
57932
57933  FREETYPE_SRC_PATH="$with_freetype_src"
57934  BUILD_FREETYPE=yes
57935
57936  # Check if the freetype sources are acessible..
57937  if ! test -d $FREETYPE_SRC_PATH; then
57938    { $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
57939$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57940    BUILD_FREETYPE=no
57941  fi
57942  # ..and contain a vc2010 project file
57943  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57944  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57945    { $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
57946$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57947    BUILD_FREETYPE=no
57948  fi
57949  # Now check if configure found a version of 'msbuild.exe'
57950  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57951    { $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
57952$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;}
57953    BUILD_FREETYPE=no
57954  fi
57955
57956  # Ready to go..
57957  if test "x$BUILD_FREETYPE" = xyes; then
57958    # msbuild requires trailing slashes for output directories
57959    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57960    freetype_lib_path_unix="$freetype_lib_path"
57961    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57962
57963  unix_path="$vcxproj_path"
57964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57965    windows_path=`$CYGPATH -m "$unix_path"`
57966    vcxproj_path="$windows_path"
57967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57968    windows_path=`cmd //c echo $unix_path`
57969    vcxproj_path="$windows_path"
57970  fi
57971
57972
57973  unix_path="$freetype_lib_path"
57974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57975    windows_path=`$CYGPATH -m "$unix_path"`
57976    freetype_lib_path="$windows_path"
57977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57978    windows_path=`cmd //c echo $unix_path`
57979    freetype_lib_path="$windows_path"
57980  fi
57981
57982
57983  unix_path="$freetype_obj_path"
57984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57985    windows_path=`$CYGPATH -m "$unix_path"`
57986    freetype_obj_path="$windows_path"
57987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57988    windows_path=`cmd //c echo $unix_path`
57989    freetype_obj_path="$windows_path"
57990  fi
57991
57992    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57993      freetype_platform=x64
57994    else
57995      freetype_platform=win32
57996    fi
57997
57998    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57999    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58000    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58001    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58002    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58003$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58004
58005    # First we try to build the freetype.dll
58006    $ECHO -e "@echo off\n"\
58007        "$MSBUILD $vcxproj_path "\
58008        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58009        "/p:Configuration=\"Release Multithreaded\" "\
58010        "/p:Platform=$freetype_platform "\
58011        "/p:ConfigurationType=DynamicLibrary "\
58012        "/p:TargetName=freetype "\
58013        "/p:OutDir=\"$freetype_lib_path\" "\
58014        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58015    cmd /c freetype.bat
58016
58017    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58018      # If that succeeds we also build freetype.lib
58019      $ECHO -e "@echo off\n"\
58020          "$MSBUILD $vcxproj_path "\
58021          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58022          "/p:Configuration=\"Release Multithreaded\" "\
58023          "/p:Platform=$freetype_platform "\
58024          "/p:ConfigurationType=StaticLibrary "\
58025          "/p:TargetName=freetype "\
58026          "/p:OutDir=\"$freetype_lib_path\" "\
58027          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58028      cmd /c freetype.bat
58029
58030      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58031        # Once we build both, lib and dll, set freetype lib and include path appropriately
58032        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58033        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58034        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58035$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58036      else
58037        BUILD_FREETYPE=no
58038      fi
58039    else
58040      BUILD_FREETYPE=no
58041    fi
58042  fi
58043
58044        if test "x$BUILD_FREETYPE" = xyes; then
58045          # Okay, we built it. Check that it works.
58046
58047  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58048  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58049  METHOD="--with-freetype-src"
58050
58051  # Let's start with an optimistic view of the world :-)
58052  FOUND_FREETYPE=yes
58053
58054  # First look for the canonical freetype main include file ft2build.h.
58055  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58056    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58057    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58058    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58059      # Fail.
58060      FOUND_FREETYPE=no
58061    fi
58062  fi
58063
58064  if test "x$FOUND_FREETYPE" = xyes; then
58065    # Include file found, let's continue the sanity check.
58066    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58067$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58068
58069    # Reset to default value
58070    FREETYPE_BASE_NAME=freetype
58071    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58072    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58073      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58074          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58075        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58076        # for the .6 version explicitly.
58077        FREETYPE_BASE_NAME=freetype.6
58078        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58079        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58080$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58081      else
58082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58083$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58084        FOUND_FREETYPE=no
58085      fi
58086    else
58087      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58088        # On Windows, we will need both .lib and .dll file.
58089        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58090          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58091$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58092          FOUND_FREETYPE=no
58093        fi
58094      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58095          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58096        # Found lib in isa dir, use that instead.
58097        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58098        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58099$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58100      fi
58101    fi
58102  fi
58103
58104  if test "x$FOUND_FREETYPE" = xyes; then
58105
58106  # Only process if variable expands to non-empty
58107
58108  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58110
58111  # Input might be given as Windows format, start by converting to
58112  # unix format.
58113  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58114  new_path=`$CYGPATH -u "$path"`
58115
58116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58119  # "foo.exe" is OK but "foo" is an error.
58120  #
58121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58122  # It is also a way to make sure we got the proper file name for the real test later on.
58123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58124  if test "x$test_shortpath" = x; then
58125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58127    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58128  fi
58129
58130  # Call helper function which possibly converts this using DOS-style short mode.
58131  # If so, the updated path is stored in $new_path.
58132
58133  input_path="$new_path"
58134  # Check if we need to convert this using DOS-style short mode. If the path
58135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58136  # take no chances and rewrite it.
58137  # Note: m4 eats our [], so we need to use [ and ] instead.
58138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58139  if test "x$has_forbidden_chars" != x; then
58140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58144      # Going to short mode and back again did indeed matter. Since short mode is
58145      # case insensitive, let's make it lowercase to improve readability.
58146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58147      # Now convert it back to Unix-style (cygpath)
58148      input_path=`$CYGPATH -u "$shortmode_path"`
58149      new_path="$input_path"
58150    fi
58151  fi
58152
58153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58154  if test "x$test_cygdrive_prefix" = x; then
58155    # As a simple fix, exclude /usr/bin since it's not a real path.
58156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58158      # a path prefixed by /cygdrive for fixpath to work.
58159      new_path="$CYGWIN_ROOT_PATH$input_path"
58160    fi
58161  fi
58162
58163
58164  if test "x$path" != "x$new_path"; then
58165    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58168  fi
58169
58170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58171
58172  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58173  has_colon=`$ECHO $path | $GREP ^.:`
58174  new_path="$path"
58175  if test "x$has_colon" = x; then
58176    # Not in mixed or Windows style, start by that.
58177    new_path=`cmd //c echo $path`
58178  fi
58179
58180
58181  input_path="$new_path"
58182  # Check if we need to convert this using DOS-style short mode. If the path
58183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58184  # take no chances and rewrite it.
58185  # Note: m4 eats our [], so we need to use [ and ] instead.
58186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58187  if test "x$has_forbidden_chars" != x; then
58188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58190  fi
58191
58192
58193  windows_path="$new_path"
58194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58195    unix_path=`$CYGPATH -u "$windows_path"`
58196    new_path="$unix_path"
58197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58199    new_path="$unix_path"
58200  fi
58201
58202  if test "x$path" != "x$new_path"; then
58203    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58206  fi
58207
58208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58210
58211    else
58212      # We're on a unix platform. Hooray! :)
58213      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58214      has_space=`$ECHO "$path" | $GREP " "`
58215      if test "x$has_space" != x; then
58216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58219      fi
58220
58221      # Use eval to expand a potential ~
58222      eval path="$path"
58223      if test ! -f "$path" && test ! -d "$path"; then
58224        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58225      fi
58226
58227      if test -d "$path"; then
58228        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58229      else
58230        dir="`$DIRNAME "$path"`"
58231        base="`$BASENAME "$path"`"
58232        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58233      fi
58234    fi
58235  fi
58236
58237
58238  # Only process if variable expands to non-empty
58239
58240  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58242
58243  # Input might be given as Windows format, start by converting to
58244  # unix format.
58245  path="$POTENTIAL_FREETYPE_LIB_PATH"
58246  new_path=`$CYGPATH -u "$path"`
58247
58248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58251  # "foo.exe" is OK but "foo" is an error.
58252  #
58253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58254  # It is also a way to make sure we got the proper file name for the real test later on.
58255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58256  if test "x$test_shortpath" = x; then
58257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58259    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58260  fi
58261
58262  # Call helper function which possibly converts this using DOS-style short mode.
58263  # If so, the updated path is stored in $new_path.
58264
58265  input_path="$new_path"
58266  # Check if we need to convert this using DOS-style short mode. If the path
58267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58268  # take no chances and rewrite it.
58269  # Note: m4 eats our [], so we need to use [ and ] instead.
58270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58271  if test "x$has_forbidden_chars" != x; then
58272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58276      # Going to short mode and back again did indeed matter. Since short mode is
58277      # case insensitive, let's make it lowercase to improve readability.
58278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58279      # Now convert it back to Unix-style (cygpath)
58280      input_path=`$CYGPATH -u "$shortmode_path"`
58281      new_path="$input_path"
58282    fi
58283  fi
58284
58285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58286  if test "x$test_cygdrive_prefix" = x; then
58287    # As a simple fix, exclude /usr/bin since it's not a real path.
58288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58290      # a path prefixed by /cygdrive for fixpath to work.
58291      new_path="$CYGWIN_ROOT_PATH$input_path"
58292    fi
58293  fi
58294
58295
58296  if test "x$path" != "x$new_path"; then
58297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58300  fi
58301
58302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58303
58304  path="$POTENTIAL_FREETYPE_LIB_PATH"
58305  has_colon=`$ECHO $path | $GREP ^.:`
58306  new_path="$path"
58307  if test "x$has_colon" = x; then
58308    # Not in mixed or Windows style, start by that.
58309    new_path=`cmd //c echo $path`
58310  fi
58311
58312
58313  input_path="$new_path"
58314  # Check if we need to convert this using DOS-style short mode. If the path
58315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58316  # take no chances and rewrite it.
58317  # Note: m4 eats our [], so we need to use [ and ] instead.
58318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58319  if test "x$has_forbidden_chars" != x; then
58320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58322  fi
58323
58324
58325  windows_path="$new_path"
58326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58327    unix_path=`$CYGPATH -u "$windows_path"`
58328    new_path="$unix_path"
58329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58331    new_path="$unix_path"
58332  fi
58333
58334  if test "x$path" != "x$new_path"; then
58335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58338  fi
58339
58340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58342
58343    else
58344      # We're on a unix platform. Hooray! :)
58345      path="$POTENTIAL_FREETYPE_LIB_PATH"
58346      has_space=`$ECHO "$path" | $GREP " "`
58347      if test "x$has_space" != x; then
58348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58351      fi
58352
58353      # Use eval to expand a potential ~
58354      eval path="$path"
58355      if test ! -f "$path" && test ! -d "$path"; then
58356        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58357      fi
58358
58359      if test -d "$path"; then
58360        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58361      else
58362        dir="`$DIRNAME "$path"`"
58363        base="`$BASENAME "$path"`"
58364        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58365      fi
58366    fi
58367  fi
58368
58369
58370    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58372$as_echo_n "checking for freetype includes... " >&6; }
58373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58374$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58375    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58377$as_echo_n "checking for freetype libraries... " >&6; }
58378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58379$as_echo "$FREETYPE_LIB_PATH" >&6; }
58380  fi
58381
58382          if test "x$FOUND_FREETYPE" != xyes; then
58383            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58384          fi
58385        else
58386          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58387$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58388          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58389        fi
58390      else
58391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58392$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58393      fi
58394    fi
58395
58396    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58397      # User has specified settings
58398
58399      if test "x$BUNDLE_FREETYPE" = x; then
58400        # If not specified, default is to bundle freetype
58401        BUNDLE_FREETYPE=yes
58402      fi
58403
58404      if test "x$with_freetype" != x; then
58405        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58406        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58407      fi
58408
58409      # Allow --with-freetype-lib and --with-freetype-include to override
58410      if test "x$with_freetype_include" != x; then
58411        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58412      fi
58413      if test "x$with_freetype_lib" != x; then
58414        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58415      fi
58416
58417      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58418        # Okay, we got it. Check that it works.
58419
58420  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58421  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58422  METHOD="--with-freetype"
58423
58424  # Let's start with an optimistic view of the world :-)
58425  FOUND_FREETYPE=yes
58426
58427  # First look for the canonical freetype main include file ft2build.h.
58428  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58429    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58430    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58431    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58432      # Fail.
58433      FOUND_FREETYPE=no
58434    fi
58435  fi
58436
58437  if test "x$FOUND_FREETYPE" = xyes; then
58438    # Include file found, let's continue the sanity check.
58439    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58440$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58441
58442    # Reset to default value
58443    FREETYPE_BASE_NAME=freetype
58444    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58445    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58446      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58447          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58448        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58449        # for the .6 version explicitly.
58450        FREETYPE_BASE_NAME=freetype.6
58451        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58452        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58453$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58454      else
58455        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58456$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58457        FOUND_FREETYPE=no
58458      fi
58459    else
58460      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58461        # On Windows, we will need both .lib and .dll file.
58462        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58463          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58464$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58465          FOUND_FREETYPE=no
58466        fi
58467      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58468          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58469        # Found lib in isa dir, use that instead.
58470        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58471        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58472$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58473      fi
58474    fi
58475  fi
58476
58477  if test "x$FOUND_FREETYPE" = xyes; then
58478
58479  # Only process if variable expands to non-empty
58480
58481  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58483
58484  # Input might be given as Windows format, start by converting to
58485  # unix format.
58486  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58487  new_path=`$CYGPATH -u "$path"`
58488
58489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58492  # "foo.exe" is OK but "foo" is an error.
58493  #
58494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58495  # It is also a way to make sure we got the proper file name for the real test later on.
58496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58497  if test "x$test_shortpath" = x; then
58498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58500    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58501  fi
58502
58503  # Call helper function which possibly converts this using DOS-style short mode.
58504  # If so, the updated path is stored in $new_path.
58505
58506  input_path="$new_path"
58507  # Check if we need to convert this using DOS-style short mode. If the path
58508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58509  # take no chances and rewrite it.
58510  # Note: m4 eats our [], so we need to use [ and ] instead.
58511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58512  if test "x$has_forbidden_chars" != x; then
58513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58517      # Going to short mode and back again did indeed matter. Since short mode is
58518      # case insensitive, let's make it lowercase to improve readability.
58519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58520      # Now convert it back to Unix-style (cygpath)
58521      input_path=`$CYGPATH -u "$shortmode_path"`
58522      new_path="$input_path"
58523    fi
58524  fi
58525
58526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58527  if test "x$test_cygdrive_prefix" = x; then
58528    # As a simple fix, exclude /usr/bin since it's not a real path.
58529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58531      # a path prefixed by /cygdrive for fixpath to work.
58532      new_path="$CYGWIN_ROOT_PATH$input_path"
58533    fi
58534  fi
58535
58536
58537  if test "x$path" != "x$new_path"; then
58538    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58541  fi
58542
58543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58544
58545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58546  has_colon=`$ECHO $path | $GREP ^.:`
58547  new_path="$path"
58548  if test "x$has_colon" = x; then
58549    # Not in mixed or Windows style, start by that.
58550    new_path=`cmd //c echo $path`
58551  fi
58552
58553
58554  input_path="$new_path"
58555  # Check if we need to convert this using DOS-style short mode. If the path
58556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58557  # take no chances and rewrite it.
58558  # Note: m4 eats our [], so we need to use [ and ] instead.
58559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58560  if test "x$has_forbidden_chars" != x; then
58561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58563  fi
58564
58565
58566  windows_path="$new_path"
58567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58568    unix_path=`$CYGPATH -u "$windows_path"`
58569    new_path="$unix_path"
58570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58572    new_path="$unix_path"
58573  fi
58574
58575  if test "x$path" != "x$new_path"; then
58576    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58578$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58579  fi
58580
58581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58583
58584    else
58585      # We're on a unix platform. Hooray! :)
58586      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58587      has_space=`$ECHO "$path" | $GREP " "`
58588      if test "x$has_space" != x; then
58589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58590$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58592      fi
58593
58594      # Use eval to expand a potential ~
58595      eval path="$path"
58596      if test ! -f "$path" && test ! -d "$path"; then
58597        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58598      fi
58599
58600      if test -d "$path"; then
58601        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58602      else
58603        dir="`$DIRNAME "$path"`"
58604        base="`$BASENAME "$path"`"
58605        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58606      fi
58607    fi
58608  fi
58609
58610
58611  # Only process if variable expands to non-empty
58612
58613  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58615
58616  # Input might be given as Windows format, start by converting to
58617  # unix format.
58618  path="$POTENTIAL_FREETYPE_LIB_PATH"
58619  new_path=`$CYGPATH -u "$path"`
58620
58621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58624  # "foo.exe" is OK but "foo" is an error.
58625  #
58626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58627  # It is also a way to make sure we got the proper file name for the real test later on.
58628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58629  if test "x$test_shortpath" = x; then
58630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58631$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58632    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58633  fi
58634
58635  # Call helper function which possibly converts this using DOS-style short mode.
58636  # If so, the updated path is stored in $new_path.
58637
58638  input_path="$new_path"
58639  # Check if we need to convert this using DOS-style short mode. If the path
58640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58641  # take no chances and rewrite it.
58642  # Note: m4 eats our [], so we need to use [ and ] instead.
58643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58644  if test "x$has_forbidden_chars" != x; then
58645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58649      # Going to short mode and back again did indeed matter. Since short mode is
58650      # case insensitive, let's make it lowercase to improve readability.
58651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58652      # Now convert it back to Unix-style (cygpath)
58653      input_path=`$CYGPATH -u "$shortmode_path"`
58654      new_path="$input_path"
58655    fi
58656  fi
58657
58658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58659  if test "x$test_cygdrive_prefix" = x; then
58660    # As a simple fix, exclude /usr/bin since it's not a real path.
58661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58663      # a path prefixed by /cygdrive for fixpath to work.
58664      new_path="$CYGWIN_ROOT_PATH$input_path"
58665    fi
58666  fi
58667
58668
58669  if test "x$path" != "x$new_path"; then
58670    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58673  fi
58674
58675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58676
58677  path="$POTENTIAL_FREETYPE_LIB_PATH"
58678  has_colon=`$ECHO $path | $GREP ^.:`
58679  new_path="$path"
58680  if test "x$has_colon" = x; then
58681    # Not in mixed or Windows style, start by that.
58682    new_path=`cmd //c echo $path`
58683  fi
58684
58685
58686  input_path="$new_path"
58687  # Check if we need to convert this using DOS-style short mode. If the path
58688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58689  # take no chances and rewrite it.
58690  # Note: m4 eats our [], so we need to use [ and ] instead.
58691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58692  if test "x$has_forbidden_chars" != x; then
58693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58695  fi
58696
58697
58698  windows_path="$new_path"
58699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58700    unix_path=`$CYGPATH -u "$windows_path"`
58701    new_path="$unix_path"
58702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58704    new_path="$unix_path"
58705  fi
58706
58707  if test "x$path" != "x$new_path"; then
58708    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58710$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58711  fi
58712
58713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58715
58716    else
58717      # We're on a unix platform. Hooray! :)
58718      path="$POTENTIAL_FREETYPE_LIB_PATH"
58719      has_space=`$ECHO "$path" | $GREP " "`
58720      if test "x$has_space" != x; then
58721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58722$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58724      fi
58725
58726      # Use eval to expand a potential ~
58727      eval path="$path"
58728      if test ! -f "$path" && test ! -d "$path"; then
58729        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58730      fi
58731
58732      if test -d "$path"; then
58733        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58734      else
58735        dir="`$DIRNAME "$path"`"
58736        base="`$BASENAME "$path"`"
58737        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58738      fi
58739    fi
58740  fi
58741
58742
58743    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58745$as_echo_n "checking for freetype includes... " >&6; }
58746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58747$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58748    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58750$as_echo_n "checking for freetype libraries... " >&6; }
58751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58752$as_echo "$FREETYPE_LIB_PATH" >&6; }
58753  fi
58754
58755        if test "x$FOUND_FREETYPE" != xyes; then
58756          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58757        fi
58758      else
58759        # User specified only one of lib or include. This is an error.
58760        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58761          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58762$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58763          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58764        else
58765          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58766$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58767          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58768        fi
58769      fi
58770    else
58771      # User did not specify settings, but we need freetype. Try to locate it.
58772
58773      if test "x$BUNDLE_FREETYPE" = x; then
58774        # If not specified, default is to bundle freetype only on windows
58775        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58776          BUNDLE_FREETYPE=yes
58777        else
58778          BUNDLE_FREETYPE=no
58779        fi
58780      fi
58781
58782      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58783      if test "x$SYSROOT" = x; then
58784        if test "x$FOUND_FREETYPE" != xyes; then
58785          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58786          if test "x$PKG_CONFIG" != x; then
58787
58788pkg_failed=no
58789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58790$as_echo_n "checking for FREETYPE... " >&6; }
58791
58792if test -n "$FREETYPE_CFLAGS"; then
58793    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58794 elif test -n "$PKG_CONFIG"; then
58795    if test -n "$PKG_CONFIG" && \
58796    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58797  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58798  ac_status=$?
58799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58800  test $ac_status = 0; }; then
58801  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58802else
58803  pkg_failed=yes
58804fi
58805 else
58806    pkg_failed=untried
58807fi
58808if test -n "$FREETYPE_LIBS"; then
58809    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58810 elif test -n "$PKG_CONFIG"; then
58811    if test -n "$PKG_CONFIG" && \
58812    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58813  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58814  ac_status=$?
58815  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58816  test $ac_status = 0; }; then
58817  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58818else
58819  pkg_failed=yes
58820fi
58821 else
58822    pkg_failed=untried
58823fi
58824
58825
58826
58827if test $pkg_failed = yes; then
58828
58829if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58830        _pkg_short_errors_supported=yes
58831else
58832        _pkg_short_errors_supported=no
58833fi
58834        if test $_pkg_short_errors_supported = yes; then
58835	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58836        else
58837	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58838        fi
58839	# Put the nasty error message in config.log where it belongs
58840	echo "$FREETYPE_PKG_ERRORS" >&5
58841
58842	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58843$as_echo "no" >&6; }
58844                FOUND_FREETYPE=no
58845elif test $pkg_failed = untried; then
58846	FOUND_FREETYPE=no
58847else
58848	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58849	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58851$as_echo "yes" >&6; }
58852	FOUND_FREETYPE=yes
58853fi
58854            if test "x$FOUND_FREETYPE" = xyes; then
58855              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58856              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58857              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58858              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58859                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58860              fi
58861              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58862              if test "x$BUNDLE_FREETYPE" = xyes; then
58863                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58864$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58865                FOUND_FREETYPE=no
58866              else
58867                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58868$as_echo_n "checking for freetype... " >&6; }
58869                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58870$as_echo "yes (using pkg-config)" >&6; }
58871              fi
58872            fi
58873          fi
58874        fi
58875      fi
58876
58877      if test "x$FOUND_FREETYPE" != xyes; then
58878        # Check in well-known locations
58879        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58880          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58881
58882  windows_path="$FREETYPE_BASE_DIR"
58883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58884    unix_path=`$CYGPATH -u "$windows_path"`
58885    FREETYPE_BASE_DIR="$unix_path"
58886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58888    FREETYPE_BASE_DIR="$unix_path"
58889  fi
58890
58891
58892  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58893  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58894  METHOD="well-known location"
58895
58896  # Let's start with an optimistic view of the world :-)
58897  FOUND_FREETYPE=yes
58898
58899  # First look for the canonical freetype main include file ft2build.h.
58900  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58901    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58902    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58903    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58904      # Fail.
58905      FOUND_FREETYPE=no
58906    fi
58907  fi
58908
58909  if test "x$FOUND_FREETYPE" = xyes; then
58910    # Include file found, let's continue the sanity check.
58911    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58912$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58913
58914    # Reset to default value
58915    FREETYPE_BASE_NAME=freetype
58916    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58917    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58918      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58919          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58920        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58921        # for the .6 version explicitly.
58922        FREETYPE_BASE_NAME=freetype.6
58923        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58924        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58925$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58926      else
58927        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58928$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58929        FOUND_FREETYPE=no
58930      fi
58931    else
58932      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58933        # On Windows, we will need both .lib and .dll file.
58934        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58935          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58936$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58937          FOUND_FREETYPE=no
58938        fi
58939      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58940          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58941        # Found lib in isa dir, use that instead.
58942        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58943        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58944$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58945      fi
58946    fi
58947  fi
58948
58949  if test "x$FOUND_FREETYPE" = xyes; then
58950
58951  # Only process if variable expands to non-empty
58952
58953  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58955
58956  # Input might be given as Windows format, start by converting to
58957  # unix format.
58958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58959  new_path=`$CYGPATH -u "$path"`
58960
58961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58964  # "foo.exe" is OK but "foo" is an error.
58965  #
58966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58967  # It is also a way to make sure we got the proper file name for the real test later on.
58968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58969  if test "x$test_shortpath" = x; then
58970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58973  fi
58974
58975  # Call helper function which possibly converts this using DOS-style short mode.
58976  # If so, the updated path is stored in $new_path.
58977
58978  input_path="$new_path"
58979  # Check if we need to convert this using DOS-style short mode. If the path
58980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58981  # take no chances and rewrite it.
58982  # Note: m4 eats our [], so we need to use [ and ] instead.
58983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58984  if test "x$has_forbidden_chars" != x; then
58985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58989      # Going to short mode and back again did indeed matter. Since short mode is
58990      # case insensitive, let's make it lowercase to improve readability.
58991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58992      # Now convert it back to Unix-style (cygpath)
58993      input_path=`$CYGPATH -u "$shortmode_path"`
58994      new_path="$input_path"
58995    fi
58996  fi
58997
58998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58999  if test "x$test_cygdrive_prefix" = x; then
59000    # As a simple fix, exclude /usr/bin since it's not a real path.
59001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59003      # a path prefixed by /cygdrive for fixpath to work.
59004      new_path="$CYGWIN_ROOT_PATH$input_path"
59005    fi
59006  fi
59007
59008
59009  if test "x$path" != "x$new_path"; then
59010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59013  fi
59014
59015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59016
59017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59018  has_colon=`$ECHO $path | $GREP ^.:`
59019  new_path="$path"
59020  if test "x$has_colon" = x; then
59021    # Not in mixed or Windows style, start by that.
59022    new_path=`cmd //c echo $path`
59023  fi
59024
59025
59026  input_path="$new_path"
59027  # Check if we need to convert this using DOS-style short mode. If the path
59028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59029  # take no chances and rewrite it.
59030  # Note: m4 eats our [], so we need to use [ and ] instead.
59031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59032  if test "x$has_forbidden_chars" != x; then
59033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59035  fi
59036
59037
59038  windows_path="$new_path"
59039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59040    unix_path=`$CYGPATH -u "$windows_path"`
59041    new_path="$unix_path"
59042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59044    new_path="$unix_path"
59045  fi
59046
59047  if test "x$path" != "x$new_path"; then
59048    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59051  fi
59052
59053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59055
59056    else
59057      # We're on a unix platform. Hooray! :)
59058      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59059      has_space=`$ECHO "$path" | $GREP " "`
59060      if test "x$has_space" != x; then
59061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59064      fi
59065
59066      # Use eval to expand a potential ~
59067      eval path="$path"
59068      if test ! -f "$path" && test ! -d "$path"; then
59069        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59070      fi
59071
59072      if test -d "$path"; then
59073        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59074      else
59075        dir="`$DIRNAME "$path"`"
59076        base="`$BASENAME "$path"`"
59077        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59078      fi
59079    fi
59080  fi
59081
59082
59083  # Only process if variable expands to non-empty
59084
59085  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59087
59088  # Input might be given as Windows format, start by converting to
59089  # unix format.
59090  path="$POTENTIAL_FREETYPE_LIB_PATH"
59091  new_path=`$CYGPATH -u "$path"`
59092
59093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59096  # "foo.exe" is OK but "foo" is an error.
59097  #
59098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59099  # It is also a way to make sure we got the proper file name for the real test later on.
59100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59101  if test "x$test_shortpath" = x; then
59102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59103$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59104    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59105  fi
59106
59107  # Call helper function which possibly converts this using DOS-style short mode.
59108  # If so, the updated path is stored in $new_path.
59109
59110  input_path="$new_path"
59111  # Check if we need to convert this using DOS-style short mode. If the path
59112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59113  # take no chances and rewrite it.
59114  # Note: m4 eats our [], so we need to use [ and ] instead.
59115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59116  if test "x$has_forbidden_chars" != x; then
59117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59121      # Going to short mode and back again did indeed matter. Since short mode is
59122      # case insensitive, let's make it lowercase to improve readability.
59123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59124      # Now convert it back to Unix-style (cygpath)
59125      input_path=`$CYGPATH -u "$shortmode_path"`
59126      new_path="$input_path"
59127    fi
59128  fi
59129
59130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59131  if test "x$test_cygdrive_prefix" = x; then
59132    # As a simple fix, exclude /usr/bin since it's not a real path.
59133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59135      # a path prefixed by /cygdrive for fixpath to work.
59136      new_path="$CYGWIN_ROOT_PATH$input_path"
59137    fi
59138  fi
59139
59140
59141  if test "x$path" != "x$new_path"; then
59142    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59144$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59145  fi
59146
59147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59148
59149  path="$POTENTIAL_FREETYPE_LIB_PATH"
59150  has_colon=`$ECHO $path | $GREP ^.:`
59151  new_path="$path"
59152  if test "x$has_colon" = x; then
59153    # Not in mixed or Windows style, start by that.
59154    new_path=`cmd //c echo $path`
59155  fi
59156
59157
59158  input_path="$new_path"
59159  # Check if we need to convert this using DOS-style short mode. If the path
59160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59161  # take no chances and rewrite it.
59162  # Note: m4 eats our [], so we need to use [ and ] instead.
59163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59164  if test "x$has_forbidden_chars" != x; then
59165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59167  fi
59168
59169
59170  windows_path="$new_path"
59171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59172    unix_path=`$CYGPATH -u "$windows_path"`
59173    new_path="$unix_path"
59174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59176    new_path="$unix_path"
59177  fi
59178
59179  if test "x$path" != "x$new_path"; then
59180    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59182$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59183  fi
59184
59185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59187
59188    else
59189      # We're on a unix platform. Hooray! :)
59190      path="$POTENTIAL_FREETYPE_LIB_PATH"
59191      has_space=`$ECHO "$path" | $GREP " "`
59192      if test "x$has_space" != x; then
59193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59196      fi
59197
59198      # Use eval to expand a potential ~
59199      eval path="$path"
59200      if test ! -f "$path" && test ! -d "$path"; then
59201        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59202      fi
59203
59204      if test -d "$path"; then
59205        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59206      else
59207        dir="`$DIRNAME "$path"`"
59208        base="`$BASENAME "$path"`"
59209        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59210      fi
59211    fi
59212  fi
59213
59214
59215    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59217$as_echo_n "checking for freetype includes... " >&6; }
59218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59219$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59220    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59222$as_echo_n "checking for freetype libraries... " >&6; }
59223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59224$as_echo "$FREETYPE_LIB_PATH" >&6; }
59225  fi
59226
59227          if test "x$FOUND_FREETYPE" != xyes; then
59228            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59229
59230  windows_path="$FREETYPE_BASE_DIR"
59231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59232    unix_path=`$CYGPATH -u "$windows_path"`
59233    FREETYPE_BASE_DIR="$unix_path"
59234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59236    FREETYPE_BASE_DIR="$unix_path"
59237  fi
59238
59239
59240  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59241  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59242  METHOD="well-known location"
59243
59244  # Let's start with an optimistic view of the world :-)
59245  FOUND_FREETYPE=yes
59246
59247  # First look for the canonical freetype main include file ft2build.h.
59248  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59249    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59250    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59251    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59252      # Fail.
59253      FOUND_FREETYPE=no
59254    fi
59255  fi
59256
59257  if test "x$FOUND_FREETYPE" = xyes; then
59258    # Include file found, let's continue the sanity check.
59259    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59260$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59261
59262    # Reset to default value
59263    FREETYPE_BASE_NAME=freetype
59264    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59265    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59266      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59267          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59268        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59269        # for the .6 version explicitly.
59270        FREETYPE_BASE_NAME=freetype.6
59271        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59272        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59273$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59274      else
59275        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59276$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59277        FOUND_FREETYPE=no
59278      fi
59279    else
59280      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59281        # On Windows, we will need both .lib and .dll file.
59282        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59283          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59284$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59285          FOUND_FREETYPE=no
59286        fi
59287      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59288          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59289        # Found lib in isa dir, use that instead.
59290        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59291        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59292$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59293      fi
59294    fi
59295  fi
59296
59297  if test "x$FOUND_FREETYPE" = xyes; then
59298
59299  # Only process if variable expands to non-empty
59300
59301  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59303
59304  # Input might be given as Windows format, start by converting to
59305  # unix format.
59306  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59307  new_path=`$CYGPATH -u "$path"`
59308
59309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59312  # "foo.exe" is OK but "foo" is an error.
59313  #
59314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59315  # It is also a way to make sure we got the proper file name for the real test later on.
59316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59317  if test "x$test_shortpath" = x; then
59318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59321  fi
59322
59323  # Call helper function which possibly converts this using DOS-style short mode.
59324  # If so, the updated path is stored in $new_path.
59325
59326  input_path="$new_path"
59327  # Check if we need to convert this using DOS-style short mode. If the path
59328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59329  # take no chances and rewrite it.
59330  # Note: m4 eats our [], so we need to use [ and ] instead.
59331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59332  if test "x$has_forbidden_chars" != x; then
59333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59337      # Going to short mode and back again did indeed matter. Since short mode is
59338      # case insensitive, let's make it lowercase to improve readability.
59339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59340      # Now convert it back to Unix-style (cygpath)
59341      input_path=`$CYGPATH -u "$shortmode_path"`
59342      new_path="$input_path"
59343    fi
59344  fi
59345
59346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59347  if test "x$test_cygdrive_prefix" = x; then
59348    # As a simple fix, exclude /usr/bin since it's not a real path.
59349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59351      # a path prefixed by /cygdrive for fixpath to work.
59352      new_path="$CYGWIN_ROOT_PATH$input_path"
59353    fi
59354  fi
59355
59356
59357  if test "x$path" != "x$new_path"; then
59358    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59361  fi
59362
59363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59364
59365  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59366  has_colon=`$ECHO $path | $GREP ^.:`
59367  new_path="$path"
59368  if test "x$has_colon" = x; then
59369    # Not in mixed or Windows style, start by that.
59370    new_path=`cmd //c echo $path`
59371  fi
59372
59373
59374  input_path="$new_path"
59375  # Check if we need to convert this using DOS-style short mode. If the path
59376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59377  # take no chances and rewrite it.
59378  # Note: m4 eats our [], so we need to use [ and ] instead.
59379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59380  if test "x$has_forbidden_chars" != x; then
59381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59383  fi
59384
59385
59386  windows_path="$new_path"
59387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59388    unix_path=`$CYGPATH -u "$windows_path"`
59389    new_path="$unix_path"
59390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59392    new_path="$unix_path"
59393  fi
59394
59395  if test "x$path" != "x$new_path"; then
59396    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59399  fi
59400
59401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59403
59404    else
59405      # We're on a unix platform. Hooray! :)
59406      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59407      has_space=`$ECHO "$path" | $GREP " "`
59408      if test "x$has_space" != x; then
59409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59412      fi
59413
59414      # Use eval to expand a potential ~
59415      eval path="$path"
59416      if test ! -f "$path" && test ! -d "$path"; then
59417        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59418      fi
59419
59420      if test -d "$path"; then
59421        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59422      else
59423        dir="`$DIRNAME "$path"`"
59424        base="`$BASENAME "$path"`"
59425        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59426      fi
59427    fi
59428  fi
59429
59430
59431  # Only process if variable expands to non-empty
59432
59433  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59435
59436  # Input might be given as Windows format, start by converting to
59437  # unix format.
59438  path="$POTENTIAL_FREETYPE_LIB_PATH"
59439  new_path=`$CYGPATH -u "$path"`
59440
59441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59444  # "foo.exe" is OK but "foo" is an error.
59445  #
59446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59447  # It is also a way to make sure we got the proper file name for the real test later on.
59448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59449  if test "x$test_shortpath" = x; then
59450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59453  fi
59454
59455  # Call helper function which possibly converts this using DOS-style short mode.
59456  # If so, the updated path is stored in $new_path.
59457
59458  input_path="$new_path"
59459  # Check if we need to convert this using DOS-style short mode. If the path
59460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59461  # take no chances and rewrite it.
59462  # Note: m4 eats our [], so we need to use [ and ] instead.
59463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59464  if test "x$has_forbidden_chars" != x; then
59465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59469      # Going to short mode and back again did indeed matter. Since short mode is
59470      # case insensitive, let's make it lowercase to improve readability.
59471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59472      # Now convert it back to Unix-style (cygpath)
59473      input_path=`$CYGPATH -u "$shortmode_path"`
59474      new_path="$input_path"
59475    fi
59476  fi
59477
59478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59479  if test "x$test_cygdrive_prefix" = x; then
59480    # As a simple fix, exclude /usr/bin since it's not a real path.
59481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59483      # a path prefixed by /cygdrive for fixpath to work.
59484      new_path="$CYGWIN_ROOT_PATH$input_path"
59485    fi
59486  fi
59487
59488
59489  if test "x$path" != "x$new_path"; then
59490    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59493  fi
59494
59495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59496
59497  path="$POTENTIAL_FREETYPE_LIB_PATH"
59498  has_colon=`$ECHO $path | $GREP ^.:`
59499  new_path="$path"
59500  if test "x$has_colon" = x; then
59501    # Not in mixed or Windows style, start by that.
59502    new_path=`cmd //c echo $path`
59503  fi
59504
59505
59506  input_path="$new_path"
59507  # Check if we need to convert this using DOS-style short mode. If the path
59508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59509  # take no chances and rewrite it.
59510  # Note: m4 eats our [], so we need to use [ and ] instead.
59511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59512  if test "x$has_forbidden_chars" != x; then
59513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59515  fi
59516
59517
59518  windows_path="$new_path"
59519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59520    unix_path=`$CYGPATH -u "$windows_path"`
59521    new_path="$unix_path"
59522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59524    new_path="$unix_path"
59525  fi
59526
59527  if test "x$path" != "x$new_path"; then
59528    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59531  fi
59532
59533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59535
59536    else
59537      # We're on a unix platform. Hooray! :)
59538      path="$POTENTIAL_FREETYPE_LIB_PATH"
59539      has_space=`$ECHO "$path" | $GREP " "`
59540      if test "x$has_space" != x; then
59541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59544      fi
59545
59546      # Use eval to expand a potential ~
59547      eval path="$path"
59548      if test ! -f "$path" && test ! -d "$path"; then
59549        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59550      fi
59551
59552      if test -d "$path"; then
59553        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59554      else
59555        dir="`$DIRNAME "$path"`"
59556        base="`$BASENAME "$path"`"
59557        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59558      fi
59559    fi
59560  fi
59561
59562
59563    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59565$as_echo_n "checking for freetype includes... " >&6; }
59566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59567$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59568    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59570$as_echo_n "checking for freetype libraries... " >&6; }
59571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59572$as_echo "$FREETYPE_LIB_PATH" >&6; }
59573  fi
59574
59575          fi
59576          if test "x$FOUND_FREETYPE" != xyes; then
59577            FREETYPE_BASE_DIR="$HOME/freetype"
59578
59579  windows_path="$FREETYPE_BASE_DIR"
59580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59581    unix_path=`$CYGPATH -u "$windows_path"`
59582    FREETYPE_BASE_DIR="$unix_path"
59583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59585    FREETYPE_BASE_DIR="$unix_path"
59586  fi
59587
59588            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59589
59590  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59591  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59592  METHOD="well-known location"
59593
59594  # Let's start with an optimistic view of the world :-)
59595  FOUND_FREETYPE=yes
59596
59597  # First look for the canonical freetype main include file ft2build.h.
59598  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59599    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59600    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59601    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59602      # Fail.
59603      FOUND_FREETYPE=no
59604    fi
59605  fi
59606
59607  if test "x$FOUND_FREETYPE" = xyes; then
59608    # Include file found, let's continue the sanity check.
59609    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59610$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59611
59612    # Reset to default value
59613    FREETYPE_BASE_NAME=freetype
59614    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59615    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59616      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59617          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59618        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59619        # for the .6 version explicitly.
59620        FREETYPE_BASE_NAME=freetype.6
59621        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59622        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59623$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59624      else
59625        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59626$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59627        FOUND_FREETYPE=no
59628      fi
59629    else
59630      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59631        # On Windows, we will need both .lib and .dll file.
59632        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59633          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59634$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59635          FOUND_FREETYPE=no
59636        fi
59637      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59638          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59639        # Found lib in isa dir, use that instead.
59640        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59641        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59642$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59643      fi
59644    fi
59645  fi
59646
59647  if test "x$FOUND_FREETYPE" = xyes; then
59648
59649  # Only process if variable expands to non-empty
59650
59651  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59653
59654  # Input might be given as Windows format, start by converting to
59655  # unix format.
59656  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59657  new_path=`$CYGPATH -u "$path"`
59658
59659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59662  # "foo.exe" is OK but "foo" is an error.
59663  #
59664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59665  # It is also a way to make sure we got the proper file name for the real test later on.
59666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59667  if test "x$test_shortpath" = x; then
59668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59669$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59670    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59671  fi
59672
59673  # Call helper function which possibly converts this using DOS-style short mode.
59674  # If so, the updated path is stored in $new_path.
59675
59676  input_path="$new_path"
59677  # Check if we need to convert this using DOS-style short mode. If the path
59678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59679  # take no chances and rewrite it.
59680  # Note: m4 eats our [], so we need to use [ and ] instead.
59681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59682  if test "x$has_forbidden_chars" != x; then
59683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59687      # Going to short mode and back again did indeed matter. Since short mode is
59688      # case insensitive, let's make it lowercase to improve readability.
59689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59690      # Now convert it back to Unix-style (cygpath)
59691      input_path=`$CYGPATH -u "$shortmode_path"`
59692      new_path="$input_path"
59693    fi
59694  fi
59695
59696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59697  if test "x$test_cygdrive_prefix" = x; then
59698    # As a simple fix, exclude /usr/bin since it's not a real path.
59699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59701      # a path prefixed by /cygdrive for fixpath to work.
59702      new_path="$CYGWIN_ROOT_PATH$input_path"
59703    fi
59704  fi
59705
59706
59707  if test "x$path" != "x$new_path"; then
59708    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59710$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59711  fi
59712
59713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59714
59715  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59716  has_colon=`$ECHO $path | $GREP ^.:`
59717  new_path="$path"
59718  if test "x$has_colon" = x; then
59719    # Not in mixed or Windows style, start by that.
59720    new_path=`cmd //c echo $path`
59721  fi
59722
59723
59724  input_path="$new_path"
59725  # Check if we need to convert this using DOS-style short mode. If the path
59726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59727  # take no chances and rewrite it.
59728  # Note: m4 eats our [], so we need to use [ and ] instead.
59729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59730  if test "x$has_forbidden_chars" != x; then
59731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59733  fi
59734
59735
59736  windows_path="$new_path"
59737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59738    unix_path=`$CYGPATH -u "$windows_path"`
59739    new_path="$unix_path"
59740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59742    new_path="$unix_path"
59743  fi
59744
59745  if test "x$path" != "x$new_path"; then
59746    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59749  fi
59750
59751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59753
59754    else
59755      # We're on a unix platform. Hooray! :)
59756      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59757      has_space=`$ECHO "$path" | $GREP " "`
59758      if test "x$has_space" != x; then
59759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59762      fi
59763
59764      # Use eval to expand a potential ~
59765      eval path="$path"
59766      if test ! -f "$path" && test ! -d "$path"; then
59767        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59768      fi
59769
59770      if test -d "$path"; then
59771        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59772      else
59773        dir="`$DIRNAME "$path"`"
59774        base="`$BASENAME "$path"`"
59775        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59776      fi
59777    fi
59778  fi
59779
59780
59781  # Only process if variable expands to non-empty
59782
59783  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59785
59786  # Input might be given as Windows format, start by converting to
59787  # unix format.
59788  path="$POTENTIAL_FREETYPE_LIB_PATH"
59789  new_path=`$CYGPATH -u "$path"`
59790
59791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59794  # "foo.exe" is OK but "foo" is an error.
59795  #
59796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59797  # It is also a way to make sure we got the proper file name for the real test later on.
59798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59799  if test "x$test_shortpath" = x; then
59800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59803  fi
59804
59805  # Call helper function which possibly converts this using DOS-style short mode.
59806  # If so, the updated path is stored in $new_path.
59807
59808  input_path="$new_path"
59809  # Check if we need to convert this using DOS-style short mode. If the path
59810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59811  # take no chances and rewrite it.
59812  # Note: m4 eats our [], so we need to use [ and ] instead.
59813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59814  if test "x$has_forbidden_chars" != x; then
59815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59819      # Going to short mode and back again did indeed matter. Since short mode is
59820      # case insensitive, let's make it lowercase to improve readability.
59821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59822      # Now convert it back to Unix-style (cygpath)
59823      input_path=`$CYGPATH -u "$shortmode_path"`
59824      new_path="$input_path"
59825    fi
59826  fi
59827
59828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59829  if test "x$test_cygdrive_prefix" = x; then
59830    # As a simple fix, exclude /usr/bin since it's not a real path.
59831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59833      # a path prefixed by /cygdrive for fixpath to work.
59834      new_path="$CYGWIN_ROOT_PATH$input_path"
59835    fi
59836  fi
59837
59838
59839  if test "x$path" != "x$new_path"; then
59840    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59843  fi
59844
59845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59846
59847  path="$POTENTIAL_FREETYPE_LIB_PATH"
59848  has_colon=`$ECHO $path | $GREP ^.:`
59849  new_path="$path"
59850  if test "x$has_colon" = x; then
59851    # Not in mixed or Windows style, start by that.
59852    new_path=`cmd //c echo $path`
59853  fi
59854
59855
59856  input_path="$new_path"
59857  # Check if we need to convert this using DOS-style short mode. If the path
59858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59859  # take no chances and rewrite it.
59860  # Note: m4 eats our [], so we need to use [ and ] instead.
59861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59862  if test "x$has_forbidden_chars" != x; then
59863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59865  fi
59866
59867
59868  windows_path="$new_path"
59869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59870    unix_path=`$CYGPATH -u "$windows_path"`
59871    new_path="$unix_path"
59872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59874    new_path="$unix_path"
59875  fi
59876
59877  if test "x$path" != "x$new_path"; then
59878    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59881  fi
59882
59883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59885
59886    else
59887      # We're on a unix platform. Hooray! :)
59888      path="$POTENTIAL_FREETYPE_LIB_PATH"
59889      has_space=`$ECHO "$path" | $GREP " "`
59890      if test "x$has_space" != x; then
59891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59894      fi
59895
59896      # Use eval to expand a potential ~
59897      eval path="$path"
59898      if test ! -f "$path" && test ! -d "$path"; then
59899        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59900      fi
59901
59902      if test -d "$path"; then
59903        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59904      else
59905        dir="`$DIRNAME "$path"`"
59906        base="`$BASENAME "$path"`"
59907        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59908      fi
59909    fi
59910  fi
59911
59912
59913    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59915$as_echo_n "checking for freetype includes... " >&6; }
59916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59917$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59918    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59920$as_echo_n "checking for freetype libraries... " >&6; }
59921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59922$as_echo "$FREETYPE_LIB_PATH" >&6; }
59923  fi
59924
59925            else
59926
59927  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59928  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59929  METHOD="well-known location"
59930
59931  # Let's start with an optimistic view of the world :-)
59932  FOUND_FREETYPE=yes
59933
59934  # First look for the canonical freetype main include file ft2build.h.
59935  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59936    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59937    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59938    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59939      # Fail.
59940      FOUND_FREETYPE=no
59941    fi
59942  fi
59943
59944  if test "x$FOUND_FREETYPE" = xyes; then
59945    # Include file found, let's continue the sanity check.
59946    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59947$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59948
59949    # Reset to default value
59950    FREETYPE_BASE_NAME=freetype
59951    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59952    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59953      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59954          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59955        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59956        # for the .6 version explicitly.
59957        FREETYPE_BASE_NAME=freetype.6
59958        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59959        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59960$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59961      else
59962        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59963$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59964        FOUND_FREETYPE=no
59965      fi
59966    else
59967      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59968        # On Windows, we will need both .lib and .dll file.
59969        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59970          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59971$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59972          FOUND_FREETYPE=no
59973        fi
59974      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59975          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59976        # Found lib in isa dir, use that instead.
59977        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59978        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59979$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59980      fi
59981    fi
59982  fi
59983
59984  if test "x$FOUND_FREETYPE" = xyes; then
59985
59986  # Only process if variable expands to non-empty
59987
59988  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59990
59991  # Input might be given as Windows format, start by converting to
59992  # unix format.
59993  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59994  new_path=`$CYGPATH -u "$path"`
59995
59996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59999  # "foo.exe" is OK but "foo" is an error.
60000  #
60001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60002  # It is also a way to make sure we got the proper file name for the real test later on.
60003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60004  if test "x$test_shortpath" = x; then
60005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60006$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60007    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60008  fi
60009
60010  # Call helper function which possibly converts this using DOS-style short mode.
60011  # If so, the updated path is stored in $new_path.
60012
60013  input_path="$new_path"
60014  # Check if we need to convert this using DOS-style short mode. If the path
60015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60016  # take no chances and rewrite it.
60017  # Note: m4 eats our [], so we need to use [ and ] instead.
60018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60019  if test "x$has_forbidden_chars" != x; then
60020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60024      # Going to short mode and back again did indeed matter. Since short mode is
60025      # case insensitive, let's make it lowercase to improve readability.
60026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60027      # Now convert it back to Unix-style (cygpath)
60028      input_path=`$CYGPATH -u "$shortmode_path"`
60029      new_path="$input_path"
60030    fi
60031  fi
60032
60033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60034  if test "x$test_cygdrive_prefix" = x; then
60035    # As a simple fix, exclude /usr/bin since it's not a real path.
60036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60038      # a path prefixed by /cygdrive for fixpath to work.
60039      new_path="$CYGWIN_ROOT_PATH$input_path"
60040    fi
60041  fi
60042
60043
60044  if test "x$path" != "x$new_path"; then
60045    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60048  fi
60049
60050    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60051
60052  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60053  has_colon=`$ECHO $path | $GREP ^.:`
60054  new_path="$path"
60055  if test "x$has_colon" = x; then
60056    # Not in mixed or Windows style, start by that.
60057    new_path=`cmd //c echo $path`
60058  fi
60059
60060
60061  input_path="$new_path"
60062  # Check if we need to convert this using DOS-style short mode. If the path
60063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60064  # take no chances and rewrite it.
60065  # Note: m4 eats our [], so we need to use [ and ] instead.
60066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60067  if test "x$has_forbidden_chars" != x; then
60068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60070  fi
60071
60072
60073  windows_path="$new_path"
60074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60075    unix_path=`$CYGPATH -u "$windows_path"`
60076    new_path="$unix_path"
60077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60079    new_path="$unix_path"
60080  fi
60081
60082  if test "x$path" != "x$new_path"; then
60083    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60085$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60086  fi
60087
60088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60090
60091    else
60092      # We're on a unix platform. Hooray! :)
60093      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60094      has_space=`$ECHO "$path" | $GREP " "`
60095      if test "x$has_space" != x; then
60096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60097$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60098        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60099      fi
60100
60101      # Use eval to expand a potential ~
60102      eval path="$path"
60103      if test ! -f "$path" && test ! -d "$path"; then
60104        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60105      fi
60106
60107      if test -d "$path"; then
60108        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60109      else
60110        dir="`$DIRNAME "$path"`"
60111        base="`$BASENAME "$path"`"
60112        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60113      fi
60114    fi
60115  fi
60116
60117
60118  # Only process if variable expands to non-empty
60119
60120  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60122
60123  # Input might be given as Windows format, start by converting to
60124  # unix format.
60125  path="$POTENTIAL_FREETYPE_LIB_PATH"
60126  new_path=`$CYGPATH -u "$path"`
60127
60128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60131  # "foo.exe" is OK but "foo" is an error.
60132  #
60133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60134  # It is also a way to make sure we got the proper file name for the real test later on.
60135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60136  if test "x$test_shortpath" = x; then
60137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60139    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60140  fi
60141
60142  # Call helper function which possibly converts this using DOS-style short mode.
60143  # If so, the updated path is stored in $new_path.
60144
60145  input_path="$new_path"
60146  # Check if we need to convert this using DOS-style short mode. If the path
60147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60148  # take no chances and rewrite it.
60149  # Note: m4 eats our [], so we need to use [ and ] instead.
60150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60151  if test "x$has_forbidden_chars" != x; then
60152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60156      # Going to short mode and back again did indeed matter. Since short mode is
60157      # case insensitive, let's make it lowercase to improve readability.
60158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60159      # Now convert it back to Unix-style (cygpath)
60160      input_path=`$CYGPATH -u "$shortmode_path"`
60161      new_path="$input_path"
60162    fi
60163  fi
60164
60165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60166  if test "x$test_cygdrive_prefix" = x; then
60167    # As a simple fix, exclude /usr/bin since it's not a real path.
60168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60170      # a path prefixed by /cygdrive for fixpath to work.
60171      new_path="$CYGWIN_ROOT_PATH$input_path"
60172    fi
60173  fi
60174
60175
60176  if test "x$path" != "x$new_path"; then
60177    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60180  fi
60181
60182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60183
60184  path="$POTENTIAL_FREETYPE_LIB_PATH"
60185  has_colon=`$ECHO $path | $GREP ^.:`
60186  new_path="$path"
60187  if test "x$has_colon" = x; then
60188    # Not in mixed or Windows style, start by that.
60189    new_path=`cmd //c echo $path`
60190  fi
60191
60192
60193  input_path="$new_path"
60194  # Check if we need to convert this using DOS-style short mode. If the path
60195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60196  # take no chances and rewrite it.
60197  # Note: m4 eats our [], so we need to use [ and ] instead.
60198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60199  if test "x$has_forbidden_chars" != x; then
60200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60202  fi
60203
60204
60205  windows_path="$new_path"
60206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60207    unix_path=`$CYGPATH -u "$windows_path"`
60208    new_path="$unix_path"
60209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60211    new_path="$unix_path"
60212  fi
60213
60214  if test "x$path" != "x$new_path"; then
60215    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60217$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60218  fi
60219
60220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60222
60223    else
60224      # We're on a unix platform. Hooray! :)
60225      path="$POTENTIAL_FREETYPE_LIB_PATH"
60226      has_space=`$ECHO "$path" | $GREP " "`
60227      if test "x$has_space" != x; then
60228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60231      fi
60232
60233      # Use eval to expand a potential ~
60234      eval path="$path"
60235      if test ! -f "$path" && test ! -d "$path"; then
60236        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60237      fi
60238
60239      if test -d "$path"; then
60240        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60241      else
60242        dir="`$DIRNAME "$path"`"
60243        base="`$BASENAME "$path"`"
60244        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60245      fi
60246    fi
60247  fi
60248
60249
60250    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60252$as_echo_n "checking for freetype includes... " >&6; }
60253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60254$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60255    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60257$as_echo_n "checking for freetype libraries... " >&6; }
60258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60259$as_echo "$FREETYPE_LIB_PATH" >&6; }
60260  fi
60261
60262            fi
60263            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60264                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60265              # Source is available, as a last resort try to build freetype in default location
60266
60267  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60268  BUILD_FREETYPE=yes
60269
60270  # Check if the freetype sources are acessible..
60271  if ! test -d $FREETYPE_SRC_PATH; then
60272    { $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
60273$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60274    BUILD_FREETYPE=no
60275  fi
60276  # ..and contain a vc2010 project file
60277  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60278  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60279    { $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
60280$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60281    BUILD_FREETYPE=no
60282  fi
60283  # Now check if configure found a version of 'msbuild.exe'
60284  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60285    { $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
60286$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;}
60287    BUILD_FREETYPE=no
60288  fi
60289
60290  # Ready to go..
60291  if test "x$BUILD_FREETYPE" = xyes; then
60292    # msbuild requires trailing slashes for output directories
60293    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60294    freetype_lib_path_unix="$freetype_lib_path"
60295    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60296
60297  unix_path="$vcxproj_path"
60298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60299    windows_path=`$CYGPATH -m "$unix_path"`
60300    vcxproj_path="$windows_path"
60301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60302    windows_path=`cmd //c echo $unix_path`
60303    vcxproj_path="$windows_path"
60304  fi
60305
60306
60307  unix_path="$freetype_lib_path"
60308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60309    windows_path=`$CYGPATH -m "$unix_path"`
60310    freetype_lib_path="$windows_path"
60311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60312    windows_path=`cmd //c echo $unix_path`
60313    freetype_lib_path="$windows_path"
60314  fi
60315
60316
60317  unix_path="$freetype_obj_path"
60318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60319    windows_path=`$CYGPATH -m "$unix_path"`
60320    freetype_obj_path="$windows_path"
60321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60322    windows_path=`cmd //c echo $unix_path`
60323    freetype_obj_path="$windows_path"
60324  fi
60325
60326    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60327      freetype_platform=x64
60328    else
60329      freetype_platform=win32
60330    fi
60331
60332    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60333    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60334    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60335    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60336    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60337$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60338
60339    # First we try to build the freetype.dll
60340    $ECHO -e "@echo off\n"\
60341        "$MSBUILD $vcxproj_path "\
60342        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60343        "/p:Configuration=\"Release Multithreaded\" "\
60344        "/p:Platform=$freetype_platform "\
60345        "/p:ConfigurationType=DynamicLibrary "\
60346        "/p:TargetName=freetype "\
60347        "/p:OutDir=\"$freetype_lib_path\" "\
60348        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60349    cmd /c freetype.bat
60350
60351    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60352      # If that succeeds we also build freetype.lib
60353      $ECHO -e "@echo off\n"\
60354          "$MSBUILD $vcxproj_path "\
60355          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60356          "/p:Configuration=\"Release Multithreaded\" "\
60357          "/p:Platform=$freetype_platform "\
60358          "/p:ConfigurationType=StaticLibrary "\
60359          "/p:TargetName=freetype "\
60360          "/p:OutDir=\"$freetype_lib_path\" "\
60361          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60362      cmd /c freetype.bat
60363
60364      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60365        # Once we build both, lib and dll, set freetype lib and include path appropriately
60366        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60367        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60368        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60369$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60370      else
60371        BUILD_FREETYPE=no
60372      fi
60373    else
60374      BUILD_FREETYPE=no
60375    fi
60376  fi
60377
60378              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60379
60380  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60381  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60382  METHOD="well-known location"
60383
60384  # Let's start with an optimistic view of the world :-)
60385  FOUND_FREETYPE=yes
60386
60387  # First look for the canonical freetype main include file ft2build.h.
60388  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60389    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60390    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60391    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60392      # Fail.
60393      FOUND_FREETYPE=no
60394    fi
60395  fi
60396
60397  if test "x$FOUND_FREETYPE" = xyes; then
60398    # Include file found, let's continue the sanity check.
60399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60400$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60401
60402    # Reset to default value
60403    FREETYPE_BASE_NAME=freetype
60404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60406      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60408        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60409        # for the .6 version explicitly.
60410        FREETYPE_BASE_NAME=freetype.6
60411        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60412        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60413$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60414      else
60415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60417        FOUND_FREETYPE=no
60418      fi
60419    else
60420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60421        # On Windows, we will need both .lib and .dll file.
60422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60425          FOUND_FREETYPE=no
60426        fi
60427      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60428          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60429        # Found lib in isa dir, use that instead.
60430        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60431        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60432$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60433      fi
60434    fi
60435  fi
60436
60437  if test "x$FOUND_FREETYPE" = xyes; then
60438
60439  # Only process if variable expands to non-empty
60440
60441  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60443
60444  # Input might be given as Windows format, start by converting to
60445  # unix format.
60446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60447  new_path=`$CYGPATH -u "$path"`
60448
60449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60452  # "foo.exe" is OK but "foo" is an error.
60453  #
60454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60455  # It is also a way to make sure we got the proper file name for the real test later on.
60456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60457  if test "x$test_shortpath" = x; then
60458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60460    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60461  fi
60462
60463  # Call helper function which possibly converts this using DOS-style short mode.
60464  # If so, the updated path is stored in $new_path.
60465
60466  input_path="$new_path"
60467  # Check if we need to convert this using DOS-style short mode. If the path
60468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60469  # take no chances and rewrite it.
60470  # Note: m4 eats our [], so we need to use [ and ] instead.
60471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60472  if test "x$has_forbidden_chars" != x; then
60473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60477      # Going to short mode and back again did indeed matter. Since short mode is
60478      # case insensitive, let's make it lowercase to improve readability.
60479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60480      # Now convert it back to Unix-style (cygpath)
60481      input_path=`$CYGPATH -u "$shortmode_path"`
60482      new_path="$input_path"
60483    fi
60484  fi
60485
60486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60487  if test "x$test_cygdrive_prefix" = x; then
60488    # As a simple fix, exclude /usr/bin since it's not a real path.
60489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60491      # a path prefixed by /cygdrive for fixpath to work.
60492      new_path="$CYGWIN_ROOT_PATH$input_path"
60493    fi
60494  fi
60495
60496
60497  if test "x$path" != "x$new_path"; then
60498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60501  fi
60502
60503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60504
60505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60506  has_colon=`$ECHO $path | $GREP ^.:`
60507  new_path="$path"
60508  if test "x$has_colon" = x; then
60509    # Not in mixed or Windows style, start by that.
60510    new_path=`cmd //c echo $path`
60511  fi
60512
60513
60514  input_path="$new_path"
60515  # Check if we need to convert this using DOS-style short mode. If the path
60516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60517  # take no chances and rewrite it.
60518  # Note: m4 eats our [], so we need to use [ and ] instead.
60519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60520  if test "x$has_forbidden_chars" != x; then
60521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60523  fi
60524
60525
60526  windows_path="$new_path"
60527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60528    unix_path=`$CYGPATH -u "$windows_path"`
60529    new_path="$unix_path"
60530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60532    new_path="$unix_path"
60533  fi
60534
60535  if test "x$path" != "x$new_path"; then
60536    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60538$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60539  fi
60540
60541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60543
60544    else
60545      # We're on a unix platform. Hooray! :)
60546      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60547      has_space=`$ECHO "$path" | $GREP " "`
60548      if test "x$has_space" != x; then
60549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60552      fi
60553
60554      # Use eval to expand a potential ~
60555      eval path="$path"
60556      if test ! -f "$path" && test ! -d "$path"; then
60557        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60558      fi
60559
60560      if test -d "$path"; then
60561        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60562      else
60563        dir="`$DIRNAME "$path"`"
60564        base="`$BASENAME "$path"`"
60565        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60566      fi
60567    fi
60568  fi
60569
60570
60571  # Only process if variable expands to non-empty
60572
60573  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60575
60576  # Input might be given as Windows format, start by converting to
60577  # unix format.
60578  path="$POTENTIAL_FREETYPE_LIB_PATH"
60579  new_path=`$CYGPATH -u "$path"`
60580
60581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60584  # "foo.exe" is OK but "foo" is an error.
60585  #
60586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60587  # It is also a way to make sure we got the proper file name for the real test later on.
60588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60589  if test "x$test_shortpath" = x; then
60590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60592    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60593  fi
60594
60595  # Call helper function which possibly converts this using DOS-style short mode.
60596  # If so, the updated path is stored in $new_path.
60597
60598  input_path="$new_path"
60599  # Check if we need to convert this using DOS-style short mode. If the path
60600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60601  # take no chances and rewrite it.
60602  # Note: m4 eats our [], so we need to use [ and ] instead.
60603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60604  if test "x$has_forbidden_chars" != x; then
60605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60609      # Going to short mode and back again did indeed matter. Since short mode is
60610      # case insensitive, let's make it lowercase to improve readability.
60611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60612      # Now convert it back to Unix-style (cygpath)
60613      input_path=`$CYGPATH -u "$shortmode_path"`
60614      new_path="$input_path"
60615    fi
60616  fi
60617
60618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60619  if test "x$test_cygdrive_prefix" = x; then
60620    # As a simple fix, exclude /usr/bin since it's not a real path.
60621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60623      # a path prefixed by /cygdrive for fixpath to work.
60624      new_path="$CYGWIN_ROOT_PATH$input_path"
60625    fi
60626  fi
60627
60628
60629  if test "x$path" != "x$new_path"; then
60630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60633  fi
60634
60635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60636
60637  path="$POTENTIAL_FREETYPE_LIB_PATH"
60638  has_colon=`$ECHO $path | $GREP ^.:`
60639  new_path="$path"
60640  if test "x$has_colon" = x; then
60641    # Not in mixed or Windows style, start by that.
60642    new_path=`cmd //c echo $path`
60643  fi
60644
60645
60646  input_path="$new_path"
60647  # Check if we need to convert this using DOS-style short mode. If the path
60648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60649  # take no chances and rewrite it.
60650  # Note: m4 eats our [], so we need to use [ and ] instead.
60651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60652  if test "x$has_forbidden_chars" != x; then
60653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60655  fi
60656
60657
60658  windows_path="$new_path"
60659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60660    unix_path=`$CYGPATH -u "$windows_path"`
60661    new_path="$unix_path"
60662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60664    new_path="$unix_path"
60665  fi
60666
60667  if test "x$path" != "x$new_path"; then
60668    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60671  fi
60672
60673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60675
60676    else
60677      # We're on a unix platform. Hooray! :)
60678      path="$POTENTIAL_FREETYPE_LIB_PATH"
60679      has_space=`$ECHO "$path" | $GREP " "`
60680      if test "x$has_space" != x; then
60681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60684      fi
60685
60686      # Use eval to expand a potential ~
60687      eval path="$path"
60688      if test ! -f "$path" && test ! -d "$path"; then
60689        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60690      fi
60691
60692      if test -d "$path"; then
60693        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60694      else
60695        dir="`$DIRNAME "$path"`"
60696        base="`$BASENAME "$path"`"
60697        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60698      fi
60699    fi
60700  fi
60701
60702
60703    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60705$as_echo_n "checking for freetype includes... " >&6; }
60706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60707$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60708    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60710$as_echo_n "checking for freetype libraries... " >&6; }
60711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60712$as_echo "$FREETYPE_LIB_PATH" >&6; }
60713  fi
60714
60715              else
60716
60717  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60718  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60719  METHOD="well-known location"
60720
60721  # Let's start with an optimistic view of the world :-)
60722  FOUND_FREETYPE=yes
60723
60724  # First look for the canonical freetype main include file ft2build.h.
60725  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60726    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60727    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60728    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60729      # Fail.
60730      FOUND_FREETYPE=no
60731    fi
60732  fi
60733
60734  if test "x$FOUND_FREETYPE" = xyes; then
60735    # Include file found, let's continue the sanity check.
60736    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60737$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60738
60739    # Reset to default value
60740    FREETYPE_BASE_NAME=freetype
60741    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60742    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60743      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60744          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60745        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60746        # for the .6 version explicitly.
60747        FREETYPE_BASE_NAME=freetype.6
60748        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60749        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60750$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60751      else
60752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60754        FOUND_FREETYPE=no
60755      fi
60756    else
60757      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60758        # On Windows, we will need both .lib and .dll file.
60759        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60760          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60761$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60762          FOUND_FREETYPE=no
60763        fi
60764      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60765          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60766        # Found lib in isa dir, use that instead.
60767        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60768        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60769$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60770      fi
60771    fi
60772  fi
60773
60774  if test "x$FOUND_FREETYPE" = xyes; then
60775
60776  # Only process if variable expands to non-empty
60777
60778  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60780
60781  # Input might be given as Windows format, start by converting to
60782  # unix format.
60783  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60784  new_path=`$CYGPATH -u "$path"`
60785
60786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60789  # "foo.exe" is OK but "foo" is an error.
60790  #
60791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60792  # It is also a way to make sure we got the proper file name for the real test later on.
60793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60794  if test "x$test_shortpath" = x; then
60795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60797    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60798  fi
60799
60800  # Call helper function which possibly converts this using DOS-style short mode.
60801  # If so, the updated path is stored in $new_path.
60802
60803  input_path="$new_path"
60804  # Check if we need to convert this using DOS-style short mode. If the path
60805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60806  # take no chances and rewrite it.
60807  # Note: m4 eats our [], so we need to use [ and ] instead.
60808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60809  if test "x$has_forbidden_chars" != x; then
60810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60814      # Going to short mode and back again did indeed matter. Since short mode is
60815      # case insensitive, let's make it lowercase to improve readability.
60816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60817      # Now convert it back to Unix-style (cygpath)
60818      input_path=`$CYGPATH -u "$shortmode_path"`
60819      new_path="$input_path"
60820    fi
60821  fi
60822
60823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60824  if test "x$test_cygdrive_prefix" = x; then
60825    # As a simple fix, exclude /usr/bin since it's not a real path.
60826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60828      # a path prefixed by /cygdrive for fixpath to work.
60829      new_path="$CYGWIN_ROOT_PATH$input_path"
60830    fi
60831  fi
60832
60833
60834  if test "x$path" != "x$new_path"; then
60835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60838  fi
60839
60840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60841
60842  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60843  has_colon=`$ECHO $path | $GREP ^.:`
60844  new_path="$path"
60845  if test "x$has_colon" = x; then
60846    # Not in mixed or Windows style, start by that.
60847    new_path=`cmd //c echo $path`
60848  fi
60849
60850
60851  input_path="$new_path"
60852  # Check if we need to convert this using DOS-style short mode. If the path
60853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60854  # take no chances and rewrite it.
60855  # Note: m4 eats our [], so we need to use [ and ] instead.
60856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60857  if test "x$has_forbidden_chars" != x; then
60858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60860  fi
60861
60862
60863  windows_path="$new_path"
60864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60865    unix_path=`$CYGPATH -u "$windows_path"`
60866    new_path="$unix_path"
60867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60869    new_path="$unix_path"
60870  fi
60871
60872  if test "x$path" != "x$new_path"; then
60873    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60876  fi
60877
60878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60880
60881    else
60882      # We're on a unix platform. Hooray! :)
60883      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60884      has_space=`$ECHO "$path" | $GREP " "`
60885      if test "x$has_space" != x; then
60886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60889      fi
60890
60891      # Use eval to expand a potential ~
60892      eval path="$path"
60893      if test ! -f "$path" && test ! -d "$path"; then
60894        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60895      fi
60896
60897      if test -d "$path"; then
60898        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60899      else
60900        dir="`$DIRNAME "$path"`"
60901        base="`$BASENAME "$path"`"
60902        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60903      fi
60904    fi
60905  fi
60906
60907
60908  # Only process if variable expands to non-empty
60909
60910  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60912
60913  # Input might be given as Windows format, start by converting to
60914  # unix format.
60915  path="$POTENTIAL_FREETYPE_LIB_PATH"
60916  new_path=`$CYGPATH -u "$path"`
60917
60918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60921  # "foo.exe" is OK but "foo" is an error.
60922  #
60923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60924  # It is also a way to make sure we got the proper file name for the real test later on.
60925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60926  if test "x$test_shortpath" = x; then
60927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60928$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60929    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60930  fi
60931
60932  # Call helper function which possibly converts this using DOS-style short mode.
60933  # If so, the updated path is stored in $new_path.
60934
60935  input_path="$new_path"
60936  # Check if we need to convert this using DOS-style short mode. If the path
60937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60938  # take no chances and rewrite it.
60939  # Note: m4 eats our [], so we need to use [ and ] instead.
60940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60941  if test "x$has_forbidden_chars" != x; then
60942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60946      # Going to short mode and back again did indeed matter. Since short mode is
60947      # case insensitive, let's make it lowercase to improve readability.
60948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60949      # Now convert it back to Unix-style (cygpath)
60950      input_path=`$CYGPATH -u "$shortmode_path"`
60951      new_path="$input_path"
60952    fi
60953  fi
60954
60955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60956  if test "x$test_cygdrive_prefix" = x; then
60957    # As a simple fix, exclude /usr/bin since it's not a real path.
60958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60960      # a path prefixed by /cygdrive for fixpath to work.
60961      new_path="$CYGWIN_ROOT_PATH$input_path"
60962    fi
60963  fi
60964
60965
60966  if test "x$path" != "x$new_path"; then
60967    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60970  fi
60971
60972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60973
60974  path="$POTENTIAL_FREETYPE_LIB_PATH"
60975  has_colon=`$ECHO $path | $GREP ^.:`
60976  new_path="$path"
60977  if test "x$has_colon" = x; then
60978    # Not in mixed or Windows style, start by that.
60979    new_path=`cmd //c echo $path`
60980  fi
60981
60982
60983  input_path="$new_path"
60984  # Check if we need to convert this using DOS-style short mode. If the path
60985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60986  # take no chances and rewrite it.
60987  # Note: m4 eats our [], so we need to use [ and ] instead.
60988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60989  if test "x$has_forbidden_chars" != x; then
60990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60992  fi
60993
60994
60995  windows_path="$new_path"
60996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60997    unix_path=`$CYGPATH -u "$windows_path"`
60998    new_path="$unix_path"
60999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61001    new_path="$unix_path"
61002  fi
61003
61004  if test "x$path" != "x$new_path"; then
61005    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61008  fi
61009
61010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61012
61013    else
61014      # We're on a unix platform. Hooray! :)
61015      path="$POTENTIAL_FREETYPE_LIB_PATH"
61016      has_space=`$ECHO "$path" | $GREP " "`
61017      if test "x$has_space" != x; then
61018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61021      fi
61022
61023      # Use eval to expand a potential ~
61024      eval path="$path"
61025      if test ! -f "$path" && test ! -d "$path"; then
61026        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61027      fi
61028
61029      if test -d "$path"; then
61030        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61031      else
61032        dir="`$DIRNAME "$path"`"
61033        base="`$BASENAME "$path"`"
61034        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61035      fi
61036    fi
61037  fi
61038
61039
61040    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61042$as_echo_n "checking for freetype includes... " >&6; }
61043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61044$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61045    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61047$as_echo_n "checking for freetype libraries... " >&6; }
61048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61049$as_echo "$FREETYPE_LIB_PATH" >&6; }
61050  fi
61051
61052              fi
61053            fi
61054          fi
61055        else
61056          FREETYPE_BASE_DIR="$SYSROOT/usr"
61057
61058  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61059  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61060  METHOD="well-known location"
61061
61062  # Let's start with an optimistic view of the world :-)
61063  FOUND_FREETYPE=yes
61064
61065  # First look for the canonical freetype main include file ft2build.h.
61066  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61067    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61068    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61069    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61070      # Fail.
61071      FOUND_FREETYPE=no
61072    fi
61073  fi
61074
61075  if test "x$FOUND_FREETYPE" = xyes; then
61076    # Include file found, let's continue the sanity check.
61077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61078$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61079
61080    # Reset to default value
61081    FREETYPE_BASE_NAME=freetype
61082    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61083    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61084      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61085          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61086        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61087        # for the .6 version explicitly.
61088        FREETYPE_BASE_NAME=freetype.6
61089        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61090        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61091$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61092      else
61093        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61094$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61095        FOUND_FREETYPE=no
61096      fi
61097    else
61098      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61099        # On Windows, we will need both .lib and .dll file.
61100        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61101          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61102$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61103          FOUND_FREETYPE=no
61104        fi
61105      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61106          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61107        # Found lib in isa dir, use that instead.
61108        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61109        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61110$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61111      fi
61112    fi
61113  fi
61114
61115  if test "x$FOUND_FREETYPE" = xyes; then
61116
61117  # Only process if variable expands to non-empty
61118
61119  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61121
61122  # Input might be given as Windows format, start by converting to
61123  # unix format.
61124  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61125  new_path=`$CYGPATH -u "$path"`
61126
61127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61130  # "foo.exe" is OK but "foo" is an error.
61131  #
61132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61133  # It is also a way to make sure we got the proper file name for the real test later on.
61134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61135  if test "x$test_shortpath" = x; then
61136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61139  fi
61140
61141  # Call helper function which possibly converts this using DOS-style short mode.
61142  # If so, the updated path is stored in $new_path.
61143
61144  input_path="$new_path"
61145  # Check if we need to convert this using DOS-style short mode. If the path
61146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61147  # take no chances and rewrite it.
61148  # Note: m4 eats our [], so we need to use [ and ] instead.
61149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61150  if test "x$has_forbidden_chars" != x; then
61151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61155      # Going to short mode and back again did indeed matter. Since short mode is
61156      # case insensitive, let's make it lowercase to improve readability.
61157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61158      # Now convert it back to Unix-style (cygpath)
61159      input_path=`$CYGPATH -u "$shortmode_path"`
61160      new_path="$input_path"
61161    fi
61162  fi
61163
61164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61165  if test "x$test_cygdrive_prefix" = x; then
61166    # As a simple fix, exclude /usr/bin since it's not a real path.
61167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61169      # a path prefixed by /cygdrive for fixpath to work.
61170      new_path="$CYGWIN_ROOT_PATH$input_path"
61171    fi
61172  fi
61173
61174
61175  if test "x$path" != "x$new_path"; then
61176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61179  fi
61180
61181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61182
61183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61184  has_colon=`$ECHO $path | $GREP ^.:`
61185  new_path="$path"
61186  if test "x$has_colon" = x; then
61187    # Not in mixed or Windows style, start by that.
61188    new_path=`cmd //c echo $path`
61189  fi
61190
61191
61192  input_path="$new_path"
61193  # Check if we need to convert this using DOS-style short mode. If the path
61194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61195  # take no chances and rewrite it.
61196  # Note: m4 eats our [], so we need to use [ and ] instead.
61197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61198  if test "x$has_forbidden_chars" != x; then
61199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61201  fi
61202
61203
61204  windows_path="$new_path"
61205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61206    unix_path=`$CYGPATH -u "$windows_path"`
61207    new_path="$unix_path"
61208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61210    new_path="$unix_path"
61211  fi
61212
61213  if test "x$path" != "x$new_path"; then
61214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61217  fi
61218
61219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61221
61222    else
61223      # We're on a unix platform. Hooray! :)
61224      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61225      has_space=`$ECHO "$path" | $GREP " "`
61226      if test "x$has_space" != x; then
61227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61230      fi
61231
61232      # Use eval to expand a potential ~
61233      eval path="$path"
61234      if test ! -f "$path" && test ! -d "$path"; then
61235        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61236      fi
61237
61238      if test -d "$path"; then
61239        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61240      else
61241        dir="`$DIRNAME "$path"`"
61242        base="`$BASENAME "$path"`"
61243        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61244      fi
61245    fi
61246  fi
61247
61248
61249  # Only process if variable expands to non-empty
61250
61251  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61253
61254  # Input might be given as Windows format, start by converting to
61255  # unix format.
61256  path="$POTENTIAL_FREETYPE_LIB_PATH"
61257  new_path=`$CYGPATH -u "$path"`
61258
61259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61262  # "foo.exe" is OK but "foo" is an error.
61263  #
61264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61265  # It is also a way to make sure we got the proper file name for the real test later on.
61266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61267  if test "x$test_shortpath" = x; then
61268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61270    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61271  fi
61272
61273  # Call helper function which possibly converts this using DOS-style short mode.
61274  # If so, the updated path is stored in $new_path.
61275
61276  input_path="$new_path"
61277  # Check if we need to convert this using DOS-style short mode. If the path
61278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61279  # take no chances and rewrite it.
61280  # Note: m4 eats our [], so we need to use [ and ] instead.
61281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61282  if test "x$has_forbidden_chars" != x; then
61283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61287      # Going to short mode and back again did indeed matter. Since short mode is
61288      # case insensitive, let's make it lowercase to improve readability.
61289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61290      # Now convert it back to Unix-style (cygpath)
61291      input_path=`$CYGPATH -u "$shortmode_path"`
61292      new_path="$input_path"
61293    fi
61294  fi
61295
61296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61297  if test "x$test_cygdrive_prefix" = x; then
61298    # As a simple fix, exclude /usr/bin since it's not a real path.
61299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61301      # a path prefixed by /cygdrive for fixpath to work.
61302      new_path="$CYGWIN_ROOT_PATH$input_path"
61303    fi
61304  fi
61305
61306
61307  if test "x$path" != "x$new_path"; then
61308    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61311  fi
61312
61313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61314
61315  path="$POTENTIAL_FREETYPE_LIB_PATH"
61316  has_colon=`$ECHO $path | $GREP ^.:`
61317  new_path="$path"
61318  if test "x$has_colon" = x; then
61319    # Not in mixed or Windows style, start by that.
61320    new_path=`cmd //c echo $path`
61321  fi
61322
61323
61324  input_path="$new_path"
61325  # Check if we need to convert this using DOS-style short mode. If the path
61326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61327  # take no chances and rewrite it.
61328  # Note: m4 eats our [], so we need to use [ and ] instead.
61329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61330  if test "x$has_forbidden_chars" != x; then
61331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61333  fi
61334
61335
61336  windows_path="$new_path"
61337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61338    unix_path=`$CYGPATH -u "$windows_path"`
61339    new_path="$unix_path"
61340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61342    new_path="$unix_path"
61343  fi
61344
61345  if test "x$path" != "x$new_path"; then
61346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61349  fi
61350
61351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61353
61354    else
61355      # We're on a unix platform. Hooray! :)
61356      path="$POTENTIAL_FREETYPE_LIB_PATH"
61357      has_space=`$ECHO "$path" | $GREP " "`
61358      if test "x$has_space" != x; then
61359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61362      fi
61363
61364      # Use eval to expand a potential ~
61365      eval path="$path"
61366      if test ! -f "$path" && test ! -d "$path"; then
61367        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61368      fi
61369
61370      if test -d "$path"; then
61371        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61372      else
61373        dir="`$DIRNAME "$path"`"
61374        base="`$BASENAME "$path"`"
61375        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61376      fi
61377    fi
61378  fi
61379
61380
61381    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61383$as_echo_n "checking for freetype includes... " >&6; }
61384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61385$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61386    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61388$as_echo_n "checking for freetype libraries... " >&6; }
61389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61390$as_echo "$FREETYPE_LIB_PATH" >&6; }
61391  fi
61392
61393
61394          if test "x$FOUND_FREETYPE" != xyes; then
61395            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61396
61397  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61398  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61399  METHOD="well-known location"
61400
61401  # Let's start with an optimistic view of the world :-)
61402  FOUND_FREETYPE=yes
61403
61404  # First look for the canonical freetype main include file ft2build.h.
61405  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61406    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61407    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61408    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61409      # Fail.
61410      FOUND_FREETYPE=no
61411    fi
61412  fi
61413
61414  if test "x$FOUND_FREETYPE" = xyes; then
61415    # Include file found, let's continue the sanity check.
61416    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61417$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61418
61419    # Reset to default value
61420    FREETYPE_BASE_NAME=freetype
61421    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61422    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61423      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61424          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61425        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61426        # for the .6 version explicitly.
61427        FREETYPE_BASE_NAME=freetype.6
61428        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61429        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61430$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61431      else
61432        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61433$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61434        FOUND_FREETYPE=no
61435      fi
61436    else
61437      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61438        # On Windows, we will need both .lib and .dll file.
61439        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61440          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61441$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61442          FOUND_FREETYPE=no
61443        fi
61444      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61445          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61446        # Found lib in isa dir, use that instead.
61447        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61448        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61449$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61450      fi
61451    fi
61452  fi
61453
61454  if test "x$FOUND_FREETYPE" = xyes; then
61455
61456  # Only process if variable expands to non-empty
61457
61458  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61460
61461  # Input might be given as Windows format, start by converting to
61462  # unix format.
61463  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61464  new_path=`$CYGPATH -u "$path"`
61465
61466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61469  # "foo.exe" is OK but "foo" is an error.
61470  #
61471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61472  # It is also a way to make sure we got the proper file name for the real test later on.
61473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61474  if test "x$test_shortpath" = x; then
61475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61477    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61478  fi
61479
61480  # Call helper function which possibly converts this using DOS-style short mode.
61481  # If so, the updated path is stored in $new_path.
61482
61483  input_path="$new_path"
61484  # Check if we need to convert this using DOS-style short mode. If the path
61485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61486  # take no chances and rewrite it.
61487  # Note: m4 eats our [], so we need to use [ and ] instead.
61488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61489  if test "x$has_forbidden_chars" != x; then
61490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61494      # Going to short mode and back again did indeed matter. Since short mode is
61495      # case insensitive, let's make it lowercase to improve readability.
61496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61497      # Now convert it back to Unix-style (cygpath)
61498      input_path=`$CYGPATH -u "$shortmode_path"`
61499      new_path="$input_path"
61500    fi
61501  fi
61502
61503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61504  if test "x$test_cygdrive_prefix" = x; then
61505    # As a simple fix, exclude /usr/bin since it's not a real path.
61506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61508      # a path prefixed by /cygdrive for fixpath to work.
61509      new_path="$CYGWIN_ROOT_PATH$input_path"
61510    fi
61511  fi
61512
61513
61514  if test "x$path" != "x$new_path"; then
61515    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61518  fi
61519
61520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61521
61522  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61523  has_colon=`$ECHO $path | $GREP ^.:`
61524  new_path="$path"
61525  if test "x$has_colon" = x; then
61526    # Not in mixed or Windows style, start by that.
61527    new_path=`cmd //c echo $path`
61528  fi
61529
61530
61531  input_path="$new_path"
61532  # Check if we need to convert this using DOS-style short mode. If the path
61533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61534  # take no chances and rewrite it.
61535  # Note: m4 eats our [], so we need to use [ and ] instead.
61536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61537  if test "x$has_forbidden_chars" != x; then
61538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61540  fi
61541
61542
61543  windows_path="$new_path"
61544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61545    unix_path=`$CYGPATH -u "$windows_path"`
61546    new_path="$unix_path"
61547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61549    new_path="$unix_path"
61550  fi
61551
61552  if test "x$path" != "x$new_path"; then
61553    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61556  fi
61557
61558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61560
61561    else
61562      # We're on a unix platform. Hooray! :)
61563      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61564      has_space=`$ECHO "$path" | $GREP " "`
61565      if test "x$has_space" != x; then
61566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61567$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61569      fi
61570
61571      # Use eval to expand a potential ~
61572      eval path="$path"
61573      if test ! -f "$path" && test ! -d "$path"; then
61574        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61575      fi
61576
61577      if test -d "$path"; then
61578        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61579      else
61580        dir="`$DIRNAME "$path"`"
61581        base="`$BASENAME "$path"`"
61582        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61583      fi
61584    fi
61585  fi
61586
61587
61588  # Only process if variable expands to non-empty
61589
61590  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61592
61593  # Input might be given as Windows format, start by converting to
61594  # unix format.
61595  path="$POTENTIAL_FREETYPE_LIB_PATH"
61596  new_path=`$CYGPATH -u "$path"`
61597
61598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61601  # "foo.exe" is OK but "foo" is an error.
61602  #
61603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61604  # It is also a way to make sure we got the proper file name for the real test later on.
61605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61606  if test "x$test_shortpath" = x; then
61607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61610  fi
61611
61612  # Call helper function which possibly converts this using DOS-style short mode.
61613  # If so, the updated path is stored in $new_path.
61614
61615  input_path="$new_path"
61616  # Check if we need to convert this using DOS-style short mode. If the path
61617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61618  # take no chances and rewrite it.
61619  # Note: m4 eats our [], so we need to use [ and ] instead.
61620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61621  if test "x$has_forbidden_chars" != x; then
61622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61626      # Going to short mode and back again did indeed matter. Since short mode is
61627      # case insensitive, let's make it lowercase to improve readability.
61628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61629      # Now convert it back to Unix-style (cygpath)
61630      input_path=`$CYGPATH -u "$shortmode_path"`
61631      new_path="$input_path"
61632    fi
61633  fi
61634
61635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61636  if test "x$test_cygdrive_prefix" = x; then
61637    # As a simple fix, exclude /usr/bin since it's not a real path.
61638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61640      # a path prefixed by /cygdrive for fixpath to work.
61641      new_path="$CYGWIN_ROOT_PATH$input_path"
61642    fi
61643  fi
61644
61645
61646  if test "x$path" != "x$new_path"; then
61647    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61650  fi
61651
61652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61653
61654  path="$POTENTIAL_FREETYPE_LIB_PATH"
61655  has_colon=`$ECHO $path | $GREP ^.:`
61656  new_path="$path"
61657  if test "x$has_colon" = x; then
61658    # Not in mixed or Windows style, start by that.
61659    new_path=`cmd //c echo $path`
61660  fi
61661
61662
61663  input_path="$new_path"
61664  # Check if we need to convert this using DOS-style short mode. If the path
61665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61666  # take no chances and rewrite it.
61667  # Note: m4 eats our [], so we need to use [ and ] instead.
61668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61669  if test "x$has_forbidden_chars" != x; then
61670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61672  fi
61673
61674
61675  windows_path="$new_path"
61676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61677    unix_path=`$CYGPATH -u "$windows_path"`
61678    new_path="$unix_path"
61679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61681    new_path="$unix_path"
61682  fi
61683
61684  if test "x$path" != "x$new_path"; then
61685    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61688  fi
61689
61690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61692
61693    else
61694      # We're on a unix platform. Hooray! :)
61695      path="$POTENTIAL_FREETYPE_LIB_PATH"
61696      has_space=`$ECHO "$path" | $GREP " "`
61697      if test "x$has_space" != x; then
61698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61701      fi
61702
61703      # Use eval to expand a potential ~
61704      eval path="$path"
61705      if test ! -f "$path" && test ! -d "$path"; then
61706        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61707      fi
61708
61709      if test -d "$path"; then
61710        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61711      else
61712        dir="`$DIRNAME "$path"`"
61713        base="`$BASENAME "$path"`"
61714        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61715      fi
61716    fi
61717  fi
61718
61719
61720    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61722$as_echo_n "checking for freetype includes... " >&6; }
61723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61724$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61725    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61727$as_echo_n "checking for freetype libraries... " >&6; }
61728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61729$as_echo "$FREETYPE_LIB_PATH" >&6; }
61730  fi
61731
61732          fi
61733          if test "x$FOUND_FREETYPE" != xyes; then
61734            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61735
61736  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61737  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61738  METHOD="well-known location"
61739
61740  # Let's start with an optimistic view of the world :-)
61741  FOUND_FREETYPE=yes
61742
61743  # First look for the canonical freetype main include file ft2build.h.
61744  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61745    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61746    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61747    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61748      # Fail.
61749      FOUND_FREETYPE=no
61750    fi
61751  fi
61752
61753  if test "x$FOUND_FREETYPE" = xyes; then
61754    # Include file found, let's continue the sanity check.
61755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61756$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61757
61758    # Reset to default value
61759    FREETYPE_BASE_NAME=freetype
61760    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61761    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61762      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61763          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61764        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61765        # for the .6 version explicitly.
61766        FREETYPE_BASE_NAME=freetype.6
61767        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61768        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61769$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61770      else
61771        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61772$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61773        FOUND_FREETYPE=no
61774      fi
61775    else
61776      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61777        # On Windows, we will need both .lib and .dll file.
61778        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61779          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61781          FOUND_FREETYPE=no
61782        fi
61783      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61784          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61785        # Found lib in isa dir, use that instead.
61786        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61787        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61788$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61789      fi
61790    fi
61791  fi
61792
61793  if test "x$FOUND_FREETYPE" = xyes; then
61794
61795  # Only process if variable expands to non-empty
61796
61797  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61799
61800  # Input might be given as Windows format, start by converting to
61801  # unix format.
61802  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61803  new_path=`$CYGPATH -u "$path"`
61804
61805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61808  # "foo.exe" is OK but "foo" is an error.
61809  #
61810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61811  # It is also a way to make sure we got the proper file name for the real test later on.
61812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61813  if test "x$test_shortpath" = x; then
61814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61815$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61816    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61817  fi
61818
61819  # Call helper function which possibly converts this using DOS-style short mode.
61820  # If so, the updated path is stored in $new_path.
61821
61822  input_path="$new_path"
61823  # Check if we need to convert this using DOS-style short mode. If the path
61824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61825  # take no chances and rewrite it.
61826  # Note: m4 eats our [], so we need to use [ and ] instead.
61827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61828  if test "x$has_forbidden_chars" != x; then
61829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61833      # Going to short mode and back again did indeed matter. Since short mode is
61834      # case insensitive, let's make it lowercase to improve readability.
61835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61836      # Now convert it back to Unix-style (cygpath)
61837      input_path=`$CYGPATH -u "$shortmode_path"`
61838      new_path="$input_path"
61839    fi
61840  fi
61841
61842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61843  if test "x$test_cygdrive_prefix" = x; then
61844    # As a simple fix, exclude /usr/bin since it's not a real path.
61845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61847      # a path prefixed by /cygdrive for fixpath to work.
61848      new_path="$CYGWIN_ROOT_PATH$input_path"
61849    fi
61850  fi
61851
61852
61853  if test "x$path" != "x$new_path"; then
61854    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61856$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61857  fi
61858
61859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61860
61861  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61862  has_colon=`$ECHO $path | $GREP ^.:`
61863  new_path="$path"
61864  if test "x$has_colon" = x; then
61865    # Not in mixed or Windows style, start by that.
61866    new_path=`cmd //c echo $path`
61867  fi
61868
61869
61870  input_path="$new_path"
61871  # Check if we need to convert this using DOS-style short mode. If the path
61872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61873  # take no chances and rewrite it.
61874  # Note: m4 eats our [], so we need to use [ and ] instead.
61875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61876  if test "x$has_forbidden_chars" != x; then
61877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61879  fi
61880
61881
61882  windows_path="$new_path"
61883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61884    unix_path=`$CYGPATH -u "$windows_path"`
61885    new_path="$unix_path"
61886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61888    new_path="$unix_path"
61889  fi
61890
61891  if test "x$path" != "x$new_path"; then
61892    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61895  fi
61896
61897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61899
61900    else
61901      # We're on a unix platform. Hooray! :)
61902      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61903      has_space=`$ECHO "$path" | $GREP " "`
61904      if test "x$has_space" != x; then
61905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61906$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61907        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61908      fi
61909
61910      # Use eval to expand a potential ~
61911      eval path="$path"
61912      if test ! -f "$path" && test ! -d "$path"; then
61913        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61914      fi
61915
61916      if test -d "$path"; then
61917        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61918      else
61919        dir="`$DIRNAME "$path"`"
61920        base="`$BASENAME "$path"`"
61921        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61922      fi
61923    fi
61924  fi
61925
61926
61927  # Only process if variable expands to non-empty
61928
61929  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61931
61932  # Input might be given as Windows format, start by converting to
61933  # unix format.
61934  path="$POTENTIAL_FREETYPE_LIB_PATH"
61935  new_path=`$CYGPATH -u "$path"`
61936
61937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61940  # "foo.exe" is OK but "foo" is an error.
61941  #
61942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61943  # It is also a way to make sure we got the proper file name for the real test later on.
61944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61945  if test "x$test_shortpath" = x; then
61946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61948    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61949  fi
61950
61951  # Call helper function which possibly converts this using DOS-style short mode.
61952  # If so, the updated path is stored in $new_path.
61953
61954  input_path="$new_path"
61955  # Check if we need to convert this using DOS-style short mode. If the path
61956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61957  # take no chances and rewrite it.
61958  # Note: m4 eats our [], so we need to use [ and ] instead.
61959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61960  if test "x$has_forbidden_chars" != x; then
61961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61965      # Going to short mode and back again did indeed matter. Since short mode is
61966      # case insensitive, let's make it lowercase to improve readability.
61967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61968      # Now convert it back to Unix-style (cygpath)
61969      input_path=`$CYGPATH -u "$shortmode_path"`
61970      new_path="$input_path"
61971    fi
61972  fi
61973
61974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61975  if test "x$test_cygdrive_prefix" = x; then
61976    # As a simple fix, exclude /usr/bin since it's not a real path.
61977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61979      # a path prefixed by /cygdrive for fixpath to work.
61980      new_path="$CYGWIN_ROOT_PATH$input_path"
61981    fi
61982  fi
61983
61984
61985  if test "x$path" != "x$new_path"; then
61986    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61989  fi
61990
61991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61992
61993  path="$POTENTIAL_FREETYPE_LIB_PATH"
61994  has_colon=`$ECHO $path | $GREP ^.:`
61995  new_path="$path"
61996  if test "x$has_colon" = x; then
61997    # Not in mixed or Windows style, start by that.
61998    new_path=`cmd //c echo $path`
61999  fi
62000
62001
62002  input_path="$new_path"
62003  # Check if we need to convert this using DOS-style short mode. If the path
62004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62005  # take no chances and rewrite it.
62006  # Note: m4 eats our [], so we need to use [ and ] instead.
62007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62008  if test "x$has_forbidden_chars" != x; then
62009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62011  fi
62012
62013
62014  windows_path="$new_path"
62015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62016    unix_path=`$CYGPATH -u "$windows_path"`
62017    new_path="$unix_path"
62018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62020    new_path="$unix_path"
62021  fi
62022
62023  if test "x$path" != "x$new_path"; then
62024    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62027  fi
62028
62029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62031
62032    else
62033      # We're on a unix platform. Hooray! :)
62034      path="$POTENTIAL_FREETYPE_LIB_PATH"
62035      has_space=`$ECHO "$path" | $GREP " "`
62036      if test "x$has_space" != x; then
62037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62040      fi
62041
62042      # Use eval to expand a potential ~
62043      eval path="$path"
62044      if test ! -f "$path" && test ! -d "$path"; then
62045        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62046      fi
62047
62048      if test -d "$path"; then
62049        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62050      else
62051        dir="`$DIRNAME "$path"`"
62052        base="`$BASENAME "$path"`"
62053        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62054      fi
62055    fi
62056  fi
62057
62058
62059    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62061$as_echo_n "checking for freetype includes... " >&6; }
62062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62063$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62064    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62066$as_echo_n "checking for freetype libraries... " >&6; }
62067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62068$as_echo "$FREETYPE_LIB_PATH" >&6; }
62069  fi
62070
62071          fi
62072
62073          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62074            if test "x$FOUND_FREETYPE" != xyes; then
62075              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62076              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62077
62078  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62079  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62080  METHOD="well-known location"
62081
62082  # Let's start with an optimistic view of the world :-)
62083  FOUND_FREETYPE=yes
62084
62085  # First look for the canonical freetype main include file ft2build.h.
62086  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62087    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62088    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62089    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62090      # Fail.
62091      FOUND_FREETYPE=no
62092    fi
62093  fi
62094
62095  if test "x$FOUND_FREETYPE" = xyes; then
62096    # Include file found, let's continue the sanity check.
62097    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62098$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62099
62100    # Reset to default value
62101    FREETYPE_BASE_NAME=freetype
62102    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62103    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62104      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62105          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62106        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62107        # for the .6 version explicitly.
62108        FREETYPE_BASE_NAME=freetype.6
62109        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62110        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62111$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62112      else
62113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62114$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62115        FOUND_FREETYPE=no
62116      fi
62117    else
62118      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62119        # On Windows, we will need both .lib and .dll file.
62120        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62121          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62122$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62123          FOUND_FREETYPE=no
62124        fi
62125      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62126          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62127        # Found lib in isa dir, use that instead.
62128        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62129        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62130$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62131      fi
62132    fi
62133  fi
62134
62135  if test "x$FOUND_FREETYPE" = xyes; then
62136
62137  # Only process if variable expands to non-empty
62138
62139  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62141
62142  # Input might be given as Windows format, start by converting to
62143  # unix format.
62144  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62145  new_path=`$CYGPATH -u "$path"`
62146
62147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62150  # "foo.exe" is OK but "foo" is an error.
62151  #
62152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62153  # It is also a way to make sure we got the proper file name for the real test later on.
62154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62155  if test "x$test_shortpath" = x; then
62156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62158    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62159  fi
62160
62161  # Call helper function which possibly converts this using DOS-style short mode.
62162  # If so, the updated path is stored in $new_path.
62163
62164  input_path="$new_path"
62165  # Check if we need to convert this using DOS-style short mode. If the path
62166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62167  # take no chances and rewrite it.
62168  # Note: m4 eats our [], so we need to use [ and ] instead.
62169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62170  if test "x$has_forbidden_chars" != x; then
62171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62175      # Going to short mode and back again did indeed matter. Since short mode is
62176      # case insensitive, let's make it lowercase to improve readability.
62177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62178      # Now convert it back to Unix-style (cygpath)
62179      input_path=`$CYGPATH -u "$shortmode_path"`
62180      new_path="$input_path"
62181    fi
62182  fi
62183
62184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62185  if test "x$test_cygdrive_prefix" = x; then
62186    # As a simple fix, exclude /usr/bin since it's not a real path.
62187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62189      # a path prefixed by /cygdrive for fixpath to work.
62190      new_path="$CYGWIN_ROOT_PATH$input_path"
62191    fi
62192  fi
62193
62194
62195  if test "x$path" != "x$new_path"; then
62196    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62199  fi
62200
62201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62202
62203  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62204  has_colon=`$ECHO $path | $GREP ^.:`
62205  new_path="$path"
62206  if test "x$has_colon" = x; then
62207    # Not in mixed or Windows style, start by that.
62208    new_path=`cmd //c echo $path`
62209  fi
62210
62211
62212  input_path="$new_path"
62213  # Check if we need to convert this using DOS-style short mode. If the path
62214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62215  # take no chances and rewrite it.
62216  # Note: m4 eats our [], so we need to use [ and ] instead.
62217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62218  if test "x$has_forbidden_chars" != x; then
62219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62221  fi
62222
62223
62224  windows_path="$new_path"
62225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62226    unix_path=`$CYGPATH -u "$windows_path"`
62227    new_path="$unix_path"
62228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62230    new_path="$unix_path"
62231  fi
62232
62233  if test "x$path" != "x$new_path"; then
62234    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62237  fi
62238
62239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62241
62242    else
62243      # We're on a unix platform. Hooray! :)
62244      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62245      has_space=`$ECHO "$path" | $GREP " "`
62246      if test "x$has_space" != x; then
62247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62248$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62249        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62250      fi
62251
62252      # Use eval to expand a potential ~
62253      eval path="$path"
62254      if test ! -f "$path" && test ! -d "$path"; then
62255        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62256      fi
62257
62258      if test -d "$path"; then
62259        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62260      else
62261        dir="`$DIRNAME "$path"`"
62262        base="`$BASENAME "$path"`"
62263        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62264      fi
62265    fi
62266  fi
62267
62268
62269  # Only process if variable expands to non-empty
62270
62271  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62273
62274  # Input might be given as Windows format, start by converting to
62275  # unix format.
62276  path="$POTENTIAL_FREETYPE_LIB_PATH"
62277  new_path=`$CYGPATH -u "$path"`
62278
62279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62282  # "foo.exe" is OK but "foo" is an error.
62283  #
62284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62285  # It is also a way to make sure we got the proper file name for the real test later on.
62286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62287  if test "x$test_shortpath" = x; then
62288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62290    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62291  fi
62292
62293  # Call helper function which possibly converts this using DOS-style short mode.
62294  # If so, the updated path is stored in $new_path.
62295
62296  input_path="$new_path"
62297  # Check if we need to convert this using DOS-style short mode. If the path
62298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62299  # take no chances and rewrite it.
62300  # Note: m4 eats our [], so we need to use [ and ] instead.
62301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62302  if test "x$has_forbidden_chars" != x; then
62303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62307      # Going to short mode and back again did indeed matter. Since short mode is
62308      # case insensitive, let's make it lowercase to improve readability.
62309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62310      # Now convert it back to Unix-style (cygpath)
62311      input_path=`$CYGPATH -u "$shortmode_path"`
62312      new_path="$input_path"
62313    fi
62314  fi
62315
62316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62317  if test "x$test_cygdrive_prefix" = x; then
62318    # As a simple fix, exclude /usr/bin since it's not a real path.
62319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62321      # a path prefixed by /cygdrive for fixpath to work.
62322      new_path="$CYGWIN_ROOT_PATH$input_path"
62323    fi
62324  fi
62325
62326
62327  if test "x$path" != "x$new_path"; then
62328    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62331  fi
62332
62333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62334
62335  path="$POTENTIAL_FREETYPE_LIB_PATH"
62336  has_colon=`$ECHO $path | $GREP ^.:`
62337  new_path="$path"
62338  if test "x$has_colon" = x; then
62339    # Not in mixed or Windows style, start by that.
62340    new_path=`cmd //c echo $path`
62341  fi
62342
62343
62344  input_path="$new_path"
62345  # Check if we need to convert this using DOS-style short mode. If the path
62346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62347  # take no chances and rewrite it.
62348  # Note: m4 eats our [], so we need to use [ and ] instead.
62349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62350  if test "x$has_forbidden_chars" != x; then
62351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62353  fi
62354
62355
62356  windows_path="$new_path"
62357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62358    unix_path=`$CYGPATH -u "$windows_path"`
62359    new_path="$unix_path"
62360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62362    new_path="$unix_path"
62363  fi
62364
62365  if test "x$path" != "x$new_path"; then
62366    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62368$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62369  fi
62370
62371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62373
62374    else
62375      # We're on a unix platform. Hooray! :)
62376      path="$POTENTIAL_FREETYPE_LIB_PATH"
62377      has_space=`$ECHO "$path" | $GREP " "`
62378      if test "x$has_space" != x; then
62379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62380$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62382      fi
62383
62384      # Use eval to expand a potential ~
62385      eval path="$path"
62386      if test ! -f "$path" && test ! -d "$path"; then
62387        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62388      fi
62389
62390      if test -d "$path"; then
62391        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62392      else
62393        dir="`$DIRNAME "$path"`"
62394        base="`$BASENAME "$path"`"
62395        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62396      fi
62397    fi
62398  fi
62399
62400
62401    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62403$as_echo_n "checking for freetype includes... " >&6; }
62404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62405$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62406    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62408$as_echo_n "checking for freetype libraries... " >&6; }
62409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62410$as_echo "$FREETYPE_LIB_PATH" >&6; }
62411  fi
62412
62413            fi
62414          fi
62415
62416          if test "x$FOUND_FREETYPE" != xyes; then
62417            FREETYPE_BASE_DIR="$SYSROOT/usr"
62418            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62419
62420  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62421  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62422  METHOD="well-known location"
62423
62424  # Let's start with an optimistic view of the world :-)
62425  FOUND_FREETYPE=yes
62426
62427  # First look for the canonical freetype main include file ft2build.h.
62428  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62429    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62430    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62431    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62432      # Fail.
62433      FOUND_FREETYPE=no
62434    fi
62435  fi
62436
62437  if test "x$FOUND_FREETYPE" = xyes; then
62438    # Include file found, let's continue the sanity check.
62439    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62440$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62441
62442    # Reset to default value
62443    FREETYPE_BASE_NAME=freetype
62444    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62445    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62446      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62447          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62448        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62449        # for the .6 version explicitly.
62450        FREETYPE_BASE_NAME=freetype.6
62451        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62452        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62453$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62454      else
62455        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62456$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62457        FOUND_FREETYPE=no
62458      fi
62459    else
62460      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62461        # On Windows, we will need both .lib and .dll file.
62462        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62463          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62464$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62465          FOUND_FREETYPE=no
62466        fi
62467      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62468          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62469        # Found lib in isa dir, use that instead.
62470        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62471        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62472$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62473      fi
62474    fi
62475  fi
62476
62477  if test "x$FOUND_FREETYPE" = xyes; then
62478
62479  # Only process if variable expands to non-empty
62480
62481  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62483
62484  # Input might be given as Windows format, start by converting to
62485  # unix format.
62486  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62487  new_path=`$CYGPATH -u "$path"`
62488
62489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62492  # "foo.exe" is OK but "foo" is an error.
62493  #
62494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62495  # It is also a way to make sure we got the proper file name for the real test later on.
62496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62497  if test "x$test_shortpath" = x; then
62498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62500    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62501  fi
62502
62503  # Call helper function which possibly converts this using DOS-style short mode.
62504  # If so, the updated path is stored in $new_path.
62505
62506  input_path="$new_path"
62507  # Check if we need to convert this using DOS-style short mode. If the path
62508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62509  # take no chances and rewrite it.
62510  # Note: m4 eats our [], so we need to use [ and ] instead.
62511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62512  if test "x$has_forbidden_chars" != x; then
62513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62517      # Going to short mode and back again did indeed matter. Since short mode is
62518      # case insensitive, let's make it lowercase to improve readability.
62519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62520      # Now convert it back to Unix-style (cygpath)
62521      input_path=`$CYGPATH -u "$shortmode_path"`
62522      new_path="$input_path"
62523    fi
62524  fi
62525
62526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62527  if test "x$test_cygdrive_prefix" = x; then
62528    # As a simple fix, exclude /usr/bin since it's not a real path.
62529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62531      # a path prefixed by /cygdrive for fixpath to work.
62532      new_path="$CYGWIN_ROOT_PATH$input_path"
62533    fi
62534  fi
62535
62536
62537  if test "x$path" != "x$new_path"; then
62538    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62541  fi
62542
62543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62544
62545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62546  has_colon=`$ECHO $path | $GREP ^.:`
62547  new_path="$path"
62548  if test "x$has_colon" = x; then
62549    # Not in mixed or Windows style, start by that.
62550    new_path=`cmd //c echo $path`
62551  fi
62552
62553
62554  input_path="$new_path"
62555  # Check if we need to convert this using DOS-style short mode. If the path
62556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62557  # take no chances and rewrite it.
62558  # Note: m4 eats our [], so we need to use [ and ] instead.
62559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62560  if test "x$has_forbidden_chars" != x; then
62561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62563  fi
62564
62565
62566  windows_path="$new_path"
62567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62568    unix_path=`$CYGPATH -u "$windows_path"`
62569    new_path="$unix_path"
62570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62572    new_path="$unix_path"
62573  fi
62574
62575  if test "x$path" != "x$new_path"; then
62576    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62578$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62579  fi
62580
62581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62583
62584    else
62585      # We're on a unix platform. Hooray! :)
62586      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62587      has_space=`$ECHO "$path" | $GREP " "`
62588      if test "x$has_space" != x; then
62589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62590$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62592      fi
62593
62594      # Use eval to expand a potential ~
62595      eval path="$path"
62596      if test ! -f "$path" && test ! -d "$path"; then
62597        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62598      fi
62599
62600      if test -d "$path"; then
62601        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62602      else
62603        dir="`$DIRNAME "$path"`"
62604        base="`$BASENAME "$path"`"
62605        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62606      fi
62607    fi
62608  fi
62609
62610
62611  # Only process if variable expands to non-empty
62612
62613  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62615
62616  # Input might be given as Windows format, start by converting to
62617  # unix format.
62618  path="$POTENTIAL_FREETYPE_LIB_PATH"
62619  new_path=`$CYGPATH -u "$path"`
62620
62621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62624  # "foo.exe" is OK but "foo" is an error.
62625  #
62626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62627  # It is also a way to make sure we got the proper file name for the real test later on.
62628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62629  if test "x$test_shortpath" = x; then
62630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62631$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62632    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62633  fi
62634
62635  # Call helper function which possibly converts this using DOS-style short mode.
62636  # If so, the updated path is stored in $new_path.
62637
62638  input_path="$new_path"
62639  # Check if we need to convert this using DOS-style short mode. If the path
62640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62641  # take no chances and rewrite it.
62642  # Note: m4 eats our [], so we need to use [ and ] instead.
62643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62644  if test "x$has_forbidden_chars" != x; then
62645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62649      # Going to short mode and back again did indeed matter. Since short mode is
62650      # case insensitive, let's make it lowercase to improve readability.
62651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62652      # Now convert it back to Unix-style (cygpath)
62653      input_path=`$CYGPATH -u "$shortmode_path"`
62654      new_path="$input_path"
62655    fi
62656  fi
62657
62658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62659  if test "x$test_cygdrive_prefix" = x; then
62660    # As a simple fix, exclude /usr/bin since it's not a real path.
62661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62663      # a path prefixed by /cygdrive for fixpath to work.
62664      new_path="$CYGWIN_ROOT_PATH$input_path"
62665    fi
62666  fi
62667
62668
62669  if test "x$path" != "x$new_path"; then
62670    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62673  fi
62674
62675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62676
62677  path="$POTENTIAL_FREETYPE_LIB_PATH"
62678  has_colon=`$ECHO $path | $GREP ^.:`
62679  new_path="$path"
62680  if test "x$has_colon" = x; then
62681    # Not in mixed or Windows style, start by that.
62682    new_path=`cmd //c echo $path`
62683  fi
62684
62685
62686  input_path="$new_path"
62687  # Check if we need to convert this using DOS-style short mode. If the path
62688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62689  # take no chances and rewrite it.
62690  # Note: m4 eats our [], so we need to use [ and ] instead.
62691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62692  if test "x$has_forbidden_chars" != x; then
62693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62695  fi
62696
62697
62698  windows_path="$new_path"
62699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62700    unix_path=`$CYGPATH -u "$windows_path"`
62701    new_path="$unix_path"
62702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62704    new_path="$unix_path"
62705  fi
62706
62707  if test "x$path" != "x$new_path"; then
62708    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62710$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62711  fi
62712
62713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62715
62716    else
62717      # We're on a unix platform. Hooray! :)
62718      path="$POTENTIAL_FREETYPE_LIB_PATH"
62719      has_space=`$ECHO "$path" | $GREP " "`
62720      if test "x$has_space" != x; then
62721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62722$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62724      fi
62725
62726      # Use eval to expand a potential ~
62727      eval path="$path"
62728      if test ! -f "$path" && test ! -d "$path"; then
62729        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62730      fi
62731
62732      if test -d "$path"; then
62733        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62734      else
62735        dir="`$DIRNAME "$path"`"
62736        base="`$BASENAME "$path"`"
62737        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62738      fi
62739    fi
62740  fi
62741
62742
62743    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62745$as_echo_n "checking for freetype includes... " >&6; }
62746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62747$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62748    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62750$as_echo_n "checking for freetype libraries... " >&6; }
62751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62752$as_echo "$FREETYPE_LIB_PATH" >&6; }
62753  fi
62754
62755            else
62756
62757  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62758  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62759  METHOD="well-known location"
62760
62761  # Let's start with an optimistic view of the world :-)
62762  FOUND_FREETYPE=yes
62763
62764  # First look for the canonical freetype main include file ft2build.h.
62765  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62766    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62767    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62768    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62769      # Fail.
62770      FOUND_FREETYPE=no
62771    fi
62772  fi
62773
62774  if test "x$FOUND_FREETYPE" = xyes; then
62775    # Include file found, let's continue the sanity check.
62776    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62777$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62778
62779    # Reset to default value
62780    FREETYPE_BASE_NAME=freetype
62781    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62782    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62783      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62784          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62785        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62786        # for the .6 version explicitly.
62787        FREETYPE_BASE_NAME=freetype.6
62788        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62789        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62790$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62791      else
62792        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62793$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62794        FOUND_FREETYPE=no
62795      fi
62796    else
62797      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62798        # On Windows, we will need both .lib and .dll file.
62799        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62800          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62801$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62802          FOUND_FREETYPE=no
62803        fi
62804      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62805          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62806        # Found lib in isa dir, use that instead.
62807        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62808        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62809$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62810      fi
62811    fi
62812  fi
62813
62814  if test "x$FOUND_FREETYPE" = xyes; then
62815
62816  # Only process if variable expands to non-empty
62817
62818  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62820
62821  # Input might be given as Windows format, start by converting to
62822  # unix format.
62823  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62824  new_path=`$CYGPATH -u "$path"`
62825
62826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62829  # "foo.exe" is OK but "foo" is an error.
62830  #
62831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62832  # It is also a way to make sure we got the proper file name for the real test later on.
62833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62834  if test "x$test_shortpath" = x; then
62835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62837    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62838  fi
62839
62840  # Call helper function which possibly converts this using DOS-style short mode.
62841  # If so, the updated path is stored in $new_path.
62842
62843  input_path="$new_path"
62844  # Check if we need to convert this using DOS-style short mode. If the path
62845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62846  # take no chances and rewrite it.
62847  # Note: m4 eats our [], so we need to use [ and ] instead.
62848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62849  if test "x$has_forbidden_chars" != x; then
62850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62854      # Going to short mode and back again did indeed matter. Since short mode is
62855      # case insensitive, let's make it lowercase to improve readability.
62856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62857      # Now convert it back to Unix-style (cygpath)
62858      input_path=`$CYGPATH -u "$shortmode_path"`
62859      new_path="$input_path"
62860    fi
62861  fi
62862
62863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62864  if test "x$test_cygdrive_prefix" = x; then
62865    # As a simple fix, exclude /usr/bin since it's not a real path.
62866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62868      # a path prefixed by /cygdrive for fixpath to work.
62869      new_path="$CYGWIN_ROOT_PATH$input_path"
62870    fi
62871  fi
62872
62873
62874  if test "x$path" != "x$new_path"; then
62875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62878  fi
62879
62880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62881
62882  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62883  has_colon=`$ECHO $path | $GREP ^.:`
62884  new_path="$path"
62885  if test "x$has_colon" = x; then
62886    # Not in mixed or Windows style, start by that.
62887    new_path=`cmd //c echo $path`
62888  fi
62889
62890
62891  input_path="$new_path"
62892  # Check if we need to convert this using DOS-style short mode. If the path
62893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62894  # take no chances and rewrite it.
62895  # Note: m4 eats our [], so we need to use [ and ] instead.
62896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62897  if test "x$has_forbidden_chars" != x; then
62898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62900  fi
62901
62902
62903  windows_path="$new_path"
62904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62905    unix_path=`$CYGPATH -u "$windows_path"`
62906    new_path="$unix_path"
62907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62909    new_path="$unix_path"
62910  fi
62911
62912  if test "x$path" != "x$new_path"; then
62913    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62915$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62916  fi
62917
62918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62920
62921    else
62922      # We're on a unix platform. Hooray! :)
62923      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62924      has_space=`$ECHO "$path" | $GREP " "`
62925      if test "x$has_space" != x; then
62926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62929      fi
62930
62931      # Use eval to expand a potential ~
62932      eval path="$path"
62933      if test ! -f "$path" && test ! -d "$path"; then
62934        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62935      fi
62936
62937      if test -d "$path"; then
62938        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62939      else
62940        dir="`$DIRNAME "$path"`"
62941        base="`$BASENAME "$path"`"
62942        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62943      fi
62944    fi
62945  fi
62946
62947
62948  # Only process if variable expands to non-empty
62949
62950  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62952
62953  # Input might be given as Windows format, start by converting to
62954  # unix format.
62955  path="$POTENTIAL_FREETYPE_LIB_PATH"
62956  new_path=`$CYGPATH -u "$path"`
62957
62958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62961  # "foo.exe" is OK but "foo" is an error.
62962  #
62963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62964  # It is also a way to make sure we got the proper file name for the real test later on.
62965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62966  if test "x$test_shortpath" = x; then
62967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62969    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62970  fi
62971
62972  # Call helper function which possibly converts this using DOS-style short mode.
62973  # If so, the updated path is stored in $new_path.
62974
62975  input_path="$new_path"
62976  # Check if we need to convert this using DOS-style short mode. If the path
62977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62978  # take no chances and rewrite it.
62979  # Note: m4 eats our [], so we need to use [ and ] instead.
62980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62981  if test "x$has_forbidden_chars" != x; then
62982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62986      # Going to short mode and back again did indeed matter. Since short mode is
62987      # case insensitive, let's make it lowercase to improve readability.
62988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62989      # Now convert it back to Unix-style (cygpath)
62990      input_path=`$CYGPATH -u "$shortmode_path"`
62991      new_path="$input_path"
62992    fi
62993  fi
62994
62995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62996  if test "x$test_cygdrive_prefix" = x; then
62997    # As a simple fix, exclude /usr/bin since it's not a real path.
62998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63000      # a path prefixed by /cygdrive for fixpath to work.
63001      new_path="$CYGWIN_ROOT_PATH$input_path"
63002    fi
63003  fi
63004
63005
63006  if test "x$path" != "x$new_path"; then
63007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63010  fi
63011
63012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63013
63014  path="$POTENTIAL_FREETYPE_LIB_PATH"
63015  has_colon=`$ECHO $path | $GREP ^.:`
63016  new_path="$path"
63017  if test "x$has_colon" = x; then
63018    # Not in mixed or Windows style, start by that.
63019    new_path=`cmd //c echo $path`
63020  fi
63021
63022
63023  input_path="$new_path"
63024  # Check if we need to convert this using DOS-style short mode. If the path
63025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63026  # take no chances and rewrite it.
63027  # Note: m4 eats our [], so we need to use [ and ] instead.
63028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63029  if test "x$has_forbidden_chars" != x; then
63030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63032  fi
63033
63034
63035  windows_path="$new_path"
63036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63037    unix_path=`$CYGPATH -u "$windows_path"`
63038    new_path="$unix_path"
63039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63041    new_path="$unix_path"
63042  fi
63043
63044  if test "x$path" != "x$new_path"; then
63045    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63048  fi
63049
63050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63052
63053    else
63054      # We're on a unix platform. Hooray! :)
63055      path="$POTENTIAL_FREETYPE_LIB_PATH"
63056      has_space=`$ECHO "$path" | $GREP " "`
63057      if test "x$has_space" != x; then
63058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63061      fi
63062
63063      # Use eval to expand a potential ~
63064      eval path="$path"
63065      if test ! -f "$path" && test ! -d "$path"; then
63066        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63067      fi
63068
63069      if test -d "$path"; then
63070        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63071      else
63072        dir="`$DIRNAME "$path"`"
63073        base="`$BASENAME "$path"`"
63074        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63075      fi
63076    fi
63077  fi
63078
63079
63080    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63082$as_echo_n "checking for freetype includes... " >&6; }
63083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63084$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63085    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63087$as_echo_n "checking for freetype libraries... " >&6; }
63088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63089$as_echo "$FREETYPE_LIB_PATH" >&6; }
63090  fi
63091
63092              if test "x$FOUND_FREETYPE" != xyes; then
63093
63094  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63095  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63096  METHOD="well-known location"
63097
63098  # Let's start with an optimistic view of the world :-)
63099  FOUND_FREETYPE=yes
63100
63101  # First look for the canonical freetype main include file ft2build.h.
63102  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63103    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63104    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63105    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63106      # Fail.
63107      FOUND_FREETYPE=no
63108    fi
63109  fi
63110
63111  if test "x$FOUND_FREETYPE" = xyes; then
63112    # Include file found, let's continue the sanity check.
63113    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63114$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63115
63116    # Reset to default value
63117    FREETYPE_BASE_NAME=freetype
63118    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63119    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63120      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63121          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63122        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63123        # for the .6 version explicitly.
63124        FREETYPE_BASE_NAME=freetype.6
63125        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63126        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63127$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63128      else
63129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63130$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63131        FOUND_FREETYPE=no
63132      fi
63133    else
63134      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63135        # On Windows, we will need both .lib and .dll file.
63136        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63137          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63139          FOUND_FREETYPE=no
63140        fi
63141      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63142          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63143        # Found lib in isa dir, use that instead.
63144        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63145        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63146$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63147      fi
63148    fi
63149  fi
63150
63151  if test "x$FOUND_FREETYPE" = xyes; then
63152
63153  # Only process if variable expands to non-empty
63154
63155  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63157
63158  # Input might be given as Windows format, start by converting to
63159  # unix format.
63160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63161  new_path=`$CYGPATH -u "$path"`
63162
63163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63166  # "foo.exe" is OK but "foo" is an error.
63167  #
63168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63169  # It is also a way to make sure we got the proper file name for the real test later on.
63170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63171  if test "x$test_shortpath" = x; then
63172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63174    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63175  fi
63176
63177  # Call helper function which possibly converts this using DOS-style short mode.
63178  # If so, the updated path is stored in $new_path.
63179
63180  input_path="$new_path"
63181  # Check if we need to convert this using DOS-style short mode. If the path
63182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63183  # take no chances and rewrite it.
63184  # Note: m4 eats our [], so we need to use [ and ] instead.
63185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63186  if test "x$has_forbidden_chars" != x; then
63187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63191      # Going to short mode and back again did indeed matter. Since short mode is
63192      # case insensitive, let's make it lowercase to improve readability.
63193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63194      # Now convert it back to Unix-style (cygpath)
63195      input_path=`$CYGPATH -u "$shortmode_path"`
63196      new_path="$input_path"
63197    fi
63198  fi
63199
63200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63201  if test "x$test_cygdrive_prefix" = x; then
63202    # As a simple fix, exclude /usr/bin since it's not a real path.
63203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63205      # a path prefixed by /cygdrive for fixpath to work.
63206      new_path="$CYGWIN_ROOT_PATH$input_path"
63207    fi
63208  fi
63209
63210
63211  if test "x$path" != "x$new_path"; then
63212    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63215  fi
63216
63217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63218
63219  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63220  has_colon=`$ECHO $path | $GREP ^.:`
63221  new_path="$path"
63222  if test "x$has_colon" = x; then
63223    # Not in mixed or Windows style, start by that.
63224    new_path=`cmd //c echo $path`
63225  fi
63226
63227
63228  input_path="$new_path"
63229  # Check if we need to convert this using DOS-style short mode. If the path
63230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63231  # take no chances and rewrite it.
63232  # Note: m4 eats our [], so we need to use [ and ] instead.
63233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63234  if test "x$has_forbidden_chars" != x; then
63235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63237  fi
63238
63239
63240  windows_path="$new_path"
63241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63242    unix_path=`$CYGPATH -u "$windows_path"`
63243    new_path="$unix_path"
63244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63246    new_path="$unix_path"
63247  fi
63248
63249  if test "x$path" != "x$new_path"; then
63250    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63252$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63253  fi
63254
63255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63257
63258    else
63259      # We're on a unix platform. Hooray! :)
63260      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63261      has_space=`$ECHO "$path" | $GREP " "`
63262      if test "x$has_space" != x; then
63263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63266      fi
63267
63268      # Use eval to expand a potential ~
63269      eval path="$path"
63270      if test ! -f "$path" && test ! -d "$path"; then
63271        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63272      fi
63273
63274      if test -d "$path"; then
63275        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63276      else
63277        dir="`$DIRNAME "$path"`"
63278        base="`$BASENAME "$path"`"
63279        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63280      fi
63281    fi
63282  fi
63283
63284
63285  # Only process if variable expands to non-empty
63286
63287  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63289
63290  # Input might be given as Windows format, start by converting to
63291  # unix format.
63292  path="$POTENTIAL_FREETYPE_LIB_PATH"
63293  new_path=`$CYGPATH -u "$path"`
63294
63295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63298  # "foo.exe" is OK but "foo" is an error.
63299  #
63300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63301  # It is also a way to make sure we got the proper file name for the real test later on.
63302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63303  if test "x$test_shortpath" = x; then
63304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63306    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63307  fi
63308
63309  # Call helper function which possibly converts this using DOS-style short mode.
63310  # If so, the updated path is stored in $new_path.
63311
63312  input_path="$new_path"
63313  # Check if we need to convert this using DOS-style short mode. If the path
63314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63315  # take no chances and rewrite it.
63316  # Note: m4 eats our [], so we need to use [ and ] instead.
63317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63318  if test "x$has_forbidden_chars" != x; then
63319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63323      # Going to short mode and back again did indeed matter. Since short mode is
63324      # case insensitive, let's make it lowercase to improve readability.
63325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63326      # Now convert it back to Unix-style (cygpath)
63327      input_path=`$CYGPATH -u "$shortmode_path"`
63328      new_path="$input_path"
63329    fi
63330  fi
63331
63332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63333  if test "x$test_cygdrive_prefix" = x; then
63334    # As a simple fix, exclude /usr/bin since it's not a real path.
63335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63337      # a path prefixed by /cygdrive for fixpath to work.
63338      new_path="$CYGWIN_ROOT_PATH$input_path"
63339    fi
63340  fi
63341
63342
63343  if test "x$path" != "x$new_path"; then
63344    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63347  fi
63348
63349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63350
63351  path="$POTENTIAL_FREETYPE_LIB_PATH"
63352  has_colon=`$ECHO $path | $GREP ^.:`
63353  new_path="$path"
63354  if test "x$has_colon" = x; then
63355    # Not in mixed or Windows style, start by that.
63356    new_path=`cmd //c echo $path`
63357  fi
63358
63359
63360  input_path="$new_path"
63361  # Check if we need to convert this using DOS-style short mode. If the path
63362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63363  # take no chances and rewrite it.
63364  # Note: m4 eats our [], so we need to use [ and ] instead.
63365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63366  if test "x$has_forbidden_chars" != x; then
63367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63369  fi
63370
63371
63372  windows_path="$new_path"
63373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63374    unix_path=`$CYGPATH -u "$windows_path"`
63375    new_path="$unix_path"
63376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63378    new_path="$unix_path"
63379  fi
63380
63381  if test "x$path" != "x$new_path"; then
63382    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63385  fi
63386
63387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63389
63390    else
63391      # We're on a unix platform. Hooray! :)
63392      path="$POTENTIAL_FREETYPE_LIB_PATH"
63393      has_space=`$ECHO "$path" | $GREP " "`
63394      if test "x$has_space" != x; then
63395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63398      fi
63399
63400      # Use eval to expand a potential ~
63401      eval path="$path"
63402      if test ! -f "$path" && test ! -d "$path"; then
63403        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63404      fi
63405
63406      if test -d "$path"; then
63407        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63408      else
63409        dir="`$DIRNAME "$path"`"
63410        base="`$BASENAME "$path"`"
63411        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63412      fi
63413    fi
63414  fi
63415
63416
63417    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63419$as_echo_n "checking for freetype includes... " >&6; }
63420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63421$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63422    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63424$as_echo_n "checking for freetype libraries... " >&6; }
63425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63426$as_echo "$FREETYPE_LIB_PATH" >&6; }
63427  fi
63428
63429              fi
63430            fi
63431          fi
63432        fi
63433      fi # end check in well-known locations
63434
63435      if test "x$FOUND_FREETYPE" != xyes; then
63436
63437  # Print a helpful message on how to acquire the necessary build dependency.
63438  # freetype is the help tag: freetype, cups, alsa etc
63439  MISSING_DEPENDENCY=freetype
63440
63441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63442    cygwin_help $MISSING_DEPENDENCY
63443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63444    msys_help $MISSING_DEPENDENCY
63445  else
63446    PKGHANDLER_COMMAND=
63447
63448    case $PKGHANDLER in
63449      apt-get)
63450        apt_help     $MISSING_DEPENDENCY ;;
63451      yum)
63452        yum_help     $MISSING_DEPENDENCY ;;
63453      brew)
63454        brew_help    $MISSING_DEPENDENCY ;;
63455      port)
63456        port_help    $MISSING_DEPENDENCY ;;
63457      pkgutil)
63458        pkgutil_help $MISSING_DEPENDENCY ;;
63459      pkgadd)
63460        pkgadd_help  $MISSING_DEPENDENCY ;;
63461    esac
63462
63463    if test "x$PKGHANDLER_COMMAND" != x; then
63464      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63465    fi
63466  fi
63467
63468        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63469      fi
63470    fi # end user specified settings
63471
63472    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63473    if test "x$FREETYPE_CFLAGS" = x; then
63474
63475  # Only process if variable expands to non-empty
63476
63477  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63479
63480  # Input might be given as Windows format, start by converting to
63481  # unix format.
63482  path="$FREETYPE_INCLUDE_PATH"
63483  new_path=`$CYGPATH -u "$path"`
63484
63485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63488  # "foo.exe" is OK but "foo" is an error.
63489  #
63490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63491  # It is also a way to make sure we got the proper file name for the real test later on.
63492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63493  if test "x$test_shortpath" = x; then
63494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63495$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63496    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63497  fi
63498
63499  # Call helper function which possibly converts this using DOS-style short mode.
63500  # If so, the updated path is stored in $new_path.
63501
63502  input_path="$new_path"
63503  # Check if we need to convert this using DOS-style short mode. If the path
63504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63505  # take no chances and rewrite it.
63506  # Note: m4 eats our [], so we need to use [ and ] instead.
63507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63508  if test "x$has_forbidden_chars" != x; then
63509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63513      # Going to short mode and back again did indeed matter. Since short mode is
63514      # case insensitive, let's make it lowercase to improve readability.
63515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63516      # Now convert it back to Unix-style (cygpath)
63517      input_path=`$CYGPATH -u "$shortmode_path"`
63518      new_path="$input_path"
63519    fi
63520  fi
63521
63522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63523  if test "x$test_cygdrive_prefix" = x; then
63524    # As a simple fix, exclude /usr/bin since it's not a real path.
63525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63527      # a path prefixed by /cygdrive for fixpath to work.
63528      new_path="$CYGWIN_ROOT_PATH$input_path"
63529    fi
63530  fi
63531
63532
63533  if test "x$path" != "x$new_path"; then
63534    FREETYPE_INCLUDE_PATH="$new_path"
63535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63536$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63537  fi
63538
63539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63540
63541  path="$FREETYPE_INCLUDE_PATH"
63542  has_colon=`$ECHO $path | $GREP ^.:`
63543  new_path="$path"
63544  if test "x$has_colon" = x; then
63545    # Not in mixed or Windows style, start by that.
63546    new_path=`cmd //c echo $path`
63547  fi
63548
63549
63550  input_path="$new_path"
63551  # Check if we need to convert this using DOS-style short mode. If the path
63552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63553  # take no chances and rewrite it.
63554  # Note: m4 eats our [], so we need to use [ and ] instead.
63555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63556  if test "x$has_forbidden_chars" != x; then
63557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63559  fi
63560
63561
63562  windows_path="$new_path"
63563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63564    unix_path=`$CYGPATH -u "$windows_path"`
63565    new_path="$unix_path"
63566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63568    new_path="$unix_path"
63569  fi
63570
63571  if test "x$path" != "x$new_path"; then
63572    FREETYPE_INCLUDE_PATH="$new_path"
63573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63574$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63575  fi
63576
63577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63579
63580    else
63581      # We're on a unix platform. Hooray! :)
63582      path="$FREETYPE_INCLUDE_PATH"
63583      has_space=`$ECHO "$path" | $GREP " "`
63584      if test "x$has_space" != x; then
63585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63586$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63588      fi
63589
63590      # Use eval to expand a potential ~
63591      eval path="$path"
63592      if test ! -f "$path" && test ! -d "$path"; then
63593        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63594      fi
63595
63596      if test -d "$path"; then
63597        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63598      else
63599        dir="`$DIRNAME "$path"`"
63600        base="`$BASENAME "$path"`"
63601        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63602      fi
63603    fi
63604  fi
63605
63606      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63607        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63608      else
63609        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63610      fi
63611    fi
63612
63613    if test "x$FREETYPE_LIBS" = x; then
63614
63615  # Only process if variable expands to non-empty
63616
63617  if test "x$FREETYPE_LIB_PATH" != x; then
63618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63619
63620  # Input might be given as Windows format, start by converting to
63621  # unix format.
63622  path="$FREETYPE_LIB_PATH"
63623  new_path=`$CYGPATH -u "$path"`
63624
63625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63628  # "foo.exe" is OK but "foo" is an error.
63629  #
63630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63631  # It is also a way to make sure we got the proper file name for the real test later on.
63632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63633  if test "x$test_shortpath" = x; then
63634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63635$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63636    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63637  fi
63638
63639  # Call helper function which possibly converts this using DOS-style short mode.
63640  # If so, the updated path is stored in $new_path.
63641
63642  input_path="$new_path"
63643  # Check if we need to convert this using DOS-style short mode. If the path
63644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63645  # take no chances and rewrite it.
63646  # Note: m4 eats our [], so we need to use [ and ] instead.
63647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63648  if test "x$has_forbidden_chars" != x; then
63649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63653      # Going to short mode and back again did indeed matter. Since short mode is
63654      # case insensitive, let's make it lowercase to improve readability.
63655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63656      # Now convert it back to Unix-style (cygpath)
63657      input_path=`$CYGPATH -u "$shortmode_path"`
63658      new_path="$input_path"
63659    fi
63660  fi
63661
63662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63663  if test "x$test_cygdrive_prefix" = x; then
63664    # As a simple fix, exclude /usr/bin since it's not a real path.
63665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63667      # a path prefixed by /cygdrive for fixpath to work.
63668      new_path="$CYGWIN_ROOT_PATH$input_path"
63669    fi
63670  fi
63671
63672
63673  if test "x$path" != "x$new_path"; then
63674    FREETYPE_LIB_PATH="$new_path"
63675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63676$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63677  fi
63678
63679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63680
63681  path="$FREETYPE_LIB_PATH"
63682  has_colon=`$ECHO $path | $GREP ^.:`
63683  new_path="$path"
63684  if test "x$has_colon" = x; then
63685    # Not in mixed or Windows style, start by that.
63686    new_path=`cmd //c echo $path`
63687  fi
63688
63689
63690  input_path="$new_path"
63691  # Check if we need to convert this using DOS-style short mode. If the path
63692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63693  # take no chances and rewrite it.
63694  # Note: m4 eats our [], so we need to use [ and ] instead.
63695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63696  if test "x$has_forbidden_chars" != x; then
63697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63699  fi
63700
63701
63702  windows_path="$new_path"
63703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63704    unix_path=`$CYGPATH -u "$windows_path"`
63705    new_path="$unix_path"
63706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63708    new_path="$unix_path"
63709  fi
63710
63711  if test "x$path" != "x$new_path"; then
63712    FREETYPE_LIB_PATH="$new_path"
63713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63714$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63715  fi
63716
63717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63719
63720    else
63721      # We're on a unix platform. Hooray! :)
63722      path="$FREETYPE_LIB_PATH"
63723      has_space=`$ECHO "$path" | $GREP " "`
63724      if test "x$has_space" != x; then
63725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63726$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63728      fi
63729
63730      # Use eval to expand a potential ~
63731      eval path="$path"
63732      if test ! -f "$path" && test ! -d "$path"; then
63733        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63734      fi
63735
63736      if test -d "$path"; then
63737        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63738      else
63739        dir="`$DIRNAME "$path"`"
63740        base="`$BASENAME "$path"`"
63741        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63742      fi
63743    fi
63744  fi
63745
63746      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63747        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63748      else
63749        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63750      fi
63751    fi
63752
63753    # Try to compile it
63754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63755$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63756    ac_ext=cpp
63757ac_cpp='$CXXCPP $CPPFLAGS'
63758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63761
63762    PREV_CXXCFLAGS="$CXXFLAGS"
63763    PREV_LIBS="$LIBS"
63764    PREV_CXX="$CXX"
63765    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63766    LIBS="$LIBS $FREETYPE_LIBS"
63767    CXX="$FIXPATH $CXX"
63768    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63769/* end confdefs.h.  */
63770
63771          #include<ft2build.h>
63772          #include FT_FREETYPE_H
63773          int main () {
63774            FT_Init_FreeType(NULL);
63775            return 0;
63776          }
63777
63778_ACEOF
63779if ac_fn_cxx_try_link "$LINENO"; then :
63780
63781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63782$as_echo "yes" >&6; }
63783
63784else
63785
63786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63787$as_echo "no" >&6; }
63788          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63789$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63790          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63791$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63792
63793
63794  # Print a helpful message on how to acquire the necessary build dependency.
63795  # freetype is the help tag: freetype, cups, alsa etc
63796  MISSING_DEPENDENCY=freetype
63797
63798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63799    cygwin_help $MISSING_DEPENDENCY
63800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63801    msys_help $MISSING_DEPENDENCY
63802  else
63803    PKGHANDLER_COMMAND=
63804
63805    case $PKGHANDLER in
63806      apt-get)
63807        apt_help     $MISSING_DEPENDENCY ;;
63808      yum)
63809        yum_help     $MISSING_DEPENDENCY ;;
63810      brew)
63811        brew_help    $MISSING_DEPENDENCY ;;
63812      port)
63813        port_help    $MISSING_DEPENDENCY ;;
63814      pkgutil)
63815        pkgutil_help $MISSING_DEPENDENCY ;;
63816      pkgadd)
63817        pkgadd_help  $MISSING_DEPENDENCY ;;
63818    esac
63819
63820    if test "x$PKGHANDLER_COMMAND" != x; then
63821      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63822    fi
63823  fi
63824
63825
63826          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63827
63828
63829fi
63830rm -f core conftest.err conftest.$ac_objext \
63831    conftest$ac_exeext conftest.$ac_ext
63832    CXXCFLAGS="$PREV_CXXFLAGS"
63833    LIBS="$PREV_LIBS"
63834    CXX="$PREV_CXX"
63835    ac_ext=cpp
63836ac_cpp='$CXXCPP $CPPFLAGS'
63837ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63838ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63839ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63840
63841
63842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63843$as_echo_n "checking if we should bundle freetype... " >&6; }
63844    if test "x$BUNDLE_FREETYPE" = xyes; then
63845      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63846    fi
63847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63848$as_echo "$BUNDLE_FREETYPE" >&6; }
63849
63850  fi # end freetype needed
63851
63852
63853
63854
63855
63856
63857
63858# Check whether --with-alsa was given.
63859if test "${with_alsa+set}" = set; then :
63860  withval=$with_alsa;
63861fi
63862
63863
63864# Check whether --with-alsa-include was given.
63865if test "${with_alsa_include+set}" = set; then :
63866  withval=$with_alsa_include;
63867fi
63868
63869
63870# Check whether --with-alsa-lib was given.
63871if test "${with_alsa_lib+set}" = set; then :
63872  withval=$with_alsa_lib;
63873fi
63874
63875
63876  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63877    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63878        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63879        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63880      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63881$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63882    fi
63883    ALSA_CFLAGS=
63884    ALSA_LIBS=
63885  else
63886    ALSA_FOUND=no
63887
63888    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63889      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63890    fi
63891
63892    if test "x${with_alsa}" != x; then
63893      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63894      ALSA_CFLAGS="-I${with_alsa}/include"
63895      ALSA_FOUND=yes
63896    fi
63897    if test "x${with_alsa_include}" != x; then
63898      ALSA_CFLAGS="-I${with_alsa_include}"
63899      ALSA_FOUND=yes
63900    fi
63901    if test "x${with_alsa_lib}" != x; then
63902      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63903      ALSA_FOUND=yes
63904    fi
63905    # Do not try pkg-config if we have a sysroot set.
63906    if test "x$SYSROOT" = x; then
63907      if test "x$ALSA_FOUND" = xno; then
63908
63909pkg_failed=no
63910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63911$as_echo_n "checking for ALSA... " >&6; }
63912
63913if test -n "$ALSA_CFLAGS"; then
63914    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63915 elif test -n "$PKG_CONFIG"; then
63916    if test -n "$PKG_CONFIG" && \
63917    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63918  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63919  ac_status=$?
63920  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63921  test $ac_status = 0; }; then
63922  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63923else
63924  pkg_failed=yes
63925fi
63926 else
63927    pkg_failed=untried
63928fi
63929if test -n "$ALSA_LIBS"; then
63930    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63931 elif test -n "$PKG_CONFIG"; then
63932    if test -n "$PKG_CONFIG" && \
63933    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63934  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63935  ac_status=$?
63936  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63937  test $ac_status = 0; }; then
63938  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63939else
63940  pkg_failed=yes
63941fi
63942 else
63943    pkg_failed=untried
63944fi
63945
63946
63947
63948if test $pkg_failed = yes; then
63949
63950if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63951        _pkg_short_errors_supported=yes
63952else
63953        _pkg_short_errors_supported=no
63954fi
63955        if test $_pkg_short_errors_supported = yes; then
63956	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63957        else
63958	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63959        fi
63960	# Put the nasty error message in config.log where it belongs
63961	echo "$ALSA_PKG_ERRORS" >&5
63962
63963	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63964$as_echo "no" >&6; }
63965                ALSA_FOUND=no
63966elif test $pkg_failed = untried; then
63967	ALSA_FOUND=no
63968else
63969	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63970	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63972$as_echo "yes" >&6; }
63973	ALSA_FOUND=yes
63974fi
63975      fi
63976    fi
63977    if test "x$ALSA_FOUND" = xno; then
63978      for ac_header in alsa/asoundlib.h
63979do :
63980  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63981if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63982  cat >>confdefs.h <<_ACEOF
63983#define HAVE_ALSA_ASOUNDLIB_H 1
63984_ACEOF
63985
63986            ALSA_FOUND=yes
63987            ALSA_CFLAGS=-Iignoreme
63988            ALSA_LIBS=-lasound
63989            DEFAULT_ALSA=yes
63990
63991else
63992  ALSA_FOUND=no
63993
63994fi
63995
63996done
63997
63998    fi
63999    if test "x$ALSA_FOUND" = xno; then
64000
64001  # Print a helpful message on how to acquire the necessary build dependency.
64002  # alsa is the help tag: freetype, cups, alsa etc
64003  MISSING_DEPENDENCY=alsa
64004
64005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64006    cygwin_help $MISSING_DEPENDENCY
64007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64008    msys_help $MISSING_DEPENDENCY
64009  else
64010    PKGHANDLER_COMMAND=
64011
64012    case $PKGHANDLER in
64013      apt-get)
64014        apt_help     $MISSING_DEPENDENCY ;;
64015      yum)
64016        yum_help     $MISSING_DEPENDENCY ;;
64017      brew)
64018        brew_help    $MISSING_DEPENDENCY ;;
64019      port)
64020        port_help    $MISSING_DEPENDENCY ;;
64021      pkgutil)
64022        pkgutil_help $MISSING_DEPENDENCY ;;
64023      pkgadd)
64024        pkgadd_help  $MISSING_DEPENDENCY ;;
64025    esac
64026
64027    if test "x$PKGHANDLER_COMMAND" != x; then
64028      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64029    fi
64030  fi
64031
64032      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64033    fi
64034  fi
64035
64036
64037
64038
64039
64040
64041# Check whether --with-libffi was given.
64042if test "${with_libffi+set}" = set; then :
64043  withval=$with_libffi;
64044fi
64045
64046
64047# Check whether --with-libffi-include was given.
64048if test "${with_libffi_include+set}" = set; then :
64049  withval=$with_libffi_include;
64050fi
64051
64052
64053# Check whether --with-libffi-lib was given.
64054if test "${with_libffi_lib+set}" = set; then :
64055  withval=$with_libffi_lib;
64056fi
64057
64058  # Check whether --enable-libffi-bundling was given.
64059if test "${enable_libffi_bundling+set}" = set; then :
64060  enableval=$enable_libffi_bundling;
64061fi
64062
64063
64064  if test "x$NEEDS_LIB_FFI" = xfalse; then
64065    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64066        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64067        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64068      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64069$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64070    fi
64071    LIBFFI_CFLAGS=
64072    LIBFFI_LIBS=
64073  else
64074    LIBFFI_FOUND=no
64075
64076    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64077      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64078    fi
64079
64080    if test "x${with_libffi}" != x; then
64081      LIBFFI_LIB_PATH="${with_libffi}/lib"
64082      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64083      LIBFFI_CFLAGS="-I${with_libffi}/include"
64084      LIBFFI_FOUND=yes
64085    fi
64086    if test "x${with_libffi_include}" != x; then
64087      LIBFFI_CFLAGS="-I${with_libffi_include}"
64088      LIBFFI_FOUND=yes
64089    fi
64090    if test "x${with_libffi_lib}" != x; then
64091      LIBFFI_LIB_PATH="${with_libffi_lib}"
64092      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64093      LIBFFI_FOUND=yes
64094    fi
64095    # Do not try pkg-config if we have a sysroot set.
64096    if test "x$SYSROOT" = x; then
64097      if test "x$LIBFFI_FOUND" = xno; then
64098        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64099
64100pkg_failed=no
64101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64102$as_echo_n "checking for LIBFFI... " >&6; }
64103
64104if test -n "$LIBFFI_CFLAGS"; then
64105    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64106 elif test -n "$PKG_CONFIG"; then
64107    if test -n "$PKG_CONFIG" && \
64108    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64109  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64110  ac_status=$?
64111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64112  test $ac_status = 0; }; then
64113  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64114else
64115  pkg_failed=yes
64116fi
64117 else
64118    pkg_failed=untried
64119fi
64120if test -n "$LIBFFI_LIBS"; then
64121    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64122 elif test -n "$PKG_CONFIG"; then
64123    if test -n "$PKG_CONFIG" && \
64124    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64125  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64126  ac_status=$?
64127  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64128  test $ac_status = 0; }; then
64129  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64130else
64131  pkg_failed=yes
64132fi
64133 else
64134    pkg_failed=untried
64135fi
64136
64137
64138
64139if test $pkg_failed = yes; then
64140
64141if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64142        _pkg_short_errors_supported=yes
64143else
64144        _pkg_short_errors_supported=no
64145fi
64146        if test $_pkg_short_errors_supported = yes; then
64147	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64148        else
64149	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64150        fi
64151	# Put the nasty error message in config.log where it belongs
64152	echo "$LIBFFI_PKG_ERRORS" >&5
64153
64154	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64155$as_echo "no" >&6; }
64156                LIBFFI_FOUND=no
64157elif test $pkg_failed = untried; then
64158	LIBFFI_FOUND=no
64159else
64160	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64161	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64163$as_echo "yes" >&6; }
64164	LIBFFI_FOUND=yes
64165fi
64166      fi
64167    fi
64168    if test "x$LIBFFI_FOUND" = xno; then
64169      for ac_header in ffi.h
64170do :
64171  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64172if test "x$ac_cv_header_ffi_h" = xyes; then :
64173  cat >>confdefs.h <<_ACEOF
64174#define HAVE_FFI_H 1
64175_ACEOF
64176
64177            LIBFFI_FOUND=yes
64178            LIBFFI_CFLAGS=
64179            LIBFFI_LIBS=-lffi
64180
64181else
64182  LIBFFI_FOUND=no
64183
64184fi
64185
64186done
64187
64188    fi
64189    if test "x$LIBFFI_FOUND" = xno; then
64190
64191  # Print a helpful message on how to acquire the necessary build dependency.
64192  # ffi is the help tag: freetype, cups, alsa etc
64193  MISSING_DEPENDENCY=ffi
64194
64195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64196    cygwin_help $MISSING_DEPENDENCY
64197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64198    msys_help $MISSING_DEPENDENCY
64199  else
64200    PKGHANDLER_COMMAND=
64201
64202    case $PKGHANDLER in
64203      apt-get)
64204        apt_help     $MISSING_DEPENDENCY ;;
64205      yum)
64206        yum_help     $MISSING_DEPENDENCY ;;
64207      brew)
64208        brew_help    $MISSING_DEPENDENCY ;;
64209      port)
64210        port_help    $MISSING_DEPENDENCY ;;
64211      pkgutil)
64212        pkgutil_help $MISSING_DEPENDENCY ;;
64213      pkgadd)
64214        pkgadd_help  $MISSING_DEPENDENCY ;;
64215    esac
64216
64217    if test "x$PKGHANDLER_COMMAND" != x; then
64218      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64219    fi
64220  fi
64221
64222      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64223    fi
64224
64225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64226$as_echo_n "checking if libffi works... " >&6; }
64227    ac_ext=c
64228ac_cpp='$CPP $CPPFLAGS'
64229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64231ac_compiler_gnu=$ac_cv_c_compiler_gnu
64232
64233    OLD_CFLAGS="$CFLAGS"
64234    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64235    OLD_LIBS="$LIBS"
64236    LIBS="$LIBS $LIBFFI_LIBS"
64237    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64238/* end confdefs.h.  */
64239#include <ffi.h>
64240int
64241main ()
64242{
64243
64244          ffi_call(NULL, NULL, NULL, NULL);
64245          return 0;
64246
64247  ;
64248  return 0;
64249}
64250_ACEOF
64251if ac_fn_c_try_link "$LINENO"; then :
64252  LIBFFI_WORKS=yes
64253else
64254  LIBFFI_WORKS=no
64255
64256fi
64257rm -f core conftest.err conftest.$ac_objext \
64258    conftest$ac_exeext conftest.$ac_ext
64259    CFLAGS="$OLD_CFLAGS"
64260    LIBS="$OLD_LIBS"
64261    ac_ext=cpp
64262ac_cpp='$CXXCPP $CPPFLAGS'
64263ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64264ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64265ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64266
64267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64268$as_echo "$LIBFFI_WORKS" >&6; }
64269
64270    if test "x$LIBFFI_WORKS" = xno; then
64271
64272  # Print a helpful message on how to acquire the necessary build dependency.
64273  # ffi is the help tag: freetype, cups, alsa etc
64274  MISSING_DEPENDENCY=ffi
64275
64276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64277    cygwin_help $MISSING_DEPENDENCY
64278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64279    msys_help $MISSING_DEPENDENCY
64280  else
64281    PKGHANDLER_COMMAND=
64282
64283    case $PKGHANDLER in
64284      apt-get)
64285        apt_help     $MISSING_DEPENDENCY ;;
64286      yum)
64287        yum_help     $MISSING_DEPENDENCY ;;
64288      brew)
64289        brew_help    $MISSING_DEPENDENCY ;;
64290      port)
64291        port_help    $MISSING_DEPENDENCY ;;
64292      pkgutil)
64293        pkgutil_help $MISSING_DEPENDENCY ;;
64294      pkgadd)
64295        pkgadd_help  $MISSING_DEPENDENCY ;;
64296    esac
64297
64298    if test "x$PKGHANDLER_COMMAND" != x; then
64299      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64300    fi
64301  fi
64302
64303      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64304    fi
64305
64306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64307$as_echo_n "checking if libffi should be bundled... " >&6; }
64308    if test "x$enable_libffi_bundling" = "x"; then
64309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64310$as_echo "no" >&6; }
64311      ENABLE_LIBFFI_BUNDLING=false
64312    elif  test "x$enable_libffi_bundling" = "xno"; then
64313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64314$as_echo "no, forced" >&6; }
64315      ENABLE_LIBFFI_BUNDLING=false
64316    elif  test "x$enable_libffi_bundling" = "xyes"; then
64317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64318$as_echo "yes, forced" >&6; }
64319      ENABLE_LIBFFI_BUNDLING=true
64320    else
64321      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64322    fi
64323
64324    # Find the libffi.so.X to bundle
64325    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64327$as_echo_n "checking for libffi lib file location... " >&6; }
64328      if test "x${LIBFFI_LIB_PATH}" != x; then
64329        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64330          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64331        else
64332          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64333        fi
64334      else
64335        # If we don't have an explicit path, look in a few obvious places
64336        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64337          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64338            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64339          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64340            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64341          else
64342            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64343          fi
64344        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64345          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64346            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64347          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64348            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64349          else
64350            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64351          fi
64352        else
64353          # Fallback on the default /usr/lib dir
64354          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64355            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64356          else
64357            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64358          fi
64359        fi
64360      fi
64361      # Make sure the wildcard is evaluated
64362      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64364$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64365    fi
64366  fi
64367
64368
64369
64370
64371
64372
64373
64374  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64375    # Extract the first word of "llvm-config", so it can be a program name with args.
64376set dummy llvm-config; ac_word=$2
64377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64378$as_echo_n "checking for $ac_word... " >&6; }
64379if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64380  $as_echo_n "(cached) " >&6
64381else
64382  if test -n "$LLVM_CONFIG"; then
64383  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64384else
64385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64386for as_dir in $PATH
64387do
64388  IFS=$as_save_IFS
64389  test -z "$as_dir" && as_dir=.
64390    for ac_exec_ext in '' $ac_executable_extensions; do
64391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64392    ac_cv_prog_LLVM_CONFIG="llvm-config"
64393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64394    break 2
64395  fi
64396done
64397  done
64398IFS=$as_save_IFS
64399
64400fi
64401fi
64402LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64403if test -n "$LLVM_CONFIG"; then
64404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64405$as_echo "$LLVM_CONFIG" >&6; }
64406else
64407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64408$as_echo "no" >&6; }
64409fi
64410
64411
64412
64413    if test "x$LLVM_CONFIG" != xllvm-config; then
64414      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64415    fi
64416
64417    llvm_components="jit mcjit engine nativecodegen native"
64418    unset LLVM_CFLAGS
64419    for flag in $("$LLVM_CONFIG" --cxxflags); do
64420      if echo "${flag}" | grep -q '^-[ID]'; then
64421        if test "${flag}" != "-D_DEBUG" ; then
64422          if test "${LLVM_CFLAGS}" != "" ; then
64423            LLVM_CFLAGS="${LLVM_CFLAGS} "
64424          fi
64425          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64426        fi
64427      fi
64428    done
64429    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64430    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64431
64432    unset LLVM_LDFLAGS
64433    for flag in $("${LLVM_CONFIG}" --ldflags); do
64434      if echo "${flag}" | grep -q '^-L'; then
64435        if test "${LLVM_LDFLAGS}" != ""; then
64436          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64437        fi
64438        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64439      fi
64440    done
64441
64442    unset LLVM_LIBS
64443    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64444      if echo "${flag}" | grep -q '^-l'; then
64445        if test "${LLVM_LIBS}" != ""; then
64446          LLVM_LIBS="${LLVM_LIBS} "
64447        fi
64448        LLVM_LIBS="${LLVM_LIBS}${flag}"
64449      fi
64450    done
64451
64452    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64453    # always properly detect -ltinfo
64454    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64455
64456
64457
64458
64459  fi
64460
64461
64462
64463# Check whether --with-libjpeg was given.
64464if test "${with_libjpeg+set}" = set; then :
64465  withval=$with_libjpeg;
64466fi
64467
64468
64469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64470$as_echo_n "checking for which libjpeg to use... " >&6; }
64471  # default is bundled
64472  DEFAULT_LIBJPEG=bundled
64473  # if user didn't specify, use DEFAULT_LIBJPEG
64474  if test "x${with_libjpeg}" = "x"; then
64475    with_libjpeg=${DEFAULT_LIBJPEG}
64476  fi
64477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64478$as_echo "${with_libjpeg}" >&6; }
64479
64480  if test "x${with_libjpeg}" = "xbundled"; then
64481    USE_EXTERNAL_LIBJPEG=false
64482  elif test "x${with_libjpeg}" = "xsystem"; then
64483    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64484if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64485
64486else
64487   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64488fi
64489
64490
64491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64492$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64493if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64494  $as_echo_n "(cached) " >&6
64495else
64496  ac_check_lib_save_LIBS=$LIBS
64497LIBS="-ljpeg  $LIBS"
64498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64499/* end confdefs.h.  */
64500
64501/* Override any GCC internal prototype to avoid an error.
64502   Use char because int might match the return type of a GCC
64503   builtin and then its argument prototype would still apply.  */
64504#ifdef __cplusplus
64505extern "C"
64506#endif
64507char jpeg_CreateDecompress ();
64508int
64509main ()
64510{
64511return jpeg_CreateDecompress ();
64512  ;
64513  return 0;
64514}
64515_ACEOF
64516if ac_fn_cxx_try_link "$LINENO"; then :
64517  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64518else
64519  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64520fi
64521rm -f core conftest.err conftest.$ac_objext \
64522    conftest$ac_exeext conftest.$ac_ext
64523LIBS=$ac_check_lib_save_LIBS
64524fi
64525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64526$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64527if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64528  cat >>confdefs.h <<_ACEOF
64529#define HAVE_LIBJPEG 1
64530_ACEOF
64531
64532  LIBS="-ljpeg $LIBS"
64533
64534else
64535   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64536fi
64537
64538
64539    USE_EXTERNAL_LIBJPEG=true
64540  else
64541    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64542  fi
64543
64544
64545
64546
64547
64548# Check whether --with-giflib was given.
64549if test "${with_giflib+set}" = set; then :
64550  withval=$with_giflib;
64551fi
64552
64553
64554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64555$as_echo_n "checking for which giflib to use... " >&6; }
64556  # default is bundled
64557  DEFAULT_GIFLIB=bundled
64558  # if user didn't specify, use DEFAULT_GIFLIB
64559  if test "x${with_giflib}" = "x"; then
64560    with_giflib=${DEFAULT_GIFLIB}
64561  fi
64562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64563$as_echo "${with_giflib}" >&6; }
64564
64565  if test "x${with_giflib}" = "xbundled"; then
64566    USE_EXTERNAL_LIBGIF=false
64567  elif test "x${with_giflib}" = "xsystem"; then
64568    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64569if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64570
64571else
64572   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64573fi
64574
64575
64576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64577$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64578if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64579  $as_echo_n "(cached) " >&6
64580else
64581  ac_check_lib_save_LIBS=$LIBS
64582LIBS="-lgif  $LIBS"
64583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64584/* end confdefs.h.  */
64585
64586/* Override any GCC internal prototype to avoid an error.
64587   Use char because int might match the return type of a GCC
64588   builtin and then its argument prototype would still apply.  */
64589#ifdef __cplusplus
64590extern "C"
64591#endif
64592char DGifGetCode ();
64593int
64594main ()
64595{
64596return DGifGetCode ();
64597  ;
64598  return 0;
64599}
64600_ACEOF
64601if ac_fn_cxx_try_link "$LINENO"; then :
64602  ac_cv_lib_gif_DGifGetCode=yes
64603else
64604  ac_cv_lib_gif_DGifGetCode=no
64605fi
64606rm -f core conftest.err conftest.$ac_objext \
64607    conftest$ac_exeext conftest.$ac_ext
64608LIBS=$ac_check_lib_save_LIBS
64609fi
64610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64611$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64612if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64613  cat >>confdefs.h <<_ACEOF
64614#define HAVE_LIBGIF 1
64615_ACEOF
64616
64617  LIBS="-lgif $LIBS"
64618
64619else
64620   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64621fi
64622
64623
64624    USE_EXTERNAL_LIBGIF=true
64625  else
64626    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64627  fi
64628
64629
64630
64631
64632
64633# Check whether --with-libpng was given.
64634if test "${with_libpng+set}" = set; then :
64635  withval=$with_libpng;
64636fi
64637
64638
64639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64640$as_echo_n "checking for which libpng to use... " >&6; }
64641
64642  # default is bundled
64643  DEFAULT_LIBPNG=bundled
64644  # if user didn't specify, use DEFAULT_LIBPNG
64645  if test "x${with_libpng}" = "x"; then
64646    with_libpng=${DEFAULT_LIBPNG}
64647  fi
64648
64649  if test "x${with_libpng}" = "xbundled"; then
64650    USE_EXTERNAL_LIBPNG=false
64651    PNG_CFLAGS=""
64652    PNG_LIBS=""
64653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64654$as_echo "bundled" >&6; }
64655  elif test "x${with_libpng}" = "xsystem"; then
64656
64657pkg_failed=no
64658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64659$as_echo_n "checking for PNG... " >&6; }
64660
64661if test -n "$PNG_CFLAGS"; then
64662    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64663 elif test -n "$PKG_CONFIG"; then
64664    if test -n "$PKG_CONFIG" && \
64665    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64666  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64667  ac_status=$?
64668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64669  test $ac_status = 0; }; then
64670  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64671else
64672  pkg_failed=yes
64673fi
64674 else
64675    pkg_failed=untried
64676fi
64677if test -n "$PNG_LIBS"; then
64678    pkg_cv_PNG_LIBS="$PNG_LIBS"
64679 elif test -n "$PKG_CONFIG"; then
64680    if test -n "$PKG_CONFIG" && \
64681    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64682  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64683  ac_status=$?
64684  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64685  test $ac_status = 0; }; then
64686  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64687else
64688  pkg_failed=yes
64689fi
64690 else
64691    pkg_failed=untried
64692fi
64693
64694
64695
64696if test $pkg_failed = yes; then
64697
64698if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64699        _pkg_short_errors_supported=yes
64700else
64701        _pkg_short_errors_supported=no
64702fi
64703        if test $_pkg_short_errors_supported = yes; then
64704	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64705        else
64706	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64707        fi
64708	# Put the nasty error message in config.log where it belongs
64709	echo "$PNG_PKG_ERRORS" >&5
64710
64711	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64712$as_echo "no" >&6; }
64713                LIBPNG_FOUND=no
64714elif test $pkg_failed = untried; then
64715	LIBPNG_FOUND=no
64716else
64717	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64718	PNG_LIBS=$pkg_cv_PNG_LIBS
64719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64720$as_echo "yes" >&6; }
64721	LIBPNG_FOUND=yes
64722fi
64723    if test "x${LIBPNG_FOUND}" = "xyes"; then
64724      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64725      USE_EXTERNAL_LIBPNG=true
64726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64727$as_echo "system" >&6; }
64728    else
64729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64730$as_echo "system not found" >&6; }
64731      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64732    fi
64733  else
64734    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64735  fi
64736
64737
64738
64739
64740
64741
64742
64743# Check whether --with-zlib was given.
64744if test "${with_zlib+set}" = set; then :
64745  withval=$with_zlib;
64746fi
64747
64748
64749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64750$as_echo_n "checking for compress in -lz... " >&6; }
64751if ${ac_cv_lib_z_compress+:} false; then :
64752  $as_echo_n "(cached) " >&6
64753else
64754  ac_check_lib_save_LIBS=$LIBS
64755LIBS="-lz  $LIBS"
64756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64757/* end confdefs.h.  */
64758
64759/* Override any GCC internal prototype to avoid an error.
64760   Use char because int might match the return type of a GCC
64761   builtin and then its argument prototype would still apply.  */
64762#ifdef __cplusplus
64763extern "C"
64764#endif
64765char compress ();
64766int
64767main ()
64768{
64769return compress ();
64770  ;
64771  return 0;
64772}
64773_ACEOF
64774if ac_fn_cxx_try_link "$LINENO"; then :
64775  ac_cv_lib_z_compress=yes
64776else
64777  ac_cv_lib_z_compress=no
64778fi
64779rm -f core conftest.err conftest.$ac_objext \
64780    conftest$ac_exeext conftest.$ac_ext
64781LIBS=$ac_check_lib_save_LIBS
64782fi
64783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64784$as_echo "$ac_cv_lib_z_compress" >&6; }
64785if test "x$ac_cv_lib_z_compress" = xyes; then :
64786   ZLIB_FOUND=yes
64787else
64788   ZLIB_FOUND=no
64789fi
64790
64791
64792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64793$as_echo_n "checking for which zlib to use... " >&6; }
64794
64795  DEFAULT_ZLIB=system
64796  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64797    # On windows default is bundled...on others default is system
64798    DEFAULT_ZLIB=bundled
64799  fi
64800
64801  if test "x${ZLIB_FOUND}" != "xyes"; then
64802    # If we don't find any system...set default to bundled
64803    DEFAULT_ZLIB=bundled
64804  fi
64805
64806  # If user didn't specify, use DEFAULT_ZLIB
64807  if test "x${with_zlib}" = "x"; then
64808    with_zlib=${DEFAULT_ZLIB}
64809  fi
64810
64811  if test "x${with_zlib}" = "xbundled"; then
64812    USE_EXTERNAL_LIBZ=false
64813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64814$as_echo "bundled" >&6; }
64815  elif test "x${with_zlib}" = "xsystem"; then
64816    if test "x${ZLIB_FOUND}" = "xyes"; then
64817      USE_EXTERNAL_LIBZ=true
64818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64819$as_echo "system" >&6; }
64820    else
64821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64822$as_echo "system not found" >&6; }
64823      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64824    fi
64825  else
64826    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64827  fi
64828
64829
64830
64831
64832
64833# Check whether --with-lcms was given.
64834if test "${with_lcms+set}" = set; then :
64835  withval=$with_lcms;
64836fi
64837
64838
64839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64840$as_echo_n "checking for which lcms to use... " >&6; }
64841
64842  DEFAULT_LCMS=bundled
64843  # If user didn't specify, use DEFAULT_LCMS
64844  if test "x${with_lcms}" = "x"; then
64845    with_lcms=${DEFAULT_LCMS}
64846  fi
64847
64848  if test "x${with_lcms}" = "xbundled"; then
64849    USE_EXTERNAL_LCMS=false
64850    LCMS_CFLAGS=""
64851    LCMS_LIBS=""
64852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64853$as_echo "bundled" >&6; }
64854  elif test "x${with_lcms}" = "xsystem"; then
64855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64856$as_echo "system" >&6; }
64857
64858pkg_failed=no
64859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64860$as_echo_n "checking for LCMS... " >&6; }
64861
64862if test -n "$LCMS_CFLAGS"; then
64863    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64864 elif test -n "$PKG_CONFIG"; then
64865    if test -n "$PKG_CONFIG" && \
64866    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64867  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64868  ac_status=$?
64869  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64870  test $ac_status = 0; }; then
64871  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64872else
64873  pkg_failed=yes
64874fi
64875 else
64876    pkg_failed=untried
64877fi
64878if test -n "$LCMS_LIBS"; then
64879    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64880 elif test -n "$PKG_CONFIG"; then
64881    if test -n "$PKG_CONFIG" && \
64882    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64883  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64884  ac_status=$?
64885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64886  test $ac_status = 0; }; then
64887  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64888else
64889  pkg_failed=yes
64890fi
64891 else
64892    pkg_failed=untried
64893fi
64894
64895
64896
64897if test $pkg_failed = yes; then
64898
64899if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64900        _pkg_short_errors_supported=yes
64901else
64902        _pkg_short_errors_supported=no
64903fi
64904        if test $_pkg_short_errors_supported = yes; then
64905	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64906        else
64907	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64908        fi
64909	# Put the nasty error message in config.log where it belongs
64910	echo "$LCMS_PKG_ERRORS" >&5
64911
64912	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64913$as_echo "no" >&6; }
64914                LCMS_FOUND=no
64915elif test $pkg_failed = untried; then
64916	LCMS_FOUND=no
64917else
64918	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64919	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64921$as_echo "yes" >&6; }
64922	LCMS_FOUND=yes
64923fi
64924    if test "x${LCMS_FOUND}" = "xyes"; then
64925      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64926      USE_EXTERNAL_LCMS=true
64927    else
64928      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64929    fi
64930  else
64931    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64932  fi
64933
64934
64935
64936
64937
64938
64939
64940
64941
64942
64943
64944
64945
64946  # Setup libm (the maths library)
64947  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64949$as_echo_n "checking for cos in -lm... " >&6; }
64950if ${ac_cv_lib_m_cos+:} false; then :
64951  $as_echo_n "(cached) " >&6
64952else
64953  ac_check_lib_save_LIBS=$LIBS
64954LIBS="-lm  $LIBS"
64955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64956/* end confdefs.h.  */
64957
64958/* Override any GCC internal prototype to avoid an error.
64959   Use char because int might match the return type of a GCC
64960   builtin and then its argument prototype would still apply.  */
64961#ifdef __cplusplus
64962extern "C"
64963#endif
64964char cos ();
64965int
64966main ()
64967{
64968return cos ();
64969  ;
64970  return 0;
64971}
64972_ACEOF
64973if ac_fn_cxx_try_link "$LINENO"; then :
64974  ac_cv_lib_m_cos=yes
64975else
64976  ac_cv_lib_m_cos=no
64977fi
64978rm -f core conftest.err conftest.$ac_objext \
64979    conftest$ac_exeext conftest.$ac_ext
64980LIBS=$ac_check_lib_save_LIBS
64981fi
64982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64983$as_echo "$ac_cv_lib_m_cos" >&6; }
64984if test "x$ac_cv_lib_m_cos" = xyes; then :
64985  cat >>confdefs.h <<_ACEOF
64986#define HAVE_LIBM 1
64987_ACEOF
64988
64989  LIBS="-lm $LIBS"
64990
64991else
64992
64993        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64994$as_echo "$as_me: Maths library was not found" >&6;}
64995
64996fi
64997
64998    LIBM="-lm"
64999  else
65000    LIBM=""
65001  fi
65002
65003
65004  # Setup libdl (for dynamic library loading)
65005  save_LIBS="$LIBS"
65006  LIBS=""
65007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65008$as_echo_n "checking for dlopen in -ldl... " >&6; }
65009if ${ac_cv_lib_dl_dlopen+:} false; then :
65010  $as_echo_n "(cached) " >&6
65011else
65012  ac_check_lib_save_LIBS=$LIBS
65013LIBS="-ldl  $LIBS"
65014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65015/* end confdefs.h.  */
65016
65017/* Override any GCC internal prototype to avoid an error.
65018   Use char because int might match the return type of a GCC
65019   builtin and then its argument prototype would still apply.  */
65020#ifdef __cplusplus
65021extern "C"
65022#endif
65023char dlopen ();
65024int
65025main ()
65026{
65027return dlopen ();
65028  ;
65029  return 0;
65030}
65031_ACEOF
65032if ac_fn_cxx_try_link "$LINENO"; then :
65033  ac_cv_lib_dl_dlopen=yes
65034else
65035  ac_cv_lib_dl_dlopen=no
65036fi
65037rm -f core conftest.err conftest.$ac_objext \
65038    conftest$ac_exeext conftest.$ac_ext
65039LIBS=$ac_check_lib_save_LIBS
65040fi
65041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65042$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65043if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65044  cat >>confdefs.h <<_ACEOF
65045#define HAVE_LIBDL 1
65046_ACEOF
65047
65048  LIBS="-ldl $LIBS"
65049
65050fi
65051
65052  LIBDL="$LIBS"
65053
65054  LIBS="$save_LIBS"
65055
65056  # Deprecated libraries, keep the flags for backwards compatibility
65057  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65058
65059
65060# Check whether --with-dxsdk was given.
65061if test "${with_dxsdk+set}" = set; then :
65062  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65063$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65064fi
65065
65066
65067
65068
65069# Check whether --with-dxsdk-lib was given.
65070if test "${with_dxsdk_lib+set}" = set; then :
65071  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65072$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65073fi
65074
65075
65076
65077
65078# Check whether --with-dxsdk-include was given.
65079if test "${with_dxsdk_include+set}" = set; then :
65080  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65081$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65082fi
65083
65084
65085  fi
65086
65087  # Control if libzip can use mmap. Available for purposes of overriding.
65088  LIBZIP_CAN_USE_MMAP=true
65089
65090
65091
65092  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65093    # Find the root of the Solaris Studio installation from the compiler path
65094    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65095    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65097$as_echo_n "checking for libstlport.so.1... " >&6; }
65098    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65099      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65100      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65101    fi
65102    if test -f "$STLPORT_LIB"; then
65103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65104$as_echo "yes, $STLPORT_LIB" >&6; }
65105
65106  # Only process if variable expands to non-empty
65107
65108  if test "x$STLPORT_LIB" != x; then
65109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65110
65111  # Input might be given as Windows format, start by converting to
65112  # unix format.
65113  path="$STLPORT_LIB"
65114  new_path=`$CYGPATH -u "$path"`
65115
65116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65119  # "foo.exe" is OK but "foo" is an error.
65120  #
65121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65122  # It is also a way to make sure we got the proper file name for the real test later on.
65123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65124  if test "x$test_shortpath" = x; then
65125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65126$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65127    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65128  fi
65129
65130  # Call helper function which possibly converts this using DOS-style short mode.
65131  # If so, the updated path is stored in $new_path.
65132
65133  input_path="$new_path"
65134  # Check if we need to convert this using DOS-style short mode. If the path
65135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65136  # take no chances and rewrite it.
65137  # Note: m4 eats our [], so we need to use [ and ] instead.
65138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65139  if test "x$has_forbidden_chars" != x; then
65140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65144      # Going to short mode and back again did indeed matter. Since short mode is
65145      # case insensitive, let's make it lowercase to improve readability.
65146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65147      # Now convert it back to Unix-style (cygpath)
65148      input_path=`$CYGPATH -u "$shortmode_path"`
65149      new_path="$input_path"
65150    fi
65151  fi
65152
65153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65154  if test "x$test_cygdrive_prefix" = x; then
65155    # As a simple fix, exclude /usr/bin since it's not a real path.
65156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65158      # a path prefixed by /cygdrive for fixpath to work.
65159      new_path="$CYGWIN_ROOT_PATH$input_path"
65160    fi
65161  fi
65162
65163
65164  if test "x$path" != "x$new_path"; then
65165    STLPORT_LIB="$new_path"
65166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65167$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65168  fi
65169
65170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65171
65172  path="$STLPORT_LIB"
65173  has_colon=`$ECHO $path | $GREP ^.:`
65174  new_path="$path"
65175  if test "x$has_colon" = x; then
65176    # Not in mixed or Windows style, start by that.
65177    new_path=`cmd //c echo $path`
65178  fi
65179
65180
65181  input_path="$new_path"
65182  # Check if we need to convert this using DOS-style short mode. If the path
65183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65184  # take no chances and rewrite it.
65185  # Note: m4 eats our [], so we need to use [ and ] instead.
65186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65187  if test "x$has_forbidden_chars" != x; then
65188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65190  fi
65191
65192
65193  windows_path="$new_path"
65194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65195    unix_path=`$CYGPATH -u "$windows_path"`
65196    new_path="$unix_path"
65197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65199    new_path="$unix_path"
65200  fi
65201
65202  if test "x$path" != "x$new_path"; then
65203    STLPORT_LIB="$new_path"
65204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65205$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65206  fi
65207
65208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65210
65211    else
65212      # We're on a unix platform. Hooray! :)
65213      path="$STLPORT_LIB"
65214      has_space=`$ECHO "$path" | $GREP " "`
65215      if test "x$has_space" != x; then
65216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65217$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65219      fi
65220
65221      # Use eval to expand a potential ~
65222      eval path="$path"
65223      if test ! -f "$path" && test ! -d "$path"; then
65224        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65225      fi
65226
65227      if test -d "$path"; then
65228        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65229      else
65230        dir="`$DIRNAME "$path"`"
65231        base="`$BASENAME "$path"`"
65232        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65233      fi
65234    fi
65235  fi
65236
65237    else
65238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65239$as_echo "no, not found at $STLPORT_LIB" >&6; }
65240      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65241    fi
65242
65243  fi
65244
65245
65246
65247
65248
65249
65250
65251
65252
65253
65254
65255
65256
65257
65258# Hotspot setup depends on lib checks (AOT needs libelf).
65259
65260
65261  # The user can in some cases supply additional jvm features. For the custom
65262  # variant, this defines the entire variant.
65263
65264# Check whether --with-jvm-features was given.
65265if test "${with_jvm_features+set}" = set; then :
65266  withval=$with_jvm_features;
65267fi
65268
65269  if test "x$with_jvm_features" != x; then
65270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65271$as_echo_n "checking additional JVM features... " >&6; }
65272    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65274$as_echo "$JVM_FEATURES" >&6; }
65275  fi
65276
65277  # Override hotspot cpu definitions for ARM platforms
65278  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65279    HOTSPOT_TARGET_CPU=arm_32
65280    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65281    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65282    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65283  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65284    HOTSPOT_TARGET_CPU=arm_64
65285    HOTSPOT_TARGET_CPU_ARCH=arm
65286    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65287    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65288  fi
65289
65290  # Verify that dependencies are met for explicitly set features.
65291  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65292    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65293  fi
65294
65295  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65296    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65297  fi
65298
65299  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65300    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65301  fi
65302
65303  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65304    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65305  fi
65306
65307  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65308    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65309  fi
65310
65311  # Turn on additional features based on other parts of configure
65312  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65313    JVM_FEATURES="$JVM_FEATURES dtrace"
65314  else
65315    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65316      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65317    fi
65318  fi
65319
65320  if test "x$STATIC_BUILD" = "xtrue"; then
65321    JVM_FEATURES="$JVM_FEATURES static-build"
65322  else
65323    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65324      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65325    fi
65326  fi
65327
65328  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65329    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65330      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65331    fi
65332  fi
65333
65334  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65335    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65336      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65337    fi
65338  fi
65339
65340  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65341  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65342     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65343     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65344    JVM_FEATURES_jvmci="jvmci"
65345  else
65346    JVM_FEATURES_jvmci=""
65347  fi
65348
65349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65350$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65351  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65353$as_echo "yes, forced" >&6; }
65354    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65355      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65356    fi
65357    INCLUDE_GRAAL="true"
65358  else
65359    # By default enable graal build where AOT is available
65360    if test "x$ENABLE_AOT" = "xtrue"; then
65361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65362$as_echo "yes" >&6; }
65363      JVM_FEATURES_graal="graal"
65364      INCLUDE_GRAAL="true"
65365    else
65366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65367$as_echo "no" >&6; }
65368      JVM_FEATURES_graal=""
65369      INCLUDE_GRAAL="false"
65370    fi
65371  fi
65372
65373
65374
65375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65376$as_echo_n "checking if aot should be enabled... " >&6; }
65377  if test "x$ENABLE_AOT" = "xtrue"; then
65378    if test "x$enable_aot" = "xyes"; then
65379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65380$as_echo "yes, forced" >&6; }
65381    else
65382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65383$as_echo "yes" >&6; }
65384    fi
65385    JVM_FEATURES_aot="aot"
65386  else
65387    if test "x$enable_aot" = "xno"; then
65388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65389$as_echo "no, forced" >&6; }
65390    else
65391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65392$as_echo "no" >&6; }
65393    fi
65394    JVM_FEATURES_aot=""
65395  fi
65396
65397  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65398    # Default to use link time optimizations on minimal on arm
65399    JVM_FEATURES_link_time_opt="link-time-opt"
65400  else
65401    JVM_FEATURES_link_time_opt=""
65402  fi
65403
65404  # All variants but minimal (and custom) get these features
65405  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65406
65407  # Enable features depending on variant.
65408  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65409  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65410  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65411  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65412  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65413  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65414  JVM_FEATURES_custom="$JVM_FEATURES"
65415
65416
65417
65418
65419
65420
65421
65422
65423
65424  # Used for verification of Makefiles by check-jvm-feature
65425
65426
65427  # We don't support --with-jvm-interpreter anymore, use zero instead.
65428
65429
65430# Check whether --with-jvm-interpreter was given.
65431if test "${with_jvm_interpreter+set}" = set; then :
65432  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65433$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65434fi
65435
65436
65437
65438
65439###############################################################################
65440#
65441# We need to do some final tweaking, when everything else is done.
65442#
65443###############################################################################
65444
65445
65446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65447$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65448
65449  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65450    ENABLE_INTREE_EC=true
65451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65452$as_echo "yes" >&6; }
65453  else
65454    ENABLE_INTREE_EC=false
65455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65456$as_echo "no" >&6; }
65457  fi
65458
65459
65460
65461
65462  # Check whether --enable-jtreg-failure-handler was given.
65463if test "${enable_jtreg_failure_handler+set}" = set; then :
65464  enableval=$enable_jtreg_failure_handler;
65465fi
65466
65467
65468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65469$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65470
65471  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65472    if test "x$JT_HOME" = "x"; then
65473      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65474    else
65475      BUILD_FAILURE_HANDLER=true
65476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65477$as_echo "yes, forced" >&6; }
65478    fi
65479  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65480    BUILD_FAILURE_HANDLER=false
65481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65482$as_echo "no, forced" >&6; }
65483  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65484      || test "x$enable_jtreg_failure_handler" = "x"; then
65485    if test "x$JT_HOME" = "x"; then
65486      BUILD_FAILURE_HANDLER=false
65487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65488$as_echo "no, missing jtreg" >&6; }
65489    else
65490      BUILD_FAILURE_HANDLER=true
65491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65492$as_echo "yes, jtreg present" >&6; }
65493    fi
65494  else
65495    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65496  fi
65497
65498
65499
65500
65501  # Check whether --enable-generate-classlist was given.
65502if test "${enable_generate_classlist+set}" = set; then :
65503  enableval=$enable_generate_classlist;
65504fi
65505
65506
65507  # Check if it's likely that it's possible to generate the classlist. Depending
65508  # on exact jvm configuration it could be possible anyway.
65509  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65510    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65511  else
65512    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65513  fi
65514
65515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65516$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65517  if test "x$enable_generate_classlist" = "xyes"; then
65518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65519$as_echo "yes, forced" >&6; }
65520    ENABLE_GENERATE_CLASSLIST="true"
65521    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65522      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65523$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65524    fi
65525  elif test "x$enable_generate_classlist" = "xno"; then
65526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65527$as_echo "no, forced" >&6; }
65528    ENABLE_GENERATE_CLASSLIST="false"
65529  elif test "x$enable_generate_classlist" = "x"; then
65530    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65532$as_echo "yes" >&6; }
65533      ENABLE_GENERATE_CLASSLIST="true"
65534    else
65535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65536$as_echo "no" >&6; }
65537      ENABLE_GENERATE_CLASSLIST="false"
65538    fi
65539  else
65540    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65541  fi
65542
65543
65544
65545
65546###############################################################################
65547#
65548# Configure parts of the build that only affect the build performance,
65549# not the result.
65550#
65551###############################################################################
65552
65553
65554  # How many cores do we have on this build system?
65555
65556# Check whether --with-num-cores was given.
65557if test "${with_num_cores+set}" = set; then :
65558  withval=$with_num_cores;
65559fi
65560
65561  if test "x$with_num_cores" = x; then
65562    # The number of cores were not specified, try to probe them.
65563
65564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65565$as_echo_n "checking for number of cores... " >&6; }
65566  NUM_CORES=1
65567  FOUND_CORES=no
65568
65569  if test -f /proc/cpuinfo; then
65570    # Looks like a Linux (or cygwin) system
65571    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65572    FOUND_CORES=yes
65573  elif test -x /usr/sbin/psrinfo; then
65574    # Looks like a Solaris system
65575    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65576    FOUND_CORES=yes
65577  elif test -x /usr/sbin/sysctl; then
65578    # Looks like a MacOSX system
65579    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65580    FOUND_CORES=yes
65581  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65582    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65583    FOUND_CORES=yes
65584  elif test -n "$NUMBER_OF_PROCESSORS"; then
65585    # On windows, look in the env
65586    NUM_CORES=$NUMBER_OF_PROCESSORS
65587    FOUND_CORES=yes
65588  fi
65589
65590  if test "x$FOUND_CORES" = xyes; then
65591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65592$as_echo "$NUM_CORES" >&6; }
65593  else
65594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65595$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65596    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65597$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65598  fi
65599
65600  else
65601    NUM_CORES=$with_num_cores
65602  fi
65603
65604
65605
65606  # How much memory do we have on this build system?
65607
65608# Check whether --with-memory-size was given.
65609if test "${with_memory_size+set}" = set; then :
65610  withval=$with_memory_size;
65611fi
65612
65613  if test "x$with_memory_size" = x; then
65614    # The memory size was not specified, try to probe it.
65615
65616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65617$as_echo_n "checking for memory size... " >&6; }
65618  # Default to 1024 MB
65619  MEMORY_SIZE=1024
65620  FOUND_MEM=no
65621
65622  if test -f /proc/meminfo; then
65623    # Looks like a Linux (or cygwin) system
65624    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65625    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65626    FOUND_MEM=yes
65627  elif test -x /usr/sbin/prtconf; then
65628    # Looks like a Solaris or AIX system
65629    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65630    FOUND_MEM=yes
65631  elif test -x /usr/sbin/sysctl; then
65632    # Looks like a MacOSX system
65633    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65634    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65635    FOUND_MEM=yes
65636  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65637    # Windows, but without cygwin
65638    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65639    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65640    FOUND_MEM=yes
65641  fi
65642
65643  if test "x$FOUND_MEM" = xyes; then
65644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65645$as_echo "$MEMORY_SIZE MB" >&6; }
65646  else
65647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65648$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65650$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65651  fi
65652
65653  else
65654    MEMORY_SIZE=$with_memory_size
65655  fi
65656
65657
65658
65659  # Provide a decent default number of parallel jobs for make depending on
65660  # number of cores, amount of memory and machine architecture.
65661
65662# Check whether --with-jobs was given.
65663if test "${with_jobs+set}" = set; then :
65664  withval=$with_jobs;
65665fi
65666
65667  if test "x$with_jobs" = x; then
65668    # Number of jobs was not specified, calculate.
65669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65670$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65671    # Approximate memory in GB.
65672    memory_gb=`expr $MEMORY_SIZE / 1024`
65673    # Pick the lowest of memory in gb and number of cores.
65674    if test "$memory_gb" -lt "$NUM_CORES"; then
65675      JOBS="$memory_gb"
65676    else
65677      JOBS="$NUM_CORES"
65678    fi
65679    if test "$JOBS" -eq "0"; then
65680      JOBS=1
65681    fi
65682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65683$as_echo "$JOBS" >&6; }
65684  else
65685    JOBS=$with_jobs
65686  fi
65687
65688
65689
65690  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65691
65692# Check whether --with-test-jobs was given.
65693if test "${with_test_jobs+set}" = set; then :
65694  withval=$with_test_jobs;
65695fi
65696
65697  if test "x$with_test_jobs" = x; then
65698      TEST_JOBS=0
65699  else
65700      TEST_JOBS=$with_test_jobs
65701  fi
65702
65703
65704
65705# Setup arguments for the boot jdk (after cores and memory have been setup)
65706
65707  ##############################################################################
65708  #
65709  # Specify jvm options for anything that is run with the Boot JDK.
65710  # Not all JVM:s accept the same arguments on the command line.
65711  #
65712
65713# Check whether --with-boot-jdk-jvmargs was given.
65714if test "${with_boot_jdk_jvmargs+set}" = set; then :
65715  withval=$with_boot_jdk_jvmargs;
65716fi
65717
65718
65719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65720$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65721
65722  # Disable special log output when a debug build is used as Boot JDK...
65723
65724  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65725  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65726  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65727  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65728  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65729  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65730    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65731    JVM_ARG_OK=true
65732  else
65733    $ECHO "Arg failed:" >&5
65734    $ECHO "$OUTPUT" >&5
65735    JVM_ARG_OK=false
65736  fi
65737
65738
65739  # Force en-US environment
65740
65741  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65742  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65743  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65744  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65745  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65746  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65747    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65748    JVM_ARG_OK=true
65749  else
65750    $ECHO "Arg failed:" >&5
65751    $ECHO "$OUTPUT" >&5
65752    JVM_ARG_OK=false
65753  fi
65754
65755
65756  # Apply user provided options.
65757
65758  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65759  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65760  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65761  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65762  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65763  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65764    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65765    JVM_ARG_OK=true
65766  else
65767    $ECHO "Arg failed:" >&5
65768    $ECHO "$OUTPUT" >&5
65769    JVM_ARG_OK=false
65770  fi
65771
65772
65773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65774$as_echo "$boot_jdk_jvmargs" >&6; }
65775
65776  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65777  JAVA_FLAGS=$boot_jdk_jvmargs
65778
65779
65780
65781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65782$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65783
65784  # Starting amount of heap memory.
65785
65786  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65787  $ECHO "Command: $JAVA -Xms64M -version" >&5
65788  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65789  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65790  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65791  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65792    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65793    JVM_ARG_OK=true
65794  else
65795    $ECHO "Arg failed:" >&5
65796    $ECHO "$OUTPUT" >&5
65797    JVM_ARG_OK=false
65798  fi
65799
65800  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65801
65802  # Maximum amount of heap memory and stack size.
65803  JVM_HEAP_LIMIT_32="1024"
65804  # Running a 64 bit JVM allows for and requires a bigger heap
65805  JVM_HEAP_LIMIT_64="1600"
65806  STACK_SIZE_32=768
65807  STACK_SIZE_64=1536
65808  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65809  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65810    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65811  fi
65812  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65813    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65814  fi
65815  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65816    JVM_HEAP_LIMIT_32=512
65817    JVM_HEAP_LIMIT_64=512
65818  fi
65819
65820  if test "x$BOOT_JDK_BITS" = "x32"; then
65821    STACK_SIZE=$STACK_SIZE_32
65822    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65823  else
65824    STACK_SIZE=$STACK_SIZE_64
65825    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65826  fi
65827
65828  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65829  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65830  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65831  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65832  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65833  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65834    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65835    JVM_ARG_OK=true
65836  else
65837    $ECHO "Arg failed:" >&5
65838    $ECHO "$OUTPUT" >&5
65839    JVM_ARG_OK=false
65840  fi
65841
65842
65843  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65844  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65845  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65846  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65847  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65848  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65849    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65850    JVM_ARG_OK=true
65851  else
65852    $ECHO "Arg failed:" >&5
65853    $ECHO "$OUTPUT" >&5
65854    JVM_ARG_OK=false
65855  fi
65856
65857
65858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65859$as_echo "$boot_jdk_jvmargs_big" >&6; }
65860
65861  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65862
65863
65864  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65865    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65866    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65867  else
65868    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65869    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65870  fi
65871  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65872  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65874$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65876$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65877
65878
65879  # By default, the main javac compilations use big
65880  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65881
65882
65883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65884$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65885
65886  # Use serial gc for small short lived tools if possible
65887
65888  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65889  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65890  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65891  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65892  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65893  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65894    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65895    JVM_ARG_OK=true
65896  else
65897    $ECHO "Arg failed:" >&5
65898    $ECHO "$OUTPUT" >&5
65899    JVM_ARG_OK=false
65900  fi
65901
65902
65903  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65904  $ECHO "Command: $JAVA -Xms32M -version" >&5
65905  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65906  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65907  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65908  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65909    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65910    JVM_ARG_OK=true
65911  else
65912    $ECHO "Arg failed:" >&5
65913    $ECHO "$OUTPUT" >&5
65914    JVM_ARG_OK=false
65915  fi
65916
65917
65918  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65919  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65920  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65921  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65922  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65923  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65924    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65925    JVM_ARG_OK=true
65926  else
65927    $ECHO "Arg failed:" >&5
65928    $ECHO "$OUTPUT" >&5
65929    JVM_ARG_OK=false
65930  fi
65931
65932
65933  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65934  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65935  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65936  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65937  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65938  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65939    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65940    JVM_ARG_OK=true
65941  else
65942    $ECHO "Arg failed:" >&5
65943    $ECHO "$OUTPUT" >&5
65944    JVM_ARG_OK=false
65945  fi
65946
65947
65948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65949$as_echo "$boot_jdk_jvmargs_small" >&6; }
65950
65951  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65952
65953
65954  JAVA_TOOL_FLAGS_SMALL=""
65955  for f in $JAVA_FLAGS_SMALL; do
65956    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65957  done
65958
65959
65960
65961# Setup smart javac (after cores and memory have been setup)
65962
65963
65964# Check whether --with-sjavac-server-java was given.
65965if test "${with_sjavac_server_java+set}" = set; then :
65966  withval=$with_sjavac_server_java;
65967fi
65968
65969
65970  if test "x$with_sjavac_server_java" != x; then
65971    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65972    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65973    if test "x$FOUND_VERSION" = x; then
65974      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65975    fi
65976  else
65977    SJAVAC_SERVER_JAVA="$JAVA"
65978  fi
65979
65980
65981  if test "$MEMORY_SIZE" -gt "3000"; then
65982    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
65983      JVM_64BIT=true
65984    fi
65985  fi
65986
65987  MX_VALUE=`expr $MEMORY_SIZE / 2`
65988  if test "$JVM_64BIT" = true; then
65989    # Set ms lower than mx since more than one instance of the server might
65990    # get launched at the same time before they figure out which instance won.
65991    MS_VALUE=512
65992    if test "$MX_VALUE" -gt "2048"; then
65993      MX_VALUE=2048
65994    fi
65995  else
65996    MS_VALUE=256
65997    if test "$MX_VALUE" -gt "1500"; then
65998      MX_VALUE=1500
65999    fi
66000  fi
66001  if test "$MX_VALUE" -lt "512"; then
66002    MX_VALUE=512
66003  fi
66004
66005  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66006  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66007  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66008  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66009  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66010  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66011    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66012    JVM_ARG_OK=true
66013  else
66014    $ECHO "Arg failed:" >&5
66015    $ECHO "$OUTPUT" >&5
66016    JVM_ARG_OK=false
66017  fi
66018
66019
66020
66021  # Check whether --enable-sjavac was given.
66022if test "${enable_sjavac+set}" = set; then :
66023  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66024else
66025  ENABLE_SJAVAC="no"
66026fi
66027
66028  if test "x$JVM_ARG_OK" = "xfalse"; then
66029    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66030$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66031    ENABLE_SJAVAC="no"
66032  fi
66033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66034$as_echo_n "checking whether to use sjavac... " >&6; }
66035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66036$as_echo "$ENABLE_SJAVAC" >&6; }
66037
66038
66039  # Check whether --enable-javac-server was given.
66040if test "${enable_javac_server+set}" = set; then :
66041  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66042else
66043  ENABLE_JAVAC_SERVER="yes"
66044fi
66045
66046  if test "x$JVM_ARG_OK" = "xfalse"; then
66047    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66048$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66049    ENABLE_JAVAC_SERVER="no"
66050  fi
66051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66052$as_echo_n "checking whether to use javac server... " >&6; }
66053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66054$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66055
66056
66057  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66058    # When using a server javac, the small client instances do not need much
66059    # resources.
66060    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66061  fi
66062
66063
66064# Setup use of icecc if requested
66065
66066  # Check whether --enable-icecc was given.
66067if test "${enable_icecc+set}" = set; then :
66068  enableval=$enable_icecc;
66069fi
66070
66071
66072  if test "x${enable_icecc}" = "xyes"; then
66073
66074
66075
66076  # Publish this variable in the help.
66077
66078
66079  if [ -z "${ICECC_CMD+x}" ]; then
66080    # The variable is not set by user, try to locate tool using the code snippet
66081    for ac_prog in icecc
66082do
66083  # Extract the first word of "$ac_prog", so it can be a program name with args.
66084set dummy $ac_prog; ac_word=$2
66085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66086$as_echo_n "checking for $ac_word... " >&6; }
66087if ${ac_cv_path_ICECC_CMD+:} false; then :
66088  $as_echo_n "(cached) " >&6
66089else
66090  case $ICECC_CMD in
66091  [\\/]* | ?:[\\/]*)
66092  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66093  ;;
66094  *)
66095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66096for as_dir in $PATH
66097do
66098  IFS=$as_save_IFS
66099  test -z "$as_dir" && as_dir=.
66100    for ac_exec_ext in '' $ac_executable_extensions; do
66101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66102    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66104    break 2
66105  fi
66106done
66107  done
66108IFS=$as_save_IFS
66109
66110  ;;
66111esac
66112fi
66113ICECC_CMD=$ac_cv_path_ICECC_CMD
66114if test -n "$ICECC_CMD"; then
66115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66116$as_echo "$ICECC_CMD" >&6; }
66117else
66118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66119$as_echo "no" >&6; }
66120fi
66121
66122
66123  test -n "$ICECC_CMD" && break
66124done
66125
66126  else
66127    # The variable is set, but is it from the command line or the environment?
66128
66129    # Try to remove the string !ICECC_CMD! from our list.
66130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66132      # If it failed, the variable was not from the command line. Ignore it,
66133      # but warn the user (except for BASH, which is always set by the calling BASH).
66134      if test "xICECC_CMD" != xBASH; then
66135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66136$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66137      fi
66138      # Try to locate tool using the code snippet
66139      for ac_prog in icecc
66140do
66141  # Extract the first word of "$ac_prog", so it can be a program name with args.
66142set dummy $ac_prog; ac_word=$2
66143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66144$as_echo_n "checking for $ac_word... " >&6; }
66145if ${ac_cv_path_ICECC_CMD+:} false; then :
66146  $as_echo_n "(cached) " >&6
66147else
66148  case $ICECC_CMD in
66149  [\\/]* | ?:[\\/]*)
66150  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66151  ;;
66152  *)
66153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66154for as_dir in $PATH
66155do
66156  IFS=$as_save_IFS
66157  test -z "$as_dir" && as_dir=.
66158    for ac_exec_ext in '' $ac_executable_extensions; do
66159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66160    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66162    break 2
66163  fi
66164done
66165  done
66166IFS=$as_save_IFS
66167
66168  ;;
66169esac
66170fi
66171ICECC_CMD=$ac_cv_path_ICECC_CMD
66172if test -n "$ICECC_CMD"; then
66173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66174$as_echo "$ICECC_CMD" >&6; }
66175else
66176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66177$as_echo "no" >&6; }
66178fi
66179
66180
66181  test -n "$ICECC_CMD" && break
66182done
66183
66184    else
66185      # If it succeeded, then it was overridden by the user. We will use it
66186      # for the tool.
66187
66188      # First remove it from the list of overridden variables, so we can test
66189      # for unknown variables in the end.
66190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66191
66192      # Check if we try to supply an empty value
66193      if test "x$ICECC_CMD" = x; then
66194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66195$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66197$as_echo_n "checking for ICECC_CMD... " >&6; }
66198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66199$as_echo "disabled" >&6; }
66200      else
66201        # Check if the provided tool contains a complete path.
66202        tool_specified="$ICECC_CMD"
66203        tool_basename="${tool_specified##*/}"
66204        if test "x$tool_basename" = "x$tool_specified"; then
66205          # A command without a complete path is provided, search $PATH.
66206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66207$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66208          # Extract the first word of "$tool_basename", so it can be a program name with args.
66209set dummy $tool_basename; ac_word=$2
66210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66211$as_echo_n "checking for $ac_word... " >&6; }
66212if ${ac_cv_path_ICECC_CMD+:} false; then :
66213  $as_echo_n "(cached) " >&6
66214else
66215  case $ICECC_CMD in
66216  [\\/]* | ?:[\\/]*)
66217  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66218  ;;
66219  *)
66220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66221for as_dir in $PATH
66222do
66223  IFS=$as_save_IFS
66224  test -z "$as_dir" && as_dir=.
66225    for ac_exec_ext in '' $ac_executable_extensions; do
66226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66227    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66229    break 2
66230  fi
66231done
66232  done
66233IFS=$as_save_IFS
66234
66235  ;;
66236esac
66237fi
66238ICECC_CMD=$ac_cv_path_ICECC_CMD
66239if test -n "$ICECC_CMD"; then
66240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66241$as_echo "$ICECC_CMD" >&6; }
66242else
66243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66244$as_echo "no" >&6; }
66245fi
66246
66247
66248          if test "x$ICECC_CMD" = x; then
66249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66250          fi
66251        else
66252          # Otherwise we believe it is a complete path. Use it as it is.
66253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66254$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66256$as_echo_n "checking for ICECC_CMD... " >&6; }
66257          if test ! -x "$tool_specified"; then
66258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66259$as_echo "not found" >&6; }
66260            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66261          fi
66262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66263$as_echo "$tool_specified" >&6; }
66264        fi
66265      fi
66266    fi
66267
66268  fi
66269
66270
66271
66272  if test "x$ICECC_CMD" = x; then
66273    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66274  fi
66275
66276
66277    old_path="$PATH"
66278
66279    # Look for icecc-create-env in some known places
66280    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66281
66282
66283
66284  # Publish this variable in the help.
66285
66286
66287  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66288    # The variable is not set by user, try to locate tool using the code snippet
66289    for ac_prog in icecc-create-env
66290do
66291  # Extract the first word of "$ac_prog", so it can be a program name with args.
66292set dummy $ac_prog; ac_word=$2
66293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66294$as_echo_n "checking for $ac_word... " >&6; }
66295if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66296  $as_echo_n "(cached) " >&6
66297else
66298  case $ICECC_CREATE_ENV in
66299  [\\/]* | ?:[\\/]*)
66300  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66301  ;;
66302  *)
66303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66304for as_dir in $PATH
66305do
66306  IFS=$as_save_IFS
66307  test -z "$as_dir" && as_dir=.
66308    for ac_exec_ext in '' $ac_executable_extensions; do
66309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66310    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66312    break 2
66313  fi
66314done
66315  done
66316IFS=$as_save_IFS
66317
66318  ;;
66319esac
66320fi
66321ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66322if test -n "$ICECC_CREATE_ENV"; then
66323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66324$as_echo "$ICECC_CREATE_ENV" >&6; }
66325else
66326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66327$as_echo "no" >&6; }
66328fi
66329
66330
66331  test -n "$ICECC_CREATE_ENV" && break
66332done
66333
66334  else
66335    # The variable is set, but is it from the command line or the environment?
66336
66337    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66340      # If it failed, the variable was not from the command line. Ignore it,
66341      # but warn the user (except for BASH, which is always set by the calling BASH).
66342      if test "xICECC_CREATE_ENV" != xBASH; then
66343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66344$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66345      fi
66346      # Try to locate tool using the code snippet
66347      for ac_prog in icecc-create-env
66348do
66349  # Extract the first word of "$ac_prog", so it can be a program name with args.
66350set dummy $ac_prog; ac_word=$2
66351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66352$as_echo_n "checking for $ac_word... " >&6; }
66353if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66354  $as_echo_n "(cached) " >&6
66355else
66356  case $ICECC_CREATE_ENV in
66357  [\\/]* | ?:[\\/]*)
66358  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66359  ;;
66360  *)
66361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66362for as_dir in $PATH
66363do
66364  IFS=$as_save_IFS
66365  test -z "$as_dir" && as_dir=.
66366    for ac_exec_ext in '' $ac_executable_extensions; do
66367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66368    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66370    break 2
66371  fi
66372done
66373  done
66374IFS=$as_save_IFS
66375
66376  ;;
66377esac
66378fi
66379ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66380if test -n "$ICECC_CREATE_ENV"; then
66381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66382$as_echo "$ICECC_CREATE_ENV" >&6; }
66383else
66384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66385$as_echo "no" >&6; }
66386fi
66387
66388
66389  test -n "$ICECC_CREATE_ENV" && break
66390done
66391
66392    else
66393      # If it succeeded, then it was overridden by the user. We will use it
66394      # for the tool.
66395
66396      # First remove it from the list of overridden variables, so we can test
66397      # for unknown variables in the end.
66398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66399
66400      # Check if we try to supply an empty value
66401      if test "x$ICECC_CREATE_ENV" = x; then
66402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66403$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66405$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66407$as_echo "disabled" >&6; }
66408      else
66409        # Check if the provided tool contains a complete path.
66410        tool_specified="$ICECC_CREATE_ENV"
66411        tool_basename="${tool_specified##*/}"
66412        if test "x$tool_basename" = "x$tool_specified"; then
66413          # A command without a complete path is provided, search $PATH.
66414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66415$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66416          # Extract the first word of "$tool_basename", so it can be a program name with args.
66417set dummy $tool_basename; ac_word=$2
66418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66419$as_echo_n "checking for $ac_word... " >&6; }
66420if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66421  $as_echo_n "(cached) " >&6
66422else
66423  case $ICECC_CREATE_ENV in
66424  [\\/]* | ?:[\\/]*)
66425  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66426  ;;
66427  *)
66428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66429for as_dir in $PATH
66430do
66431  IFS=$as_save_IFS
66432  test -z "$as_dir" && as_dir=.
66433    for ac_exec_ext in '' $ac_executable_extensions; do
66434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66435    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66437    break 2
66438  fi
66439done
66440  done
66441IFS=$as_save_IFS
66442
66443  ;;
66444esac
66445fi
66446ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66447if test -n "$ICECC_CREATE_ENV"; then
66448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66449$as_echo "$ICECC_CREATE_ENV" >&6; }
66450else
66451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66452$as_echo "no" >&6; }
66453fi
66454
66455
66456          if test "x$ICECC_CREATE_ENV" = x; then
66457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66458          fi
66459        else
66460          # Otherwise we believe it is a complete path. Use it as it is.
66461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66462$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66464$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66465          if test ! -x "$tool_specified"; then
66466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66467$as_echo "not found" >&6; }
66468            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66469          fi
66470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66471$as_echo "$tool_specified" >&6; }
66472        fi
66473      fi
66474    fi
66475
66476  fi
66477
66478
66479
66480  if test "x$ICECC_CREATE_ENV" = x; then
66481    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66482  fi
66483
66484
66485    # Use icecc-create-env to create a minimal compilation environment that can
66486    # be sent to the other hosts in the icecream cluster.
66487    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66488    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66489    # Older versions of icecc does not have the --gcc parameter
66490    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66491      icecc_gcc_arg="--gcc"
66492    fi
66493    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66494
66495  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66496      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66497          ${icecc_create_env_log} 2>&1 )
66498  if test "$?" != "0"; then
66499    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66500$as_echo "$as_me: icecc-create-env output:" >&6;}
66501    cat \
66502          ${icecc_create_env_log}
66503    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66504  fi
66505
66506    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66507      # For clang, the icecc compilerwrapper is needed. It usually resides next
66508      # to icecc-create-env.
66509
66510
66511
66512  # Publish this variable in the help.
66513
66514
66515  if [ -z "${ICECC_WRAPPER+x}" ]; then
66516    # The variable is not set by user, try to locate tool using the code snippet
66517    for ac_prog in compilerwrapper
66518do
66519  # Extract the first word of "$ac_prog", so it can be a program name with args.
66520set dummy $ac_prog; ac_word=$2
66521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66522$as_echo_n "checking for $ac_word... " >&6; }
66523if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66524  $as_echo_n "(cached) " >&6
66525else
66526  case $ICECC_WRAPPER in
66527  [\\/]* | ?:[\\/]*)
66528  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66529  ;;
66530  *)
66531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66532for as_dir in $PATH
66533do
66534  IFS=$as_save_IFS
66535  test -z "$as_dir" && as_dir=.
66536    for ac_exec_ext in '' $ac_executable_extensions; do
66537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66538    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66540    break 2
66541  fi
66542done
66543  done
66544IFS=$as_save_IFS
66545
66546  ;;
66547esac
66548fi
66549ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66550if test -n "$ICECC_WRAPPER"; then
66551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66552$as_echo "$ICECC_WRAPPER" >&6; }
66553else
66554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66555$as_echo "no" >&6; }
66556fi
66557
66558
66559  test -n "$ICECC_WRAPPER" && break
66560done
66561
66562  else
66563    # The variable is set, but is it from the command line or the environment?
66564
66565    # Try to remove the string !ICECC_WRAPPER! from our list.
66566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66568      # If it failed, the variable was not from the command line. Ignore it,
66569      # but warn the user (except for BASH, which is always set by the calling BASH).
66570      if test "xICECC_WRAPPER" != xBASH; then
66571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66572$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66573      fi
66574      # Try to locate tool using the code snippet
66575      for ac_prog in compilerwrapper
66576do
66577  # Extract the first word of "$ac_prog", so it can be a program name with args.
66578set dummy $ac_prog; ac_word=$2
66579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66580$as_echo_n "checking for $ac_word... " >&6; }
66581if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66582  $as_echo_n "(cached) " >&6
66583else
66584  case $ICECC_WRAPPER in
66585  [\\/]* | ?:[\\/]*)
66586  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66587  ;;
66588  *)
66589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66590for as_dir in $PATH
66591do
66592  IFS=$as_save_IFS
66593  test -z "$as_dir" && as_dir=.
66594    for ac_exec_ext in '' $ac_executable_extensions; do
66595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66596    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66598    break 2
66599  fi
66600done
66601  done
66602IFS=$as_save_IFS
66603
66604  ;;
66605esac
66606fi
66607ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66608if test -n "$ICECC_WRAPPER"; then
66609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66610$as_echo "$ICECC_WRAPPER" >&6; }
66611else
66612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66613$as_echo "no" >&6; }
66614fi
66615
66616
66617  test -n "$ICECC_WRAPPER" && break
66618done
66619
66620    else
66621      # If it succeeded, then it was overridden by the user. We will use it
66622      # for the tool.
66623
66624      # First remove it from the list of overridden variables, so we can test
66625      # for unknown variables in the end.
66626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66627
66628      # Check if we try to supply an empty value
66629      if test "x$ICECC_WRAPPER" = x; then
66630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66631$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66633$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66635$as_echo "disabled" >&6; }
66636      else
66637        # Check if the provided tool contains a complete path.
66638        tool_specified="$ICECC_WRAPPER"
66639        tool_basename="${tool_specified##*/}"
66640        if test "x$tool_basename" = "x$tool_specified"; then
66641          # A command without a complete path is provided, search $PATH.
66642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66643$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66644          # Extract the first word of "$tool_basename", so it can be a program name with args.
66645set dummy $tool_basename; ac_word=$2
66646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66647$as_echo_n "checking for $ac_word... " >&6; }
66648if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66649  $as_echo_n "(cached) " >&6
66650else
66651  case $ICECC_WRAPPER in
66652  [\\/]* | ?:[\\/]*)
66653  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66654  ;;
66655  *)
66656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66657for as_dir in $PATH
66658do
66659  IFS=$as_save_IFS
66660  test -z "$as_dir" && as_dir=.
66661    for ac_exec_ext in '' $ac_executable_extensions; do
66662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66663    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66665    break 2
66666  fi
66667done
66668  done
66669IFS=$as_save_IFS
66670
66671  ;;
66672esac
66673fi
66674ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66675if test -n "$ICECC_WRAPPER"; then
66676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66677$as_echo "$ICECC_WRAPPER" >&6; }
66678else
66679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66680$as_echo "no" >&6; }
66681fi
66682
66683
66684          if test "x$ICECC_WRAPPER" = x; then
66685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66686          fi
66687        else
66688          # Otherwise we believe it is a complete path. Use it as it is.
66689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66690$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66692$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66693          if test ! -x "$tool_specified"; then
66694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66695$as_echo "not found" >&6; }
66696            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66697          fi
66698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66699$as_echo "$tool_specified" >&6; }
66700        fi
66701      fi
66702    fi
66703
66704  fi
66705
66706
66707
66708  if test "x$ICECC_WRAPPER" = x; then
66709    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66710  fi
66711
66712
66713
66714  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66715      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66716  if test "$?" != "0"; then
66717    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66718$as_echo "$as_me: icecc-create-env output:" >&6;}
66719    cat ${icecc_create_env_log}
66720    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66721  fi
66722
66723    else
66724      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66725    fi
66726    PATH="$old_path"
66727    # The bundle with the compiler gets a name based on checksums. Parse log file
66728    # to find it.
66729    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66730    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66731    if test ! -f ${ICECC_ENV_BUNDLE}; then
66732      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66733    fi
66734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66735$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66737$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66738    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66739
66740    if test "x${COMPILE_TYPE}" = "xcross"; then
66741      # If cross compiling, create a separate env package for the build compiler
66742      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66743      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66744      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66745
66746  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66747      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66748            ${icecc_create_env_log_build} 2>&1 )
66749  if test "$?" != "0"; then
66750    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66751$as_echo "$as_me: icecc-create-env output:" >&6;}
66752    cat \
66753            ${icecc_create_env_log_build}
66754    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66755  fi
66756
66757      elif test "x${BUILD_CC##*/}" = "xclang"; then
66758
66759  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66760      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66761  if test "$?" != "0"; then
66762    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66763$as_echo "$as_me: icecc-create-env output:" >&6;}
66764    cat ${icecc_create_env_log_build}
66765    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66766  fi
66767
66768      else
66769        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66770      fi
66771      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66772      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66773      if test ! -f ${ICECC_ENV_BUNDLE}; then
66774        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66775      fi
66776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66777$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66779$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66780      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66781          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66782    else
66783      BUILD_ICECC="${ICECC}"
66784    fi
66785
66786
66787  fi
66788
66789
66790# Can the C/C++ compiler use precompiled headers?
66791
66792
66793  ###############################################################################
66794  #
66795  # Can the C/C++ compiler use precompiled headers?
66796  #
66797  # Check whether --enable-precompiled-headers was given.
66798if test "${enable_precompiled_headers+set}" = set; then :
66799  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66800else
66801  ENABLE_PRECOMPH=yes
66802fi
66803
66804
66805  USE_PRECOMPILED_HEADER=true
66806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66807$as_echo_n "checking If precompiled header is enabled... " >&6; }
66808  if test "x$ENABLE_PRECOMPH" = xno; then
66809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66810$as_echo "no, forced" >&6; }
66811    USE_PRECOMPILED_HEADER=false
66812  elif test "x$ICECC" != "x"; then
66813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66814$as_echo "no, does not work effectively with icecc" >&6; }
66815    USE_PRECOMPILED_HEADER=false
66816  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66818$as_echo "no, does not work with Solaris Studio" >&6; }
66819    USE_PRECOMPILED_HEADER=false
66820  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66822$as_echo "no, does not work with xlc" >&6; }
66823    USE_PRECOMPILED_HEADER=false
66824  else
66825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66826$as_echo "yes" >&6; }
66827  fi
66828
66829  if test "x$ENABLE_PRECOMPH" = xyes; then
66830    # Check that the compiler actually supports precomp headers.
66831    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66833$as_echo_n "checking that precompiled headers work... " >&6; }
66834      echo "int alfa();" > conftest.h
66835      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66836      if test ! -f conftest.hpp.gch; then
66837        USE_PRECOMPILED_HEADER=false
66838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66839$as_echo "no" >&6; }
66840      else
66841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66842$as_echo "yes" >&6; }
66843      fi
66844      $RM conftest.h conftest.hpp.gch
66845    fi
66846  fi
66847
66848
66849
66850
66851# Setup use of ccache, if available
66852
66853  # Check whether --enable-ccache was given.
66854if test "${enable_ccache+set}" = set; then :
66855  enableval=$enable_ccache;
66856fi
66857
66858
66859  CCACHE_STATUS=
66860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66861$as_echo_n "checking is ccache enabled... " >&6; }
66862  if test "x$enable_ccache" = xyes; then
66863    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66865$as_echo "yes" >&6; }
66866      OLD_PATH="$PATH"
66867      if test "x$TOOLCHAIN_PATH" != x; then
66868        PATH=$TOOLCHAIN_PATH:$PATH
66869      fi
66870
66871
66872
66873  # Publish this variable in the help.
66874
66875
66876  if [ -z "${CCACHE+x}" ]; then
66877    # The variable is not set by user, try to locate tool using the code snippet
66878    for ac_prog in ccache
66879do
66880  # Extract the first word of "$ac_prog", so it can be a program name with args.
66881set dummy $ac_prog; ac_word=$2
66882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66883$as_echo_n "checking for $ac_word... " >&6; }
66884if ${ac_cv_path_CCACHE+:} false; then :
66885  $as_echo_n "(cached) " >&6
66886else
66887  case $CCACHE in
66888  [\\/]* | ?:[\\/]*)
66889  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66890  ;;
66891  *)
66892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66893for as_dir in $PATH
66894do
66895  IFS=$as_save_IFS
66896  test -z "$as_dir" && as_dir=.
66897    for ac_exec_ext in '' $ac_executable_extensions; do
66898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66899    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66901    break 2
66902  fi
66903done
66904  done
66905IFS=$as_save_IFS
66906
66907  ;;
66908esac
66909fi
66910CCACHE=$ac_cv_path_CCACHE
66911if test -n "$CCACHE"; then
66912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66913$as_echo "$CCACHE" >&6; }
66914else
66915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66916$as_echo "no" >&6; }
66917fi
66918
66919
66920  test -n "$CCACHE" && break
66921done
66922
66923  else
66924    # The variable is set, but is it from the command line or the environment?
66925
66926    # Try to remove the string !CCACHE! from our list.
66927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66929      # If it failed, the variable was not from the command line. Ignore it,
66930      # but warn the user (except for BASH, which is always set by the calling BASH).
66931      if test "xCCACHE" != xBASH; then
66932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66933$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66934      fi
66935      # Try to locate tool using the code snippet
66936      for ac_prog in ccache
66937do
66938  # Extract the first word of "$ac_prog", so it can be a program name with args.
66939set dummy $ac_prog; ac_word=$2
66940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66941$as_echo_n "checking for $ac_word... " >&6; }
66942if ${ac_cv_path_CCACHE+:} false; then :
66943  $as_echo_n "(cached) " >&6
66944else
66945  case $CCACHE in
66946  [\\/]* | ?:[\\/]*)
66947  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66948  ;;
66949  *)
66950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66951for as_dir in $PATH
66952do
66953  IFS=$as_save_IFS
66954  test -z "$as_dir" && as_dir=.
66955    for ac_exec_ext in '' $ac_executable_extensions; do
66956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66957    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66959    break 2
66960  fi
66961done
66962  done
66963IFS=$as_save_IFS
66964
66965  ;;
66966esac
66967fi
66968CCACHE=$ac_cv_path_CCACHE
66969if test -n "$CCACHE"; then
66970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66971$as_echo "$CCACHE" >&6; }
66972else
66973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66974$as_echo "no" >&6; }
66975fi
66976
66977
66978  test -n "$CCACHE" && break
66979done
66980
66981    else
66982      # If it succeeded, then it was overridden by the user. We will use it
66983      # for the tool.
66984
66985      # First remove it from the list of overridden variables, so we can test
66986      # for unknown variables in the end.
66987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66988
66989      # Check if we try to supply an empty value
66990      if test "x$CCACHE" = x; then
66991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66992$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66994$as_echo_n "checking for CCACHE... " >&6; }
66995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66996$as_echo "disabled" >&6; }
66997      else
66998        # Check if the provided tool contains a complete path.
66999        tool_specified="$CCACHE"
67000        tool_basename="${tool_specified##*/}"
67001        if test "x$tool_basename" = "x$tool_specified"; then
67002          # A command without a complete path is provided, search $PATH.
67003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67004$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67005          # Extract the first word of "$tool_basename", so it can be a program name with args.
67006set dummy $tool_basename; ac_word=$2
67007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67008$as_echo_n "checking for $ac_word... " >&6; }
67009if ${ac_cv_path_CCACHE+:} false; then :
67010  $as_echo_n "(cached) " >&6
67011else
67012  case $CCACHE in
67013  [\\/]* | ?:[\\/]*)
67014  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67015  ;;
67016  *)
67017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67018for as_dir in $PATH
67019do
67020  IFS=$as_save_IFS
67021  test -z "$as_dir" && as_dir=.
67022    for ac_exec_ext in '' $ac_executable_extensions; do
67023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67024    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67026    break 2
67027  fi
67028done
67029  done
67030IFS=$as_save_IFS
67031
67032  ;;
67033esac
67034fi
67035CCACHE=$ac_cv_path_CCACHE
67036if test -n "$CCACHE"; then
67037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67038$as_echo "$CCACHE" >&6; }
67039else
67040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67041$as_echo "no" >&6; }
67042fi
67043
67044
67045          if test "x$CCACHE" = x; then
67046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67047          fi
67048        else
67049          # Otherwise we believe it is a complete path. Use it as it is.
67050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67051$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67053$as_echo_n "checking for CCACHE... " >&6; }
67054          if test ! -x "$tool_specified"; then
67055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67056$as_echo "not found" >&6; }
67057            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67058          fi
67059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67060$as_echo "$tool_specified" >&6; }
67061        fi
67062      fi
67063    fi
67064
67065  fi
67066
67067
67068
67069  if test "x$CCACHE" = x; then
67070    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67071  fi
67072
67073
67074      PATH="$OLD_PATH"
67075      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67076      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67077    else
67078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67079$as_echo "no" >&6; }
67080      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67081$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67082    fi
67083  elif test "x$enable_ccache" = xno; then
67084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67085$as_echo "no, explicitly disabled" >&6; }
67086    CCACHE_STATUS="Disabled"
67087  elif test "x$enable_ccache" = x; then
67088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67089$as_echo "no" >&6; }
67090  else
67091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67092$as_echo "unknown" >&6; }
67093    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67094  fi
67095
67096
67097
67098# Check whether --with-ccache-dir was given.
67099if test "${with_ccache_dir+set}" = set; then :
67100  withval=$with_ccache_dir;
67101fi
67102
67103
67104  if test "x$with_ccache_dir" != x; then
67105    # When using a non home ccache directory, assume the use is to share ccache files
67106    # with other users. Thus change the umask.
67107    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67108    if test "x$CCACHE" = x; then
67109      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67110$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67111    fi
67112  fi
67113
67114  if test "x$CCACHE" != x; then
67115
67116  if test "x$CCACHE" != x; then
67117    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67118      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67119          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67120      if test "x$HAS_BAD_CCACHE" != "x"; then
67121        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67122      fi
67123    fi
67124    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67125      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67126          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67127      if test "x$HAS_BAD_CCACHE" != "x"; then
67128        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67129      fi
67130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67131$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67132      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67133      PUSHED_FLAGS="$CXXFLAGS"
67134      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67135      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67136/* end confdefs.h.  */
67137
67138int
67139main ()
67140{
67141
67142  ;
67143  return 0;
67144}
67145_ACEOF
67146if ac_fn_cxx_try_compile "$LINENO"; then :
67147  CC_KNOWS_CCACHE_TRICK=yes
67148else
67149  CC_KNOWS_CCACHE_TRICK=no
67150fi
67151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67152      CXXFLAGS="$PUSHED_FLAGS"
67153      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67155$as_echo "yes" >&6; }
67156        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67157
67158        CCACHE_SLOPPINESS=pch_defines,time_macros
67159      else
67160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67161$as_echo "no" >&6; }
67162        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67163      fi
67164    fi
67165
67166    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67167        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67168
67169    if test "x$SET_CCACHE_DIR" != x; then
67170      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67171      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67172    fi
67173  fi
67174
67175  fi
67176
67177
67178###############################################################################
67179#
67180# And now the finish...
67181#
67182###############################################################################
67183
67184# Check for some common pitfalls
67185
67186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67187    file_to_test="$SRC_ROOT/LICENSE"
67188    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67189      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
67190    fi
67191  fi
67192
67193
67194  # Did user specify any unknown variables?
67195
67196  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67197    # Replace the separating ! with spaces before presenting for end user.
67198    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67200$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67201  fi
67202
67203
67204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67205$as_echo_n "checking if build directory is on local disk... " >&6; }
67206
67207  # df -l lists only local disks; if the given directory is not found then
67208  # a non-zero exit code is given
67209  if test "x$DF" = x; then
67210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67211      # msys does not have df; use Windows "net use" instead.
67212      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67213      if test "x$IS_NETWORK_DISK" = x; then
67214        OUTPUT_DIR_IS_LOCAL="yes"
67215      else
67216        OUTPUT_DIR_IS_LOCAL="no"
67217      fi
67218    else
67219      # No df here, say it's local
67220      OUTPUT_DIR_IS_LOCAL="yes"
67221    fi
67222  else
67223    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67224      OUTPUT_DIR_IS_LOCAL="yes"
67225    else
67226      OUTPUT_DIR_IS_LOCAL="no"
67227    fi
67228  fi
67229
67230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67231$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67232
67233
67234
67235  # Check if the user has any old-style ALT_ variables set.
67236  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67237
67238  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67239  # Since we can't properly handle the dependencies for this, warn the user about the situation
67240  if test -e $OUTPUT_ROOT/spec.gmk; then
67241    IS_RECONFIGURE=yes
67242  else
67243    IS_RECONFIGURE=no
67244  fi
67245
67246
67247# At the end, call the custom hook. (Dummy macro if no custom sources available)
67248
67249
67250# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67251
67252  # Keep feature lists sorted and free of duplicates
67253  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67254  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67255  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67256  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67257  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67258  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67259  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67260
67261  # Validate features
67262  for variant in $JVM_VARIANTS; do
67263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67264$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67265    features_var_name=JVM_FEATURES_$variant
67266    JVM_FEATURES_TO_TEST=${!features_var_name}
67267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67268$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67269    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67270    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67271    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67272    if test "x$INVALID_FEATURES" != x; then
67273      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67274    fi
67275  done
67276
67277
67278# We're messing a bit with internal autoconf variables to put the config.status
67279# in the output directory instead of the current directory.
67280CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67281
67282# Create the actual output files. Now the main work of configure is done.
67283cat >confcache <<\_ACEOF
67284# This file is a shell script that caches the results of configure
67285# tests run on this system so they can be shared between configure
67286# scripts and configure runs, see configure's option --config-cache.
67287# It is not useful on other systems.  If it contains results you don't
67288# want to keep, you may remove or edit it.
67289#
67290# config.status only pays attention to the cache file if you give it
67291# the --recheck option to rerun configure.
67292#
67293# `ac_cv_env_foo' variables (set or unset) will be overridden when
67294# loading this file, other *unset* `ac_cv_foo' will be assigned the
67295# following values.
67296
67297_ACEOF
67298
67299# The following way of writing the cache mishandles newlines in values,
67300# but we know of no workaround that is simple, portable, and efficient.
67301# So, we kill variables containing newlines.
67302# Ultrix sh set writes to stderr and can't be redirected directly,
67303# and sets the high bit in the cache file unless we assign to the vars.
67304(
67305  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67306    eval ac_val=\$$ac_var
67307    case $ac_val in #(
67308    *${as_nl}*)
67309      case $ac_var in #(
67310      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67311$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67312      esac
67313      case $ac_var in #(
67314      _ | IFS | as_nl) ;; #(
67315      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67316      *) { eval $ac_var=; unset $ac_var;} ;;
67317      esac ;;
67318    esac
67319  done
67320
67321  (set) 2>&1 |
67322    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67323    *${as_nl}ac_space=\ *)
67324      # `set' does not quote correctly, so add quotes: double-quote
67325      # substitution turns \\\\ into \\, and sed turns \\ into \.
67326      sed -n \
67327	"s/'/'\\\\''/g;
67328	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67329      ;; #(
67330    *)
67331      # `set' quotes correctly as required by POSIX, so do not add quotes.
67332      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67333      ;;
67334    esac |
67335    sort
67336) |
67337  sed '
67338     /^ac_cv_env_/b end
67339     t clear
67340     :clear
67341     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67342     t end
67343     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67344     :end' >>confcache
67345if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67346  if test -w "$cache_file"; then
67347    if test "x$cache_file" != "x/dev/null"; then
67348      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67349$as_echo "$as_me: updating cache $cache_file" >&6;}
67350      if test ! -f "$cache_file" || test -h "$cache_file"; then
67351	cat confcache >"$cache_file"
67352      else
67353        case $cache_file in #(
67354        */* | ?:*)
67355	  mv -f confcache "$cache_file"$$ &&
67356	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67357        *)
67358	  mv -f confcache "$cache_file" ;;
67359	esac
67360      fi
67361    fi
67362  else
67363    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67364$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67365  fi
67366fi
67367rm -f confcache
67368
67369test "x$prefix" = xNONE && prefix=$ac_default_prefix
67370# Let make expand exec_prefix.
67371test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67372
67373# Transform confdefs.h into DEFS.
67374# Protect against shell expansion while executing Makefile rules.
67375# Protect against Makefile macro expansion.
67376#
67377# If the first sed substitution is executed (which looks for macros that
67378# take arguments), then branch to the quote section.  Otherwise,
67379# look for a macro that doesn't take arguments.
67380ac_script='
67381:mline
67382/\\$/{
67383 N
67384 s,\\\n,,
67385 b mline
67386}
67387t clear
67388:clear
67389s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67390t quote
67391s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67392t quote
67393b any
67394:quote
67395s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67396s/\[/\\&/g
67397s/\]/\\&/g
67398s/\$/$$/g
67399H
67400:any
67401${
67402	g
67403	s/^\n//
67404	s/\n/ /g
67405	p
67406}
67407'
67408DEFS=`sed -n "$ac_script" confdefs.h`
67409
67410
67411ac_libobjs=
67412ac_ltlibobjs=
67413U=
67414for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67415  # 1. Remove the extension, and $U if already installed.
67416  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67417  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67418  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67419  #    will be set to the directory where LIBOBJS objects are built.
67420  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67421  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67422done
67423LIBOBJS=$ac_libobjs
67424
67425LTLIBOBJS=$ac_ltlibobjs
67426
67427
67428
67429: "${CONFIG_STATUS=./config.status}"
67430ac_write_fail=0
67431ac_clean_files_save=$ac_clean_files
67432ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67433{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67434$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67435as_write_fail=0
67436cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67437#! $SHELL
67438# Generated by $as_me.
67439# Run this file to recreate the current configuration.
67440# Compiler output produced by configure, useful for debugging
67441# configure, is in config.log if it exists.
67442
67443debug=false
67444ac_cs_recheck=false
67445ac_cs_silent=false
67446
67447SHELL=\${CONFIG_SHELL-$SHELL}
67448export SHELL
67449_ASEOF
67450cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67451## -------------------- ##
67452## M4sh Initialization. ##
67453## -------------------- ##
67454
67455# Be more Bourne compatible
67456DUALCASE=1; export DUALCASE # for MKS sh
67457if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67458  emulate sh
67459  NULLCMD=:
67460  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67461  # is contrary to our usage.  Disable this feature.
67462  alias -g '${1+"$@"}'='"$@"'
67463  setopt NO_GLOB_SUBST
67464else
67465  case `(set -o) 2>/dev/null` in #(
67466  *posix*) :
67467    set -o posix ;; #(
67468  *) :
67469     ;;
67470esac
67471fi
67472
67473
67474as_nl='
67475'
67476export as_nl
67477# Printing a long string crashes Solaris 7 /usr/bin/printf.
67478as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67479as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67480as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67481# Prefer a ksh shell builtin over an external printf program on Solaris,
67482# but without wasting forks for bash or zsh.
67483if test -z "$BASH_VERSION$ZSH_VERSION" \
67484    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67485  as_echo='print -r --'
67486  as_echo_n='print -rn --'
67487elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67488  as_echo='printf %s\n'
67489  as_echo_n='printf %s'
67490else
67491  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67492    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67493    as_echo_n='/usr/ucb/echo -n'
67494  else
67495    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67496    as_echo_n_body='eval
67497      arg=$1;
67498      case $arg in #(
67499      *"$as_nl"*)
67500	expr "X$arg" : "X\\(.*\\)$as_nl";
67501	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67502      esac;
67503      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67504    '
67505    export as_echo_n_body
67506    as_echo_n='sh -c $as_echo_n_body as_echo'
67507  fi
67508  export as_echo_body
67509  as_echo='sh -c $as_echo_body as_echo'
67510fi
67511
67512# The user is always right.
67513if test "${PATH_SEPARATOR+set}" != set; then
67514  PATH_SEPARATOR=:
67515  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67516    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67517      PATH_SEPARATOR=';'
67518  }
67519fi
67520
67521
67522# IFS
67523# We need space, tab and new line, in precisely that order.  Quoting is
67524# there to prevent editors from complaining about space-tab.
67525# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67526# splitting by setting IFS to empty value.)
67527IFS=" ""	$as_nl"
67528
67529# Find who we are.  Look in the path if we contain no directory separator.
67530as_myself=
67531case $0 in #((
67532  *[\\/]* ) as_myself=$0 ;;
67533  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67534for as_dir in $PATH
67535do
67536  IFS=$as_save_IFS
67537  test -z "$as_dir" && as_dir=.
67538    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67539  done
67540IFS=$as_save_IFS
67541
67542     ;;
67543esac
67544# We did not find ourselves, most probably we were run as `sh COMMAND'
67545# in which case we are not to be found in the path.
67546if test "x$as_myself" = x; then
67547  as_myself=$0
67548fi
67549if test ! -f "$as_myself"; then
67550  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67551  exit 1
67552fi
67553
67554# Unset variables that we do not need and which cause bugs (e.g. in
67555# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67556# suppresses any "Segmentation fault" message there.  '((' could
67557# trigger a bug in pdksh 5.2.14.
67558for as_var in BASH_ENV ENV MAIL MAILPATH
67559do eval test x\${$as_var+set} = xset \
67560  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67561done
67562PS1='$ '
67563PS2='> '
67564PS4='+ '
67565
67566# NLS nuisances.
67567LC_ALL=C
67568export LC_ALL
67569LANGUAGE=C
67570export LANGUAGE
67571
67572# CDPATH.
67573(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67574
67575
67576# as_fn_error STATUS ERROR [LINENO LOG_FD]
67577# ----------------------------------------
67578# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67579# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67580# script with STATUS, using 1 if that was 0.
67581as_fn_error ()
67582{
67583  as_status=$1; test $as_status -eq 0 && as_status=1
67584  if test "$4"; then
67585    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67586    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67587  fi
67588  $as_echo "$as_me: error: $2" >&2
67589  as_fn_exit $as_status
67590} # as_fn_error
67591
67592
67593# as_fn_set_status STATUS
67594# -----------------------
67595# Set $? to STATUS, without forking.
67596as_fn_set_status ()
67597{
67598  return $1
67599} # as_fn_set_status
67600
67601# as_fn_exit STATUS
67602# -----------------
67603# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67604as_fn_exit ()
67605{
67606  set +e
67607  as_fn_set_status $1
67608  exit $1
67609} # as_fn_exit
67610
67611# as_fn_unset VAR
67612# ---------------
67613# Portably unset VAR.
67614as_fn_unset ()
67615{
67616  { eval $1=; unset $1;}
67617}
67618as_unset=as_fn_unset
67619# as_fn_append VAR VALUE
67620# ----------------------
67621# Append the text in VALUE to the end of the definition contained in VAR. Take
67622# advantage of any shell optimizations that allow amortized linear growth over
67623# repeated appends, instead of the typical quadratic growth present in naive
67624# implementations.
67625if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67626  eval 'as_fn_append ()
67627  {
67628    eval $1+=\$2
67629  }'
67630else
67631  as_fn_append ()
67632  {
67633    eval $1=\$$1\$2
67634  }
67635fi # as_fn_append
67636
67637# as_fn_arith ARG...
67638# ------------------
67639# Perform arithmetic evaluation on the ARGs, and store the result in the
67640# global $as_val. Take advantage of shells that can avoid forks. The arguments
67641# must be portable across $(()) and expr.
67642if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67643  eval 'as_fn_arith ()
67644  {
67645    as_val=$(( $* ))
67646  }'
67647else
67648  as_fn_arith ()
67649  {
67650    as_val=`expr "$@" || test $? -eq 1`
67651  }
67652fi # as_fn_arith
67653
67654
67655if expr a : '\(a\)' >/dev/null 2>&1 &&
67656   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67657  as_expr=expr
67658else
67659  as_expr=false
67660fi
67661
67662if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67663  as_basename=basename
67664else
67665  as_basename=false
67666fi
67667
67668if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67669  as_dirname=dirname
67670else
67671  as_dirname=false
67672fi
67673
67674as_me=`$as_basename -- "$0" ||
67675$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67676	 X"$0" : 'X\(//\)$' \| \
67677	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67678$as_echo X/"$0" |
67679    sed '/^.*\/\([^/][^/]*\)\/*$/{
67680	    s//\1/
67681	    q
67682	  }
67683	  /^X\/\(\/\/\)$/{
67684	    s//\1/
67685	    q
67686	  }
67687	  /^X\/\(\/\).*/{
67688	    s//\1/
67689	    q
67690	  }
67691	  s/.*/./; q'`
67692
67693# Avoid depending upon Character Ranges.
67694as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67695as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67696as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67697as_cr_digits='0123456789'
67698as_cr_alnum=$as_cr_Letters$as_cr_digits
67699
67700ECHO_C= ECHO_N= ECHO_T=
67701case `echo -n x` in #(((((
67702-n*)
67703  case `echo 'xy\c'` in
67704  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67705  xy)  ECHO_C='\c';;
67706  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67707       ECHO_T='	';;
67708  esac;;
67709*)
67710  ECHO_N='-n';;
67711esac
67712
67713rm -f conf$$ conf$$.exe conf$$.file
67714if test -d conf$$.dir; then
67715  rm -f conf$$.dir/conf$$.file
67716else
67717  rm -f conf$$.dir
67718  mkdir conf$$.dir 2>/dev/null
67719fi
67720if (echo >conf$$.file) 2>/dev/null; then
67721  if ln -s conf$$.file conf$$ 2>/dev/null; then
67722    as_ln_s='ln -s'
67723    # ... but there are two gotchas:
67724    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67725    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67726    # In both cases, we have to default to `cp -pR'.
67727    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67728      as_ln_s='cp -pR'
67729  elif ln conf$$.file conf$$ 2>/dev/null; then
67730    as_ln_s=ln
67731  else
67732    as_ln_s='cp -pR'
67733  fi
67734else
67735  as_ln_s='cp -pR'
67736fi
67737rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67738rmdir conf$$.dir 2>/dev/null
67739
67740
67741# as_fn_mkdir_p
67742# -------------
67743# Create "$as_dir" as a directory, including parents if necessary.
67744as_fn_mkdir_p ()
67745{
67746
67747  case $as_dir in #(
67748  -*) as_dir=./$as_dir;;
67749  esac
67750  test -d "$as_dir" || eval $as_mkdir_p || {
67751    as_dirs=
67752    while :; do
67753      case $as_dir in #(
67754      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67755      *) as_qdir=$as_dir;;
67756      esac
67757      as_dirs="'$as_qdir' $as_dirs"
67758      as_dir=`$as_dirname -- "$as_dir" ||
67759$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67760	 X"$as_dir" : 'X\(//\)[^/]' \| \
67761	 X"$as_dir" : 'X\(//\)$' \| \
67762	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67763$as_echo X"$as_dir" |
67764    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67765	    s//\1/
67766	    q
67767	  }
67768	  /^X\(\/\/\)[^/].*/{
67769	    s//\1/
67770	    q
67771	  }
67772	  /^X\(\/\/\)$/{
67773	    s//\1/
67774	    q
67775	  }
67776	  /^X\(\/\).*/{
67777	    s//\1/
67778	    q
67779	  }
67780	  s/.*/./; q'`
67781      test -d "$as_dir" && break
67782    done
67783    test -z "$as_dirs" || eval "mkdir $as_dirs"
67784  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67785
67786
67787} # as_fn_mkdir_p
67788if mkdir -p . 2>/dev/null; then
67789  as_mkdir_p='mkdir -p "$as_dir"'
67790else
67791  test -d ./-p && rmdir ./-p
67792  as_mkdir_p=false
67793fi
67794
67795
67796# as_fn_executable_p FILE
67797# -----------------------
67798# Test if FILE is an executable regular file.
67799as_fn_executable_p ()
67800{
67801  test -f "$1" && test -x "$1"
67802} # as_fn_executable_p
67803as_test_x='test -x'
67804as_executable_p=as_fn_executable_p
67805
67806# Sed expression to map a string onto a valid CPP name.
67807as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67808
67809# Sed expression to map a string onto a valid variable name.
67810as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67811
67812
67813exec 6>&1
67814## ----------------------------------- ##
67815## Main body of $CONFIG_STATUS script. ##
67816## ----------------------------------- ##
67817_ASEOF
67818test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67819
67820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67821# Save the log message, to keep $0 and so on meaningful, and to
67822# report actual input values of CONFIG_FILES etc. instead of their
67823# values after options handling.
67824ac_log="
67825This file was extended by OpenJDK $as_me jdk9, which was
67826generated by GNU Autoconf 2.69.  Invocation command line was
67827
67828  CONFIG_FILES    = $CONFIG_FILES
67829  CONFIG_HEADERS  = $CONFIG_HEADERS
67830  CONFIG_LINKS    = $CONFIG_LINKS
67831  CONFIG_COMMANDS = $CONFIG_COMMANDS
67832  $ $0 $@
67833
67834on `(hostname || uname -n) 2>/dev/null | sed 1q`
67835"
67836
67837_ACEOF
67838
67839case $ac_config_files in *"
67840"*) set x $ac_config_files; shift; ac_config_files=$*;;
67841esac
67842
67843
67844
67845cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67846# Files that config.status was made for.
67847config_files="$ac_config_files"
67848
67849_ACEOF
67850
67851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67852ac_cs_usage="\
67853\`$as_me' instantiates files and other configuration actions
67854from templates according to the current configuration.  Unless the files
67855and actions are specified as TAGs, all are instantiated by default.
67856
67857Usage: $0 [OPTION]... [TAG]...
67858
67859  -h, --help       print this help, then exit
67860  -V, --version    print version number and configuration settings, then exit
67861      --config     print configuration, then exit
67862  -q, --quiet, --silent
67863                   do not print progress messages
67864  -d, --debug      don't remove temporary files
67865      --recheck    update $as_me by reconfiguring in the same conditions
67866      --file=FILE[:TEMPLATE]
67867                   instantiate the configuration file FILE
67868
67869Configuration files:
67870$config_files
67871
67872Report bugs to <build-dev@openjdk.java.net>.
67873OpenJDK home page: <http://openjdk.java.net>."
67874
67875_ACEOF
67876cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67877ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67878ac_cs_version="\\
67879OpenJDK config.status jdk9
67880configured by $0, generated by GNU Autoconf 2.69,
67881  with options \\"\$ac_cs_config\\"
67882
67883Copyright (C) 2012 Free Software Foundation, Inc.
67884This config.status script is free software; the Free Software Foundation
67885gives unlimited permission to copy, distribute and modify it."
67886
67887ac_pwd='$ac_pwd'
67888srcdir='$srcdir'
67889AWK='$AWK'
67890test -n "\$AWK" || AWK=awk
67891_ACEOF
67892
67893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67894# The default lists apply if the user does not specify any file.
67895ac_need_defaults=:
67896while test $# != 0
67897do
67898  case $1 in
67899  --*=?*)
67900    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67901    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67902    ac_shift=:
67903    ;;
67904  --*=)
67905    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67906    ac_optarg=
67907    ac_shift=:
67908    ;;
67909  *)
67910    ac_option=$1
67911    ac_optarg=$2
67912    ac_shift=shift
67913    ;;
67914  esac
67915
67916  case $ac_option in
67917  # Handling of the options.
67918  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67919    ac_cs_recheck=: ;;
67920  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67921    $as_echo "$ac_cs_version"; exit ;;
67922  --config | --confi | --conf | --con | --co | --c )
67923    $as_echo "$ac_cs_config"; exit ;;
67924  --debug | --debu | --deb | --de | --d | -d )
67925    debug=: ;;
67926  --file | --fil | --fi | --f )
67927    $ac_shift
67928    case $ac_optarg in
67929    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67930    '') as_fn_error $? "missing file argument" ;;
67931    esac
67932    as_fn_append CONFIG_FILES " '$ac_optarg'"
67933    ac_need_defaults=false;;
67934  --he | --h |  --help | --hel | -h )
67935    $as_echo "$ac_cs_usage"; exit ;;
67936  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67937  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67938    ac_cs_silent=: ;;
67939
67940  # This is an error.
67941  -*) as_fn_error $? "unrecognized option: \`$1'
67942Try \`$0 --help' for more information." ;;
67943
67944  *) as_fn_append ac_config_targets " $1"
67945     ac_need_defaults=false ;;
67946
67947  esac
67948  shift
67949done
67950
67951ac_configure_extra_args=
67952
67953if $ac_cs_silent; then
67954  exec 6>/dev/null
67955  ac_configure_extra_args="$ac_configure_extra_args --silent"
67956fi
67957
67958_ACEOF
67959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67960if \$ac_cs_recheck; then
67961  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67962  shift
67963  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67964  CONFIG_SHELL='$SHELL'
67965  export CONFIG_SHELL
67966  exec "\$@"
67967fi
67968
67969_ACEOF
67970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67971exec 5>>config.log
67972{
67973  echo
67974  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67975## Running $as_me. ##
67976_ASBOX
67977  $as_echo "$ac_log"
67978} >&5
67979
67980_ACEOF
67981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67982_ACEOF
67983
67984cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67985
67986# Handling of arguments.
67987for ac_config_target in $ac_config_targets
67988do
67989  case $ac_config_target in
67990    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67991    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67992    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67993    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67994    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67995
67996  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67997  esac
67998done
67999
68000
68001# If the user did not use the arguments to specify the items to instantiate,
68002# then the envvar interface is used.  Set only those that are not.
68003# We use the long form for the default assignment because of an extremely
68004# bizarre bug on SunOS 4.1.3.
68005if $ac_need_defaults; then
68006  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68007fi
68008
68009# Have a temporary directory for convenience.  Make it in the build tree
68010# simply because there is no reason against having it here, and in addition,
68011# creating and moving files from /tmp can sometimes cause problems.
68012# Hook for its removal unless debugging.
68013# Note that there is a small window in which the directory will not be cleaned:
68014# after its creation but before its name has been assigned to `$tmp'.
68015$debug ||
68016{
68017  tmp= ac_tmp=
68018  trap 'exit_status=$?
68019  : "${ac_tmp:=$tmp}"
68020  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68021' 0
68022  trap 'as_fn_exit 1' 1 2 13 15
68023}
68024# Create a (secure) tmp directory for tmp files.
68025
68026{
68027  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68028  test -d "$tmp"
68029}  ||
68030{
68031  tmp=./conf$$-$RANDOM
68032  (umask 077 && mkdir "$tmp")
68033} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68034ac_tmp=$tmp
68035
68036# Set up the scripts for CONFIG_FILES section.
68037# No need to generate them if there are no CONFIG_FILES.
68038# This happens for instance with `./config.status config.h'.
68039if test -n "$CONFIG_FILES"; then
68040
68041
68042ac_cr=`echo X | tr X '\015'`
68043# On cygwin, bash can eat \r inside `` if the user requested igncr.
68044# But we know of no other shell where ac_cr would be empty at this
68045# point, so we can use a bashism as a fallback.
68046if test "x$ac_cr" = x; then
68047  eval ac_cr=\$\'\\r\'
68048fi
68049ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68050if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68051  ac_cs_awk_cr='\\r'
68052else
68053  ac_cs_awk_cr=$ac_cr
68054fi
68055
68056echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68057_ACEOF
68058
68059
68060{
68061  echo "cat >conf$$subs.awk <<_ACEOF" &&
68062  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68063  echo "_ACEOF"
68064} >conf$$subs.sh ||
68065  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68066ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68067ac_delim='%!_!# '
68068for ac_last_try in false false false false false :; do
68069  . ./conf$$subs.sh ||
68070    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68071
68072  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68073  if test $ac_delim_n = $ac_delim_num; then
68074    break
68075  elif $ac_last_try; then
68076    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68077  else
68078    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68079  fi
68080done
68081rm -f conf$$subs.sh
68082
68083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68084cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68085_ACEOF
68086sed -n '
68087h
68088s/^/S["/; s/!.*/"]=/
68089p
68090g
68091s/^[^!]*!//
68092:repl
68093t repl
68094s/'"$ac_delim"'$//
68095t delim
68096:nl
68097h
68098s/\(.\{148\}\)..*/\1/
68099t more1
68100s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68101p
68102n
68103b repl
68104:more1
68105s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68106p
68107g
68108s/.\{148\}//
68109t nl
68110:delim
68111h
68112s/\(.\{148\}\)..*/\1/
68113t more2
68114s/["\\]/\\&/g; s/^/"/; s/$/"/
68115p
68116b
68117:more2
68118s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68119p
68120g
68121s/.\{148\}//
68122t delim
68123' <conf$$subs.awk | sed '
68124/^[^""]/{
68125  N
68126  s/\n//
68127}
68128' >>$CONFIG_STATUS || ac_write_fail=1
68129rm -f conf$$subs.awk
68130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68131_ACAWK
68132cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68133  for (key in S) S_is_set[key] = 1
68134  FS = ""
68135
68136}
68137{
68138  line = $ 0
68139  nfields = split(line, field, "@")
68140  substed = 0
68141  len = length(field[1])
68142  for (i = 2; i < nfields; i++) {
68143    key = field[i]
68144    keylen = length(key)
68145    if (S_is_set[key]) {
68146      value = S[key]
68147      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68148      len += length(value) + length(field[++i])
68149      substed = 1
68150    } else
68151      len += 1 + keylen
68152  }
68153
68154  print line
68155}
68156
68157_ACAWK
68158_ACEOF
68159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68160if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68161  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68162else
68163  cat
68164fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68165  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68166_ACEOF
68167
68168# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68169# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68170# trailing colons and then remove the whole line if VPATH becomes empty
68171# (actually we leave an empty line to preserve line numbers).
68172if test "x$srcdir" = x.; then
68173  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68174h
68175s///
68176s/^/:/
68177s/[	 ]*$/:/
68178s/:\$(srcdir):/:/g
68179s/:\${srcdir}:/:/g
68180s/:@srcdir@:/:/g
68181s/^:*//
68182s/:*$//
68183x
68184s/\(=[	 ]*\).*/\1/
68185G
68186s/\n//
68187s/^[^=]*=[	 ]*$//
68188}'
68189fi
68190
68191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68192fi # test -n "$CONFIG_FILES"
68193
68194
68195eval set X "  :F $CONFIG_FILES      "
68196shift
68197for ac_tag
68198do
68199  case $ac_tag in
68200  :[FHLC]) ac_mode=$ac_tag; continue;;
68201  esac
68202  case $ac_mode$ac_tag in
68203  :[FHL]*:*);;
68204  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68205  :[FH]-) ac_tag=-:-;;
68206  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68207  esac
68208  ac_save_IFS=$IFS
68209  IFS=:
68210  set x $ac_tag
68211  IFS=$ac_save_IFS
68212  shift
68213  ac_file=$1
68214  shift
68215
68216  case $ac_mode in
68217  :L) ac_source=$1;;
68218  :[FH])
68219    ac_file_inputs=
68220    for ac_f
68221    do
68222      case $ac_f in
68223      -) ac_f="$ac_tmp/stdin";;
68224      *) # Look for the file first in the build tree, then in the source tree
68225	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68226	 # because $ac_f cannot contain `:'.
68227	 test -f "$ac_f" ||
68228	   case $ac_f in
68229	   [\\/$]*) false;;
68230	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68231	   esac ||
68232	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68233      esac
68234      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68235      as_fn_append ac_file_inputs " '$ac_f'"
68236    done
68237
68238    # Let's still pretend it is `configure' which instantiates (i.e., don't
68239    # use $as_me), people would be surprised to read:
68240    #    /* config.h.  Generated by config.status.  */
68241    configure_input='Generated from '`
68242	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68243	`' by configure.'
68244    if test x"$ac_file" != x-; then
68245      configure_input="$ac_file.  $configure_input"
68246      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68247$as_echo "$as_me: creating $ac_file" >&6;}
68248    fi
68249    # Neutralize special characters interpreted by sed in replacement strings.
68250    case $configure_input in #(
68251    *\&* | *\|* | *\\* )
68252       ac_sed_conf_input=`$as_echo "$configure_input" |
68253       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68254    *) ac_sed_conf_input=$configure_input;;
68255    esac
68256
68257    case $ac_tag in
68258    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68259      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68260    esac
68261    ;;
68262  esac
68263
68264  ac_dir=`$as_dirname -- "$ac_file" ||
68265$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68266	 X"$ac_file" : 'X\(//\)[^/]' \| \
68267	 X"$ac_file" : 'X\(//\)$' \| \
68268	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68269$as_echo X"$ac_file" |
68270    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68271	    s//\1/
68272	    q
68273	  }
68274	  /^X\(\/\/\)[^/].*/{
68275	    s//\1/
68276	    q
68277	  }
68278	  /^X\(\/\/\)$/{
68279	    s//\1/
68280	    q
68281	  }
68282	  /^X\(\/\).*/{
68283	    s//\1/
68284	    q
68285	  }
68286	  s/.*/./; q'`
68287  as_dir="$ac_dir"; as_fn_mkdir_p
68288  ac_builddir=.
68289
68290case "$ac_dir" in
68291.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68292*)
68293  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68294  # A ".." for each directory in $ac_dir_suffix.
68295  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68296  case $ac_top_builddir_sub in
68297  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68298  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68299  esac ;;
68300esac
68301ac_abs_top_builddir=$ac_pwd
68302ac_abs_builddir=$ac_pwd$ac_dir_suffix
68303# for backward compatibility:
68304ac_top_builddir=$ac_top_build_prefix
68305
68306case $srcdir in
68307  .)  # We are building in place.
68308    ac_srcdir=.
68309    ac_top_srcdir=$ac_top_builddir_sub
68310    ac_abs_top_srcdir=$ac_pwd ;;
68311  [\\/]* | ?:[\\/]* )  # Absolute name.
68312    ac_srcdir=$srcdir$ac_dir_suffix;
68313    ac_top_srcdir=$srcdir
68314    ac_abs_top_srcdir=$srcdir ;;
68315  *) # Relative name.
68316    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68317    ac_top_srcdir=$ac_top_build_prefix$srcdir
68318    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68319esac
68320ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68321
68322
68323  case $ac_mode in
68324  :F)
68325  #
68326  # CONFIG_FILE
68327  #
68328
68329_ACEOF
68330
68331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68332# If the template does not know about datarootdir, expand it.
68333# FIXME: This hack should be removed a few years after 2.60.
68334ac_datarootdir_hack=; ac_datarootdir_seen=
68335ac_sed_dataroot='
68336/datarootdir/ {
68337  p
68338  q
68339}
68340/@datadir@/p
68341/@docdir@/p
68342/@infodir@/p
68343/@localedir@/p
68344/@mandir@/p'
68345case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68346*datarootdir*) ac_datarootdir_seen=yes;;
68347*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68348  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68349$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68350_ACEOF
68351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68352  ac_datarootdir_hack='
68353  s&@datadir@&$datadir&g
68354  s&@docdir@&$docdir&g
68355  s&@infodir@&$infodir&g
68356  s&@localedir@&$localedir&g
68357  s&@mandir@&$mandir&g
68358  s&\\\${datarootdir}&$datarootdir&g' ;;
68359esac
68360_ACEOF
68361
68362# Neutralize VPATH when `$srcdir' = `.'.
68363# Shell code in configure.ac might set extrasub.
68364# FIXME: do we really want to maintain this feature?
68365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68366ac_sed_extra="$ac_vpsub
68367$extrasub
68368_ACEOF
68369cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68370:t
68371/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68372s|@configure_input@|$ac_sed_conf_input|;t t
68373s&@top_builddir@&$ac_top_builddir_sub&;t t
68374s&@top_build_prefix@&$ac_top_build_prefix&;t t
68375s&@srcdir@&$ac_srcdir&;t t
68376s&@abs_srcdir@&$ac_abs_srcdir&;t t
68377s&@top_srcdir@&$ac_top_srcdir&;t t
68378s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68379s&@builddir@&$ac_builddir&;t t
68380s&@abs_builddir@&$ac_abs_builddir&;t t
68381s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68382$ac_datarootdir_hack
68383"
68384eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68385  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68386
68387test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68388  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68389  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68390      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68391  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68392which seems to be undefined.  Please make sure it is defined" >&5
68393$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68394which seems to be undefined.  Please make sure it is defined" >&2;}
68395
68396  rm -f "$ac_tmp/stdin"
68397  case $ac_file in
68398  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68399  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68400  esac \
68401  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68402 ;;
68403
68404
68405
68406  esac
68407
68408done # for ac_tag
68409
68410
68411as_fn_exit 0
68412_ACEOF
68413ac_clean_files=$ac_clean_files_save
68414
68415test $ac_write_fail = 0 ||
68416  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68417
68418
68419# configure is writing to config.log, and then calls config.status.
68420# config.status does its own redirection, appending to config.log.
68421# Unfortunately, on DOS this fails, as config.log is still kept open
68422# by configure, so config.status won't be able to write to it; its
68423# output is simply discarded.  So we exec the FD to /dev/null,
68424# effectively closing config.log, so it can be properly (re)opened and
68425# appended to by config.status.  When coming back to configure, we
68426# need to make the FD available again.
68427if test "$no_create" != yes; then
68428  ac_cs_success=:
68429  ac_config_status_args=
68430  test "$silent" = yes &&
68431    ac_config_status_args="$ac_config_status_args --quiet"
68432  exec 5>/dev/null
68433  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68434  exec 5>>config.log
68435  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68436  # would make configure fail if this is the last instruction.
68437  $ac_cs_success || as_fn_exit 1
68438fi
68439if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68440  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68441$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68442fi
68443
68444
68445# After AC_OUTPUT, we need to do final work
68446
68447
68448  # Try to move config.log (generated by autoconf) to the configure-support directory.
68449  if test -e ./config.log; then
68450    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68451  fi
68452
68453  # Rotate our log file (configure.log)
68454  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68455    $RM -f "$OUTPUT_ROOT/configure.log.old"
68456  fi
68457  if test -e "$OUTPUT_ROOT/configure.log"; then
68458    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68459  fi
68460
68461  # Move configure.log from current directory to the build output root
68462  if test -e ./configure.log; then
68463    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68464  fi
68465
68466  # Make the compare script executable
68467  $CHMOD +x $OUTPUT_ROOT/compare.sh
68468
68469
68470# Finally output some useful information to the user
68471
68472  # Finally output some useful information to the user
68473
68474  printf "\n"
68475  printf "====================================================\n"
68476  if test "x$no_create" != "xyes"; then
68477    if test "x$IS_RECONFIGURE" != "xyes"; then
68478      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68479    else
68480      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68481    fi
68482  else
68483    if test "x$IS_RECONFIGURE" != "xyes"; then
68484      printf "A configuration has been successfully checked but not created\n"
68485    else
68486      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68487    fi
68488  fi
68489  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68490    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68491  else
68492    printf "using default settings.\n"
68493  fi
68494
68495  printf "\n"
68496  printf "Configuration summary:\n"
68497  printf "* Debug level:    $DEBUG_LEVEL\n"
68498  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68499  printf "* JDK variant:    $JDK_VARIANT\n"
68500  printf "* JVM variants:   $JVM_VARIANTS\n"
68501  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68502  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68503
68504  printf "\n"
68505  printf "Tools summary:\n"
68506  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68507    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68508  fi
68509  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68510  if test "x$TOOLCHAIN_VERSION" != "x"; then
68511    print_version=" $TOOLCHAIN_VERSION"
68512  fi
68513  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68514  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68515  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68516
68517  printf "\n"
68518  printf "Build performance summary:\n"
68519  printf "* Cores to use:   $JOBS\n"
68520  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68521  if test "x$CCACHE_STATUS" != "x"; then
68522    printf "* ccache status:  $CCACHE_STATUS\n"
68523  fi
68524  printf "\n"
68525
68526  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68527    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68528    printf "will result in longer build times.\n"
68529    printf "\n"
68530  fi
68531
68532  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68533    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68534    printf "These are not respected, and will be ignored. It is recommended\n"
68535    printf "that you clean your environment. The following variables are set:\n"
68536    printf "$FOUND_ALT_VARIABLES\n"
68537    printf "\n"
68538  fi
68539
68540  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68541    printf "WARNING: Your build output directory is not on a local disk.\n"
68542    printf "This will severely degrade build performance!\n"
68543    printf "It is recommended that you create an output directory on a local disk,\n"
68544    printf "and run the configure script again from that directory.\n"
68545    printf "\n"
68546  fi
68547
68548  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68549    printf "WARNING: The result of this configuration has overridden an older\n"
68550    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68551    printf "proper build. Failure to do so might result in strange build problems.\n"
68552    printf "\n"
68553  fi
68554
68555  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68556    printf "WARNING: The result of this configuration was not saved.\n"
68557    printf "You should run without '--no-create | -n' to create the configuration.\n"
68558    printf "\n"
68559  fi
68560
68561
68562
68563  # Locate config.log.
68564  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68565    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68566  elif test -e "./config.log"; then
68567    CONFIG_LOG_PATH="."
68568  fi
68569
68570  if test -e "$CONFIG_LOG_PATH/config.log"; then
68571    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68572    if test $? -eq 0; then
68573      printf "The following warnings were produced. Repeated here for convenience:\n"
68574      # We must quote sed expression (using []) to stop m4 from eating the [].
68575      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68576      printf "\n"
68577    fi
68578  fi
68579
68580