generated-configure.sh revision 2406:ebb53399f956
1181430Sstas#!/bin/bash
2181430Sstas#
3181430Sstas# ##########################################################
4181430Sstas# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5181430Sstas# ##########################################################
6181430Sstas#
7181430Sstas#! /bin/sh
8181430Sstas# Guess values for system-dependent variables and create Makefiles.
9181430Sstas# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10181430Sstas#
11181430Sstas# Report bugs to <build-dev@openjdk.java.net>.
12181430Sstas#
13181430Sstas#
14181430Sstas# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15181430Sstas#
16181430Sstas#
17181430Sstas# This configure script is free software; the Free Software Foundation
18181430Sstas# gives unlimited permission to copy, distribute and modify it.
19181430Sstas## -------------------- ##
20181430Sstas## M4sh Initialization. ##
21181430Sstas## -------------------- ##
22181430Sstas
23181430Sstas# Be more Bourne compatible
24181430SstasDUALCASE=1; export DUALCASE # for MKS sh
25181430Sstasif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26181430Sstas  emulate sh
27181430Sstas  NULLCMD=:
28181430Sstas  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29181430Sstas  # is contrary to our usage.  Disable this feature.
30181430Sstas  alias -g '${1+"$@"}'='"$@"'
31181430Sstas  setopt NO_GLOB_SUBST
32181430Sstaselse
33181430Sstas  case `(set -o) 2>/dev/null` in #(
34181430Sstas  *posix*) :
35181430Sstas    set -o posix ;; #(
36181430Sstas  *) :
37181430Sstas     ;;
38181430Sstasesac
39181430Sstasfi
40181430Sstas
41181430Sstas
42181430Sstasas_nl='
43181430Sstas'
44181430Sstasexport as_nl
45181430Sstas# Printing a long string crashes Solaris 7 /usr/bin/printf.
46181430Sstasas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47181430Sstasas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48181430Sstasas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49181430Sstas# Prefer a ksh shell builtin over an external printf program on Solaris,
50181430Sstas# but without wasting forks for bash or zsh.
51181430Sstasif test -z "$BASH_VERSION$ZSH_VERSION" \
52181430Sstas    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53181430Sstas  as_echo='print -r --'
54181430Sstas  as_echo_n='print -rn --'
55181430Sstaselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56181430Sstas  as_echo='printf %s\n'
57181430Sstas  as_echo_n='printf %s'
58181430Sstaselse
59181430Sstas  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60181430Sstas    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61181430Sstas    as_echo_n='/usr/ucb/echo -n'
62181430Sstas  else
63181430Sstas    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64181430Sstas    as_echo_n_body='eval
65181430Sstas      arg=$1;
66275960Skib      case $arg in #(
67181430Sstas      *"$as_nl"*)
68181430Sstas	expr "X$arg" : "X\\(.*\\)$as_nl";
69181430Sstas	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70301962Skib      esac;
71181430Sstas      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72301962Skib    '
73267651Sattilio    export as_echo_n_body
74181430Sstas    as_echo_n='sh -c $as_echo_n_body as_echo'
75181430Sstas  fi
76181430Sstas  export as_echo_body
77181430Sstas  as_echo='sh -c $as_echo_body as_echo'
78181430Sstasfi
79228436Sfabient
80228436Sfabient# The user is always right.
81181430Sstasif test "${PATH_SEPARATOR+set}" != set; then
82181430Sstas  PATH_SEPARATOR=:
83181430Sstas  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84181430Sstas    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85181430Sstas      PATH_SEPARATOR=';'
86181430Sstas  }
87181430Sstasfi
88181430Sstas
89181430Sstas
90181430Sstas# IFS
91181430Sstas# We need space, tab and new line, in precisely that order.  Quoting is
92181430Sstas# there to prevent editors from complaining about space-tab.
93181430Sstas# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94181430Sstas# splitting by setting IFS to empty value.)
95181430SstasIFS=" ""	$as_nl"
96181430Sstas
97181430Sstas# Find who we are.  Look in the path if we contain no directory separator.
98181430Sstasas_myself=
99181430Sstascase $0 in #((
100181430Sstas  *[\\/]* ) as_myself=$0 ;;
101181430Sstas  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102181430Sstasfor as_dir in $PATH
103181430Sstasdo
104181430Sstas  IFS=$as_save_IFS
105181430Sstas  test -z "$as_dir" && as_dir=.
106181430Sstas    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107181430Sstas  done
108181430SstasIFS=$as_save_IFS
109181430Sstas
110181430Sstas     ;;
111181430Sstasesac
112181430Sstas# We did not find ourselves, most probably we were run as `sh COMMAND'
113181430Sstas# in which case we are not to be found in the path.
114181430Sstasif test "x$as_myself" = x; then
115181430Sstas  as_myself=$0
116181430Sstasfi
117181430Sstasif test ! -f "$as_myself"; then
118181430Sstas  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119181430Sstas  exit 1
120181430Sstasfi
121181430Sstas
122181430Sstas# Unset variables that we do not need and which cause bugs (e.g. in
123302372Snwhitehorn# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124181430Sstas# suppresses any "Segmentation fault" message there.  '((' could
125181430Sstas# trigger a bug in pdksh 5.2.14.
126181430Sstasfor as_var in BASH_ENV ENV MAIL MAILPATH
127181430Sstasdo eval test x\${$as_var+set} = xset \
128181430Sstas  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129300424Sachedone
130181430SstasPS1='$ '
131181430SstasPS2='> '
132181430SstasPS4='+ '
133181430Sstas
134181430Sstas# NLS nuisances.
135181430SstasLC_ALL=C
136302372Snwhitehornexport LC_ALL
137181430SstasLANGUAGE=C
138181430Sstasexport LANGUAGE
139181430Sstas
140181430Sstas# CDPATH.
141181430Sstas(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142181430Sstas
143181430Sstas# Use a proper internal environment variable to ensure we don't fall
144181430Sstas  # into an infinite loop, continuously re-executing ourselves.
145181430Sstas  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146181430Sstas    _as_can_reexec=no; export _as_can_reexec;
147181430Sstas    # We cannot yet assume a decent shell, so we have to provide a
148181430Sstas# neutralization value for shells without unset; and this also
149181430Sstas# works around shells that cannot unset nonexistent variables.
150181430Sstas# Preserve -v and -x to the replacement shell.
151183397SedBASH_ENV=/dev/null
152181430SstasENV=/dev/null
153302372Snwhitehorn(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154181430Sstascase $- in # ((((
155181430Sstas  *v*x* | *x*v* ) as_opts=-vx ;;
156181430Sstas  *v* ) as_opts=-v ;;
157181430Sstas  *x* ) as_opts=-x ;;
158181430Sstas  * ) as_opts= ;;
159181430Sstasesac
160181430Sstasexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161181430Sstas# Admittedly, this is quite paranoid, since all the known shells bail
162181430Sstas# out after a failed `exec'.
163181430Sstas$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164181430Sstasas_fn_exit 255
165195189Sstas  fi
166195189Sstas  # We don't want this to propagate to other subprocesses.
167181430Sstas          { _as_can_reexec=; unset _as_can_reexec;}
168181430Sstasif test "x$CONFIG_SHELL" = x; then
169181430Sstas  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170181430Sstas  emulate sh
171181430Sstas  NULLCMD=:
172181430Sstas  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173181430Sstas  # is contrary to our usage.  Disable this feature.
174301962Skib  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175181430Sstas  setopt NO_GLOB_SUBST
176181430Sstaselse
177181430Sstas  case \`(set -o) 2>/dev/null\` in #(
178181430Sstas  *posix*) :
179181430Sstas    set -o posix ;; #(
180181430Sstas  *) :
181181430Sstas     ;;
182267651Sattilioesac
183301962Skibfi
184301962Skib"
185267651Sattilio  as_required="as_fn_return () { (exit \$1); }
186181430Sstasas_fn_success () { as_fn_return 0; }
187181430Sstasas_fn_failure () { as_fn_return 1; }
188181430Sstasas_fn_ret_success () { return 0; }
189181430Sstasas_fn_ret_failure () { return 1; }
190181430Sstas
191181430Sstasexitcode=0
192181430Sstasas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193181430Sstasas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194181430Sstasas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195181430Sstasas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196181430Sstasif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197301962Skib
198267673Skibelse
199267673Skib  exitcode=1; echo positional parameters were not saved.
200181430Sstasfi
201181430Sstastest x\$exitcode = x0 || exit 1
202181430Sstastest -x / || exit 1"
203181430Sstas  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204302372Snwhitehorn  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205181430Sstas  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206181430Sstas  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207181430Sstastest \$(( 1 + 1 )) = 2 || exit 1"
208181430Sstas  if (eval "$as_required") 2>/dev/null; then :
209267651Sattilio  as_have_required=yes
210267651Sattilioelse
211301962Skib  as_have_required=no
212301962Skibfi
213301962Skib  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214301962Skib
215181430Sstaselse
216181430Sstas  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217181430Sstasas_found=false
218267651Sattiliofor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219181430Sstasdo
220301962Skib  IFS=$as_save_IFS
221181430Sstas  test -z "$as_dir" && as_dir=.
222181430Sstas  as_found=:
223301962Skib  case $as_dir in #(
224267651Sattilio	 /*)
225267651Sattilio	   for as_base in sh bash ksh sh5; do
226267673Skib	     # Try only shells that exist, to save several forks.
227301962Skib	     as_shell=$as_dir/$as_base
228267651Sattilio	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229267673Skib		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230267651Sattilio  CONFIG_SHELL=$as_shell as_have_required=yes
231267673Skib		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232301962Skib  break 2
233267673Skibfi
234301962Skibfi
235267651Sattilio	   done;;
236267651Sattilio       esac
237181430Sstas  as_found=false
238181430Sstasdone
239181430Sstas$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240181430Sstas	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241181430Sstas  CONFIG_SHELL=$SHELL as_have_required=yes
242181430Sstasfi; }
243195189SstasIFS=$as_save_IFS
244181430Sstas
245181430Sstas
246181430Sstas      if test "x$CONFIG_SHELL" != x; then :
247181430Sstas  export CONFIG_SHELL
248302372Snwhitehorn             # We cannot yet assume a decent shell, so we have to provide a
249181430Sstas# neutralization value for shells without unset; and this also
250181430Sstas# works around shells that cannot unset nonexistent variables.
251181430Sstas# Preserve -v and -x to the replacement shell.
252181430SstasBASH_ENV=/dev/null
253181430SstasENV=/dev/null
254181430Sstas(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255181430Sstascase $- in # ((((
256181430Sstas  *v*x* | *x*v* ) as_opts=-vx ;;
257301962Skib  *v* ) as_opts=-v ;;
258301962Skib  *x* ) as_opts=-x ;;
259301962Skib  * ) as_opts= ;;
260301962Skibesac
261181430Sstasexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262181430Sstas# Admittedly, this is quite paranoid, since all the known shells bail
263181430Sstas# out after a failed `exec'.
264195081Sstas$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265195081Sstasexit 255
266195081Sstasfi
267195189Sstas
268195081Sstas    if test x$as_have_required = xno; then :
269195189Sstas  $as_echo "$0: This script requires a shell more modern than all"
270195189Sstas  $as_echo "$0: the shells that I found on your system."
271195189Sstas  if test x${ZSH_VERSION+set} = xset ; then
272195189Sstas    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273195189Sstas    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274195189Sstas  else
275195189Sstas    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276195189Sstas$0: build-dev@openjdk.java.net about your system, including
277195189Sstas$0: any error possibly output before this message. Then
278195189Sstas$0: install a modern shell, or manually run the script
279195189Sstas$0: under such a shell if you do have one."
280195189Sstas  fi
281195189Sstas  exit 1
282195189Sstasfi
283181430Sstasfi
284181430Sstasfi
285181430SstasSHELL=${CONFIG_SHELL-/bin/sh}
286181430Sstasexport SHELL
287181430Sstas# Unset more variables known to interfere with behavior of common tools.
288181430SstasCLICOLOR_FORCE= GREP_OPTIONS=
289181430Sstasunset CLICOLOR_FORCE GREP_OPTIONS
290181430Sstas
291181430Sstas## --------------------- ##
292181430Sstas## M4sh Shell Functions. ##
293181430Sstas## --------------------- ##
294181430Sstas# as_fn_unset VAR
295181430Sstas# ---------------
296181430Sstas# Portably unset VAR.
297181430Sstasas_fn_unset ()
298181430Sstas{
299302372Snwhitehorn  { eval $1=; unset $1;}
300181430Sstas}
301181430Sstasas_unset=as_fn_unset
302181430Sstas
303301962Skib# as_fn_set_status STATUS
304301962Skib# -----------------------
305301962Skib# Set $? to STATUS, without forking.
306181430Sstasas_fn_set_status ()
307181430Sstas{
308181430Sstas  return $1
309181430Sstas} # as_fn_set_status
310181430Sstas
311181430Sstas# as_fn_exit STATUS
312228436Sfabient# -----------------
313181430Sstas# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314228436Sfabientas_fn_exit ()
315228436Sfabient{
316181430Sstas  set +e
317181430Sstas  as_fn_set_status $1
318181430Sstas  exit $1
319181430Sstas} # as_fn_exit
320181430Sstas
321181430Sstas# as_fn_mkdir_p
322181430Sstas# -------------
323181430Sstas# Create "$as_dir" as a directory, including parents if necessary.
324255439Skibas_fn_mkdir_p ()
325181430Sstas{
326181430Sstas
327255439Skib  case $as_dir in #(
328181430Sstas  -*) as_dir=./$as_dir;;
329181430Sstas  esac
330181430Sstas  test -d "$as_dir" || eval $as_mkdir_p || {
331181430Sstas    as_dirs=
332181430Sstas    while :; do
333181430Sstas      case $as_dir in #(
334181430Sstas      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335181430Sstas      *) as_qdir=$as_dir;;
336181430Sstas      esac
337181430Sstas      as_dirs="'$as_qdir' $as_dirs"
338181430Sstas      as_dir=`$as_dirname -- "$as_dir" ||
339181430Sstas$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340181430Sstas	 X"$as_dir" : 'X\(//\)[^/]' \| \
341255439Skib	 X"$as_dir" : 'X\(//\)$' \| \
342255439Skib	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343255439Skib$as_echo X"$as_dir" |
344181430Sstas    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345181430Sstas	    s//\1/
346181430Sstas	    q
347181430Sstas	  }
348181430Sstas	  /^X\(\/\/\)[^/].*/{
349181430Sstas	    s//\1/
350181430Sstas	    q
351181430Sstas	  }
352181430Sstas	  /^X\(\/\/\)$/{
353181430Sstas	    s//\1/
354181430Sstas	    q
355181430Sstas	  }
356252592Srpaulo	  /^X\(\/\).*/{
357181430Sstas	    s//\1/
358181430Sstas	    q
359181430Sstas	  }
360181430Sstas	  s/.*/./; q'`
361181430Sstas      test -d "$as_dir" && break
362181430Sstas    done
363181430Sstas    test -z "$as_dirs" || eval "mkdir $as_dirs"
364181430Sstas  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365181430Sstas
366181430Sstas
367181430Sstas} # as_fn_mkdir_p
368181430Sstas
369252592Srpaulo# as_fn_executable_p FILE
370181430Sstas# -----------------------
371181430Sstas# Test if FILE is an executable regular file.
372181430Sstasas_fn_executable_p ()
373181430Sstas{
374181430Sstas  test -f "$1" && test -x "$1"
375181430Sstas} # as_fn_executable_p
376254191Skib# as_fn_append VAR VALUE
377181430Sstas# ----------------------
378181430Sstas# Append the text in VALUE to the end of the definition contained in VAR. Take
379181430Sstas# advantage of any shell optimizations that allow amortized linear growth over
380181430Sstas# repeated appends, instead of the typical quadratic growth present in naive
381181430Sstas# implementations.
382181430Sstasif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383181430Sstas  eval 'as_fn_append ()
384181430Sstas  {
385181430Sstas    eval $1+=\$2
386181430Sstas  }'
387181430Sstaselse
388181430Sstas  as_fn_append ()
389181430Sstas  {
390181430Sstas    eval $1=\$$1\$2
391181430Sstas  }
392181430Sstasfi # as_fn_append
393181430Sstas
394181430Sstas# as_fn_arith ARG...
395181430Sstas# ------------------
396181430Sstas# Perform arithmetic evaluation on the ARGs, and store the result in the
397181430Sstas# global $as_val. Take advantage of shells that can avoid forks. The arguments
398181430Sstas# must be portable across $(()) and expr.
399181430Sstasif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400181430Sstas  eval 'as_fn_arith ()
401181430Sstas  {
402181430Sstas    as_val=$(( $* ))
403181430Sstas  }'
404181430Sstaselse
405181430Sstas  as_fn_arith ()
406181430Sstas  {
407181430Sstas    as_val=`expr "$@" || test $? -eq 1`
408181430Sstas  }
409181430Sstasfi # as_fn_arith
410181430Sstas
411181430Sstas
412181430Sstas# as_fn_error STATUS ERROR [LINENO LOG_FD]
413181430Sstas# ----------------------------------------
414181430Sstas# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415181430Sstas# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416181430Sstas# script with STATUS, using 1 if that was 0.
417181430Sstasas_fn_error ()
418181430Sstas{
419181430Sstas  as_status=$1; test $as_status -eq 0 && as_status=1
420195081Sstas  if test "$4"; then
421181430Sstas    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422181430Sstas    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423181430Sstas  fi
424181430Sstas  $as_echo "$as_me: error: $2" >&2
425181430Sstas  as_fn_exit $as_status
426181430Sstas} # as_fn_error
427181430Sstas
428181430Sstasif expr a : '\(a\)' >/dev/null 2>&1 &&
429181430Sstas   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430181430Sstas  as_expr=expr
431181430Sstaselse
432181430Sstas  as_expr=false
433181430Sstasfi
434181430Sstas
435228436Sfabientif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436228436Sfabient  as_basename=basename
437228436Sfabientelse
438255439Skib  as_basename=false
439228436Sfabientfi
440228436Sfabient
441255439Skibif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442228436Sfabient  as_dirname=dirname
443228436Sfabientelse
444228436Sfabient  as_dirname=false
445228436Sfabientfi
446228436Sfabient
447228436Sfabientas_me=`$as_basename -- "$0" ||
448228436Sfabient$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449228436Sfabient	 X"$0" : 'X\(//\)$' \| \
450228436Sfabient	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451228436Sfabient$as_echo X/"$0" |
452228436Sfabient    sed '/^.*\/\([^/][^/]*\)\/*$/{
453228436Sfabient	    s//\1/
454228436Sfabient	    q
455228436Sfabient	  }
456228436Sfabient	  /^X\/\(\/\/\)$/{
457255439Skib	    s//\1/
458228436Sfabient	    q
459228436Sfabient	  }
460228436Sfabient	  /^X\/\(\/\).*/{
461228436Sfabient	    s//\1/
462228436Sfabient	    q
463228436Sfabient	  }
464228436Sfabient	  s/.*/./; q'`
465228436Sfabient
466228436Sfabient# Avoid depending upon Character Ranges.
467228436Sfabientas_cr_letters='abcdefghijklmnopqrstuvwxyz'
468252592Srpauloas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469228436Sfabientas_cr_Letters=$as_cr_letters$as_cr_LETTERS
470228436Sfabientas_cr_digits='0123456789'
471228436Sfabientas_cr_alnum=$as_cr_Letters$as_cr_digits
472228436Sfabient
473228436Sfabient
474228436Sfabient  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475228436Sfabient  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476228436Sfabient  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477228436Sfabient  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478228436Sfabient  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479228436Sfabient  sed -n '
480228436Sfabient    p
481228436Sfabient    /[$]LINENO/=
482228436Sfabient  ' <$as_myself |
483228436Sfabient    sed '
484228436Sfabient      s/[$]LINENO.*/&-/
485228436Sfabient      t lineno
486228436Sfabient      b
487228436Sfabient      :lineno
488228436Sfabient      N
489228436Sfabient      :loop
490228436Sfabient      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491228436Sfabient      t loop
492228436Sfabient      s/-\n.*//
493228436Sfabient    ' >$as_me.lineno &&
494228436Sfabient  chmod +x "$as_me.lineno" ||
495228436Sfabient    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496228436Sfabient
497228436Sfabient  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498228436Sfabient  # already done that, so ensure we don't try to do so again and fall
499228436Sfabient  # in an infinite loop.  This has already happened in practice.
500228436Sfabient  _as_can_reexec=no; export _as_can_reexec
501228436Sfabient  # Don't try to exec as it changes $[0], causing all sort of problems
502228436Sfabient  # (the dirname of $[0] is not the place where we might find the
503228436Sfabient  # original and so on.  Autoconf is especially sensitive to this).
504254191Skib  . "./$as_me.lineno"
505228436Sfabient  # Exit status is that of the last command.
506228436Sfabient  exit
507228436Sfabient}
508181430Sstas
509181430SstasECHO_C= ECHO_N= ECHO_T=
510181430Sstascase `echo -n x` in #(((((
511181430Sstas-n*)
512181430Sstas  case `echo 'xy\c'` in
513181430Sstas  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514183397Sed  xy)  ECHO_C='\c';;
515302372Snwhitehorn  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516181430Sstas       ECHO_T='	';;
517181430Sstas  esac;;
518181430Sstas*)
519181430Sstas  ECHO_N='-n';;
520181430Sstasesac
521181430Sstas
522181430Sstasrm -f conf$$ conf$$.exe conf$$.file
523181430Sstasif test -d conf$$.dir; then
524181430Sstas  rm -f conf$$.dir/conf$$.file
525181430Sstaselse
526181430Sstas  rm -f conf$$.dir
527181430Sstas  mkdir conf$$.dir 2>/dev/null
528181430Sstasfi
529181430Sstasif (echo >conf$$.file) 2>/dev/null; then
530181430Sstas  if ln -s conf$$.file conf$$ 2>/dev/null; then
531181430Sstas    as_ln_s='ln -s'
532181430Sstas    # ... but there are two gotchas:
533181430Sstas    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534302372Snwhitehorn    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535263080Skib    # In both cases, we have to default to `cp -pR'.
536302372Snwhitehorn    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537181430Sstas      as_ln_s='cp -pR'
538181430Sstas  elif ln conf$$.file conf$$ 2>/dev/null; then
539181430Sstas    as_ln_s=ln
540181430Sstas  else
541181430Sstas    as_ln_s='cp -pR'
542302372Snwhitehorn  fi
543181430Sstaselse
544181430Sstas  as_ln_s='cp -pR'
545181430Sstasfi
546181430Sstasrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547181430Sstasrmdir conf$$.dir 2>/dev/null
548181430Sstas
549181430Sstasif mkdir -p . 2>/dev/null; then
550181430Sstas  as_mkdir_p='mkdir -p "$as_dir"'
551181430Sstaselse
552181430Sstas  test -d ./-p && rmdir ./-p
553181430Sstas  as_mkdir_p=false
554181430Sstasfi
555181430Sstas
556181430Sstasas_test_x='test -x'
557181430Sstasas_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707INCLUDE_DTRACE
708GCOV_ENABLED
709ZIP_EXTERNAL_DEBUG_SYMBOLS
710COPY_DEBUG_SYMBOLS
711COMPILE_WITH_DEBUG_SYMBOLS
712CFLAGS_WARNINGS_ARE_ERRORS
713BUILD_CC_DISABLE_WARNING_PREFIX
714DISABLE_WARNING_PREFIX
715HOTSPOT_SET_WARNINGS_AS_ERRORS
716WARNINGS_AS_ERRORS
717COMPILER_SUPPORTS_TARGET_BITS_FLAG
718ZERO_ARCHFLAG
719LDFLAGS_TESTEXE
720LDFLAGS_TESTLIB
721CXXFLAGS_TESTEXE
722CXXFLAGS_TESTLIB
723CFLAGS_TESTEXE
724CFLAGS_TESTLIB
725OPENJDK_BUILD_JVM_LIBS
726OPENJDK_BUILD_JVM_ASFLAGS
727OPENJDK_BUILD_JVM_LDFLAGS
728OPENJDK_BUILD_JVM_CFLAGS
729OPENJDK_BUILD_LDFLAGS_HASH_STYLE
730OPENJDK_BUILD_LDFLAGS_CXX_JDK
731OPENJDK_BUILD_JDKEXE_LIBS
732OPENJDK_BUILD_JDKLIB_LIBS
733OPENJDK_BUILD_LDFLAGS_JDKEXE
734OPENJDK_BUILD_LDFLAGS_JDKLIB
735OPENJDK_BUILD_CXXFLAGS_JDKEXE
736OPENJDK_BUILD_CXXFLAGS_JDKLIB
737OPENJDK_BUILD_CFLAGS_JDKEXE
738OPENJDK_BUILD_CFLAGS_JDKLIB
739OPENJDK_BUILD_CXXSTD_CXXFLAG
740JVM_LIBS
741JVM_ASFLAGS
742JVM_LDFLAGS
743JVM_CFLAGS
744LDFLAGS_HASH_STYLE
745LDFLAGS_CXX_JDK
746JDKEXE_LIBS
747JDKLIB_LIBS
748LDFLAGS_JDKEXE
749LDFLAGS_JDKLIB
750CXXFLAGS_JDKEXE
751CXXFLAGS_JDKLIB
752CFLAGS_JDKEXE
753CFLAGS_JDKLIB
754MACOSX_VERSION_MIN
755CXXSTD_CXXFLAG
756JDK_ARCH_ABI_PROP_NAME
757CXX_O_FLAG_SIZE
758CXX_O_FLAG_NONE
759CXX_O_FLAG_DEBUG
760CXX_O_FLAG_NORM
761CXX_O_FLAG_HI
762CXX_O_FLAG_HIGHEST
763CXX_O_FLAG_HIGHEST_JVM
764C_O_FLAG_SIZE
765C_O_FLAG_NONE
766C_O_FLAG_DEBUG
767C_O_FLAG_NORM
768C_O_FLAG_HI
769C_O_FLAG_HIGHEST
770C_O_FLAG_HIGHEST_JVM
771JVM_CFLAGS_SYMBOLS
772CXXFLAGS_DEBUG_SYMBOLS
773CFLAGS_DEBUG_SYMBOLS
774CXX_FLAG_DEPS
775C_FLAG_DEPS
776SHARED_LIBRARY_FLAGS
777SET_SHARED_LIBRARY_MAPFILE
778SET_SHARED_LIBRARY_NAME
779SET_SHARED_LIBRARY_ORIGIN
780SET_EXECUTABLE_ORIGIN
781CXX_FLAG_REORDER
782C_FLAG_REORDER
783JVM_RCFLAGS
784RC_FLAGS
785AR_OUT_OPTION
786LD_OUT_OPTION
787EXE_OUT_OPTION
788CC_OUT_OPTION
789STRIPFLAGS
790ARFLAGS
791COMPILER_BINDCMD_FILE_FLAG
792COMPILER_COMMAND_FILE_FLAG
793COMPILER_TARGET_BITS_FLAG
794JT_HOME
795JTREGEXE
796HOTSPOT_TOOLCHAIN_TYPE
797USING_BROKEN_SUSE_LD
798PACKAGE_PATH
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_MAN
872IMPORT_MODULES_LEGAL
873IMPORT_MODULES_CONF
874IMPORT_MODULES_LIBS
875IMPORT_MODULES_CMDS
876IMPORT_MODULES_CLASSES
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928ENABLE_HEADLESS_ONLY
929DEFAULT_MAKE_TARGET
930OS_VERSION_MICRO
931OS_VERSION_MINOR
932OS_VERSION_MAJOR
933PKG_CONFIG
934BASH_ARGS
935SETFILE
936CODESIGN
937XATTR
938DSYMUTIL
939IS_GNU_TIME
940PATCH
941DTRACE
942TIME
943STAT
944HG
945READELF
946OTOOL
947LDD
948ZIPEXE
949UNZIP
950TAR_SUPPORTS_TRANSFORM
951TAR_INCLUDE_PARAM
952TAR_CREATE_EXTRA_PARAM
953TAR_TYPE
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969JVM_VARIANT_MAIN
970VALID_JVM_VARIANTS
971JVM_VARIANTS
972DEBUG_LEVEL
973HOTSPOT_DEBUG_LEVEL
974JDK_VARIANT
975USERNAME
976CANONICAL_TOPDIR
977ORIGINAL_TOPDIR
978TOPDIR
979PATH_SEP
980ZERO_ARCHDEF
981HOTSPOT_BUILD_CPU_DEFINE
982HOTSPOT_BUILD_CPU_ARCH
983HOTSPOT_BUILD_CPU
984HOTSPOT_BUILD_OS_TYPE
985HOTSPOT_BUILD_OS
986OPENJDK_BUILD_BUNDLE_PLATFORM
987OPENJDK_BUILD_CPU_BUNDLE
988OPENJDK_BUILD_OS_BUNDLE
989OPENJDK_BUILD_OS_EXPORT_DIR
990OPENJDK_BUILD_CPU_OSARCH
991OPENJDK_BUILD_CPU_ISADIR
992OPENJDK_BUILD_CPU_LEGACY_LIB
993OPENJDK_BUILD_CPU_LEGACY
994HOTSPOT_TARGET_CPU_DEFINE
995HOTSPOT_TARGET_CPU_ARCH
996HOTSPOT_TARGET_CPU
997HOTSPOT_TARGET_OS_TYPE
998HOTSPOT_TARGET_OS
999DEFINE_CROSS_COMPILE_ARCH
1000LP64
1001OPENJDK_TARGET_BUNDLE_PLATFORM
1002OPENJDK_TARGET_CPU_BUNDLE
1003OPENJDK_TARGET_OS_BUNDLE
1004OPENJDK_TARGET_OS_EXPORT_DIR
1005OPENJDK_TARGET_CPU_OSARCH
1006OPENJDK_TARGET_CPU_ISADIR
1007OPENJDK_TARGET_CPU_LEGACY_LIB
1008OPENJDK_TARGET_CPU_LEGACY
1009REQUIRED_OS_VERSION
1010REQUIRED_OS_NAME
1011COMPILE_TYPE
1012OPENJDK_TARGET_CPU_ENDIAN
1013OPENJDK_TARGET_CPU_BITS
1014OPENJDK_TARGET_CPU_ARCH
1015OPENJDK_TARGET_CPU
1016OPENJDK_TARGET_OS_ENV
1017OPENJDK_TARGET_OS_TYPE
1018OPENJDK_TARGET_OS
1019OPENJDK_BUILD_CPU_ENDIAN
1020OPENJDK_BUILD_CPU_BITS
1021OPENJDK_BUILD_CPU_ARCH
1022OPENJDK_BUILD_CPU
1023OPENJDK_BUILD_OS_ENV
1024OPENJDK_BUILD_OS_TYPE
1025OPENJDK_BUILD_OS
1026OPENJDK_BUILD_AUTOCONF_NAME
1027OPENJDK_TARGET_AUTOCONF_NAME
1028target_os
1029target_vendor
1030target_cpu
1031target
1032host_os
1033host_vendor
1034host_cpu
1035host
1036build_os
1037build_vendor
1038build_cpu
1039build
1040NICE
1041CPIO
1042DF
1043READLINK
1044CYGPATH
1045SED
1046FGREP
1047EGREP
1048GREP
1049AWK
1050XARGS
1051WHICH
1052WC
1053UNIQ
1054UNAME
1055TR
1056TOUCH
1057TEE
1058TAR
1059TAIL
1060SORT
1061SH
1062RMDIR
1063RM
1064PRINTF
1065NAWK
1066MV
1067MKTEMP
1068MKDIR
1069LS
1070LN
1071GZIP
1072GUNZIP
1073HEAD
1074FIND
1075FILE
1076EXPR
1077ECHO
1078DIRNAME
1079DIFF
1080DATE
1081CUT
1082CP
1083COMM
1084CMP
1085CHMOD
1086CAT
1087BASH
1088BASENAME
1089DATE_WHEN_CONFIGURED
1090ORIGINAL_PATH
1091CONFIGURE_COMMAND_LINE
1092target_alias
1093host_alias
1094build_alias
1095LIBS
1096ECHO_T
1097ECHO_N
1098ECHO_C
1099DEFS
1100mandir
1101localedir
1102libdir
1103psdir
1104pdfdir
1105dvidir
1106htmldir
1107infodir
1108docdir
1109oldincludedir
1110includedir
1111localstatedir
1112sharedstatedir
1113sysconfdir
1114datadir
1115datarootdir
1116libexecdir
1117sbindir
1118bindir
1119program_transform_name
1120prefix
1121exec_prefix
1122PACKAGE_URL
1123PACKAGE_BUGREPORT
1124PACKAGE_STRING
1125PACKAGE_VERSION
1126PACKAGE_TARNAME
1127PACKAGE_NAME
1128PATH_SEPARATOR
1129SHELL'
1130ac_subst_files=''
1131ac_user_opts='
1132enable_option_checking
1133with_target_bits
1134enable_openjdk_only
1135with_custom_make_dir
1136with_jdk_variant
1137enable_debug
1138with_debug_level
1139with_jvm_variants
1140with_cpu_port
1141with_devkit
1142with_sys_root
1143with_sysroot
1144with_tools_dir
1145with_toolchain_path
1146with_extra_path
1147with_sdk_name
1148with_conf_name
1149with_output_sync
1150with_default_make_target
1151enable_headless_only
1152with_cacerts_file
1153enable_unlimited_crypto
1154with_copyright_year
1155enable_keep_packaged_modules
1156with_milestone
1157with_update_version
1158with_user_release_suffix
1159with_build_number
1160with_version_string
1161with_version_pre
1162with_version_opt
1163with_version_build
1164with_version_major
1165with_version_minor
1166with_version_security
1167with_version_patch
1168with_boot_jdk
1169with_build_jdk
1170with_add_source_root
1171with_override_source_root
1172with_adds_and_overrides
1173with_override_langtools
1174with_override_corba
1175with_override_jaxp
1176with_override_jaxws
1177with_override_hotspot
1178with_override_nashorn
1179with_override_jdk
1180with_import_hotspot
1181with_import_modules
1182enable_static_build
1183with_toolchain_type
1184with_extra_cflags
1185with_extra_cxxflags
1186with_extra_ldflags
1187with_toolchain_version
1188with_build_devkit
1189with_jtreg
1190with_abi_profile
1191enable_warnings_as_errors
1192with_native_debug_symbols
1193enable_debug_symbols
1194enable_zip_debug_info
1195enable_native_coverage
1196enable_dtrace
1197enable_aot
1198enable_hotspot_gtest
1199with_stdc__lib
1200with_msvcr_dll
1201with_msvcp_dll
1202with_x
1203with_cups
1204with_cups_include
1205with_freetype
1206with_freetype_include
1207with_freetype_lib
1208with_freetype_src
1209enable_freetype_bundling
1210with_alsa
1211with_alsa_include
1212with_alsa_lib
1213with_libffi
1214with_libffi_include
1215with_libffi_lib
1216enable_libffi_bundling
1217with_libjpeg
1218with_giflib
1219with_libpng
1220with_zlib
1221with_lcms
1222with_dxsdk
1223with_dxsdk_lib
1224with_dxsdk_include
1225with_libelf
1226with_libelf_include
1227with_libelf_lib
1228with_jvm_features
1229with_jvm_interpreter
1230enable_jtreg_failure_handler
1231enable_generate_classlist
1232with_num_cores
1233with_memory_size
1234with_jobs
1235with_test_jobs
1236with_boot_jdk_jvmargs
1237with_sjavac_server_java
1238enable_sjavac
1239enable_javac_server
1240enable_icecc
1241enable_precompiled_headers
1242enable_ccache
1243with_ccache_dir
1244'
1245      ac_precious_vars='build_alias
1246host_alias
1247target_alias
1248BASENAME
1249BASH
1250CAT
1251CHMOD
1252CMP
1253COMM
1254CP
1255CUT
1256DATE
1257DIFF
1258DIRNAME
1259ECHO
1260EXPR
1261FILE
1262FIND
1263HEAD
1264GUNZIP
1265GZIP
1266LN
1267LS
1268MKDIR
1269MKTEMP
1270MV
1271NAWK
1272PRINTF
1273RM
1274RMDIR
1275SH
1276SORT
1277TAIL
1278TAR
1279TEE
1280TOUCH
1281TR
1282UNAME
1283UNIQ
1284WC
1285WHICH
1286XARGS
1287AWK
1288GREP
1289EGREP
1290FGREP
1291SED
1292CYGPATH
1293READLINK
1294DF
1295CPIO
1296NICE
1297MAKE
1298UNZIP
1299ZIPEXE
1300LDD
1301OTOOL
1302READELF
1303HG
1304STAT
1305TIME
1306DTRACE
1307PATCH
1308DSYMUTIL
1309XATTR
1310CODESIGN
1311SETFILE
1312PKG_CONFIG
1313JAVA
1314JAVAC
1315JAVAH
1316JAR
1317JARSIGNER
1318CC
1319CFLAGS
1320LDFLAGS
1321LIBS
1322CPPFLAGS
1323CXX
1324CXXFLAGS
1325CCC
1326CPP
1327CXXCPP
1328AS
1329AR
1330LIPO
1331STRIP
1332NM
1333GNM
1334OBJCOPY
1335OBJDUMP
1336BUILD_CC
1337BUILD_CXX
1338BUILD_NM
1339BUILD_AR
1340BUILD_OBJCOPY
1341BUILD_STRIP
1342JTREGEXE
1343XMKMF
1344FREETYPE_CFLAGS
1345FREETYPE_LIBS
1346ALSA_CFLAGS
1347ALSA_LIBS
1348LIBFFI_CFLAGS
1349LIBFFI_LIBS
1350PNG_CFLAGS
1351PNG_LIBS
1352LCMS_CFLAGS
1353LCMS_LIBS
1354ELF_CFLAGS
1355ELF_LIBS
1356ICECC_CMD
1357ICECC_CREATE_ENV
1358ICECC_WRAPPER
1359CCACHE'
1360
1361
1362# Initialize some variables set by options.
1363ac_init_help=
1364ac_init_version=false
1365ac_unrecognized_opts=
1366ac_unrecognized_sep=
1367# The variables have the same names as the options, with
1368# dashes changed to underlines.
1369cache_file=/dev/null
1370exec_prefix=NONE
1371no_create=
1372no_recursion=
1373prefix=NONE
1374program_prefix=NONE
1375program_suffix=NONE
1376program_transform_name=s,x,x,
1377silent=
1378site=
1379srcdir=
1380verbose=
1381x_includes=NONE
1382x_libraries=NONE
1383
1384# Installation directory options.
1385# These are left unexpanded so users can "make install exec_prefix=/foo"
1386# and all the variables that are supposed to be based on exec_prefix
1387# by default will actually change.
1388# Use braces instead of parens because sh, perl, etc. also accept them.
1389# (The list follows the same order as the GNU Coding Standards.)
1390bindir='${exec_prefix}/bin'
1391sbindir='${exec_prefix}/sbin'
1392libexecdir='${exec_prefix}/libexec'
1393datarootdir='${prefix}/share'
1394datadir='${datarootdir}'
1395sysconfdir='${prefix}/etc'
1396sharedstatedir='${prefix}/com'
1397localstatedir='${prefix}/var'
1398includedir='${prefix}/include'
1399oldincludedir='/usr/include'
1400docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1401infodir='${datarootdir}/info'
1402htmldir='${docdir}'
1403dvidir='${docdir}'
1404pdfdir='${docdir}'
1405psdir='${docdir}'
1406libdir='${exec_prefix}/lib'
1407localedir='${datarootdir}/locale'
1408mandir='${datarootdir}/man'
1409
1410ac_prev=
1411ac_dashdash=
1412for ac_option
1413do
1414  # If the previous option needs an argument, assign it.
1415  if test -n "$ac_prev"; then
1416    eval $ac_prev=\$ac_option
1417    ac_prev=
1418    continue
1419  fi
1420
1421  case $ac_option in
1422  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1423  *=)   ac_optarg= ;;
1424  *)    ac_optarg=yes ;;
1425  esac
1426
1427  # Accept the important Cygnus configure options, so we can diagnose typos.
1428
1429  case $ac_dashdash$ac_option in
1430  --)
1431    ac_dashdash=yes ;;
1432
1433  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1434    ac_prev=bindir ;;
1435  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1436    bindir=$ac_optarg ;;
1437
1438  -build | --build | --buil | --bui | --bu)
1439    ac_prev=build_alias ;;
1440  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1441    build_alias=$ac_optarg ;;
1442
1443  -cache-file | --cache-file | --cache-fil | --cache-fi \
1444  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1445    ac_prev=cache_file ;;
1446  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1447  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1448    cache_file=$ac_optarg ;;
1449
1450  --config-cache | -C)
1451    cache_file=config.cache ;;
1452
1453  -datadir | --datadir | --datadi | --datad)
1454    ac_prev=datadir ;;
1455  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1456    datadir=$ac_optarg ;;
1457
1458  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1459  | --dataroo | --dataro | --datar)
1460    ac_prev=datarootdir ;;
1461  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1462  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1463    datarootdir=$ac_optarg ;;
1464
1465  -disable-* | --disable-*)
1466    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1467    # Reject names that are not valid shell variable names.
1468    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1469      as_fn_error $? "invalid feature name: $ac_useropt"
1470    ac_useropt_orig=$ac_useropt
1471    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1472    case $ac_user_opts in
1473      *"
1474"enable_$ac_useropt"
1475"*) ;;
1476      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1477	 ac_unrecognized_sep=', ';;
1478    esac
1479    eval enable_$ac_useropt=no ;;
1480
1481  -docdir | --docdir | --docdi | --doc | --do)
1482    ac_prev=docdir ;;
1483  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1484    docdir=$ac_optarg ;;
1485
1486  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1487    ac_prev=dvidir ;;
1488  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1489    dvidir=$ac_optarg ;;
1490
1491  -enable-* | --enable-*)
1492    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1493    # Reject names that are not valid shell variable names.
1494    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1495      as_fn_error $? "invalid feature name: $ac_useropt"
1496    ac_useropt_orig=$ac_useropt
1497    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1498    case $ac_user_opts in
1499      *"
1500"enable_$ac_useropt"
1501"*) ;;
1502      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1503	 ac_unrecognized_sep=', ';;
1504    esac
1505    eval enable_$ac_useropt=\$ac_optarg ;;
1506
1507  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1508  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1509  | --exec | --exe | --ex)
1510    ac_prev=exec_prefix ;;
1511  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1512  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1513  | --exec=* | --exe=* | --ex=*)
1514    exec_prefix=$ac_optarg ;;
1515
1516  -gas | --gas | --ga | --g)
1517    # Obsolete; use --with-gas.
1518    with_gas=yes ;;
1519
1520  -help | --help | --hel | --he | -h)
1521    ac_init_help=long ;;
1522  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1523    ac_init_help=recursive ;;
1524  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1525    ac_init_help=short ;;
1526
1527  -host | --host | --hos | --ho)
1528    ac_prev=host_alias ;;
1529  -host=* | --host=* | --hos=* | --ho=*)
1530    host_alias=$ac_optarg ;;
1531
1532  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1533    ac_prev=htmldir ;;
1534  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1535  | --ht=*)
1536    htmldir=$ac_optarg ;;
1537
1538  -includedir | --includedir | --includedi | --included | --include \
1539  | --includ | --inclu | --incl | --inc)
1540    ac_prev=includedir ;;
1541  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1542  | --includ=* | --inclu=* | --incl=* | --inc=*)
1543    includedir=$ac_optarg ;;
1544
1545  -infodir | --infodir | --infodi | --infod | --info | --inf)
1546    ac_prev=infodir ;;
1547  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1548    infodir=$ac_optarg ;;
1549
1550  -libdir | --libdir | --libdi | --libd)
1551    ac_prev=libdir ;;
1552  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1553    libdir=$ac_optarg ;;
1554
1555  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1556  | --libexe | --libex | --libe)
1557    ac_prev=libexecdir ;;
1558  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1559  | --libexe=* | --libex=* | --libe=*)
1560    libexecdir=$ac_optarg ;;
1561
1562  -localedir | --localedir | --localedi | --localed | --locale)
1563    ac_prev=localedir ;;
1564  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1565    localedir=$ac_optarg ;;
1566
1567  -localstatedir | --localstatedir | --localstatedi | --localstated \
1568  | --localstate | --localstat | --localsta | --localst | --locals)
1569    ac_prev=localstatedir ;;
1570  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1571  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1572    localstatedir=$ac_optarg ;;
1573
1574  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1575    ac_prev=mandir ;;
1576  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1577    mandir=$ac_optarg ;;
1578
1579  -nfp | --nfp | --nf)
1580    # Obsolete; use --without-fp.
1581    with_fp=no ;;
1582
1583  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1584  | --no-cr | --no-c | -n)
1585    no_create=yes ;;
1586
1587  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1588  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1589    no_recursion=yes ;;
1590
1591  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1592  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1593  | --oldin | --oldi | --old | --ol | --o)
1594    ac_prev=oldincludedir ;;
1595  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1596  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1597  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1598    oldincludedir=$ac_optarg ;;
1599
1600  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1601    ac_prev=prefix ;;
1602  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1603    prefix=$ac_optarg ;;
1604
1605  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1606  | --program-pre | --program-pr | --program-p)
1607    ac_prev=program_prefix ;;
1608  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1609  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1610    program_prefix=$ac_optarg ;;
1611
1612  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1613  | --program-suf | --program-su | --program-s)
1614    ac_prev=program_suffix ;;
1615  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1616  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1617    program_suffix=$ac_optarg ;;
1618
1619  -program-transform-name | --program-transform-name \
1620  | --program-transform-nam | --program-transform-na \
1621  | --program-transform-n | --program-transform- \
1622  | --program-transform | --program-transfor \
1623  | --program-transfo | --program-transf \
1624  | --program-trans | --program-tran \
1625  | --progr-tra | --program-tr | --program-t)
1626    ac_prev=program_transform_name ;;
1627  -program-transform-name=* | --program-transform-name=* \
1628  | --program-transform-nam=* | --program-transform-na=* \
1629  | --program-transform-n=* | --program-transform-=* \
1630  | --program-transform=* | --program-transfor=* \
1631  | --program-transfo=* | --program-transf=* \
1632  | --program-trans=* | --program-tran=* \
1633  | --progr-tra=* | --program-tr=* | --program-t=*)
1634    program_transform_name=$ac_optarg ;;
1635
1636  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1637    ac_prev=pdfdir ;;
1638  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1639    pdfdir=$ac_optarg ;;
1640
1641  -psdir | --psdir | --psdi | --psd | --ps)
1642    ac_prev=psdir ;;
1643  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1644    psdir=$ac_optarg ;;
1645
1646  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1647  | -silent | --silent | --silen | --sile | --sil)
1648    silent=yes ;;
1649
1650  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1651    ac_prev=sbindir ;;
1652  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1653  | --sbi=* | --sb=*)
1654    sbindir=$ac_optarg ;;
1655
1656  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1657  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1658  | --sharedst | --shareds | --shared | --share | --shar \
1659  | --sha | --sh)
1660    ac_prev=sharedstatedir ;;
1661  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1662  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1663  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1664  | --sha=* | --sh=*)
1665    sharedstatedir=$ac_optarg ;;
1666
1667  -site | --site | --sit)
1668    ac_prev=site ;;
1669  -site=* | --site=* | --sit=*)
1670    site=$ac_optarg ;;
1671
1672  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1673    ac_prev=srcdir ;;
1674  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1675    srcdir=$ac_optarg ;;
1676
1677  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1678  | --syscon | --sysco | --sysc | --sys | --sy)
1679    ac_prev=sysconfdir ;;
1680  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1681  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1682    sysconfdir=$ac_optarg ;;
1683
1684  -target | --target | --targe | --targ | --tar | --ta | --t)
1685    ac_prev=target_alias ;;
1686  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1687    target_alias=$ac_optarg ;;
1688
1689  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1690    verbose=yes ;;
1691
1692  -version | --version | --versio | --versi | --vers | -V)
1693    ac_init_version=: ;;
1694
1695  -with-* | --with-*)
1696    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1697    # Reject names that are not valid shell variable names.
1698    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1699      as_fn_error $? "invalid package name: $ac_useropt"
1700    ac_useropt_orig=$ac_useropt
1701    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1702    case $ac_user_opts in
1703      *"
1704"with_$ac_useropt"
1705"*) ;;
1706      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1707	 ac_unrecognized_sep=', ';;
1708    esac
1709    eval with_$ac_useropt=\$ac_optarg ;;
1710
1711  -without-* | --without-*)
1712    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1713    # Reject names that are not valid shell variable names.
1714    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1715      as_fn_error $? "invalid package name: $ac_useropt"
1716    ac_useropt_orig=$ac_useropt
1717    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1718    case $ac_user_opts in
1719      *"
1720"with_$ac_useropt"
1721"*) ;;
1722      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1723	 ac_unrecognized_sep=', ';;
1724    esac
1725    eval with_$ac_useropt=no ;;
1726
1727  --x)
1728    # Obsolete; use --with-x.
1729    with_x=yes ;;
1730
1731  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1732  | --x-incl | --x-inc | --x-in | --x-i)
1733    ac_prev=x_includes ;;
1734  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1735  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1736    x_includes=$ac_optarg ;;
1737
1738  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1739  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1740    ac_prev=x_libraries ;;
1741  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1742  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1743    x_libraries=$ac_optarg ;;
1744
1745  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1746Try \`$0 --help' for more information"
1747    ;;
1748
1749  *=*)
1750    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1751    # Reject names that are not valid shell variable names.
1752    case $ac_envvar in #(
1753      '' | [0-9]* | *[!_$as_cr_alnum]* )
1754      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1755    esac
1756    eval $ac_envvar=\$ac_optarg
1757    export $ac_envvar ;;
1758
1759  *)
1760    # FIXME: should be removed in autoconf 3.0.
1761    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1762    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1763      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1764    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1765    ;;
1766
1767  esac
1768done
1769
1770if test -n "$ac_prev"; then
1771  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1772  as_fn_error $? "missing argument to $ac_option"
1773fi
1774
1775if test -n "$ac_unrecognized_opts"; then
1776  case $enable_option_checking in
1777    no) ;;
1778    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1779    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1780  esac
1781fi
1782
1783# Check all directory arguments for consistency.
1784for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1785		datadir sysconfdir sharedstatedir localstatedir includedir \
1786		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1787		libdir localedir mandir
1788do
1789  eval ac_val=\$$ac_var
1790  # Remove trailing slashes.
1791  case $ac_val in
1792    */ )
1793      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1794      eval $ac_var=\$ac_val;;
1795  esac
1796  # Be sure to have absolute directory names.
1797  case $ac_val in
1798    [\\/$]* | ?:[\\/]* )  continue;;
1799    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1800  esac
1801  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1802done
1803
1804# There might be people who depend on the old broken behavior: `$host'
1805# used to hold the argument of --host etc.
1806# FIXME: To remove some day.
1807build=$build_alias
1808host=$host_alias
1809target=$target_alias
1810
1811# FIXME: To remove some day.
1812if test "x$host_alias" != x; then
1813  if test "x$build_alias" = x; then
1814    cross_compiling=maybe
1815  elif test "x$build_alias" != "x$host_alias"; then
1816    cross_compiling=yes
1817  fi
1818fi
1819
1820ac_tool_prefix=
1821test -n "$host_alias" && ac_tool_prefix=$host_alias-
1822
1823test "$silent" = yes && exec 6>/dev/null
1824
1825
1826ac_pwd=`pwd` && test -n "$ac_pwd" &&
1827ac_ls_di=`ls -di .` &&
1828ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1829  as_fn_error $? "working directory cannot be determined"
1830test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1831  as_fn_error $? "pwd does not report name of working directory"
1832
1833
1834# Find the source files, if location was not specified.
1835if test -z "$srcdir"; then
1836  ac_srcdir_defaulted=yes
1837  # Try the directory containing this script, then the parent directory.
1838  ac_confdir=`$as_dirname -- "$as_myself" ||
1839$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1840	 X"$as_myself" : 'X\(//\)[^/]' \| \
1841	 X"$as_myself" : 'X\(//\)$' \| \
1842	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1843$as_echo X"$as_myself" |
1844    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\/\)[^/].*/{
1849	    s//\1/
1850	    q
1851	  }
1852	  /^X\(\/\/\)$/{
1853	    s//\1/
1854	    q
1855	  }
1856	  /^X\(\/\).*/{
1857	    s//\1/
1858	    q
1859	  }
1860	  s/.*/./; q'`
1861  srcdir=$ac_confdir
1862  if test ! -r "$srcdir/$ac_unique_file"; then
1863    srcdir=..
1864  fi
1865else
1866  ac_srcdir_defaulted=no
1867fi
1868if test ! -r "$srcdir/$ac_unique_file"; then
1869  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1870  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1871fi
1872ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1873ac_abs_confdir=`(
1874	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1875	pwd)`
1876# When building in place, set srcdir=.
1877if test "$ac_abs_confdir" = "$ac_pwd"; then
1878  srcdir=.
1879fi
1880# Remove unnecessary trailing slashes from srcdir.
1881# Double slashes in file names in object file debugging info
1882# mess up M-x gdb in Emacs.
1883case $srcdir in
1884*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1885esac
1886for ac_var in $ac_precious_vars; do
1887  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1888  eval ac_env_${ac_var}_value=\$${ac_var}
1889  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1890  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1891done
1892
1893#
1894# Report the --help message.
1895#
1896if test "$ac_init_help" = "long"; then
1897  # Omit some internal or obsolete options to make the list less imposing.
1898  # This message is too long to be a string in the A/UX 3.1 sh.
1899  cat <<_ACEOF
1900\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1901
1902Usage: $0 [OPTION]... [VAR=VALUE]...
1903
1904To assign environment variables (e.g., CC, CFLAGS...), specify them as
1905VAR=VALUE.  See below for descriptions of some of the useful variables.
1906
1907Defaults for the options are specified in brackets.
1908
1909Configuration:
1910  -h, --help              display this help and exit
1911      --help=short        display options specific to this package
1912      --help=recursive    display the short help of all the included packages
1913  -V, --version           display version information and exit
1914  -q, --quiet, --silent   do not print \`checking ...' messages
1915      --cache-file=FILE   cache test results in FILE [disabled]
1916  -C, --config-cache      alias for \`--cache-file=config.cache'
1917  -n, --no-create         do not create output files
1918      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1919
1920Installation directories:
1921  --prefix=PREFIX         install architecture-independent files in PREFIX
1922                          [$ac_default_prefix]
1923  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1924                          [PREFIX]
1925
1926By default, \`make install' will install all the files in
1927\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1928an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1929for instance \`--prefix=\$HOME'.
1930
1931For better control, use the options below.
1932
1933Fine tuning of the installation directories:
1934  --bindir=DIR            user executables [EPREFIX/bin]
1935  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1936  --libexecdir=DIR        program executables [EPREFIX/libexec]
1937  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1938  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1939  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1940  --libdir=DIR            object code libraries [EPREFIX/lib]
1941  --includedir=DIR        C header files [PREFIX/include]
1942  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1943  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1944  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1945  --infodir=DIR           info documentation [DATAROOTDIR/info]
1946  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1947  --mandir=DIR            man documentation [DATAROOTDIR/man]
1948  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1949  --htmldir=DIR           html documentation [DOCDIR]
1950  --dvidir=DIR            dvi documentation [DOCDIR]
1951  --pdfdir=DIR            pdf documentation [DOCDIR]
1952  --psdir=DIR             ps documentation [DOCDIR]
1953_ACEOF
1954
1955  cat <<\_ACEOF
1956
1957X features:
1958  --x-includes=DIR    X include files are in DIR
1959  --x-libraries=DIR   X library files are in DIR
1960
1961System types:
1962  --build=BUILD     configure for building on BUILD [guessed]
1963  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1964  --target=TARGET   configure for building compilers for TARGET [HOST]
1965_ACEOF
1966fi
1967
1968if test -n "$ac_init_help"; then
1969  case $ac_init_help in
1970     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1971   esac
1972  cat <<\_ACEOF
1973
1974Optional Features:
1975  --disable-option-checking  ignore unrecognized --enable/--with options
1976  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1977  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1978  --enable-openjdk-only   suppress building custom source even if present
1979                          [disabled]
1980  --enable-debug          set the debug level to fastdebug (shorthand for
1981                          --with-debug-level=fastdebug) [disabled]
1982  --enable-headless-only  only build headless (no GUI) support [disabled]
1983  --disable-unlimited-crypto
1984                          Disable unlimited crypto policy [enabled]
1985  --disable-keep-packaged-modules
1986                          Do not keep packaged modules in jdk image [enable]
1987  --enable-static-build   enable static library build [disabled]
1988  --disable-warnings-as-errors
1989                          do not consider native warnings to be an error
1990                          [enabled]
1991  --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --enable-native-coverage
1996                          enable native compilation with code coverage
1997                          data[disabled]
1998  --enable-dtrace[=yes/no/auto]
1999                          enable dtrace. Default is auto, where dtrace is
2000                          enabled if all dependencies are present.
2001  --enable-aot[=yes/no/auto]
2002                          enable ahead of time compilation feature. Default is
2003                          auto, where aot is enabled if all dependencies are
2004                          present.
2005  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2006  --disable-freetype-bundling
2007                          disable bundling of the freetype library with the
2008                          build result [enabled on Windows or when using
2009                          --with-freetype, disabled otherwise]
2010  --enable-libffi-bundling
2011                          enable bundling of libffi.so to make the built JDK
2012                          runnable on more systems
2013  --enable-jtreg-failure-handler
2014                          forces build of the jtreg failure handler to be
2015                          enabled, missing dependencies become fatal errors.
2016                          Default is auto, where the failure handler is built
2017                          if all dependencies are present and otherwise just
2018                          disabled.
2019  --disable-generate-classlist
2020                          forces enabling or disabling of the generation of a
2021                          CDS classlist at build time. Default is to generate
2022                          it when either the server or client JVMs are built.
2023  --enable-sjavac         use sjavac to do fast incremental compiles
2024                          [disabled]
2025  --disable-javac-server  disable javac server [enabled]
2026  --enable-icecc          enable distribted compilation of native code using
2027                          icecc/icecream [disabled]
2028  --disable-precompiled-headers
2029                          disable using precompiled headers when compiling C++
2030                          [enabled]
2031  --enable-ccache         enable using ccache to speed up recompilations
2032                          [disabled]
2033
2034Optional Packages:
2035  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2036  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2037  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2038                          support it), e.g. --with-target-bits=32 [guessed]
2039  --with-custom-make-dir  Deprecated. Option is kept for backwards
2040                          compatibility and is ignored
2041  --with-jdk-variant      JDK variant to build (normal) [normal]
2042  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2043                          optimized) [release]
2044  --with-jvm-variants     JVM variants (separated by commas) to build
2045                          (server,client,minimal,core,zero,zeroshark,custom)
2046                          [server]
2047  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2048                          (arm64,aarch64) [aarch64]
2049  --with-devkit           use this devkit for compilers, tools and resources
2050  --with-sys-root         alias for --with-sysroot for backwards compatability
2051  --with-sysroot          use this directory as sysroot
2052  --with-tools-dir        alias for --with-toolchain-path for backwards
2053                          compatibility
2054  --with-toolchain-path   prepend these directories when searching for
2055                          toolchain binaries (compilers etc)
2056  --with-extra-path       prepend these directories to the default path
2057  --with-sdk-name         use the platform SDK of the given name. [macosx]
2058  --with-conf-name        use this as the name of the configuration [generated
2059                          from important configuration options]
2060  --with-output-sync      set make output sync type if supported by make.
2061                          [recurse]
2062  --with-default-make-target
2063                          set the default make target [exploded-image]
2064  --with-cacerts-file     specify alternative cacerts file
2065  --with-copyright-year   Set copyright year value for build [current year]
2066  --with-milestone        Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-update-version   Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-user-release-suffix
2071                          Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-build-number     Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-version-string   Set version string [calculated]
2076  --with-version-pre      Set the base part of the version 'PRE' field
2077                          (pre-release identifier) ['internal']
2078  --with-version-opt      Set version 'OPT' field (build metadata)
2079                          [<timestamp>.<user>.<dirname>]
2080  --with-version-build    Set version 'BUILD' field (build number) [not
2081                          specified]
2082  --with-version-major    Set version 'MAJOR' field (first number) [current
2083                          source value]
2084  --with-version-minor    Set version 'MINOR' field (second number) [current
2085                          source value]
2086  --with-version-security Set version 'SECURITY' field (third number) [current
2087                          source value]
2088  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2089                          specified]
2090  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2091  --with-build-jdk        path to JDK of same version as is being built[the
2092                          newly built JDK]
2093  --with-add-source-root  Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-source-root
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-adds-and-overrides
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-langtools
2102                          Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-corba   Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-jaxp    Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-jaxws   Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-hotspot Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-override-nashorn Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-override-jdk     Deprecated. Option is kept for backwards
2115                          compatibility and is ignored
2116  --with-import_hotspot   Deprecated. Option is kept for backwards
2117                          compatibility and is ignored
2118  --with-import-modules   import a set of prebuilt modules either as a zip
2119                          file or an exploded directory
2120  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2121                          to show possible values [platform dependent]
2122  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2123  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2124  --with-extra-ldflags    extra flags to be used when linking jdk
2125  --with-toolchain-version
2126                          the version of the toolchain to look for, use
2127                          '--help' to show possible values [platform
2128                          dependent]
2129  --with-build-devkit     Devkit to use for the build platform toolchain
2130  --with-jtreg            Regression Test Harness [probed]
2131  --with-abi-profile      specify ABI profile for ARM builds
2132                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2133                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2134                          [toolchain dependent]
2135  --with-native-debug-symbols
2136                          set the native debug symbol configuration (none,
2137                          internal, external, zipped) [varying]
2138  --with-stdc++lib=<static>,<dynamic>,<default>
2139                          force linking of the C++ runtime on Linux to either
2140                          static or dynamic, default is static with dynamic as
2141                          fallback
2142  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2143                          (Windows only) [probed]
2144  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2145                          (Windows only) [probed]
2146  --with-x                use the X Window System
2147  --with-cups             specify prefix directory for the cups package
2148                          (expecting the headers under PATH/include)
2149  --with-cups-include     specify directory for the cups include files
2150  --with-freetype         specify prefix directory for the freetype package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-freetype-include specify directory for the freetype include files
2154  --with-freetype-lib     specify directory for the freetype library
2155  --with-freetype-src     specify directory with freetype sources to
2156                          automatically build the library (experimental,
2157                          Windows-only)
2158  --with-alsa             specify prefix directory for the alsa package
2159                          (expecting the libraries under PATH/lib and the
2160                          headers under PATH/include)
2161  --with-alsa-include     specify directory for the alsa include files
2162  --with-alsa-lib         specify directory for the alsa library
2163  --with-libffi           specify prefix directory for the libffi package
2164                          (expecting the libraries under PATH/lib and the
2165                          headers under PATH/include)
2166  --with-libffi-include   specify directory for the libffi include files
2167  --with-libffi-lib       specify directory for the libffi library
2168  --with-libjpeg          use libjpeg from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-giflib           use giflib from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-libpng           use libpng from build system or OpenJDK source
2173                          (system, bundled) [bundled]
2174  --with-zlib             use zlib from build system or OpenJDK source
2175                          (system, bundled) [bundled]
2176  --with-lcms             use lcms2 from build system or OpenJDK source
2177                          (system, bundled) [bundled]
2178  --with-dxsdk            Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2181                          compatibility and is ignored
2182  --with-dxsdk-include    Deprecated. Option is kept for backwards
2183                          compatibility and is ignored
2184  --with-libelf           specify prefix directory for the libelf package
2185                          (expecting the libraries under PATH/lib and the
2186                          headers under PATH/include)
2187  --with-libelf-include   specify directory for the libelf include files
2188  --with-libelf-lib       specify directory for the libelf library
2189  --with-jvm-features     additional JVM features to enable (separated by
2190                          comma), use '--help' to show possible values [none]
2191  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2192                          compatibility and is ignored
2193  --with-num-cores        number of cores in the build system, e.g.
2194                          --with-num-cores=8 [probed]
2195  --with-memory-size      memory (in MB) available in the build system, e.g.
2196                          --with-memory-size=1024 [probed]
2197  --with-jobs             number of parallel jobs to let make run [calculated
2198                          based on cores and memory]
2199  --with-test-jobs        number of parallel tests jobs to run [based on build
2200                          jobs]
2201  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2202                          invocations of boot JDK, overriding the default
2203                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2204                          -enableassertions"
2205  --with-sjavac-server-java
2206                          use this java binary for running the sjavac
2207                          background server [Boot JDK java]
2208  --with-ccache-dir       where to store ccache files [~/.ccache]
2209
2210Some influential environment variables:
2211  BASENAME    Override default value for BASENAME
2212  BASH        Override default value for BASH
2213  CAT         Override default value for CAT
2214  CHMOD       Override default value for CHMOD
2215  CMP         Override default value for CMP
2216  COMM        Override default value for COMM
2217  CP          Override default value for CP
2218  CUT         Override default value for CUT
2219  DATE        Override default value for DATE
2220  DIFF        Override default value for DIFF
2221  DIRNAME     Override default value for DIRNAME
2222  ECHO        Override default value for ECHO
2223  EXPR        Override default value for EXPR
2224  FILE        Override default value for FILE
2225  FIND        Override default value for FIND
2226  HEAD        Override default value for HEAD
2227  GUNZIP      Override default value for GUNZIP
2228  GZIP        Override default value for GZIP
2229  LN          Override default value for LN
2230  LS          Override default value for LS
2231  MKDIR       Override default value for MKDIR
2232  MKTEMP      Override default value for MKTEMP
2233  MV          Override default value for MV
2234  NAWK        Override default value for NAWK
2235  PRINTF      Override default value for PRINTF
2236  RM          Override default value for RM
2237  RMDIR       Override default value for RMDIR
2238  SH          Override default value for SH
2239  SORT        Override default value for SORT
2240  TAIL        Override default value for TAIL
2241  TAR         Override default value for TAR
2242  TEE         Override default value for TEE
2243  TOUCH       Override default value for TOUCH
2244  TR          Override default value for TR
2245  UNAME       Override default value for UNAME
2246  UNIQ        Override default value for UNIQ
2247  WC          Override default value for WC
2248  WHICH       Override default value for WHICH
2249  XARGS       Override default value for XARGS
2250  AWK         Override default value for AWK
2251  GREP        Override default value for GREP
2252  EGREP       Override default value for EGREP
2253  FGREP       Override default value for FGREP
2254  SED         Override default value for SED
2255  CYGPATH     Override default value for CYGPATH
2256  READLINK    Override default value for READLINK
2257  DF          Override default value for DF
2258  CPIO        Override default value for CPIO
2259  NICE        Override default value for NICE
2260  MAKE        Override default value for MAKE
2261  UNZIP       Override default value for UNZIP
2262  ZIPEXE      Override default value for ZIPEXE
2263  LDD         Override default value for LDD
2264  OTOOL       Override default value for OTOOL
2265  READELF     Override default value for READELF
2266  HG          Override default value for HG
2267  STAT        Override default value for STAT
2268  TIME        Override default value for TIME
2269  DTRACE      Override default value for DTRACE
2270  PATCH       Override default value for PATCH
2271  DSYMUTIL    Override default value for DSYMUTIL
2272  XATTR       Override default value for XATTR
2273  CODESIGN    Override default value for CODESIGN
2274  SETFILE     Override default value for SETFILE
2275  PKG_CONFIG  path to pkg-config utility
2276  JAVA        Override default value for JAVA
2277  JAVAC       Override default value for JAVAC
2278  JAVAH       Override default value for JAVAH
2279  JAR         Override default value for JAR
2280  JARSIGNER   Override default value for JARSIGNER
2281  CC          C compiler command
2282  CFLAGS      C compiler flags
2283  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2284              nonstandard directory <lib dir>
2285  LIBS        libraries to pass to the linker, e.g. -l<library>
2286  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2287              you have headers in a nonstandard directory <include dir>
2288  CXX         C++ compiler command
2289  CXXFLAGS    C++ compiler flags
2290  CPP         C preprocessor
2291  CXXCPP      C++ preprocessor
2292  AS          Override default value for AS
2293  AR          Override default value for AR
2294  LIPO        Override default value for LIPO
2295  STRIP       Override default value for STRIP
2296  NM          Override default value for NM
2297  GNM         Override default value for GNM
2298  OBJCOPY     Override default value for OBJCOPY
2299  OBJDUMP     Override default value for OBJDUMP
2300  BUILD_CC    Override default value for BUILD_CC
2301  BUILD_CXX   Override default value for BUILD_CXX
2302  BUILD_NM    Override default value for BUILD_NM
2303  BUILD_AR    Override default value for BUILD_AR
2304  BUILD_OBJCOPY
2305              Override default value for BUILD_OBJCOPY
2306  BUILD_STRIP Override default value for BUILD_STRIP
2307  JTREGEXE    Override default value for JTREGEXE
2308  XMKMF       Path to xmkmf, Makefile generator for X Window System
2309  FREETYPE_CFLAGS
2310              C compiler flags for FREETYPE, overriding pkg-config
2311  FREETYPE_LIBS
2312              linker flags for FREETYPE, overriding pkg-config
2313  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2314  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2315  LIBFFI_CFLAGS
2316              C compiler flags for LIBFFI, overriding pkg-config
2317  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2318  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2319  PNG_LIBS    linker flags for PNG, overriding pkg-config
2320  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2321  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2322  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2323  ELF_LIBS    linker flags for ELF, overriding pkg-config
2324  ICECC_CMD   Override default value for ICECC_CMD
2325  ICECC_CREATE_ENV
2326              Override default value for ICECC_CREATE_ENV
2327  ICECC_WRAPPER
2328              Override default value for ICECC_WRAPPER
2329  CCACHE      Override default value for CCACHE
2330
2331Use these variables to override the choices made by `configure' or to help
2332it to find libraries and programs with nonstandard names/locations.
2333
2334Report bugs to <build-dev@openjdk.java.net>.
2335OpenJDK home page: <http://openjdk.java.net>.
2336_ACEOF
2337ac_status=$?
2338fi
2339
2340if test "$ac_init_help" = "recursive"; then
2341  # If there are subdirs, report their specific --help.
2342  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2343    test -d "$ac_dir" ||
2344      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2345      continue
2346    ac_builddir=.
2347
2348case "$ac_dir" in
2349.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2350*)
2351  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2352  # A ".." for each directory in $ac_dir_suffix.
2353  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2354  case $ac_top_builddir_sub in
2355  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2356  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2357  esac ;;
2358esac
2359ac_abs_top_builddir=$ac_pwd
2360ac_abs_builddir=$ac_pwd$ac_dir_suffix
2361# for backward compatibility:
2362ac_top_builddir=$ac_top_build_prefix
2363
2364case $srcdir in
2365  .)  # We are building in place.
2366    ac_srcdir=.
2367    ac_top_srcdir=$ac_top_builddir_sub
2368    ac_abs_top_srcdir=$ac_pwd ;;
2369  [\\/]* | ?:[\\/]* )  # Absolute name.
2370    ac_srcdir=$srcdir$ac_dir_suffix;
2371    ac_top_srcdir=$srcdir
2372    ac_abs_top_srcdir=$srcdir ;;
2373  *) # Relative name.
2374    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2375    ac_top_srcdir=$ac_top_build_prefix$srcdir
2376    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2377esac
2378ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2379
2380    cd "$ac_dir" || { ac_status=$?; continue; }
2381    # Check for guested configure.
2382    if test -f "$ac_srcdir/configure.gnu"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2385    elif test -f "$ac_srcdir/configure"; then
2386      echo &&
2387      $SHELL "$ac_srcdir/configure" --help=recursive
2388    else
2389      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2390    fi || ac_status=$?
2391    cd "$ac_pwd" || { ac_status=$?; break; }
2392  done
2393fi
2394
2395test -n "$ac_init_help" && exit $ac_status
2396if $ac_init_version; then
2397  cat <<\_ACEOF
2398OpenJDK configure jdk9
2399generated by GNU Autoconf 2.69
2400
2401Copyright (C) 2012 Free Software Foundation, Inc.
2402This configure script is free software; the Free Software Foundation
2403gives unlimited permission to copy, distribute and modify it.
2404_ACEOF
2405  exit
2406fi
2407
2408## ------------------------ ##
2409## Autoconf initialization. ##
2410## ------------------------ ##
2411
2412# ac_fn_c_try_compile LINENO
2413# --------------------------
2414# Try to compile conftest.$ac_ext, and return whether this succeeded.
2415ac_fn_c_try_compile ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  rm -f conftest.$ac_objext
2419  if { { ac_try="$ac_compile"
2420case "(($ac_try" in
2421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422  *) ac_try_echo=$ac_try;;
2423esac
2424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425$as_echo "$ac_try_echo"; } >&5
2426  (eval "$ac_compile") 2>conftest.err
2427  ac_status=$?
2428  if test -s conftest.err; then
2429    grep -v '^ *+' conftest.err >conftest.er1
2430    cat conftest.er1 >&5
2431    mv -f conftest.er1 conftest.err
2432  fi
2433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434  test $ac_status = 0; } && {
2435	 test -z "$ac_c_werror_flag" ||
2436	 test ! -s conftest.err
2437       } && test -s conftest.$ac_objext; then :
2438  ac_retval=0
2439else
2440  $as_echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443	ac_retval=1
2444fi
2445  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_c_try_compile
2449
2450# ac_fn_cxx_try_compile LINENO
2451# ----------------------------
2452# Try to compile conftest.$ac_ext, and return whether this succeeded.
2453ac_fn_cxx_try_compile ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  rm -f conftest.$ac_objext
2457  if { { ac_try="$ac_compile"
2458case "(($ac_try" in
2459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460  *) ac_try_echo=$ac_try;;
2461esac
2462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463$as_echo "$ac_try_echo"; } >&5
2464  (eval "$ac_compile") 2>conftest.err
2465  ac_status=$?
2466  if test -s conftest.err; then
2467    grep -v '^ *+' conftest.err >conftest.er1
2468    cat conftest.er1 >&5
2469    mv -f conftest.er1 conftest.err
2470  fi
2471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472  test $ac_status = 0; } && {
2473	 test -z "$ac_cxx_werror_flag" ||
2474	 test ! -s conftest.err
2475       } && test -s conftest.$ac_objext; then :
2476  ac_retval=0
2477else
2478  $as_echo "$as_me: failed program was:" >&5
2479sed 's/^/| /' conftest.$ac_ext >&5
2480
2481	ac_retval=1
2482fi
2483  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2484  as_fn_set_status $ac_retval
2485
2486} # ac_fn_cxx_try_compile
2487
2488# ac_fn_c_try_cpp LINENO
2489# ----------------------
2490# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2491ac_fn_c_try_cpp ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if { { ac_try="$ac_cpp conftest.$ac_ext"
2495case "(($ac_try" in
2496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2497  *) ac_try_echo=$ac_try;;
2498esac
2499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2500$as_echo "$ac_try_echo"; } >&5
2501  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2502  ac_status=$?
2503  if test -s conftest.err; then
2504    grep -v '^ *+' conftest.err >conftest.er1
2505    cat conftest.er1 >&5
2506    mv -f conftest.er1 conftest.err
2507  fi
2508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2509  test $ac_status = 0; } > conftest.i && {
2510	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2511	 test ! -s conftest.err
2512       }; then :
2513  ac_retval=0
2514else
2515  $as_echo "$as_me: failed program was:" >&5
2516sed 's/^/| /' conftest.$ac_ext >&5
2517
2518    ac_retval=1
2519fi
2520  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2521  as_fn_set_status $ac_retval
2522
2523} # ac_fn_c_try_cpp
2524
2525# ac_fn_cxx_try_cpp LINENO
2526# ------------------------
2527# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2528ac_fn_cxx_try_cpp ()
2529{
2530  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2531  if { { ac_try="$ac_cpp conftest.$ac_ext"
2532case "(($ac_try" in
2533  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2534  *) ac_try_echo=$ac_try;;
2535esac
2536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2537$as_echo "$ac_try_echo"; } >&5
2538  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2539  ac_status=$?
2540  if test -s conftest.err; then
2541    grep -v '^ *+' conftest.err >conftest.er1
2542    cat conftest.er1 >&5
2543    mv -f conftest.er1 conftest.err
2544  fi
2545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2546  test $ac_status = 0; } > conftest.i && {
2547	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2548	 test ! -s conftest.err
2549       }; then :
2550  ac_retval=0
2551else
2552  $as_echo "$as_me: failed program was:" >&5
2553sed 's/^/| /' conftest.$ac_ext >&5
2554
2555    ac_retval=1
2556fi
2557  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2558  as_fn_set_status $ac_retval
2559
2560} # ac_fn_cxx_try_cpp
2561
2562# ac_fn_c_try_link LINENO
2563# -----------------------
2564# Try to link conftest.$ac_ext, and return whether this succeeded.
2565ac_fn_c_try_link ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  rm -f conftest.$ac_objext conftest$ac_exeext
2569  if { { ac_try="$ac_link"
2570case "(($ac_try" in
2571  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2572  *) ac_try_echo=$ac_try;;
2573esac
2574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2575$as_echo "$ac_try_echo"; } >&5
2576  (eval "$ac_link") 2>conftest.err
2577  ac_status=$?
2578  if test -s conftest.err; then
2579    grep -v '^ *+' conftest.err >conftest.er1
2580    cat conftest.er1 >&5
2581    mv -f conftest.er1 conftest.err
2582  fi
2583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2584  test $ac_status = 0; } && {
2585	 test -z "$ac_c_werror_flag" ||
2586	 test ! -s conftest.err
2587       } && test -s conftest$ac_exeext && {
2588	 test "$cross_compiling" = yes ||
2589	 test -x conftest$ac_exeext
2590       }; then :
2591  ac_retval=0
2592else
2593  $as_echo "$as_me: failed program was:" >&5
2594sed 's/^/| /' conftest.$ac_ext >&5
2595
2596	ac_retval=1
2597fi
2598  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2599  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2600  # interfere with the next link command; also delete a directory that is
2601  # left behind by Apple's compiler.  We do this before executing the actions.
2602  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2603  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2604  as_fn_set_status $ac_retval
2605
2606} # ac_fn_c_try_link
2607
2608# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2609# ---------------------------------------------------------
2610# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2611# the include files in INCLUDES and setting the cache variable VAR
2612# accordingly.
2613ac_fn_cxx_check_header_mongrel ()
2614{
2615  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2616  if eval \${$3+:} false; then :
2617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2618$as_echo_n "checking for $2... " >&6; }
2619if eval \${$3+:} false; then :
2620  $as_echo_n "(cached) " >&6
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625else
2626  # Is the header compilable?
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2628$as_echo_n "checking $2 usability... " >&6; }
2629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631$4
2632#include <$2>
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_header_compiler=yes
2636else
2637  ac_header_compiler=no
2638fi
2639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2641$as_echo "$ac_header_compiler" >&6; }
2642
2643# Is the header present?
2644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2645$as_echo_n "checking $2 presence... " >&6; }
2646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2647/* end confdefs.h.  */
2648#include <$2>
2649_ACEOF
2650if ac_fn_cxx_try_cpp "$LINENO"; then :
2651  ac_header_preproc=yes
2652else
2653  ac_header_preproc=no
2654fi
2655rm -f conftest.err conftest.i conftest.$ac_ext
2656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2657$as_echo "$ac_header_preproc" >&6; }
2658
2659# So?  What about this header?
2660case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2661  yes:no: )
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2663$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2666    ;;
2667  no:yes:* )
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2669$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2671$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2673$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2675$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2676    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2677$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2678( $as_echo "## ----------------------------------------- ##
2679## Report this to build-dev@openjdk.java.net ##
2680## ----------------------------------------- ##"
2681     ) | sed "s/^/$as_me: WARNING:     /" >&2
2682    ;;
2683esac
2684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2685$as_echo_n "checking for $2... " >&6; }
2686if eval \${$3+:} false; then :
2687  $as_echo_n "(cached) " >&6
2688else
2689  eval "$3=\$ac_header_compiler"
2690fi
2691eval ac_res=\$$3
2692	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2693$as_echo "$ac_res" >&6; }
2694fi
2695  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2696
2697} # ac_fn_cxx_check_header_mongrel
2698
2699# ac_fn_cxx_try_run LINENO
2700# ------------------------
2701# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2702# that executables *can* be run.
2703ac_fn_cxx_try_run ()
2704{
2705  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2706  if { { ac_try="$ac_link"
2707case "(($ac_try" in
2708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709  *) ac_try_echo=$ac_try;;
2710esac
2711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712$as_echo "$ac_try_echo"; } >&5
2713  (eval "$ac_link") 2>&5
2714  ac_status=$?
2715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2717  { { case "(($ac_try" in
2718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719  *) ac_try_echo=$ac_try;;
2720esac
2721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2722$as_echo "$ac_try_echo"; } >&5
2723  (eval "$ac_try") 2>&5
2724  ac_status=$?
2725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2726  test $ac_status = 0; }; }; then :
2727  ac_retval=0
2728else
2729  $as_echo "$as_me: program exited with status $ac_status" >&5
2730       $as_echo "$as_me: failed program was:" >&5
2731sed 's/^/| /' conftest.$ac_ext >&5
2732
2733       ac_retval=$ac_status
2734fi
2735  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2736  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2737  as_fn_set_status $ac_retval
2738
2739} # ac_fn_cxx_try_run
2740
2741# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2742# ---------------------------------------------------------
2743# Tests whether HEADER exists and can be compiled using the include files in
2744# INCLUDES, setting the cache variable VAR accordingly.
2745ac_fn_cxx_check_header_compile ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2749$as_echo_n "checking for $2... " >&6; }
2750if eval \${$3+:} false; then :
2751  $as_echo_n "(cached) " >&6
2752else
2753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754/* end confdefs.h.  */
2755$4
2756#include <$2>
2757_ACEOF
2758if ac_fn_cxx_try_compile "$LINENO"; then :
2759  eval "$3=yes"
2760else
2761  eval "$3=no"
2762fi
2763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2764fi
2765eval ac_res=\$$3
2766	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2767$as_echo "$ac_res" >&6; }
2768  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2769
2770} # ac_fn_cxx_check_header_compile
2771
2772# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2773# ----------------------------------------------
2774# Tries to find the compile-time value of EXPR in a program that includes
2775# INCLUDES, setting VAR accordingly. Returns whether the value could be
2776# computed
2777ac_fn_cxx_compute_int ()
2778{
2779  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780  if test "$cross_compiling" = yes; then
2781    # Depending upon the size, compute the lo and hi bounds.
2782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2783/* end confdefs.h.  */
2784$4
2785int
2786main ()
2787{
2788static int test_array [1 - 2 * !(($2) >= 0)];
2789test_array [0] = 0;
2790return test_array [0];
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_compile "$LINENO"; then :
2797  ac_lo=0 ac_mid=0
2798  while :; do
2799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801$4
2802int
2803main ()
2804{
2805static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2806test_array [0] = 0;
2807return test_array [0];
2808
2809  ;
2810  return 0;
2811}
2812_ACEOF
2813if ac_fn_cxx_try_compile "$LINENO"; then :
2814  ac_hi=$ac_mid; break
2815else
2816  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2817			if test $ac_lo -le $ac_mid; then
2818			  ac_lo= ac_hi=
2819			  break
2820			fi
2821			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2822fi
2823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824  done
2825else
2826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828$4
2829int
2830main ()
2831{
2832static int test_array [1 - 2 * !(($2) < 0)];
2833test_array [0] = 0;
2834return test_array [0];
2835
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_compile "$LINENO"; then :
2841  ac_hi=-1 ac_mid=-1
2842  while :; do
2843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2844/* end confdefs.h.  */
2845$4
2846int
2847main ()
2848{
2849static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2850test_array [0] = 0;
2851return test_array [0];
2852
2853  ;
2854  return 0;
2855}
2856_ACEOF
2857if ac_fn_cxx_try_compile "$LINENO"; then :
2858  ac_lo=$ac_mid; break
2859else
2860  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2861			if test $ac_mid -le $ac_hi; then
2862			  ac_lo= ac_hi=
2863			  break
2864			fi
2865			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868  done
2869else
2870  ac_lo= ac_hi=
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873fi
2874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875# Binary search between lo and hi bounds.
2876while test "x$ac_lo" != "x$ac_hi"; do
2877  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$4
2881int
2882main ()
2883{
2884static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2885test_array [0] = 0;
2886return test_array [0];
2887
2888  ;
2889  return 0;
2890}
2891_ACEOF
2892if ac_fn_cxx_try_compile "$LINENO"; then :
2893  ac_hi=$ac_mid
2894else
2895  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898done
2899case $ac_lo in #((
2900?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2901'') ac_retval=1 ;;
2902esac
2903  else
2904    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2905/* end confdefs.h.  */
2906$4
2907static long int longval () { return $2; }
2908static unsigned long int ulongval () { return $2; }
2909#include <stdio.h>
2910#include <stdlib.h>
2911int
2912main ()
2913{
2914
2915  FILE *f = fopen ("conftest.val", "w");
2916  if (! f)
2917    return 1;
2918  if (($2) < 0)
2919    {
2920      long int i = longval ();
2921      if (i != ($2))
2922	return 1;
2923      fprintf (f, "%ld", i);
2924    }
2925  else
2926    {
2927      unsigned long int i = ulongval ();
2928      if (i != ($2))
2929	return 1;
2930      fprintf (f, "%lu", i);
2931    }
2932  /* Do not output a trailing newline, as this causes \r\n confusion
2933     on some platforms.  */
2934  return ferror (f) || fclose (f) != 0;
2935
2936  ;
2937  return 0;
2938}
2939_ACEOF
2940if ac_fn_cxx_try_run "$LINENO"; then :
2941  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2942else
2943  ac_retval=1
2944fi
2945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2946  conftest.$ac_objext conftest.beam conftest.$ac_ext
2947rm -f conftest.val
2948
2949  fi
2950  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2951  as_fn_set_status $ac_retval
2952
2953} # ac_fn_cxx_compute_int
2954
2955# ac_fn_cxx_try_link LINENO
2956# -------------------------
2957# Try to link conftest.$ac_ext, and return whether this succeeded.
2958ac_fn_cxx_try_link ()
2959{
2960  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2961  rm -f conftest.$ac_objext conftest$ac_exeext
2962  if { { ac_try="$ac_link"
2963case "(($ac_try" in
2964  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2965  *) ac_try_echo=$ac_try;;
2966esac
2967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2968$as_echo "$ac_try_echo"; } >&5
2969  (eval "$ac_link") 2>conftest.err
2970  ac_status=$?
2971  if test -s conftest.err; then
2972    grep -v '^ *+' conftest.err >conftest.er1
2973    cat conftest.er1 >&5
2974    mv -f conftest.er1 conftest.err
2975  fi
2976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2977  test $ac_status = 0; } && {
2978	 test -z "$ac_cxx_werror_flag" ||
2979	 test ! -s conftest.err
2980       } && test -s conftest$ac_exeext && {
2981	 test "$cross_compiling" = yes ||
2982	 test -x conftest$ac_exeext
2983       }; then :
2984  ac_retval=0
2985else
2986  $as_echo "$as_me: failed program was:" >&5
2987sed 's/^/| /' conftest.$ac_ext >&5
2988
2989	ac_retval=1
2990fi
2991  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2992  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2993  # interfere with the next link command; also delete a directory that is
2994  # left behind by Apple's compiler.  We do this before executing the actions.
2995  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2996  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2997  as_fn_set_status $ac_retval
2998
2999} # ac_fn_cxx_try_link
3000
3001# ac_fn_cxx_check_func LINENO FUNC VAR
3002# ------------------------------------
3003# Tests whether FUNC exists, setting the cache variable VAR accordingly
3004ac_fn_cxx_check_func ()
3005{
3006  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3008$as_echo_n "checking for $2... " >&6; }
3009if eval \${$3+:} false; then :
3010  $as_echo_n "(cached) " >&6
3011else
3012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013/* end confdefs.h.  */
3014/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3015   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3016#define $2 innocuous_$2
3017
3018/* System header to define __stub macros and hopefully few prototypes,
3019    which can conflict with char $2 (); below.
3020    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3021    <limits.h> exists even on freestanding compilers.  */
3022
3023#ifdef __STDC__
3024# include <limits.h>
3025#else
3026# include <assert.h>
3027#endif
3028
3029#undef $2
3030
3031/* Override any GCC internal prototype to avoid an error.
3032   Use char because int might match the return type of a GCC
3033   builtin and then its argument prototype would still apply.  */
3034#ifdef __cplusplus
3035extern "C"
3036#endif
3037char $2 ();
3038/* The GNU C library defines this for functions which it implements
3039    to always fail with ENOSYS.  Some functions are actually named
3040    something starting with __ and the normal name is an alias.  */
3041#if defined __stub_$2 || defined __stub___$2
3042choke me
3043#endif
3044
3045int
3046main ()
3047{
3048return $2 ();
3049  ;
3050  return 0;
3051}
3052_ACEOF
3053if ac_fn_cxx_try_link "$LINENO"; then :
3054  eval "$3=yes"
3055else
3056  eval "$3=no"
3057fi
3058rm -f core conftest.err conftest.$ac_objext \
3059    conftest$ac_exeext conftest.$ac_ext
3060fi
3061eval ac_res=\$$3
3062	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3063$as_echo "$ac_res" >&6; }
3064  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3065
3066} # ac_fn_cxx_check_func
3067
3068# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3069# -------------------------------------------------------
3070# Tests whether HEADER exists and can be compiled using the include files in
3071# INCLUDES, setting the cache variable VAR accordingly.
3072ac_fn_c_check_header_compile ()
3073{
3074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3076$as_echo_n "checking for $2... " >&6; }
3077if eval \${$3+:} false; then :
3078  $as_echo_n "(cached) " >&6
3079else
3080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3081/* end confdefs.h.  */
3082$4
3083#include <$2>
3084_ACEOF
3085if ac_fn_c_try_compile "$LINENO"; then :
3086  eval "$3=yes"
3087else
3088  eval "$3=no"
3089fi
3090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3091fi
3092eval ac_res=\$$3
3093	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3094$as_echo "$ac_res" >&6; }
3095  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3096
3097} # ac_fn_c_check_header_compile
3098cat >config.log <<_ACEOF
3099This file contains any messages produced by compilers while
3100running configure, to aid debugging if configure makes a mistake.
3101
3102It was created by OpenJDK $as_me jdk9, which was
3103generated by GNU Autoconf 2.69.  Invocation command line was
3104
3105  $ $0 $@
3106
3107_ACEOF
3108exec 5>>config.log
3109{
3110cat <<_ASUNAME
3111## --------- ##
3112## Platform. ##
3113## --------- ##
3114
3115hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3116uname -m = `(uname -m) 2>/dev/null || echo unknown`
3117uname -r = `(uname -r) 2>/dev/null || echo unknown`
3118uname -s = `(uname -s) 2>/dev/null || echo unknown`
3119uname -v = `(uname -v) 2>/dev/null || echo unknown`
3120
3121/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3122/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3123
3124/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3125/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3126/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3127/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3128/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3129/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3130/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3131
3132_ASUNAME
3133
3134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3135for as_dir in $PATH
3136do
3137  IFS=$as_save_IFS
3138  test -z "$as_dir" && as_dir=.
3139    $as_echo "PATH: $as_dir"
3140  done
3141IFS=$as_save_IFS
3142
3143} >&5
3144
3145cat >&5 <<_ACEOF
3146
3147
3148## ----------- ##
3149## Core tests. ##
3150## ----------- ##
3151
3152_ACEOF
3153
3154
3155# Keep a trace of the command line.
3156# Strip out --no-create and --no-recursion so they do not pile up.
3157# Strip out --silent because we don't want to record it for future runs.
3158# Also quote any args containing shell meta-characters.
3159# Make two passes to allow for proper duplicate-argument suppression.
3160ac_configure_args=
3161ac_configure_args0=
3162ac_configure_args1=
3163ac_must_keep_next=false
3164for ac_pass in 1 2
3165do
3166  for ac_arg
3167  do
3168    case $ac_arg in
3169    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3170    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3171    | -silent | --silent | --silen | --sile | --sil)
3172      continue ;;
3173    *\'*)
3174      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3175    esac
3176    case $ac_pass in
3177    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3178    2)
3179      as_fn_append ac_configure_args1 " '$ac_arg'"
3180      if test $ac_must_keep_next = true; then
3181	ac_must_keep_next=false # Got value, back to normal.
3182      else
3183	case $ac_arg in
3184	  *=* | --config-cache | -C | -disable-* | --disable-* \
3185	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3186	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3187	  | -with-* | --with-* | -without-* | --without-* | --x)
3188	    case "$ac_configure_args0 " in
3189	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3190	    esac
3191	    ;;
3192	  -* ) ac_must_keep_next=true ;;
3193	esac
3194      fi
3195      as_fn_append ac_configure_args " '$ac_arg'"
3196      ;;
3197    esac
3198  done
3199done
3200{ ac_configure_args0=; unset ac_configure_args0;}
3201{ ac_configure_args1=; unset ac_configure_args1;}
3202
3203# When interrupted or exit'd, cleanup temporary files, and complete
3204# config.log.  We remove comments because anyway the quotes in there
3205# would cause problems or look ugly.
3206# WARNING: Use '\'' to represent an apostrophe within the trap.
3207# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3208trap 'exit_status=$?
3209  # Save into config.log some information that might help in debugging.
3210  {
3211    echo
3212
3213    $as_echo "## ---------------- ##
3214## Cache variables. ##
3215## ---------------- ##"
3216    echo
3217    # The following way of writing the cache mishandles newlines in values,
3218(
3219  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3220    eval ac_val=\$$ac_var
3221    case $ac_val in #(
3222    *${as_nl}*)
3223      case $ac_var in #(
3224      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3225$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3226      esac
3227      case $ac_var in #(
3228      _ | IFS | as_nl) ;; #(
3229      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3230      *) { eval $ac_var=; unset $ac_var;} ;;
3231      esac ;;
3232    esac
3233  done
3234  (set) 2>&1 |
3235    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3236    *${as_nl}ac_space=\ *)
3237      sed -n \
3238	"s/'\''/'\''\\\\'\'''\''/g;
3239	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3240      ;; #(
3241    *)
3242      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3243      ;;
3244    esac |
3245    sort
3246)
3247    echo
3248
3249    $as_echo "## ----------------- ##
3250## Output variables. ##
3251## ----------------- ##"
3252    echo
3253    for ac_var in $ac_subst_vars
3254    do
3255      eval ac_val=\$$ac_var
3256      case $ac_val in
3257      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3258      esac
3259      $as_echo "$ac_var='\''$ac_val'\''"
3260    done | sort
3261    echo
3262
3263    if test -n "$ac_subst_files"; then
3264      $as_echo "## ------------------- ##
3265## File substitutions. ##
3266## ------------------- ##"
3267      echo
3268      for ac_var in $ac_subst_files
3269      do
3270	eval ac_val=\$$ac_var
3271	case $ac_val in
3272	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3273	esac
3274	$as_echo "$ac_var='\''$ac_val'\''"
3275      done | sort
3276      echo
3277    fi
3278
3279    if test -s confdefs.h; then
3280      $as_echo "## ----------- ##
3281## confdefs.h. ##
3282## ----------- ##"
3283      echo
3284      cat confdefs.h
3285      echo
3286    fi
3287    test "$ac_signal" != 0 &&
3288      $as_echo "$as_me: caught signal $ac_signal"
3289    $as_echo "$as_me: exit $exit_status"
3290  } >&5
3291  rm -f core *.core core.conftest.* &&
3292    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3293    exit $exit_status
3294' 0
3295for ac_signal in 1 2 13 15; do
3296  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3297done
3298ac_signal=0
3299
3300# confdefs.h avoids OS command line length limits that DEFS can exceed.
3301rm -f -r conftest* confdefs.h
3302
3303$as_echo "/* confdefs.h */" > confdefs.h
3304
3305# Predefined preprocessor variables.
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_NAME "$PACKAGE_NAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_VERSION "$PACKAGE_VERSION"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_STRING "$PACKAGE_STRING"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3325_ACEOF
3326
3327cat >>confdefs.h <<_ACEOF
3328#define PACKAGE_URL "$PACKAGE_URL"
3329_ACEOF
3330
3331
3332# Let the site file select an alternate cache file if it wants to.
3333# Prefer an explicitly selected file to automatically selected ones.
3334ac_site_file1=NONE
3335ac_site_file2=NONE
3336if test -n "$CONFIG_SITE"; then
3337  # We do not want a PATH search for config.site.
3338  case $CONFIG_SITE in #((
3339    -*)  ac_site_file1=./$CONFIG_SITE;;
3340    */*) ac_site_file1=$CONFIG_SITE;;
3341    *)   ac_site_file1=./$CONFIG_SITE;;
3342  esac
3343elif test "x$prefix" != xNONE; then
3344  ac_site_file1=$prefix/share/config.site
3345  ac_site_file2=$prefix/etc/config.site
3346else
3347  ac_site_file1=$ac_default_prefix/share/config.site
3348  ac_site_file2=$ac_default_prefix/etc/config.site
3349fi
3350for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3351do
3352  test "x$ac_site_file" = xNONE && continue
3353  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3354    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3355$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3356    sed 's/^/| /' "$ac_site_file" >&5
3357    . "$ac_site_file" \
3358      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3360as_fn_error $? "failed to load site script $ac_site_file
3361See \`config.log' for more details" "$LINENO" 5; }
3362  fi
3363done
3364
3365if test -r "$cache_file"; then
3366  # Some versions of bash will fail to source /dev/null (special files
3367  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3368  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3369    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3370$as_echo "$as_me: loading cache $cache_file" >&6;}
3371    case $cache_file in
3372      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3373      *)                      . "./$cache_file";;
3374    esac
3375  fi
3376else
3377  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3378$as_echo "$as_me: creating cache $cache_file" >&6;}
3379  >$cache_file
3380fi
3381
3382# Check that the precious variables saved in the cache have kept the same
3383# value.
3384ac_cache_corrupted=false
3385for ac_var in $ac_precious_vars; do
3386  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3387  eval ac_new_set=\$ac_env_${ac_var}_set
3388  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3389  eval ac_new_val=\$ac_env_${ac_var}_value
3390  case $ac_old_set,$ac_new_set in
3391    set,)
3392      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3393$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3394      ac_cache_corrupted=: ;;
3395    ,set)
3396      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3397$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3398      ac_cache_corrupted=: ;;
3399    ,);;
3400    *)
3401      if test "x$ac_old_val" != "x$ac_new_val"; then
3402	# differences in whitespace do not lead to failure.
3403	ac_old_val_w=`echo x $ac_old_val`
3404	ac_new_val_w=`echo x $ac_new_val`
3405	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3406	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3407$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3408	  ac_cache_corrupted=:
3409	else
3410	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3411$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3412	  eval $ac_var=\$ac_old_val
3413	fi
3414	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3415$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3416	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3417$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3418      fi;;
3419  esac
3420  # Pass precious variables to config.status.
3421  if test "$ac_new_set" = set; then
3422    case $ac_new_val in
3423    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3424    *) ac_arg=$ac_var=$ac_new_val ;;
3425    esac
3426    case " $ac_configure_args " in
3427      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3428      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3429    esac
3430  fi
3431done
3432if $ac_cache_corrupted; then
3433  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3435  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3436$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3437  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3438fi
3439## -------------------- ##
3440## Main body of script. ##
3441## -------------------- ##
3442
3443ac_ext=c
3444ac_cpp='$CPP $CPPFLAGS'
3445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3447ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448
3449
3450
3451ac_aux_dir=
3452for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3453  if test -f "$ac_dir/install-sh"; then
3454    ac_aux_dir=$ac_dir
3455    ac_install_sh="$ac_aux_dir/install-sh -c"
3456    break
3457  elif test -f "$ac_dir/install.sh"; then
3458    ac_aux_dir=$ac_dir
3459    ac_install_sh="$ac_aux_dir/install.sh -c"
3460    break
3461  elif test -f "$ac_dir/shtool"; then
3462    ac_aux_dir=$ac_dir
3463    ac_install_sh="$ac_aux_dir/shtool install -c"
3464    break
3465  fi
3466done
3467if test -z "$ac_aux_dir"; then
3468  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
3469fi
3470
3471# These three variables are undocumented and unsupported,
3472# and are intended to be withdrawn in a future Autoconf release.
3473# They can cause serious problems if a builder's source tree is in a directory
3474# whose full name contains unusual characters.
3475ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3476ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3477ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3478
3479
3480# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3481
3482#
3483# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3485#
3486# This code is free software; you can redistribute it and/or modify it
3487# under the terms of the GNU General Public License version 2 only, as
3488# published by the Free Software Foundation.  Oracle designates this
3489# particular file as subject to the "Classpath" exception as provided
3490# by Oracle in the LICENSE file that accompanied this code.
3491#
3492# This code is distributed in the hope that it will be useful, but WITHOUT
3493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3495# version 2 for more details (a copy is included in the LICENSE file that
3496# accompanied this code).
3497#
3498# You should have received a copy of the GNU General Public License version
3499# 2 along with this work; if not, write to the Free Software Foundation,
3500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3501#
3502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3503# or visit www.oracle.com if you need additional information or have any
3504# questions.
3505#
3506
3507#
3508# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3509#
3510# This program is free software; you can redistribute it and/or modify
3511# it under the terms of the GNU General Public License as published by
3512# the Free Software Foundation; either version 2 of the License, or
3513# (at your option) any later version.
3514#
3515# This program is distributed in the hope that it will be useful, but
3516# WITHOUT ANY WARRANTY; without even the implied warranty of
3517# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3518# General Public License for more details.
3519#
3520# You should have received a copy of the GNU General Public License
3521# along with this program; if not, write to the Free Software
3522# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3523#
3524# As a special exception to the GNU General Public License, if you
3525# distribute this file as part of a program that contains a
3526# configuration script generated by Autoconf, you may include it under
3527# the same distribution terms that you use for the rest of that program.
3528
3529# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3530# ----------------------------------
3531# PKG_PROG_PKG_CONFIG
3532
3533# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3534#
3535# Check to see whether a particular set of modules exists.  Similar
3536# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3537#
3538#
3539# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3540# this or PKG_CHECK_MODULES is called, or make sure to call
3541# PKG_CHECK_EXISTS manually
3542# --------------------------------------------------------------
3543
3544
3545
3546# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3547# ---------------------------------------------
3548# _PKG_CONFIG
3549
3550# _PKG_SHORT_ERRORS_SUPPORTED
3551# -----------------------------
3552# _PKG_SHORT_ERRORS_SUPPORTED
3553
3554
3555# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3556# [ACTION-IF-NOT-FOUND])
3557#
3558#
3559# Note that if there is a possibility the first call to
3560# PKG_CHECK_MODULES might not happen, you should be sure to include an
3561# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3562#
3563#
3564# --------------------------------------------------------------
3565# PKG_CHECK_MODULES
3566
3567
3568# Include these first...
3569#
3570# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3571# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3572#
3573# This code is free software; you can redistribute it and/or modify it
3574# under the terms of the GNU General Public License version 2 only, as
3575# published by the Free Software Foundation.  Oracle designates this
3576# particular file as subject to the "Classpath" exception as provided
3577# by Oracle in the LICENSE file that accompanied this code.
3578#
3579# This code is distributed in the hope that it will be useful, but WITHOUT
3580# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3581# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3582# version 2 for more details (a copy is included in the LICENSE file that
3583# accompanied this code).
3584#
3585# You should have received a copy of the GNU General Public License version
3586# 2 along with this work; if not, write to the Free Software Foundation,
3587# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3588#
3589# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3590# or visit www.oracle.com if you need additional information or have any
3591# questions.
3592#
3593
3594# Create a function/macro that takes a series of named arguments. The call is
3595# similar to AC_DEFUN, but the setup of the function looks like this:
3596# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3597# ... do something
3598#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3599# ])
3600# A star (*) in front of a named argument means that it is required and it's
3601# presence will be verified. To pass e.g. the first value as a normal indexed
3602# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3603# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3604# "ARG_FOO".
3605#
3606# The generated function can be called like this:
3607# MYFUNC(FOO: [foo-val],
3608#     BAR: [
3609#         $ECHO hello world
3610#     ])
3611# Note that the argument value must start on the same line as the argument name.
3612#
3613# Argument 1: Name of the function to define
3614# Argument 2: List of legal named arguments, with a * prefix for required arguments
3615# Argument 3: Argument array to treat as named, typically $@
3616# Argument 4: The main function body
3617
3618
3619# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3620# If so, then append $1 to $2 \
3621# Also set JVM_ARG_OK to true/false depending on outcome.
3622
3623
3624# Appends a string to a path variable, only adding the : when needed.
3625
3626
3627# Prepends a string to a path variable, only adding the : when needed.
3628
3629
3630# This will make sure the given variable points to a full and proper
3631# 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# $1: The name of the variable to fix
3638
3639
3640# This will make sure the given variable points to a executable
3641# with a full and proper path. This means:
3642# 1) There will be no spaces in the path. On unix platforms,
3643#    spaces in the path will result in an error. On Windows,
3644#    the path will be rewritten using short-style to be space-free.
3645# 2) The path will be absolute, and it will be in unix-style (on
3646#     cygwin).
3647# Any arguments given to the executable is preserved.
3648# If the input variable does not have a directory specification, then
3649# it need to be in the PATH.
3650# $1: The name of the variable to fix
3651
3652
3653
3654
3655# Register a --with argument but mark it as deprecated
3656# $1: The name of the with argument to deprecate, not including --with-
3657
3658
3659# Register a --enable argument but mark it as deprecated
3660# $1: The name of the with argument to deprecate, not including --enable-
3661# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3662# $3: Messages to user.
3663
3664
3665
3666
3667# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3668# $1: variable to check
3669
3670
3671# Check that there are no unprocessed overridden variables left.
3672# If so, they are an incorrect argument and we will exit with an error.
3673
3674
3675# Setup a tool for the given variable. If correctly specified by the user,
3676# use that value, otherwise search for the tool using the supplied code snippet.
3677# $1: variable to set
3678# $2: code snippet to call to look for the tool
3679# $3: code snippet to call if variable was used to find tool
3680
3681
3682# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3683# $1: variable to set
3684# $2: executable name (or list of names) to look for
3685# $3: [path]
3686
3687
3688# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3689# $1: variable to set
3690# $2: executable name (or list of names) to look for
3691
3692
3693# Like BASIC_PATH_PROGS but fails if no tool was found.
3694# $1: variable to set
3695# $2: executable name (or list of names) to look for
3696# $3: [path]
3697
3698
3699# Like BASIC_SETUP_TOOL but fails if no tool was found.
3700# $1: variable to set
3701# $2: autoconf macro to call to look for the special tool
3702
3703
3704# Setup the most fundamental tools that relies on not much else to set up,
3705# but is used by much of the early bootstrap code.
3706
3707
3708# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3709
3710
3711# Evaluates platform specific overrides for devkit variables.
3712# $1: Name of variable
3713
3714
3715
3716
3717
3718
3719#%%% Simple tools %%%
3720
3721# Check if we have found a usable version of make
3722# $1: the path to a potential make binary (or empty)
3723# $2: the description on how we found this
3724
3725
3726
3727
3728# Goes looking for a usable version of GNU make.
3729
3730
3731
3732
3733
3734
3735
3736
3737# Check if build directory is on local disk. If not possible to determine,
3738# we prefer to claim it's local.
3739# Argument 1: directory to test
3740# Argument 2: what to do if it is on local disk
3741# Argument 3: what to do otherwise (remote disk or failure)
3742
3743
3744# Check that source files have basic read permissions set. This might
3745# not be the case in cygwin in certain conditions.
3746
3747
3748
3749
3750# Check for support for specific options in bash
3751
3752
3753################################################################################
3754#
3755# Default make target
3756#
3757
3758
3759# Code to run after AC_OUTPUT
3760
3761
3762#
3763# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787
3788
3789
3790
3791# Helper function which possibly converts a path using DOS-style short mode.
3792# If so, the updated path is stored in $new_path.
3793# $1: The path to check
3794
3795
3796# Helper function which possibly converts a path using DOS-style short mode.
3797# If so, the updated path is stored in $new_path.
3798# $1: The path to check
3799
3800
3801# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3802# and could probably be heavily simplified. However, all changes in this
3803# area tend to need lot of testing in different scenarios, and in lack of
3804# proper unit testing, cleaning this up has not been deemed worth the effort
3805# at the moment.
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3816
3817
3818
3819
3820# ... then the rest
3821#
3822# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824#
3825# This code is free software; you can redistribute it and/or modify it
3826# under the terms of the GNU General Public License version 2 only, as
3827# published by the Free Software Foundation.  Oracle designates this
3828# particular file as subject to the "Classpath" exception as provided
3829# by Oracle in the LICENSE file that accompanied this code.
3830#
3831# This code is distributed in the hope that it will be useful, but WITHOUT
3832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834# version 2 for more details (a copy is included in the LICENSE file that
3835# accompanied this code).
3836#
3837# You should have received a copy of the GNU General Public License version
3838# 2 along with this work; if not, write to the Free Software Foundation,
3839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840#
3841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842# or visit www.oracle.com if you need additional information or have any
3843# questions.
3844#
3845
3846########################################################################
3847# This file handles detection of the Boot JDK. The Boot JDK detection
3848# process has been developed as a response to solve a complex real-world
3849# problem. Initially, it was simple, but it has grown as platform after
3850# platform, idiosyncracy after idiosyncracy has been supported.
3851#
3852# The basic idea is this:
3853# 1) You need an acceptable *) JDK to use as a Boot JDK
3854# 2) There are several ways to locate a JDK, that are mostly platform
3855#    dependent **)
3856# 3) You can have multiple JDKs installed
3857# 4) If possible, configure should try to dig out an acceptable JDK
3858#    automatically, without having to resort to command-line options
3859#
3860# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3861#     javac) and not a JRE, etc.
3862#
3863# **) On Windows we typically use a well-known path.
3864#     On MacOSX we typically use the tool java_home.
3865#     On Linux we typically find javac in the $PATH, and then follow a
3866#     chain of symlinks that often ends up in a real JDK.
3867#
3868# This leads to the code where we check in different ways to locate a
3869# JDK, and if one is found, check if it is acceptable. If not, we print
3870# our reasons for rejecting it (useful when debugging non-working
3871# configure situations) and continue checking the next one.
3872########################################################################
3873
3874# Execute the check given as argument, and verify the result
3875# If the Boot JDK was previously found, do nothing
3876# $1 A command line (typically autoconf macro) to execute
3877
3878
3879# Test: Is bootjdk explicitly set by command line arguments?
3880
3881
3882# Test: Is $JAVA_HOME set?
3883
3884
3885# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3886
3887
3888# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3889# $1: Argument to the java_home binary (optional)
3890
3891
3892# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3893
3894
3895# Look for a jdk in the given path. If there are multiple, try to select the newest.
3896# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3897# $1 = Path to directory containing jdk installations.
3898# $2 = String to append to the found JDK directory to get the proper JDK home
3899
3900
3901# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3902# environmental variable as base for where to look.
3903# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3904
3905
3906# Test: Is there a JDK installed in default, well-known locations?
3907
3908
3909# Check that a command-line tool in the Boot JDK is correct
3910# $1 = name of variable to assign
3911# $2 = name of binary
3912
3913
3914###############################################################################
3915#
3916# We need a Boot JDK to bootstrap the build.
3917#
3918
3919
3920
3921
3922
3923# BUILD_JDK: the location of the latest JDK that can run
3924#   on the host system and supports the target class file version
3925#   generated in this JDK build.  This variable should only be
3926#   used after the launchers are built.
3927#
3928
3929# Execute the check given as argument, and verify the result.
3930# If the JDK was previously found, do nothing.
3931# $1 A command line (typically autoconf macro) to execute
3932
3933
3934# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3935# is different than the host system doing the build (e.g. cross-compilation),
3936# a special BUILD_JDK is built as part of the build process.  An external
3937# prebuilt BUILD_JDK can also be supplied.
3938
3939
3940#
3941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3943#
3944# This code is free software; you can redistribute it and/or modify it
3945# under the terms of the GNU General Public License version 2 only, as
3946# published by the Free Software Foundation.  Oracle designates this
3947# particular file as subject to the "Classpath" exception as provided
3948# by Oracle in the LICENSE file that accompanied this code.
3949#
3950# This code is distributed in the hope that it will be useful, but WITHOUT
3951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3953# version 2 for more details (a copy is included in the LICENSE file that
3954# accompanied this code).
3955#
3956# You should have received a copy of the GNU General Public License version
3957# 2 along with this work; if not, write to the Free Software Foundation,
3958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3959#
3960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3961# or visit www.oracle.com if you need additional information or have any
3962# questions.
3963#
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981################################################################################
3982#
3983# Runs icecc-create-env once and prints the error if it fails
3984#
3985# $1: arguments to icecc-create-env
3986# $2: log file
3987#
3988
3989
3990################################################################################
3991#
3992# Optionally enable distributed compilation of native code using icecc/icecream
3993#
3994
3995
3996
3997
3998
3999
4000
4001#
4002# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4004#
4005# This code is free software; you can redistribute it and/or modify it
4006# under the terms of the GNU General Public License version 2 only, as
4007# published by the Free Software Foundation.  Oracle designates this
4008# particular file as subject to the "Classpath" exception as provided
4009# by Oracle in the LICENSE file that accompanied this code.
4010#
4011# This code is distributed in the hope that it will be useful, but WITHOUT
4012# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4013# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4014# version 2 for more details (a copy is included in the LICENSE file that
4015# accompanied this code).
4016#
4017# You should have received a copy of the GNU General Public License version
4018# 2 along with this work; if not, write to the Free Software Foundation,
4019# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4020#
4021# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4022# or visit www.oracle.com if you need additional information or have any
4023# questions.
4024#
4025
4026################################################################################
4027#
4028# Setup ABI profile (for arm)
4029#
4030
4031
4032# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4033# corresponding configure arguments instead
4034
4035
4036# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4037# that configure can use them while detecting compilers.
4038# TOOLCHAIN_TYPE is available here.
4039# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4040
4041
4042
4043
4044
4045
4046# Documentation on common flags used for solstudio in HIGHEST.
4047#
4048# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4049#          done with care, there are some assumptions below that need to
4050#          be understood about the use of pointers, and IEEE behavior.
4051#
4052# -fns: Use non-standard floating point mode (not IEEE 754)
4053# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4054# -fsingle: Use single precision floating point with 'float'
4055# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4056#   (Source with excessing pointer casting and data access with mixed
4057#    pointer types are not recommended)
4058# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4059#   (If you expect perfect errno behavior, do not use this)
4060# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4061# -xrestrict: Pointer parameters to functions do not overlap
4062#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4063#    If you pass in multiple pointers to the same data, do not use this)
4064# -xlibmil: Inline some library routines
4065#   (If you expect perfect errno behavior, do not use this)
4066# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4067#   (If you expect perfect errno behavior, do not use this)
4068#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4069
4070    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4071    # Bug?
4072    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4073    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4074    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4075    #fi
4076
4077
4078
4079
4080
4081
4082################################################################################
4083# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4084#      conditionals against.
4085# $2 - Optional prefix for each variable defined.
4086
4087
4088# FLAGS_C_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_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                    IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C++ compiler supports an argument
4100
4101
4102
4103
4104# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the C and C++ compilers support an argument
4108
4109
4110
4111
4112# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4113#                                   IF_FALSE: [RUN-IF-FALSE])
4114# ------------------------------------------------------------
4115# Check that the linker support an argument
4116
4117
4118
4119
4120
4121
4122# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4123# Arguments:
4124# $1 - Optional prefix for each variable defined.
4125
4126
4127#
4128# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4129# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4130#
4131# This code is free software; you can redistribute it and/or modify it
4132# under the terms of the GNU General Public License version 2 only, as
4133# published by the Free Software Foundation.  Oracle designates this
4134# particular file as subject to the "Classpath" exception as provided
4135# by Oracle in the LICENSE file that accompanied this code.
4136#
4137# This code is distributed in the hope that it will be useful, but WITHOUT
4138# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4139# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4140# version 2 for more details (a copy is included in the LICENSE file that
4141# accompanied this code).
4142#
4143# You should have received a copy of the GNU General Public License version
4144# 2 along with this work; if not, write to the Free Software Foundation,
4145# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4146#
4147# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4148# or visit www.oracle.com if you need additional information or have any
4149# questions.
4150#
4151
4152
4153
4154
4155
4156cygwin_help() {
4157  case $1 in
4158    unzip)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    zip)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    make)
4167      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169      ;;
4170    freetype)
4171      HELP_MSG="
4172The freetype library can now be build during the configure process.
4173Download the freetype sources and unpack them into an arbitrary directory:
4174
4175wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4176tar -xzf freetype-2.5.3.tar.gz
4177
4178Then run configure with '--with-freetype-src=<freetype_src>'. This will
4179automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4180builds or into '<freetype_src>/lib32' for 32-bit builds.
4181Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4182and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4183
4184Alternatively you can unpack the sources like this to use the default directory:
4185
4186tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4187      ;;
4188  esac
4189}
4190
4191msys_help() {
4192  PKGHANDLER_COMMAND=""
4193}
4194
4195apt_help() {
4196  case $1 in
4197    reduced)
4198      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4199    devkit)
4200      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4201    openjdk)
4202      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4203    alsa)
4204      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4205    cups)
4206      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4207    freetype)
4208      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4209    ffi)
4210      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4211    x11)
4212      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4213    ccache)
4214      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4215    dtrace)
4216      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4217    elf)
4218      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4219  esac
4220}
4221
4222yum_help() {
4223  case $1 in
4224    devkit)
4225      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4226    openjdk)
4227      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4228    alsa)
4229      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4230    cups)
4231      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4232    freetype)
4233      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4234    x11)
4235      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4236    ccache)
4237      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4238    elf)
4239      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4240  esac
4241}
4242
4243port_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247pkgutil_help() {
4248  PKGHANDLER_COMMAND=""
4249}
4250
4251pkgadd_help() {
4252  PKGHANDLER_COMMAND=""
4253}
4254
4255# This function will check if we're called from the "configure" wrapper while
4256# printing --help. If so, we will print out additional information that can
4257# only be extracted within the autoconf script, and then exit. This must be
4258# called at the very beginning in configure.ac.
4259
4260
4261
4262
4263
4264
4265#
4266# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268#
4269# This code is free software; you can redistribute it and/or modify it
4270# under the terms of the GNU General Public License version 2 only, as
4271# published by the Free Software Foundation.  Oracle designates this
4272# particular file as subject to the "Classpath" exception as provided
4273# by Oracle in the LICENSE file that accompanied this code.
4274#
4275# This code is distributed in the hope that it will be useful, but WITHOUT
4276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278# version 2 for more details (a copy is included in the LICENSE file that
4279# accompanied this code).
4280#
4281# You should have received a copy of the GNU General Public License version
4282# 2 along with this work; if not, write to the Free Software Foundation,
4283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284#
4285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286# or visit www.oracle.com if you need additional information or have any
4287# questions.
4288#
4289
4290# All valid JVM features, regardless of platform
4291VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4292    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4293    static-build link-time-opt aot"
4294
4295# All valid JVM variants
4296VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4297
4298###############################################################################
4299# Check if the specified JVM variant should be built. To be used in shell if
4300# constructs, like this:
4301# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4302#
4303# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4304
4305# Definition kept in one line to allow inlining in if statements.
4306# Additional [] needed to keep m4 from mangling shell constructs.
4307
4308
4309###############################################################################
4310# Check if the specified JVM features are explicitly enabled. To be used in
4311# shell if constructs, like this:
4312# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check which variants of the JVM that we want to build. Available variants are:
4322#   server: normal interpreter, and a tiered C1/C2 compiler
4323#   client: normal interpreter, and C1 (no C2 compiler)
4324#   minimal: reduced form of client with optional features stripped out
4325#   core: normal interpreter only, no compiler
4326#   zero: C++ based interpreter only, no compiler
4327#   zeroshark: C++ based interpreter, and a llvm-based compiler
4328#   custom: baseline JVM with no default features
4329#
4330
4331
4332###############################################################################
4333# Check if dtrace should be enabled and has all prerequisites present.
4334#
4335
4336
4337################################################################################
4338# Check if AOT should be enabled
4339#
4340
4341
4342###############################################################################
4343# Set up all JVM features for each JVM variant.
4344#
4345
4346
4347###############################################################################
4348# Validate JVM features once all setup is complete, including custom setup.
4349#
4350
4351
4352################################################################################
4353#
4354# Specify which sources will be used to build the 64-bit ARM port
4355#
4356# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4357# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4358#
4359
4360
4361
4362################################################################################
4363# Check if gtest should be built
4364#
4365
4366
4367#
4368# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4369# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4370#
4371# This code is free software; you can redistribute it and/or modify it
4372# under the terms of the GNU General Public License version 2 only, as
4373# published by the Free Software Foundation.  Oracle designates this
4374# particular file as subject to the "Classpath" exception as provided
4375# by Oracle in the LICENSE file that accompanied this code.
4376#
4377# This code is distributed in the hope that it will be useful, but WITHOUT
4378# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4379# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4380# version 2 for more details (a copy is included in the LICENSE file that
4381# accompanied this code).
4382#
4383# You should have received a copy of the GNU General Public License version
4384# 2 along with this work; if not, write to the Free Software Foundation,
4385# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4386#
4387# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4388# or visit www.oracle.com if you need additional information or have any
4389# questions.
4390#
4391
4392###############################################################################
4393# Check which variant of the JDK that we want to build.
4394# Currently we have:
4395#    normal:   standard edition
4396# but the custom make system may add other variants
4397#
4398# Effectively the JDK variant gives a name to a specific set of
4399# modules to compile into the JDK.
4400
4401
4402###############################################################################
4403# Set the debug level
4404#    release: no debug information, all optimizations, no asserts.
4405#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4406#    fastdebug: debug information (-g), all optimizations, all asserts
4407#    slowdebug: debug information (-g), no optimizations, all asserts
4408
4409
4410###############################################################################
4411#
4412# Should we build only OpenJDK even if closed sources are present?
4413#
4414
4415
4416
4417
4418###############################################################################
4419#
4420# Enable or disable the elliptic curve crypto implementation
4421#
4422
4423
4424
4425
4426################################################################################
4427#
4428# Gcov coverage data for hotspot
4429#
4430
4431
4432################################################################################
4433#
4434# Static build support.  When enabled will generate static
4435# libraries instead of shared libraries for all JDK libs.
4436#
4437
4438
4439################################################################################
4440#
4441# jlink options.
4442# We always keep packaged modules in JDK image.
4443#
4444
4445
4446################################################################################
4447#
4448# Check if building of the jtreg failure handler should be enabled.
4449#
4450
4451
4452################################################################################
4453#
4454# Enable or disable generation of the classlist at build time
4455#
4456
4457
4458#
4459# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4461#
4462# This code is free software; you can redistribute it and/or modify it
4463# under the terms of the GNU General Public License version 2 only, as
4464# published by the Free Software Foundation.  Oracle designates this
4465# particular file as subject to the "Classpath" exception as provided
4466# by Oracle in the LICENSE file that accompanied this code.
4467#
4468# This code is distributed in the hope that it will be useful, but WITHOUT
4469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4471# version 2 for more details (a copy is included in the LICENSE file that
4472# accompanied this code).
4473#
4474# You should have received a copy of the GNU General Public License version
4475# 2 along with this work; if not, write to the Free Software Foundation,
4476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4477#
4478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4479# or visit www.oracle.com if you need additional information or have any
4480# questions.
4481#
4482
4483###############################################################################
4484#
4485# Setup version numbers
4486#
4487
4488# Verify that a given string represents a valid version number, and assign it
4489# to a variable.
4490
4491# Argument 1: the variable to assign to
4492# Argument 2: the value given by the user
4493
4494
4495
4496
4497#
4498# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4500#
4501# This code is free software; you can redistribute it and/or modify it
4502# under the terms of the GNU General Public License version 2 only, as
4503# published by the Free Software Foundation.  Oracle designates this
4504# particular file as subject to the "Classpath" exception as provided
4505# by Oracle in the LICENSE file that accompanied this code.
4506#
4507# This code is distributed in the hope that it will be useful, but WITHOUT
4508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4510# version 2 for more details (a copy is included in the LICENSE file that
4511# accompanied this code).
4512#
4513# You should have received a copy of the GNU General Public License version
4514# 2 along with this work; if not, write to the Free Software Foundation,
4515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4516#
4517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4518# or visit www.oracle.com if you need additional information or have any
4519# questions.
4520#
4521
4522# Major library component reside in separate files.
4523#
4524# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4525# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4526#
4527# This code is free software; you can redistribute it and/or modify it
4528# under the terms of the GNU General Public License version 2 only, as
4529# published by the Free Software Foundation.  Oracle designates this
4530# particular file as subject to the "Classpath" exception as provided
4531# by Oracle in the LICENSE file that accompanied this code.
4532#
4533# This code is distributed in the hope that it will be useful, but WITHOUT
4534# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4535# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4536# version 2 for more details (a copy is included in the LICENSE file that
4537# accompanied this code).
4538#
4539# You should have received a copy of the GNU General Public License version
4540# 2 along with this work; if not, write to the Free Software Foundation,
4541# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4542#
4543# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4544# or visit www.oracle.com if you need additional information or have any
4545# questions.
4546#
4547
4548################################################################################
4549# Setup alsa (Advanced Linux Sound Architecture)
4550################################################################################
4551
4552
4553#
4554# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4555# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4556#
4557# This code is free software; you can redistribute it and/or modify it
4558# under the terms of the GNU General Public License version 2 only, as
4559# published by the Free Software Foundation.  Oracle designates this
4560# particular file as subject to the "Classpath" exception as provided
4561# by Oracle in the LICENSE file that accompanied this code.
4562#
4563# This code is distributed in the hope that it will be useful, but WITHOUT
4564# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4565# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4566# version 2 for more details (a copy is included in the LICENSE file that
4567# accompanied this code).
4568#
4569# You should have received a copy of the GNU General Public License version
4570# 2 along with this work; if not, write to the Free Software Foundation,
4571# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4572#
4573# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4574# or visit www.oracle.com if you need additional information or have any
4575# questions.
4576#
4577
4578################################################################################
4579# Setup bundled libraries.
4580#
4581# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4582# OpenJDK repository. Default is to use these libraries as bundled, but they
4583# might be replaced by en external version by the user.
4584################################################################################
4585
4586
4587################################################################################
4588# Setup libjpeg
4589################################################################################
4590
4591
4592################################################################################
4593# Setup giflib
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libpng
4599################################################################################
4600
4601
4602################################################################################
4603# Setup zlib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup lcms (Little CMS)
4609################################################################################
4610
4611
4612#
4613# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4614# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4615#
4616# This code is free software; you can redistribute it and/or modify it
4617# under the terms of the GNU General Public License version 2 only, as
4618# published by the Free Software Foundation.  Oracle designates this
4619# particular file as subject to the "Classpath" exception as provided
4620# by Oracle in the LICENSE file that accompanied this code.
4621#
4622# This code is distributed in the hope that it will be useful, but WITHOUT
4623# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4624# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4625# version 2 for more details (a copy is included in the LICENSE file that
4626# accompanied this code).
4627#
4628# You should have received a copy of the GNU General Public License version
4629# 2 along with this work; if not, write to the Free Software Foundation,
4630# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4631#
4632# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4633# or visit www.oracle.com if you need additional information or have any
4634# questions.
4635#
4636
4637################################################################################
4638# Setup cups (Common Unix Printing System)
4639################################################################################
4640
4641
4642#
4643# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4645#
4646# This code is free software; you can redistribute it and/or modify it
4647# under the terms of the GNU General Public License version 2 only, as
4648# published by the Free Software Foundation.  Oracle designates this
4649# particular file as subject to the "Classpath" exception as provided
4650# by Oracle in the LICENSE file that accompanied this code.
4651#
4652# This code is distributed in the hope that it will be useful, but WITHOUT
4653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4655# version 2 for more details (a copy is included in the LICENSE file that
4656# accompanied this code).
4657#
4658# You should have received a copy of the GNU General Public License version
4659# 2 along with this work; if not, write to the Free Software Foundation,
4660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4661#
4662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4663# or visit www.oracle.com if you need additional information or have any
4664# questions.
4665#
4666
4667################################################################################
4668# Setup libffi (Foreign Function Interface)
4669################################################################################
4670
4671
4672#
4673# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4674# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4675#
4676# This code is free software; you can redistribute it and/or modify it
4677# under the terms of the GNU General Public License version 2 only, as
4678# published by the Free Software Foundation.  Oracle designates this
4679# particular file as subject to the "Classpath" exception as provided
4680# by Oracle in the LICENSE file that accompanied this code.
4681#
4682# This code is distributed in the hope that it will be useful, but WITHOUT
4683# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4684# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4685# version 2 for more details (a copy is included in the LICENSE file that
4686# accompanied this code).
4687#
4688# You should have received a copy of the GNU General Public License version
4689# 2 along with this work; if not, write to the Free Software Foundation,
4690# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4691#
4692# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4693# or visit www.oracle.com if you need additional information or have any
4694# questions.
4695#
4696
4697################################################################################
4698# Build the freetype lib from source
4699################################################################################
4700
4701
4702################################################################################
4703# Check if a potential freeype library match is correct and usable
4704################################################################################
4705
4706
4707################################################################################
4708# Setup freetype (The FreeType2 font rendering library)
4709################################################################################
4710
4711
4712#
4713# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4714# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4715#
4716# This code is free software; you can redistribute it and/or modify it
4717# under the terms of the GNU General Public License version 2 only, as
4718# published by the Free Software Foundation.  Oracle designates this
4719# particular file as subject to the "Classpath" exception as provided
4720# by Oracle in the LICENSE file that accompanied this code.
4721#
4722# This code is distributed in the hope that it will be useful, but WITHOUT
4723# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4724# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4725# version 2 for more details (a copy is included in the LICENSE file that
4726# accompanied this code).
4727#
4728# You should have received a copy of the GNU General Public License version
4729# 2 along with this work; if not, write to the Free Software Foundation,
4730# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4731#
4732# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4733# or visit www.oracle.com if you need additional information or have any
4734# questions.
4735#
4736
4737################################################################################
4738# Setup the standard C/C++ runtime libraries.
4739#
4740# Most importantly, determine if stdc++ should be linked statically or
4741# dynamically.
4742################################################################################
4743
4744
4745#
4746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770################################################################################
4771# Setup X11 Windows system
4772################################################################################
4773
4774
4775#
4776# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4778#
4779# This code is free software; you can redistribute it and/or modify it
4780# under the terms of the GNU General Public License version 2 only, as
4781# published by the Free Software Foundation.  Oracle designates this
4782# particular file as subject to the "Classpath" exception as provided
4783# by Oracle in the LICENSE file that accompanied this code.
4784#
4785# This code is distributed in the hope that it will be useful, but WITHOUT
4786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4788# version 2 for more details (a copy is included in the LICENSE file that
4789# accompanied this code).
4790#
4791# You should have received a copy of the GNU General Public License version
4792# 2 along with this work; if not, write to the Free Software Foundation,
4793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4794#
4795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4796# or visit www.oracle.com if you need additional information or have any
4797# questions.
4798#
4799
4800################################################################################
4801# Setup libelf (ELF library)
4802################################################################################
4803
4804
4805
4806################################################################################
4807# Determine which libraries are needed for this configuration
4808################################################################################
4809
4810
4811################################################################################
4812# Parse library options, and setup needed libraries
4813################################################################################
4814
4815
4816################################################################################
4817# Setup llvm (Low-Level VM)
4818################################################################################
4819
4820
4821################################################################################
4822# Setup various libraries, typically small system libraries
4823################################################################################
4824
4825
4826################################################################################
4827# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4828# redistribute it in the test image.
4829################################################################################
4830
4831
4832
4833#
4834# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4835# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4836#
4837# This code is free software; you can redistribute it and/or modify it
4838# under the terms of the GNU General Public License version 2 only, as
4839# published by the Free Software Foundation.  Oracle designates this
4840# particular file as subject to the "Classpath" exception as provided
4841# by Oracle in the LICENSE file that accompanied this code.
4842#
4843# This code is distributed in the hope that it will be useful, but WITHOUT
4844# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4845# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4846# version 2 for more details (a copy is included in the LICENSE file that
4847# accompanied this code).
4848#
4849# You should have received a copy of the GNU General Public License version
4850# 2 along with this work; if not, write to the Free Software Foundation,
4851# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4852#
4853# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4854# or visit www.oracle.com if you need additional information or have any
4855# questions.
4856#
4857
4858# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4859# Converts autoconf style CPU name to OpenJDK style, into
4860# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4861
4862
4863# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4864# Converts autoconf style OS name to OpenJDK style, into
4865# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4866
4867
4868# Expects $host_os $host_cpu $build_os and $build_cpu
4869# and $with_target_bits to have been setup!
4870#
4871# Translate the standard triplet(quadruplet) definition
4872# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4873# OPENJDK_BUILD_OS, etc.
4874
4875
4876# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4877# accordingly. Must be done after setting up build and target system, but before
4878# doing anything else with these values.
4879
4880
4881# Setup the legacy variables, for controlling the old makefiles.
4882#
4883
4884
4885# $1 - Either TARGET or BUILD to setup the variables for.
4886
4887
4888
4889
4890#%%% Build and target systems %%%
4891
4892
4893
4894
4895# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4896# Add -mX to various FLAGS variables.
4897
4898
4899
4900
4901
4902
4903#
4904# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4905# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4906#
4907# This code is free software; you can redistribute it and/or modify it
4908# under the terms of the GNU General Public License version 2 only, as
4909# published by the Free Software Foundation.  Oracle designates this
4910# particular file as subject to the "Classpath" exception as provided
4911# by Oracle in the LICENSE file that accompanied this code.
4912#
4913# This code is distributed in the hope that it will be useful, but WITHOUT
4914# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4915# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4916# version 2 for more details (a copy is included in the LICENSE file that
4917# accompanied this code).
4918#
4919# You should have received a copy of the GNU General Public License version
4920# 2 along with this work; if not, write to the Free Software Foundation,
4921# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4922#
4923# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4924# or visit www.oracle.com if you need additional information or have any
4925# questions.
4926#
4927
4928
4929
4930
4931
4932
4933
4934################################################################################
4935# Define a mechanism for importing extra prebuilt modules
4936#
4937
4938
4939
4940#
4941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4943#
4944# This code is free software; you can redistribute it and/or modify it
4945# under the terms of the GNU General Public License version 2 only, as
4946# published by the Free Software Foundation.  Oracle designates this
4947# particular file as subject to the "Classpath" exception as provided
4948# by Oracle in the LICENSE file that accompanied this code.
4949#
4950# This code is distributed in the hope that it will be useful, but WITHOUT
4951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4953# version 2 for more details (a copy is included in the LICENSE file that
4954# accompanied this code).
4955#
4956# You should have received a copy of the GNU General Public License version
4957# 2 along with this work; if not, write to the Free Software Foundation,
4958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4959#
4960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4961# or visit www.oracle.com if you need additional information or have any
4962# questions.
4963#
4964
4965########################################################################
4966# This file is responsible for detecting, verifying and setting up the
4967# toolchain, i.e. the compiler, linker and related utilities. It will setup
4968# proper paths to the binaries, but it will not setup any flags.
4969#
4970# The binaries used is determined by the toolchain type, which is the family of
4971# compilers and related tools that are used.
4972########################################################################
4973
4974
4975# All valid toolchains, regardless of platform (used by help.m4)
4976VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4977
4978# These toolchains are valid on different platforms
4979VALID_TOOLCHAINS_linux="gcc clang"
4980VALID_TOOLCHAINS_solaris="solstudio"
4981VALID_TOOLCHAINS_macosx="gcc clang"
4982VALID_TOOLCHAINS_aix="xlc"
4983VALID_TOOLCHAINS_windows="microsoft"
4984
4985# Toolchain descriptions
4986TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4987TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4988TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4989TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4990TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4991
4992# Minimum supported versions, empty means unspecified
4993TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4994TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4995TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4996TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4997TOOLCHAIN_MINIMUM_VERSION_xlc=""
4998
4999# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5000# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5001# $1 - optional variable prefix for compiler and version variables (BUILD_)
5002# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5003
5004
5005# Check if the configured compiler (C and C++) is of a specific version or
5006# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5007#
5008# Arguments:
5009#   VERSION:   The version string to check against the found version
5010#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5011#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5012#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5013
5014
5015
5016
5017# Setup a number of variables describing how native output files are
5018# named on this platform/toolchain.
5019
5020
5021# Determine which toolchain type to use, and make sure it is valid for this
5022# platform. Setup various information about the selected toolchain.
5023
5024
5025# Before we start detecting the toolchain executables, we might need some
5026# special setup, e.g. additional paths etc.
5027
5028
5029# Restore path, etc
5030
5031
5032# Check if a compiler is of the toolchain type we expect, and save the version
5033# information from it. If the compiler does not match the expected type,
5034# this function will abort using AC_MSG_ERROR. If it matches, the version will
5035# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5036# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5037#
5038# $1 = compiler to test (CC or CXX)
5039# $2 = human readable name of compiler (C or C++)
5040
5041
5042# Try to locate the given C or C++ compiler in the path, or otherwise.
5043#
5044# $1 = compiler to test (CC or CXX)
5045# $2 = human readable name of compiler (C or C++)
5046# $3 = list of compiler names to search for
5047
5048
5049# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5050# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5051# archiver (AR). Verify that the compilers are correct according to the
5052# toolchain type.
5053
5054
5055# Setup additional tools that is considered a part of the toolchain, but not the
5056# core part. Many of these are highly platform-specific and do not exist,
5057# and/or are not needed on all platforms.
5058
5059
5060# Setup the build tools (i.e, the compiler and linker used to build programs
5061# that should be run on the build platform, not the target platform, as a build
5062# helper). Since the non-cross-compile case uses the normal, target compilers
5063# for this, we can only do this after these have been setup.
5064
5065
5066# Do some additional checks on the detected tools.
5067
5068
5069# Setup the JTReg Regression Test Harness.
5070
5071
5072#
5073# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5074# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5075#
5076# This code is free software; you can redistribute it and/or modify it
5077# under the terms of the GNU General Public License version 2 only, as
5078# published by the Free Software Foundation.  Oracle designates this
5079# particular file as subject to the "Classpath" exception as provided
5080# by Oracle in the LICENSE file that accompanied this code.
5081#
5082# This code is distributed in the hope that it will be useful, but WITHOUT
5083# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5084# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5085# version 2 for more details (a copy is included in the LICENSE file that
5086# accompanied this code).
5087#
5088# You should have received a copy of the GNU General Public License version
5089# 2 along with this work; if not, write to the Free Software Foundation,
5090# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5091#
5092# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5093# or visit www.oracle.com if you need additional information or have any
5094# questions.
5095#
5096
5097################################################################################
5098# The order of these defines the priority by which we try to find them.
5099VALID_VS_VERSIONS="2013 2012 2010"
5100
5101VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5102VS_VERSION_INTERNAL_2010=100
5103VS_MSVCR_2010=msvcr100.dll
5104# We don't use msvcp on Visual Studio 2010
5105#VS_MSVCP_2010=msvcp100.dll
5106VS_ENVVAR_2010="VS100COMNTOOLS"
5107VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5108VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5109VS_VS_PLATFORM_NAME_2010="v100"
5110VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5111
5112VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5113VS_VERSION_INTERNAL_2012=110
5114VS_MSVCR_2012=msvcr110.dll
5115VS_MSVCP_2012=msvcp110.dll
5116VS_ENVVAR_2012="VS110COMNTOOLS"
5117VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5118VS_SDK_INSTALLDIR_2012=
5119VS_VS_PLATFORM_NAME_2012="v110"
5120VS_SDK_PLATFORM_NAME_2012=
5121
5122VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5123VS_VERSION_INTERNAL_2013=120
5124VS_MSVCR_2013=msvcr120.dll
5125VS_MSVCP_2013=msvcp120.dll
5126VS_ENVVAR_2013="VS120COMNTOOLS"
5127VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5128VS_SDK_INSTALLDIR_2013=
5129VS_VS_PLATFORM_NAME_2013="v120"
5130VS_SDK_PLATFORM_NAME_2013=
5131
5132################################################################################
5133
5134
5135
5136################################################################################
5137
5138
5139
5140################################################################################
5141# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5142# build environment and assigns it to VS_ENV_CMD
5143
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150# Check if the VS env variables were setup prior to running configure.
5151# If not, then find vcvarsall.bat and run it automatically, and integrate
5152# the set env variables into the spec file.
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167# This line needs to be here, verbatim, after all includes and the dummy hook
5168# definitions. It is replaced with custom functionality when building
5169# custom sources.
5170#CUSTOM_AUTOCONF_INCLUDE
5171
5172# Do not change or remove the following line, it is needed for consistency checks:
5173DATE_WHEN_GENERATED=1482168759
5174
5175###############################################################################
5176#
5177# Initialization / Boot-strapping
5178#
5179# The bootstrapping process needs to solve the "chicken or the egg" problem,
5180# thus it jumps back and forth, each time gaining something needed later on.
5181#
5182###############################################################################
5183
5184# If we are requested to print additional help, do that and then exit.
5185# This must be the very first call.
5186
5187  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5188
5189    # Print available toolchains
5190    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5191    $PRINTF "Which are valid to use depends on the build platform.\n"
5192    for toolchain in $VALID_TOOLCHAINS_all; do
5193      # Use indirect variable referencing
5194      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5195      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5196      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5197    done
5198    $PRINTF "\n"
5199
5200    # Print available jvm features
5201    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5202    $PRINTF "Which are valid to use depends on the target platform.\n  "
5203    $PRINTF "%s " $VALID_JVM_FEATURES
5204    $PRINTF "\n"
5205
5206    # And now exit directly
5207    exit 0
5208  fi
5209
5210
5211# Basic initialization that must happen first of all in the normal process.
5212
5213  # Save the original command line. This is passed to us by the wrapper configure script.
5214
5215  # Save the path variable before it gets changed
5216  ORIGINAL_PATH="$PATH"
5217
5218  DATE_WHEN_CONFIGURED=`LANG=C date`
5219
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5221$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5223$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5224
5225
5226  # Start with tools that do not need have cross compilation support
5227  # and can be expected to be found in the default PATH. These tools are
5228  # used by configure.
5229
5230  # First are all the simple required tools.
5231
5232
5233
5234  # Publish this variable in the help.
5235
5236
5237  if [ -z "${BASENAME+x}" ]; then
5238    # The variable is not set by user, try to locate tool using the code snippet
5239    for ac_prog in basename
5240do
5241  # Extract the first word of "$ac_prog", so it can be a program name with args.
5242set dummy $ac_prog; ac_word=$2
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5244$as_echo_n "checking for $ac_word... " >&6; }
5245if ${ac_cv_path_BASENAME+:} false; then :
5246  $as_echo_n "(cached) " >&6
5247else
5248  case $BASENAME in
5249  [\\/]* | ?:[\\/]*)
5250  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5251  ;;
5252  *)
5253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5254for as_dir in $PATH
5255do
5256  IFS=$as_save_IFS
5257  test -z "$as_dir" && as_dir=.
5258    for ac_exec_ext in '' $ac_executable_extensions; do
5259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5260    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5262    break 2
5263  fi
5264done
5265  done
5266IFS=$as_save_IFS
5267
5268  ;;
5269esac
5270fi
5271BASENAME=$ac_cv_path_BASENAME
5272if test -n "$BASENAME"; then
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5274$as_echo "$BASENAME" >&6; }
5275else
5276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277$as_echo "no" >&6; }
5278fi
5279
5280
5281  test -n "$BASENAME" && break
5282done
5283
5284  else
5285    # The variable is set, but is it from the command line or the environment?
5286
5287    # Try to remove the string !BASENAME! from our list.
5288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5290      # If it failed, the variable was not from the command line. Ignore it,
5291      # but warn the user (except for BASH, which is always set by the calling BASH).
5292      if test "xBASENAME" != xBASH; then
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5294$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5295      fi
5296      # Try to locate tool using the code snippet
5297      for ac_prog in basename
5298do
5299  # Extract the first word of "$ac_prog", so it can be a program name with args.
5300set dummy $ac_prog; ac_word=$2
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5302$as_echo_n "checking for $ac_word... " >&6; }
5303if ${ac_cv_path_BASENAME+:} false; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306  case $BASENAME in
5307  [\\/]* | ?:[\\/]*)
5308  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5309  ;;
5310  *)
5311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5312for as_dir in $PATH
5313do
5314  IFS=$as_save_IFS
5315  test -z "$as_dir" && as_dir=.
5316    for ac_exec_ext in '' $ac_executable_extensions; do
5317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5318    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5320    break 2
5321  fi
5322done
5323  done
5324IFS=$as_save_IFS
5325
5326  ;;
5327esac
5328fi
5329BASENAME=$ac_cv_path_BASENAME
5330if test -n "$BASENAME"; then
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5332$as_echo "$BASENAME" >&6; }
5333else
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337
5338
5339  test -n "$BASENAME" && break
5340done
5341
5342    else
5343      # If it succeeded, then it was overridden by the user. We will use it
5344      # for the tool.
5345
5346      # First remove it from the list of overridden variables, so we can test
5347      # for unknown variables in the end.
5348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5349
5350      # Check if we try to supply an empty value
5351      if test "x$BASENAME" = x; then
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5353$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5355$as_echo_n "checking for BASENAME... " >&6; }
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5357$as_echo "disabled" >&6; }
5358      else
5359        # Check if the provided tool contains a complete path.
5360        tool_specified="$BASENAME"
5361        tool_basename="${tool_specified##*/}"
5362        if test "x$tool_basename" = "x$tool_specified"; then
5363          # A command without a complete path is provided, search $PATH.
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5365$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5366          # Extract the first word of "$tool_basename", so it can be a program name with args.
5367set dummy $tool_basename; ac_word=$2
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369$as_echo_n "checking for $ac_word... " >&6; }
5370if ${ac_cv_path_BASENAME+:} false; then :
5371  $as_echo_n "(cached) " >&6
5372else
5373  case $BASENAME in
5374  [\\/]* | ?:[\\/]*)
5375  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5376  ;;
5377  *)
5378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379for as_dir in $PATH
5380do
5381  IFS=$as_save_IFS
5382  test -z "$as_dir" && as_dir=.
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393  ;;
5394esac
5395fi
5396BASENAME=$ac_cv_path_BASENAME
5397if test -n "$BASENAME"; then
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5399$as_echo "$BASENAME" >&6; }
5400else
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }
5403fi
5404
5405
5406          if test "x$BASENAME" = x; then
5407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5408          fi
5409        else
5410          # Otherwise we believe it is a complete path. Use it as it is.
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5412$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5414$as_echo_n "checking for BASENAME... " >&6; }
5415          if test ! -x "$tool_specified"; then
5416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5417$as_echo "not found" >&6; }
5418            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5419          fi
5420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5421$as_echo "$tool_specified" >&6; }
5422        fi
5423      fi
5424    fi
5425
5426  fi
5427
5428
5429
5430  if test "x$BASENAME" = x; then
5431    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5432  fi
5433
5434
5435
5436
5437
5438  # Publish this variable in the help.
5439
5440
5441  if [ -z "${BASH+x}" ]; then
5442    # The variable is not set by user, try to locate tool using the code snippet
5443    for ac_prog in bash
5444do
5445  # Extract the first word of "$ac_prog", so it can be a program name with args.
5446set dummy $ac_prog; ac_word=$2
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
5449if ${ac_cv_path_BASH+:} false; then :
5450  $as_echo_n "(cached) " >&6
5451else
5452  case $BASH in
5453  [\\/]* | ?:[\\/]*)
5454  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5455  ;;
5456  *)
5457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  test -z "$as_dir" && as_dir=.
5462    for ac_exec_ext in '' $ac_executable_extensions; do
5463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5464    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5466    break 2
5467  fi
5468done
5469  done
5470IFS=$as_save_IFS
5471
5472  ;;
5473esac
5474fi
5475BASH=$ac_cv_path_BASH
5476if test -n "$BASH"; then
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5478$as_echo "$BASH" >&6; }
5479else
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5481$as_echo "no" >&6; }
5482fi
5483
5484
5485  test -n "$BASH" && break
5486done
5487
5488  else
5489    # The variable is set, but is it from the command line or the environment?
5490
5491    # Try to remove the string !BASH! from our list.
5492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5494      # If it failed, the variable was not from the command line. Ignore it,
5495      # but warn the user (except for BASH, which is always set by the calling BASH).
5496      if test "xBASH" != xBASH; then
5497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5498$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5499      fi
5500      # Try to locate tool using the code snippet
5501      for ac_prog in bash
5502do
5503  # Extract the first word of "$ac_prog", so it can be a program name with args.
5504set dummy $ac_prog; ac_word=$2
5505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
5507if ${ac_cv_path_BASH+:} false; then :
5508  $as_echo_n "(cached) " >&6
5509else
5510  case $BASH in
5511  [\\/]* | ?:[\\/]*)
5512  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5513  ;;
5514  *)
5515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in $PATH
5517do
5518  IFS=$as_save_IFS
5519  test -z "$as_dir" && as_dir=.
5520    for ac_exec_ext in '' $ac_executable_extensions; do
5521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5522    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5524    break 2
5525  fi
5526done
5527  done
5528IFS=$as_save_IFS
5529
5530  ;;
5531esac
5532fi
5533BASH=$ac_cv_path_BASH
5534if test -n "$BASH"; then
5535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5536$as_echo "$BASH" >&6; }
5537else
5538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
5540fi
5541
5542
5543  test -n "$BASH" && break
5544done
5545
5546    else
5547      # If it succeeded, then it was overridden by the user. We will use it
5548      # for the tool.
5549
5550      # First remove it from the list of overridden variables, so we can test
5551      # for unknown variables in the end.
5552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5553
5554      # Check if we try to supply an empty value
5555      if test "x$BASH" = x; then
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5557$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5559$as_echo_n "checking for BASH... " >&6; }
5560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5561$as_echo "disabled" >&6; }
5562      else
5563        # Check if the provided tool contains a complete path.
5564        tool_specified="$BASH"
5565        tool_basename="${tool_specified##*/}"
5566        if test "x$tool_basename" = "x$tool_specified"; then
5567          # A command without a complete path is provided, search $PATH.
5568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5569$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5570          # Extract the first word of "$tool_basename", so it can be a program name with args.
5571set dummy $tool_basename; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if ${ac_cv_path_BASH+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $BASH in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600BASH=$ac_cv_path_BASH
5601if test -n "$BASH"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5603$as_echo "$BASH" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610          if test "x$BASH" = x; then
5611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5612          fi
5613        else
5614          # Otherwise we believe it is a complete path. Use it as it is.
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5616$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5618$as_echo_n "checking for BASH... " >&6; }
5619          if test ! -x "$tool_specified"; then
5620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5621$as_echo "not found" >&6; }
5622            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5623          fi
5624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5625$as_echo "$tool_specified" >&6; }
5626        fi
5627      fi
5628    fi
5629
5630  fi
5631
5632
5633
5634  if test "x$BASH" = x; then
5635    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5636  fi
5637
5638
5639
5640
5641
5642  # Publish this variable in the help.
5643
5644
5645  if [ -z "${CAT+x}" ]; then
5646    # The variable is not set by user, try to locate tool using the code snippet
5647    for ac_prog in cat
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_CAT+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $CAT in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5668    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679CAT=$ac_cv_path_CAT
5680if test -n "$CAT"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5682$as_echo "$CAT" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$CAT" && break
5690done
5691
5692  else
5693    # The variable is set, but is it from the command line or the environment?
5694
5695    # Try to remove the string !CAT! from our list.
5696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5698      # If it failed, the variable was not from the command line. Ignore it,
5699      # but warn the user (except for BASH, which is always set by the calling BASH).
5700      if test "xCAT" != xBASH; then
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5702$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5703      fi
5704      # Try to locate tool using the code snippet
5705      for ac_prog in cat
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if ${ac_cv_path_CAT+:} false; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $CAT in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5726    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737CAT=$ac_cv_path_CAT
5738if test -n "$CAT"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5740$as_echo "$CAT" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$CAT" && break
5748done
5749
5750    else
5751      # If it succeeded, then it was overridden by the user. We will use it
5752      # for the tool.
5753
5754      # First remove it from the list of overridden variables, so we can test
5755      # for unknown variables in the end.
5756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5757
5758      # Check if we try to supply an empty value
5759      if test "x$CAT" = x; then
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5761$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5763$as_echo_n "checking for CAT... " >&6; }
5764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5765$as_echo "disabled" >&6; }
5766      else
5767        # Check if the provided tool contains a complete path.
5768        tool_specified="$CAT"
5769        tool_basename="${tool_specified##*/}"
5770        if test "x$tool_basename" = "x$tool_specified"; then
5771          # A command without a complete path is provided, search $PATH.
5772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5773$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5774          # Extract the first word of "$tool_basename", so it can be a program name with args.
5775set dummy $tool_basename; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CAT+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CAT in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CAT=$ac_cv_path_CAT
5805if test -n "$CAT"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5807$as_echo "$CAT" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814          if test "x$CAT" = x; then
5815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5816          fi
5817        else
5818          # Otherwise we believe it is a complete path. Use it as it is.
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5820$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5822$as_echo_n "checking for CAT... " >&6; }
5823          if test ! -x "$tool_specified"; then
5824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5825$as_echo "not found" >&6; }
5826            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5827          fi
5828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5829$as_echo "$tool_specified" >&6; }
5830        fi
5831      fi
5832    fi
5833
5834  fi
5835
5836
5837
5838  if test "x$CAT" = x; then
5839    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if [ -z "${CHMOD+x}" ]; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in chmod
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CHMOD+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CHMOD in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CHMOD=$ac_cv_path_CHMOD
5884if test -n "$CHMOD"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5886$as_echo "$CHMOD" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CHMOD" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CHMOD! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCHMOD" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in chmod
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CHMOD+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CHMOD in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CHMOD=$ac_cv_path_CHMOD
5942if test -n "$CHMOD"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5944$as_echo "$CHMOD" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CHMOD" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if we try to supply an empty value
5963      if test "x$CHMOD" = x; then
5964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5965$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5967$as_echo_n "checking for CHMOD... " >&6; }
5968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5969$as_echo "disabled" >&6; }
5970      else
5971        # Check if the provided tool contains a complete path.
5972        tool_specified="$CHMOD"
5973        tool_basename="${tool_specified##*/}"
5974        if test "x$tool_basename" = "x$tool_specified"; then
5975          # A command without a complete path is provided, search $PATH.
5976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5977$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5978          # Extract the first word of "$tool_basename", so it can be a program name with args.
5979set dummy $tool_basename; ac_word=$2
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981$as_echo_n "checking for $ac_word... " >&6; }
5982if ${ac_cv_path_CHMOD+:} false; then :
5983  $as_echo_n "(cached) " >&6
5984else
5985  case $CHMOD in
5986  [\\/]* | ?:[\\/]*)
5987  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5988  ;;
5989  *)
5990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005  ;;
6006esac
6007fi
6008CHMOD=$ac_cv_path_CHMOD
6009if test -n "$CHMOD"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6011$as_echo "$CHMOD" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018          if test "x$CHMOD" = x; then
6019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6020          fi
6021        else
6022          # Otherwise we believe it is a complete path. Use it as it is.
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6024$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6026$as_echo_n "checking for CHMOD... " >&6; }
6027          if test ! -x "$tool_specified"; then
6028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6029$as_echo "not found" >&6; }
6030            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6031          fi
6032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6033$as_echo "$tool_specified" >&6; }
6034        fi
6035      fi
6036    fi
6037
6038  fi
6039
6040
6041
6042  if test "x$CHMOD" = x; then
6043    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6044  fi
6045
6046
6047
6048
6049
6050  # Publish this variable in the help.
6051
6052
6053  if [ -z "${CMP+x}" ]; then
6054    # The variable is not set by user, try to locate tool using the code snippet
6055    for ac_prog in cmp
6056do
6057  # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_path_CMP+:} false; then :
6062  $as_echo_n "(cached) " >&6
6063else
6064  case $CMP in
6065  [\\/]* | ?:[\\/]*)
6066  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6067  ;;
6068  *)
6069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070for as_dir in $PATH
6071do
6072  IFS=$as_save_IFS
6073  test -z "$as_dir" && as_dir=.
6074    for ac_exec_ext in '' $ac_executable_extensions; do
6075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6076    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6078    break 2
6079  fi
6080done
6081  done
6082IFS=$as_save_IFS
6083
6084  ;;
6085esac
6086fi
6087CMP=$ac_cv_path_CMP
6088if test -n "$CMP"; then
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6090$as_echo "$CMP" >&6; }
6091else
6092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
6094fi
6095
6096
6097  test -n "$CMP" && break
6098done
6099
6100  else
6101    # The variable is set, but is it from the command line or the environment?
6102
6103    # Try to remove the string !CMP! from our list.
6104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6106      # If it failed, the variable was not from the command line. Ignore it,
6107      # but warn the user (except for BASH, which is always set by the calling BASH).
6108      if test "xCMP" != xBASH; then
6109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6110$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6111      fi
6112      # Try to locate tool using the code snippet
6113      for ac_prog in cmp
6114do
6115  # Extract the first word of "$ac_prog", so it can be a program name with args.
6116set dummy $ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_path_CMP+:} false; then :
6120  $as_echo_n "(cached) " >&6
6121else
6122  case $CMP in
6123  [\\/]* | ?:[\\/]*)
6124  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6125  ;;
6126  *)
6127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130  IFS=$as_save_IFS
6131  test -z "$as_dir" && as_dir=.
6132    for ac_exec_ext in '' $ac_executable_extensions; do
6133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6134    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6136    break 2
6137  fi
6138done
6139  done
6140IFS=$as_save_IFS
6141
6142  ;;
6143esac
6144fi
6145CMP=$ac_cv_path_CMP
6146if test -n "$CMP"; then
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6148$as_echo "$CMP" >&6; }
6149else
6150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155  test -n "$CMP" && break
6156done
6157
6158    else
6159      # If it succeeded, then it was overridden by the user. We will use it
6160      # for the tool.
6161
6162      # First remove it from the list of overridden variables, so we can test
6163      # for unknown variables in the end.
6164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6165
6166      # Check if we try to supply an empty value
6167      if test "x$CMP" = x; then
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6169$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6171$as_echo_n "checking for CMP... " >&6; }
6172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6173$as_echo "disabled" >&6; }
6174      else
6175        # Check if the provided tool contains a complete path.
6176        tool_specified="$CMP"
6177        tool_basename="${tool_specified##*/}"
6178        if test "x$tool_basename" = "x$tool_specified"; then
6179          # A command without a complete path is provided, search $PATH.
6180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6181$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6182          # Extract the first word of "$tool_basename", so it can be a program name with args.
6183set dummy $tool_basename; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_path_CMP+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  case $CMP in
6190  [\\/]* | ?:[\\/]*)
6191  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6192  ;;
6193  *)
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_exec_ext in '' $ac_executable_extensions; do
6200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203    break 2
6204  fi
6205done
6206  done
6207IFS=$as_save_IFS
6208
6209  ;;
6210esac
6211fi
6212CMP=$ac_cv_path_CMP
6213if test -n "$CMP"; then
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6215$as_echo "$CMP" >&6; }
6216else
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
6219fi
6220
6221
6222          if test "x$CMP" = x; then
6223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6224          fi
6225        else
6226          # Otherwise we believe it is a complete path. Use it as it is.
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6228$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6230$as_echo_n "checking for CMP... " >&6; }
6231          if test ! -x "$tool_specified"; then
6232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6233$as_echo "not found" >&6; }
6234            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6235          fi
6236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6237$as_echo "$tool_specified" >&6; }
6238        fi
6239      fi
6240    fi
6241
6242  fi
6243
6244
6245
6246  if test "x$CMP" = x; then
6247    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6248  fi
6249
6250
6251
6252
6253
6254  # Publish this variable in the help.
6255
6256
6257  if [ -z "${COMM+x}" ]; then
6258    # The variable is not set by user, try to locate tool using the code snippet
6259    for ac_prog in comm
6260do
6261  # Extract the first word of "$ac_prog", so it can be a program name with args.
6262set dummy $ac_prog; ac_word=$2
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6264$as_echo_n "checking for $ac_word... " >&6; }
6265if ${ac_cv_path_COMM+:} false; then :
6266  $as_echo_n "(cached) " >&6
6267else
6268  case $COMM in
6269  [\\/]* | ?:[\\/]*)
6270  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6271  ;;
6272  *)
6273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274for as_dir in $PATH
6275do
6276  IFS=$as_save_IFS
6277  test -z "$as_dir" && as_dir=.
6278    for ac_exec_ext in '' $ac_executable_extensions; do
6279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6280    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6282    break 2
6283  fi
6284done
6285  done
6286IFS=$as_save_IFS
6287
6288  ;;
6289esac
6290fi
6291COMM=$ac_cv_path_COMM
6292if test -n "$COMM"; then
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6294$as_echo "$COMM" >&6; }
6295else
6296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
6298fi
6299
6300
6301  test -n "$COMM" && break
6302done
6303
6304  else
6305    # The variable is set, but is it from the command line or the environment?
6306
6307    # Try to remove the string !COMM! from our list.
6308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6310      # If it failed, the variable was not from the command line. Ignore it,
6311      # but warn the user (except for BASH, which is always set by the calling BASH).
6312      if test "xCOMM" != xBASH; then
6313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6314$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6315      fi
6316      # Try to locate tool using the code snippet
6317      for ac_prog in comm
6318do
6319  # Extract the first word of "$ac_prog", so it can be a program name with args.
6320set dummy $ac_prog; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if ${ac_cv_path_COMM+:} false; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $COMM in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349COMM=$ac_cv_path_COMM
6350if test -n "$COMM"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6352$as_echo "$COMM" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359  test -n "$COMM" && break
6360done
6361
6362    else
6363      # If it succeeded, then it was overridden by the user. We will use it
6364      # for the tool.
6365
6366      # First remove it from the list of overridden variables, so we can test
6367      # for unknown variables in the end.
6368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6369
6370      # Check if we try to supply an empty value
6371      if test "x$COMM" = x; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6373$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6375$as_echo_n "checking for COMM... " >&6; }
6376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6377$as_echo "disabled" >&6; }
6378      else
6379        # Check if the provided tool contains a complete path.
6380        tool_specified="$COMM"
6381        tool_basename="${tool_specified##*/}"
6382        if test "x$tool_basename" = "x$tool_specified"; then
6383          # A command without a complete path is provided, search $PATH.
6384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6385$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6386          # Extract the first word of "$tool_basename", so it can be a program name with args.
6387set dummy $tool_basename; ac_word=$2
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if ${ac_cv_path_COMM+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  case $COMM in
6394  [\\/]* | ?:[\\/]*)
6395  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6396  ;;
6397  *)
6398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401  IFS=$as_save_IFS
6402  test -z "$as_dir" && as_dir=.
6403    for ac_exec_ext in '' $ac_executable_extensions; do
6404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407    break 2
6408  fi
6409done
6410  done
6411IFS=$as_save_IFS
6412
6413  ;;
6414esac
6415fi
6416COMM=$ac_cv_path_COMM
6417if test -n "$COMM"; then
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6419$as_echo "$COMM" >&6; }
6420else
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425
6426          if test "x$COMM" = x; then
6427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6428          fi
6429        else
6430          # Otherwise we believe it is a complete path. Use it as it is.
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6432$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6434$as_echo_n "checking for COMM... " >&6; }
6435          if test ! -x "$tool_specified"; then
6436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6437$as_echo "not found" >&6; }
6438            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6439          fi
6440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6441$as_echo "$tool_specified" >&6; }
6442        fi
6443      fi
6444    fi
6445
6446  fi
6447
6448
6449
6450  if test "x$COMM" = x; then
6451    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6452  fi
6453
6454
6455
6456
6457
6458  # Publish this variable in the help.
6459
6460
6461  if [ -z "${CP+x}" ]; then
6462    # The variable is not set by user, try to locate tool using the code snippet
6463    for ac_prog in cp
6464do
6465  # Extract the first word of "$ac_prog", so it can be a program name with args.
6466set dummy $ac_prog; ac_word=$2
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6468$as_echo_n "checking for $ac_word... " >&6; }
6469if ${ac_cv_path_CP+:} false; then :
6470  $as_echo_n "(cached) " >&6
6471else
6472  case $CP in
6473  [\\/]* | ?:[\\/]*)
6474  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6475  ;;
6476  *)
6477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478for as_dir in $PATH
6479do
6480  IFS=$as_save_IFS
6481  test -z "$as_dir" && as_dir=.
6482    for ac_exec_ext in '' $ac_executable_extensions; do
6483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6484    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486    break 2
6487  fi
6488done
6489  done
6490IFS=$as_save_IFS
6491
6492  ;;
6493esac
6494fi
6495CP=$ac_cv_path_CP
6496if test -n "$CP"; then
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6498$as_echo "$CP" >&6; }
6499else
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; }
6502fi
6503
6504
6505  test -n "$CP" && break
6506done
6507
6508  else
6509    # The variable is set, but is it from the command line or the environment?
6510
6511    # Try to remove the string !CP! from our list.
6512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6514      # If it failed, the variable was not from the command line. Ignore it,
6515      # but warn the user (except for BASH, which is always set by the calling BASH).
6516      if test "xCP" != xBASH; then
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6518$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6519      fi
6520      # Try to locate tool using the code snippet
6521      for ac_prog in cp
6522do
6523  # Extract the first word of "$ac_prog", so it can be a program name with args.
6524set dummy $ac_prog; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if ${ac_cv_path_CP+:} false; then :
6528  $as_echo_n "(cached) " >&6
6529else
6530  case $CP in
6531  [\\/]* | ?:[\\/]*)
6532  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6533  ;;
6534  *)
6535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536for as_dir in $PATH
6537do
6538  IFS=$as_save_IFS
6539  test -z "$as_dir" && as_dir=.
6540    for ac_exec_ext in '' $ac_executable_extensions; do
6541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544    break 2
6545  fi
6546done
6547  done
6548IFS=$as_save_IFS
6549
6550  ;;
6551esac
6552fi
6553CP=$ac_cv_path_CP
6554if test -n "$CP"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6556$as_echo "$CP" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563  test -n "$CP" && break
6564done
6565
6566    else
6567      # If it succeeded, then it was overridden by the user. We will use it
6568      # for the tool.
6569
6570      # First remove it from the list of overridden variables, so we can test
6571      # for unknown variables in the end.
6572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6573
6574      # Check if we try to supply an empty value
6575      if test "x$CP" = x; then
6576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6577$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6579$as_echo_n "checking for CP... " >&6; }
6580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6581$as_echo "disabled" >&6; }
6582      else
6583        # Check if the provided tool contains a complete path.
6584        tool_specified="$CP"
6585        tool_basename="${tool_specified##*/}"
6586        if test "x$tool_basename" = "x$tool_specified"; then
6587          # A command without a complete path is provided, search $PATH.
6588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6589$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6590          # Extract the first word of "$tool_basename", so it can be a program name with args.
6591set dummy $tool_basename; ac_word=$2
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593$as_echo_n "checking for $ac_word... " >&6; }
6594if ${ac_cv_path_CP+:} false; then :
6595  $as_echo_n "(cached) " >&6
6596else
6597  case $CP in
6598  [\\/]* | ?:[\\/]*)
6599  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6600  ;;
6601  *)
6602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603for as_dir in $PATH
6604do
6605  IFS=$as_save_IFS
6606  test -z "$as_dir" && as_dir=.
6607    for ac_exec_ext in '' $ac_executable_extensions; do
6608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611    break 2
6612  fi
6613done
6614  done
6615IFS=$as_save_IFS
6616
6617  ;;
6618esac
6619fi
6620CP=$ac_cv_path_CP
6621if test -n "$CP"; then
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6623$as_echo "$CP" >&6; }
6624else
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626$as_echo "no" >&6; }
6627fi
6628
6629
6630          if test "x$CP" = x; then
6631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6632          fi
6633        else
6634          # Otherwise we believe it is a complete path. Use it as it is.
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6636$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6638$as_echo_n "checking for CP... " >&6; }
6639          if test ! -x "$tool_specified"; then
6640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6641$as_echo "not found" >&6; }
6642            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6643          fi
6644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6645$as_echo "$tool_specified" >&6; }
6646        fi
6647      fi
6648    fi
6649
6650  fi
6651
6652
6653
6654  if test "x$CP" = x; then
6655    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6656  fi
6657
6658
6659
6660
6661
6662  # Publish this variable in the help.
6663
6664
6665  if [ -z "${CUT+x}" ]; then
6666    # The variable is not set by user, try to locate tool using the code snippet
6667    for ac_prog in cut
6668do
6669  # Extract the first word of "$ac_prog", so it can be a program name with args.
6670set dummy $ac_prog; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_CUT+:} false; then :
6674  $as_echo_n "(cached) " >&6
6675else
6676  case $CUT in
6677  [\\/]* | ?:[\\/]*)
6678  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6679  ;;
6680  *)
6681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in $PATH
6683do
6684  IFS=$as_save_IFS
6685  test -z "$as_dir" && as_dir=.
6686    for ac_exec_ext in '' $ac_executable_extensions; do
6687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6688    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690    break 2
6691  fi
6692done
6693  done
6694IFS=$as_save_IFS
6695
6696  ;;
6697esac
6698fi
6699CUT=$ac_cv_path_CUT
6700if test -n "$CUT"; then
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6702$as_echo "$CUT" >&6; }
6703else
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
6709  test -n "$CUT" && break
6710done
6711
6712  else
6713    # The variable is set, but is it from the command line or the environment?
6714
6715    # Try to remove the string !CUT! from our list.
6716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6718      # If it failed, the variable was not from the command line. Ignore it,
6719      # but warn the user (except for BASH, which is always set by the calling BASH).
6720      if test "xCUT" != xBASH; then
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6722$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6723      fi
6724      # Try to locate tool using the code snippet
6725      for ac_prog in cut
6726do
6727  # Extract the first word of "$ac_prog", so it can be a program name with args.
6728set dummy $ac_prog; ac_word=$2
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6730$as_echo_n "checking for $ac_word... " >&6; }
6731if ${ac_cv_path_CUT+:} false; then :
6732  $as_echo_n "(cached) " >&6
6733else
6734  case $CUT in
6735  [\\/]* | ?:[\\/]*)
6736  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6737  ;;
6738  *)
6739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740for as_dir in $PATH
6741do
6742  IFS=$as_save_IFS
6743  test -z "$as_dir" && as_dir=.
6744    for ac_exec_ext in '' $ac_executable_extensions; do
6745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748    break 2
6749  fi
6750done
6751  done
6752IFS=$as_save_IFS
6753
6754  ;;
6755esac
6756fi
6757CUT=$ac_cv_path_CUT
6758if test -n "$CUT"; then
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6760$as_echo "$CUT" >&6; }
6761else
6762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766
6767  test -n "$CUT" && break
6768done
6769
6770    else
6771      # If it succeeded, then it was overridden by the user. We will use it
6772      # for the tool.
6773
6774      # First remove it from the list of overridden variables, so we can test
6775      # for unknown variables in the end.
6776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6777
6778      # Check if we try to supply an empty value
6779      if test "x$CUT" = x; then
6780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6781$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6783$as_echo_n "checking for CUT... " >&6; }
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6785$as_echo "disabled" >&6; }
6786      else
6787        # Check if the provided tool contains a complete path.
6788        tool_specified="$CUT"
6789        tool_basename="${tool_specified##*/}"
6790        if test "x$tool_basename" = "x$tool_specified"; then
6791          # A command without a complete path is provided, search $PATH.
6792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6793$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6794          # Extract the first word of "$tool_basename", so it can be a program name with args.
6795set dummy $tool_basename; ac_word=$2
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797$as_echo_n "checking for $ac_word... " >&6; }
6798if ${ac_cv_path_CUT+:} false; then :
6799  $as_echo_n "(cached) " >&6
6800else
6801  case $CUT in
6802  [\\/]* | ?:[\\/]*)
6803  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6804  ;;
6805  *)
6806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in $PATH
6808do
6809  IFS=$as_save_IFS
6810  test -z "$as_dir" && as_dir=.
6811    for ac_exec_ext in '' $ac_executable_extensions; do
6812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815    break 2
6816  fi
6817done
6818  done
6819IFS=$as_save_IFS
6820
6821  ;;
6822esac
6823fi
6824CUT=$ac_cv_path_CUT
6825if test -n "$CUT"; then
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6827$as_echo "$CUT" >&6; }
6828else
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832
6833
6834          if test "x$CUT" = x; then
6835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6836          fi
6837        else
6838          # Otherwise we believe it is a complete path. Use it as it is.
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6840$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6842$as_echo_n "checking for CUT... " >&6; }
6843          if test ! -x "$tool_specified"; then
6844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6845$as_echo "not found" >&6; }
6846            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6847          fi
6848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6849$as_echo "$tool_specified" >&6; }
6850        fi
6851      fi
6852    fi
6853
6854  fi
6855
6856
6857
6858  if test "x$CUT" = x; then
6859    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6860  fi
6861
6862
6863
6864
6865
6866  # Publish this variable in the help.
6867
6868
6869  if [ -z "${DATE+x}" ]; then
6870    # The variable is not set by user, try to locate tool using the code snippet
6871    for ac_prog in date
6872do
6873  # Extract the first word of "$ac_prog", so it can be a program name with args.
6874set dummy $ac_prog; ac_word=$2
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876$as_echo_n "checking for $ac_word... " >&6; }
6877if ${ac_cv_path_DATE+:} false; then :
6878  $as_echo_n "(cached) " >&6
6879else
6880  case $DATE in
6881  [\\/]* | ?:[\\/]*)
6882  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6883  ;;
6884  *)
6885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886for as_dir in $PATH
6887do
6888  IFS=$as_save_IFS
6889  test -z "$as_dir" && as_dir=.
6890    for ac_exec_ext in '' $ac_executable_extensions; do
6891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894    break 2
6895  fi
6896done
6897  done
6898IFS=$as_save_IFS
6899
6900  ;;
6901esac
6902fi
6903DATE=$ac_cv_path_DATE
6904if test -n "$DATE"; then
6905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6906$as_echo "$DATE" >&6; }
6907else
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909$as_echo "no" >&6; }
6910fi
6911
6912
6913  test -n "$DATE" && break
6914done
6915
6916  else
6917    # The variable is set, but is it from the command line or the environment?
6918
6919    # Try to remove the string !DATE! from our list.
6920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6922      # If it failed, the variable was not from the command line. Ignore it,
6923      # but warn the user (except for BASH, which is always set by the calling BASH).
6924      if test "xDATE" != xBASH; then
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6926$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6927      fi
6928      # Try to locate tool using the code snippet
6929      for ac_prog in date
6930do
6931  # Extract the first word of "$ac_prog", so it can be a program name with args.
6932set dummy $ac_prog; ac_word=$2
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6934$as_echo_n "checking for $ac_word... " >&6; }
6935if ${ac_cv_path_DATE+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938  case $DATE in
6939  [\\/]* | ?:[\\/]*)
6940  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6941  ;;
6942  *)
6943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944for as_dir in $PATH
6945do
6946  IFS=$as_save_IFS
6947  test -z "$as_dir" && as_dir=.
6948    for ac_exec_ext in '' $ac_executable_extensions; do
6949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952    break 2
6953  fi
6954done
6955  done
6956IFS=$as_save_IFS
6957
6958  ;;
6959esac
6960fi
6961DATE=$ac_cv_path_DATE
6962if test -n "$DATE"; then
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6964$as_echo "$DATE" >&6; }
6965else
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969
6970
6971  test -n "$DATE" && break
6972done
6973
6974    else
6975      # If it succeeded, then it was overridden by the user. We will use it
6976      # for the tool.
6977
6978      # First remove it from the list of overridden variables, so we can test
6979      # for unknown variables in the end.
6980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6981
6982      # Check if we try to supply an empty value
6983      if test "x$DATE" = x; then
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6985$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6987$as_echo_n "checking for DATE... " >&6; }
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6989$as_echo "disabled" >&6; }
6990      else
6991        # Check if the provided tool contains a complete path.
6992        tool_specified="$DATE"
6993        tool_basename="${tool_specified##*/}"
6994        if test "x$tool_basename" = "x$tool_specified"; then
6995          # A command without a complete path is provided, search $PATH.
6996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6997$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6998          # Extract the first word of "$tool_basename", so it can be a program name with args.
6999set dummy $tool_basename; ac_word=$2
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7001$as_echo_n "checking for $ac_word... " >&6; }
7002if ${ac_cv_path_DATE+:} false; then :
7003  $as_echo_n "(cached) " >&6
7004else
7005  case $DATE in
7006  [\\/]* | ?:[\\/]*)
7007  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7008  ;;
7009  *)
7010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011for as_dir in $PATH
7012do
7013  IFS=$as_save_IFS
7014  test -z "$as_dir" && as_dir=.
7015    for ac_exec_ext in '' $ac_executable_extensions; do
7016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7017    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7019    break 2
7020  fi
7021done
7022  done
7023IFS=$as_save_IFS
7024
7025  ;;
7026esac
7027fi
7028DATE=$ac_cv_path_DATE
7029if test -n "$DATE"; then
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7031$as_echo "$DATE" >&6; }
7032else
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034$as_echo "no" >&6; }
7035fi
7036
7037
7038          if test "x$DATE" = x; then
7039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7040          fi
7041        else
7042          # Otherwise we believe it is a complete path. Use it as it is.
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7044$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7046$as_echo_n "checking for DATE... " >&6; }
7047          if test ! -x "$tool_specified"; then
7048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7049$as_echo "not found" >&6; }
7050            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7051          fi
7052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7053$as_echo "$tool_specified" >&6; }
7054        fi
7055      fi
7056    fi
7057
7058  fi
7059
7060
7061
7062  if test "x$DATE" = x; then
7063    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7064  fi
7065
7066
7067
7068
7069
7070  # Publish this variable in the help.
7071
7072
7073  if [ -z "${DIFF+x}" ]; then
7074    # The variable is not set by user, try to locate tool using the code snippet
7075    for ac_prog in gdiff diff
7076do
7077  # Extract the first word of "$ac_prog", so it can be a program name with args.
7078set dummy $ac_prog; ac_word=$2
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080$as_echo_n "checking for $ac_word... " >&6; }
7081if ${ac_cv_path_DIFF+:} false; then :
7082  $as_echo_n "(cached) " >&6
7083else
7084  case $DIFF in
7085  [\\/]* | ?:[\\/]*)
7086  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7087  ;;
7088  *)
7089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090for as_dir in $PATH
7091do
7092  IFS=$as_save_IFS
7093  test -z "$as_dir" && as_dir=.
7094    for ac_exec_ext in '' $ac_executable_extensions; do
7095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098    break 2
7099  fi
7100done
7101  done
7102IFS=$as_save_IFS
7103
7104  ;;
7105esac
7106fi
7107DIFF=$ac_cv_path_DIFF
7108if test -n "$DIFF"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7110$as_echo "$DIFF" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117  test -n "$DIFF" && break
7118done
7119
7120  else
7121    # The variable is set, but is it from the command line or the environment?
7122
7123    # Try to remove the string !DIFF! from our list.
7124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7126      # If it failed, the variable was not from the command line. Ignore it,
7127      # but warn the user (except for BASH, which is always set by the calling BASH).
7128      if test "xDIFF" != xBASH; then
7129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7130$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7131      fi
7132      # Try to locate tool using the code snippet
7133      for ac_prog in gdiff diff
7134do
7135  # Extract the first word of "$ac_prog", so it can be a program name with args.
7136set dummy $ac_prog; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_DIFF+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $DIFF in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165DIFF=$ac_cv_path_DIFF
7166if test -n "$DIFF"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7168$as_echo "$DIFF" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175  test -n "$DIFF" && break
7176done
7177
7178    else
7179      # If it succeeded, then it was overridden by the user. We will use it
7180      # for the tool.
7181
7182      # First remove it from the list of overridden variables, so we can test
7183      # for unknown variables in the end.
7184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7185
7186      # Check if we try to supply an empty value
7187      if test "x$DIFF" = x; then
7188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7189$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7191$as_echo_n "checking for DIFF... " >&6; }
7192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7193$as_echo "disabled" >&6; }
7194      else
7195        # Check if the provided tool contains a complete path.
7196        tool_specified="$DIFF"
7197        tool_basename="${tool_specified##*/}"
7198        if test "x$tool_basename" = "x$tool_specified"; then
7199          # A command without a complete path is provided, search $PATH.
7200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7201$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7202          # Extract the first word of "$tool_basename", so it can be a program name with args.
7203set dummy $tool_basename; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_DIFF+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $DIFF in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232DIFF=$ac_cv_path_DIFF
7233if test -n "$DIFF"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7235$as_echo "$DIFF" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242          if test "x$DIFF" = x; then
7243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7244          fi
7245        else
7246          # Otherwise we believe it is a complete path. Use it as it is.
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7248$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7250$as_echo_n "checking for DIFF... " >&6; }
7251          if test ! -x "$tool_specified"; then
7252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7253$as_echo "not found" >&6; }
7254            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7255          fi
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7257$as_echo "$tool_specified" >&6; }
7258        fi
7259      fi
7260    fi
7261
7262  fi
7263
7264
7265
7266  if test "x$DIFF" = x; then
7267    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7268  fi
7269
7270
7271
7272
7273
7274  # Publish this variable in the help.
7275
7276
7277  if [ -z "${DIRNAME+x}" ]; then
7278    # The variable is not set by user, try to locate tool using the code snippet
7279    for ac_prog in dirname
7280do
7281  # Extract the first word of "$ac_prog", so it can be a program name with args.
7282set dummy $ac_prog; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_path_DIRNAME+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  case $DIRNAME in
7289  [\\/]* | ?:[\\/]*)
7290  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7291  ;;
7292  *)
7293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7294for as_dir in $PATH
7295do
7296  IFS=$as_save_IFS
7297  test -z "$as_dir" && as_dir=.
7298    for ac_exec_ext in '' $ac_executable_extensions; do
7299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7300    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7302    break 2
7303  fi
7304done
7305  done
7306IFS=$as_save_IFS
7307
7308  ;;
7309esac
7310fi
7311DIRNAME=$ac_cv_path_DIRNAME
7312if test -n "$DIRNAME"; then
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7314$as_echo "$DIRNAME" >&6; }
7315else
7316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317$as_echo "no" >&6; }
7318fi
7319
7320
7321  test -n "$DIRNAME" && break
7322done
7323
7324  else
7325    # The variable is set, but is it from the command line or the environment?
7326
7327    # Try to remove the string !DIRNAME! from our list.
7328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7330      # If it failed, the variable was not from the command line. Ignore it,
7331      # but warn the user (except for BASH, which is always set by the calling BASH).
7332      if test "xDIRNAME" != xBASH; then
7333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7334$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7335      fi
7336      # Try to locate tool using the code snippet
7337      for ac_prog in dirname
7338do
7339  # Extract the first word of "$ac_prog", so it can be a program name with args.
7340set dummy $ac_prog; ac_word=$2
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7342$as_echo_n "checking for $ac_word... " >&6; }
7343if ${ac_cv_path_DIRNAME+:} false; then :
7344  $as_echo_n "(cached) " >&6
7345else
7346  case $DIRNAME in
7347  [\\/]* | ?:[\\/]*)
7348  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7349  ;;
7350  *)
7351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352for as_dir in $PATH
7353do
7354  IFS=$as_save_IFS
7355  test -z "$as_dir" && as_dir=.
7356    for ac_exec_ext in '' $ac_executable_extensions; do
7357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360    break 2
7361  fi
7362done
7363  done
7364IFS=$as_save_IFS
7365
7366  ;;
7367esac
7368fi
7369DIRNAME=$ac_cv_path_DIRNAME
7370if test -n "$DIRNAME"; then
7371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7372$as_echo "$DIRNAME" >&6; }
7373else
7374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
7376fi
7377
7378
7379  test -n "$DIRNAME" && break
7380done
7381
7382    else
7383      # If it succeeded, then it was overridden by the user. We will use it
7384      # for the tool.
7385
7386      # First remove it from the list of overridden variables, so we can test
7387      # for unknown variables in the end.
7388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7389
7390      # Check if we try to supply an empty value
7391      if test "x$DIRNAME" = x; then
7392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7393$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7395$as_echo_n "checking for DIRNAME... " >&6; }
7396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7397$as_echo "disabled" >&6; }
7398      else
7399        # Check if the provided tool contains a complete path.
7400        tool_specified="$DIRNAME"
7401        tool_basename="${tool_specified##*/}"
7402        if test "x$tool_basename" = "x$tool_specified"; then
7403          # A command without a complete path is provided, search $PATH.
7404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7405$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7406          # Extract the first word of "$tool_basename", so it can be a program name with args.
7407set dummy $tool_basename; ac_word=$2
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409$as_echo_n "checking for $ac_word... " >&6; }
7410if ${ac_cv_path_DIRNAME+:} false; then :
7411  $as_echo_n "(cached) " >&6
7412else
7413  case $DIRNAME in
7414  [\\/]* | ?:[\\/]*)
7415  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7416  ;;
7417  *)
7418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421  IFS=$as_save_IFS
7422  test -z "$as_dir" && as_dir=.
7423    for ac_exec_ext in '' $ac_executable_extensions; do
7424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427    break 2
7428  fi
7429done
7430  done
7431IFS=$as_save_IFS
7432
7433  ;;
7434esac
7435fi
7436DIRNAME=$ac_cv_path_DIRNAME
7437if test -n "$DIRNAME"; then
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7439$as_echo "$DIRNAME" >&6; }
7440else
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
7443fi
7444
7445
7446          if test "x$DIRNAME" = x; then
7447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7448          fi
7449        else
7450          # Otherwise we believe it is a complete path. Use it as it is.
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7452$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7454$as_echo_n "checking for DIRNAME... " >&6; }
7455          if test ! -x "$tool_specified"; then
7456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7457$as_echo "not found" >&6; }
7458            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7459          fi
7460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7461$as_echo "$tool_specified" >&6; }
7462        fi
7463      fi
7464    fi
7465
7466  fi
7467
7468
7469
7470  if test "x$DIRNAME" = x; then
7471    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7472  fi
7473
7474
7475
7476
7477
7478  # Publish this variable in the help.
7479
7480
7481  if [ -z "${ECHO+x}" ]; then
7482    # The variable is not set by user, try to locate tool using the code snippet
7483    for ac_prog in echo
7484do
7485  # Extract the first word of "$ac_prog", so it can be a program name with args.
7486set dummy $ac_prog; ac_word=$2
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7488$as_echo_n "checking for $ac_word... " >&6; }
7489if ${ac_cv_path_ECHO+:} false; then :
7490  $as_echo_n "(cached) " >&6
7491else
7492  case $ECHO in
7493  [\\/]* | ?:[\\/]*)
7494  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7495  ;;
7496  *)
7497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498for as_dir in $PATH
7499do
7500  IFS=$as_save_IFS
7501  test -z "$as_dir" && as_dir=.
7502    for ac_exec_ext in '' $ac_executable_extensions; do
7503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7506    break 2
7507  fi
7508done
7509  done
7510IFS=$as_save_IFS
7511
7512  ;;
7513esac
7514fi
7515ECHO=$ac_cv_path_ECHO
7516if test -n "$ECHO"; then
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7518$as_echo "$ECHO" >&6; }
7519else
7520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
7522fi
7523
7524
7525  test -n "$ECHO" && break
7526done
7527
7528  else
7529    # The variable is set, but is it from the command line or the environment?
7530
7531    # Try to remove the string !ECHO! from our list.
7532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7534      # If it failed, the variable was not from the command line. Ignore it,
7535      # but warn the user (except for BASH, which is always set by the calling BASH).
7536      if test "xECHO" != xBASH; then
7537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7538$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7539      fi
7540      # Try to locate tool using the code snippet
7541      for ac_prog in echo
7542do
7543  # Extract the first word of "$ac_prog", so it can be a program name with args.
7544set dummy $ac_prog; ac_word=$2
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7546$as_echo_n "checking for $ac_word... " >&6; }
7547if ${ac_cv_path_ECHO+:} false; then :
7548  $as_echo_n "(cached) " >&6
7549else
7550  case $ECHO in
7551  [\\/]* | ?:[\\/]*)
7552  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7553  ;;
7554  *)
7555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7556for as_dir in $PATH
7557do
7558  IFS=$as_save_IFS
7559  test -z "$as_dir" && as_dir=.
7560    for ac_exec_ext in '' $ac_executable_extensions; do
7561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7562    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7564    break 2
7565  fi
7566done
7567  done
7568IFS=$as_save_IFS
7569
7570  ;;
7571esac
7572fi
7573ECHO=$ac_cv_path_ECHO
7574if test -n "$ECHO"; then
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7576$as_echo "$ECHO" >&6; }
7577else
7578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
7580fi
7581
7582
7583  test -n "$ECHO" && break
7584done
7585
7586    else
7587      # If it succeeded, then it was overridden by the user. We will use it
7588      # for the tool.
7589
7590      # First remove it from the list of overridden variables, so we can test
7591      # for unknown variables in the end.
7592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7593
7594      # Check if we try to supply an empty value
7595      if test "x$ECHO" = x; then
7596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7597$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7599$as_echo_n "checking for ECHO... " >&6; }
7600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7601$as_echo "disabled" >&6; }
7602      else
7603        # Check if the provided tool contains a complete path.
7604        tool_specified="$ECHO"
7605        tool_basename="${tool_specified##*/}"
7606        if test "x$tool_basename" = "x$tool_specified"; then
7607          # A command without a complete path is provided, search $PATH.
7608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7609$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7610          # Extract the first word of "$tool_basename", so it can be a program name with args.
7611set dummy $tool_basename; ac_word=$2
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613$as_echo_n "checking for $ac_word... " >&6; }
7614if ${ac_cv_path_ECHO+:} false; then :
7615  $as_echo_n "(cached) " >&6
7616else
7617  case $ECHO in
7618  [\\/]* | ?:[\\/]*)
7619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7620  ;;
7621  *)
7622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625  IFS=$as_save_IFS
7626  test -z "$as_dir" && as_dir=.
7627    for ac_exec_ext in '' $ac_executable_extensions; do
7628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631    break 2
7632  fi
7633done
7634  done
7635IFS=$as_save_IFS
7636
7637  ;;
7638esac
7639fi
7640ECHO=$ac_cv_path_ECHO
7641if test -n "$ECHO"; then
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7643$as_echo "$ECHO" >&6; }
7644else
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650          if test "x$ECHO" = x; then
7651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7652          fi
7653        else
7654          # Otherwise we believe it is a complete path. Use it as it is.
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7656$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7658$as_echo_n "checking for ECHO... " >&6; }
7659          if test ! -x "$tool_specified"; then
7660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7661$as_echo "not found" >&6; }
7662            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7663          fi
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7665$as_echo "$tool_specified" >&6; }
7666        fi
7667      fi
7668    fi
7669
7670  fi
7671
7672
7673
7674  if test "x$ECHO" = x; then
7675    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7676  fi
7677
7678
7679
7680
7681
7682  # Publish this variable in the help.
7683
7684
7685  if [ -z "${EXPR+x}" ]; then
7686    # The variable is not set by user, try to locate tool using the code snippet
7687    for ac_prog in expr
7688do
7689  # Extract the first word of "$ac_prog", so it can be a program name with args.
7690set dummy $ac_prog; ac_word=$2
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7692$as_echo_n "checking for $ac_word... " >&6; }
7693if ${ac_cv_path_EXPR+:} false; then :
7694  $as_echo_n "(cached) " >&6
7695else
7696  case $EXPR in
7697  [\\/]* | ?:[\\/]*)
7698  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7699  ;;
7700  *)
7701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7702for as_dir in $PATH
7703do
7704  IFS=$as_save_IFS
7705  test -z "$as_dir" && as_dir=.
7706    for ac_exec_ext in '' $ac_executable_extensions; do
7707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7708    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7710    break 2
7711  fi
7712done
7713  done
7714IFS=$as_save_IFS
7715
7716  ;;
7717esac
7718fi
7719EXPR=$ac_cv_path_EXPR
7720if test -n "$EXPR"; then
7721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7722$as_echo "$EXPR" >&6; }
7723else
7724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7725$as_echo "no" >&6; }
7726fi
7727
7728
7729  test -n "$EXPR" && break
7730done
7731
7732  else
7733    # The variable is set, but is it from the command line or the environment?
7734
7735    # Try to remove the string !EXPR! from our list.
7736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7738      # If it failed, the variable was not from the command line. Ignore it,
7739      # but warn the user (except for BASH, which is always set by the calling BASH).
7740      if test "xEXPR" != xBASH; then
7741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7742$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7743      fi
7744      # Try to locate tool using the code snippet
7745      for ac_prog in expr
7746do
7747  # Extract the first word of "$ac_prog", so it can be a program name with args.
7748set dummy $ac_prog; ac_word=$2
7749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750$as_echo_n "checking for $ac_word... " >&6; }
7751if ${ac_cv_path_EXPR+:} false; then :
7752  $as_echo_n "(cached) " >&6
7753else
7754  case $EXPR in
7755  [\\/]* | ?:[\\/]*)
7756  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7757  ;;
7758  *)
7759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760for as_dir in $PATH
7761do
7762  IFS=$as_save_IFS
7763  test -z "$as_dir" && as_dir=.
7764    for ac_exec_ext in '' $ac_executable_extensions; do
7765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7766    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7768    break 2
7769  fi
7770done
7771  done
7772IFS=$as_save_IFS
7773
7774  ;;
7775esac
7776fi
7777EXPR=$ac_cv_path_EXPR
7778if test -n "$EXPR"; then
7779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7780$as_echo "$EXPR" >&6; }
7781else
7782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783$as_echo "no" >&6; }
7784fi
7785
7786
7787  test -n "$EXPR" && break
7788done
7789
7790    else
7791      # If it succeeded, then it was overridden by the user. We will use it
7792      # for the tool.
7793
7794      # First remove it from the list of overridden variables, so we can test
7795      # for unknown variables in the end.
7796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7797
7798      # Check if we try to supply an empty value
7799      if test "x$EXPR" = x; then
7800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7801$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7803$as_echo_n "checking for EXPR... " >&6; }
7804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7805$as_echo "disabled" >&6; }
7806      else
7807        # Check if the provided tool contains a complete path.
7808        tool_specified="$EXPR"
7809        tool_basename="${tool_specified##*/}"
7810        if test "x$tool_basename" = "x$tool_specified"; then
7811          # A command without a complete path is provided, search $PATH.
7812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7813$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7814          # Extract the first word of "$tool_basename", so it can be a program name with args.
7815set dummy $tool_basename; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_EXPR+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $EXPR in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844EXPR=$ac_cv_path_EXPR
7845if test -n "$EXPR"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7847$as_echo "$EXPR" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854          if test "x$EXPR" = x; then
7855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7856          fi
7857        else
7858          # Otherwise we believe it is a complete path. Use it as it is.
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7860$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7862$as_echo_n "checking for EXPR... " >&6; }
7863          if test ! -x "$tool_specified"; then
7864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7865$as_echo "not found" >&6; }
7866            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7867          fi
7868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7869$as_echo "$tool_specified" >&6; }
7870        fi
7871      fi
7872    fi
7873
7874  fi
7875
7876
7877
7878  if test "x$EXPR" = x; then
7879    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7880  fi
7881
7882
7883
7884
7885
7886  # Publish this variable in the help.
7887
7888
7889  if [ -z "${FILE+x}" ]; then
7890    # The variable is not set by user, try to locate tool using the code snippet
7891    for ac_prog in file
7892do
7893  # Extract the first word of "$ac_prog", so it can be a program name with args.
7894set dummy $ac_prog; ac_word=$2
7895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7896$as_echo_n "checking for $ac_word... " >&6; }
7897if ${ac_cv_path_FILE+:} false; then :
7898  $as_echo_n "(cached) " >&6
7899else
7900  case $FILE in
7901  [\\/]* | ?:[\\/]*)
7902  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7903  ;;
7904  *)
7905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7906for as_dir in $PATH
7907do
7908  IFS=$as_save_IFS
7909  test -z "$as_dir" && as_dir=.
7910    for ac_exec_ext in '' $ac_executable_extensions; do
7911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7912    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7914    break 2
7915  fi
7916done
7917  done
7918IFS=$as_save_IFS
7919
7920  ;;
7921esac
7922fi
7923FILE=$ac_cv_path_FILE
7924if test -n "$FILE"; then
7925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7926$as_echo "$FILE" >&6; }
7927else
7928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929$as_echo "no" >&6; }
7930fi
7931
7932
7933  test -n "$FILE" && break
7934done
7935
7936  else
7937    # The variable is set, but is it from the command line or the environment?
7938
7939    # Try to remove the string !FILE! from our list.
7940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7942      # If it failed, the variable was not from the command line. Ignore it,
7943      # but warn the user (except for BASH, which is always set by the calling BASH).
7944      if test "xFILE" != xBASH; then
7945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7946$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7947      fi
7948      # Try to locate tool using the code snippet
7949      for ac_prog in file
7950do
7951  # Extract the first word of "$ac_prog", so it can be a program name with args.
7952set dummy $ac_prog; ac_word=$2
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954$as_echo_n "checking for $ac_word... " >&6; }
7955if ${ac_cv_path_FILE+:} false; then :
7956  $as_echo_n "(cached) " >&6
7957else
7958  case $FILE in
7959  [\\/]* | ?:[\\/]*)
7960  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7961  ;;
7962  *)
7963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964for as_dir in $PATH
7965do
7966  IFS=$as_save_IFS
7967  test -z "$as_dir" && as_dir=.
7968    for ac_exec_ext in '' $ac_executable_extensions; do
7969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972    break 2
7973  fi
7974done
7975  done
7976IFS=$as_save_IFS
7977
7978  ;;
7979esac
7980fi
7981FILE=$ac_cv_path_FILE
7982if test -n "$FILE"; then
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7984$as_echo "$FILE" >&6; }
7985else
7986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989
7990
7991  test -n "$FILE" && break
7992done
7993
7994    else
7995      # If it succeeded, then it was overridden by the user. We will use it
7996      # for the tool.
7997
7998      # First remove it from the list of overridden variables, so we can test
7999      # for unknown variables in the end.
8000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8001
8002      # Check if we try to supply an empty value
8003      if test "x$FILE" = x; then
8004        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8005$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8007$as_echo_n "checking for FILE... " >&6; }
8008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8009$as_echo "disabled" >&6; }
8010      else
8011        # Check if the provided tool contains a complete path.
8012        tool_specified="$FILE"
8013        tool_basename="${tool_specified##*/}"
8014        if test "x$tool_basename" = "x$tool_specified"; then
8015          # A command without a complete path is provided, search $PATH.
8016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8018          # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_FILE+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $FILE in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048FILE=$ac_cv_path_FILE
8049if test -n "$FILE"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8051$as_echo "$FILE" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058          if test "x$FILE" = x; then
8059            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060          fi
8061        else
8062          # Otherwise we believe it is a complete path. Use it as it is.
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8065          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8066$as_echo_n "checking for FILE... " >&6; }
8067          if test ! -x "$tool_specified"; then
8068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8071          fi
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074        fi
8075      fi
8076    fi
8077
8078  fi
8079
8080
8081
8082  if test "x$FILE" = x; then
8083    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8084  fi
8085
8086
8087
8088
8089
8090  # Publish this variable in the help.
8091
8092
8093  if [ -z "${FIND+x}" ]; then
8094    # The variable is not set by user, try to locate tool using the code snippet
8095    for ac_prog in find
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_FIND+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $FIND in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127FIND=$ac_cv_path_FIND
8128if test -n "$FIND"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8130$as_echo "$FIND" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137  test -n "$FIND" && break
8138done
8139
8140  else
8141    # The variable is set, but is it from the command line or the environment?
8142
8143    # Try to remove the string !FIND! from our list.
8144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8146      # If it failed, the variable was not from the command line. Ignore it,
8147      # but warn the user (except for BASH, which is always set by the calling BASH).
8148      if test "xFIND" != xBASH; then
8149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8150$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8151      fi
8152      # Try to locate tool using the code snippet
8153      for ac_prog in find
8154do
8155  # Extract the first word of "$ac_prog", so it can be a program name with args.
8156set dummy $ac_prog; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_FIND+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $FIND in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185FIND=$ac_cv_path_FIND
8186if test -n "$FIND"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8188$as_echo "$FIND" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195  test -n "$FIND" && break
8196done
8197
8198    else
8199      # If it succeeded, then it was overridden by the user. We will use it
8200      # for the tool.
8201
8202      # First remove it from the list of overridden variables, so we can test
8203      # for unknown variables in the end.
8204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8205
8206      # Check if we try to supply an empty value
8207      if test "x$FIND" = x; then
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8209$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8211$as_echo_n "checking for FIND... " >&6; }
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8213$as_echo "disabled" >&6; }
8214      else
8215        # Check if the provided tool contains a complete path.
8216        tool_specified="$FIND"
8217        tool_basename="${tool_specified##*/}"
8218        if test "x$tool_basename" = "x$tool_specified"; then
8219          # A command without a complete path is provided, search $PATH.
8220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8221$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8222          # Extract the first word of "$tool_basename", so it can be a program name with args.
8223set dummy $tool_basename; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_FIND+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $FIND in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252FIND=$ac_cv_path_FIND
8253if test -n "$FIND"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8255$as_echo "$FIND" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262          if test "x$FIND" = x; then
8263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8264          fi
8265        else
8266          # Otherwise we believe it is a complete path. Use it as it is.
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8268$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8270$as_echo_n "checking for FIND... " >&6; }
8271          if test ! -x "$tool_specified"; then
8272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8273$as_echo "not found" >&6; }
8274            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8275          fi
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8277$as_echo "$tool_specified" >&6; }
8278        fi
8279      fi
8280    fi
8281
8282  fi
8283
8284
8285
8286  if test "x$FIND" = x; then
8287    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8288  fi
8289
8290
8291
8292
8293
8294  # Publish this variable in the help.
8295
8296
8297  if [ -z "${HEAD+x}" ]; then
8298    # The variable is not set by user, try to locate tool using the code snippet
8299    for ac_prog in head
8300do
8301  # Extract the first word of "$ac_prog", so it can be a program name with args.
8302set dummy $ac_prog; ac_word=$2
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8304$as_echo_n "checking for $ac_word... " >&6; }
8305if ${ac_cv_path_HEAD+:} false; then :
8306  $as_echo_n "(cached) " >&6
8307else
8308  case $HEAD in
8309  [\\/]* | ?:[\\/]*)
8310  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8311  ;;
8312  *)
8313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8314for as_dir in $PATH
8315do
8316  IFS=$as_save_IFS
8317  test -z "$as_dir" && as_dir=.
8318    for ac_exec_ext in '' $ac_executable_extensions; do
8319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8320    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8322    break 2
8323  fi
8324done
8325  done
8326IFS=$as_save_IFS
8327
8328  ;;
8329esac
8330fi
8331HEAD=$ac_cv_path_HEAD
8332if test -n "$HEAD"; then
8333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8334$as_echo "$HEAD" >&6; }
8335else
8336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8337$as_echo "no" >&6; }
8338fi
8339
8340
8341  test -n "$HEAD" && break
8342done
8343
8344  else
8345    # The variable is set, but is it from the command line or the environment?
8346
8347    # Try to remove the string !HEAD! from our list.
8348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8350      # If it failed, the variable was not from the command line. Ignore it,
8351      # but warn the user (except for BASH, which is always set by the calling BASH).
8352      if test "xHEAD" != xBASH; then
8353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8354$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8355      fi
8356      # Try to locate tool using the code snippet
8357      for ac_prog in head
8358do
8359  # Extract the first word of "$ac_prog", so it can be a program name with args.
8360set dummy $ac_prog; ac_word=$2
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8362$as_echo_n "checking for $ac_word... " >&6; }
8363if ${ac_cv_path_HEAD+:} false; then :
8364  $as_echo_n "(cached) " >&6
8365else
8366  case $HEAD in
8367  [\\/]* | ?:[\\/]*)
8368  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8369  ;;
8370  *)
8371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372for as_dir in $PATH
8373do
8374  IFS=$as_save_IFS
8375  test -z "$as_dir" && as_dir=.
8376    for ac_exec_ext in '' $ac_executable_extensions; do
8377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8378    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8380    break 2
8381  fi
8382done
8383  done
8384IFS=$as_save_IFS
8385
8386  ;;
8387esac
8388fi
8389HEAD=$ac_cv_path_HEAD
8390if test -n "$HEAD"; then
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8392$as_echo "$HEAD" >&6; }
8393else
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
8397
8398
8399  test -n "$HEAD" && break
8400done
8401
8402    else
8403      # If it succeeded, then it was overridden by the user. We will use it
8404      # for the tool.
8405
8406      # First remove it from the list of overridden variables, so we can test
8407      # for unknown variables in the end.
8408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8409
8410      # Check if we try to supply an empty value
8411      if test "x$HEAD" = x; then
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8413$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8415$as_echo_n "checking for HEAD... " >&6; }
8416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8417$as_echo "disabled" >&6; }
8418      else
8419        # Check if the provided tool contains a complete path.
8420        tool_specified="$HEAD"
8421        tool_basename="${tool_specified##*/}"
8422        if test "x$tool_basename" = "x$tool_specified"; then
8423          # A command without a complete path is provided, search $PATH.
8424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8425$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8426          # Extract the first word of "$tool_basename", so it can be a program name with args.
8427set dummy $tool_basename; ac_word=$2
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429$as_echo_n "checking for $ac_word... " >&6; }
8430if ${ac_cv_path_HEAD+:} false; then :
8431  $as_echo_n "(cached) " >&6
8432else
8433  case $HEAD in
8434  [\\/]* | ?:[\\/]*)
8435  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8436  ;;
8437  *)
8438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439for as_dir in $PATH
8440do
8441  IFS=$as_save_IFS
8442  test -z "$as_dir" && as_dir=.
8443    for ac_exec_ext in '' $ac_executable_extensions; do
8444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8445    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447    break 2
8448  fi
8449done
8450  done
8451IFS=$as_save_IFS
8452
8453  ;;
8454esac
8455fi
8456HEAD=$ac_cv_path_HEAD
8457if test -n "$HEAD"; then
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8459$as_echo "$HEAD" >&6; }
8460else
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
8463fi
8464
8465
8466          if test "x$HEAD" = x; then
8467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8468          fi
8469        else
8470          # Otherwise we believe it is a complete path. Use it as it is.
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8472$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8474$as_echo_n "checking for HEAD... " >&6; }
8475          if test ! -x "$tool_specified"; then
8476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8477$as_echo "not found" >&6; }
8478            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8479          fi
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8481$as_echo "$tool_specified" >&6; }
8482        fi
8483      fi
8484    fi
8485
8486  fi
8487
8488
8489
8490  if test "x$HEAD" = x; then
8491    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8492  fi
8493
8494
8495
8496
8497
8498  # Publish this variable in the help.
8499
8500
8501  if [ -z "${GUNZIP+x}" ]; then
8502    # The variable is not set by user, try to locate tool using the code snippet
8503    for ac_prog in gunzip
8504do
8505  # Extract the first word of "$ac_prog", so it can be a program name with args.
8506set dummy $ac_prog; ac_word=$2
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8508$as_echo_n "checking for $ac_word... " >&6; }
8509if ${ac_cv_path_GUNZIP+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  case $GUNZIP in
8513  [\\/]* | ?:[\\/]*)
8514  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8515  ;;
8516  *)
8517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532  ;;
8533esac
8534fi
8535GUNZIP=$ac_cv_path_GUNZIP
8536if test -n "$GUNZIP"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8538$as_echo "$GUNZIP" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544
8545  test -n "$GUNZIP" && break
8546done
8547
8548  else
8549    # The variable is set, but is it from the command line or the environment?
8550
8551    # Try to remove the string !GUNZIP! from our list.
8552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8554      # If it failed, the variable was not from the command line. Ignore it,
8555      # but warn the user (except for BASH, which is always set by the calling BASH).
8556      if test "xGUNZIP" != xBASH; then
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8558$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8559      fi
8560      # Try to locate tool using the code snippet
8561      for ac_prog in gunzip
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_GUNZIP+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $GUNZIP in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593GUNZIP=$ac_cv_path_GUNZIP
8594if test -n "$GUNZIP"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8596$as_echo "$GUNZIP" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$GUNZIP" && break
8604done
8605
8606    else
8607      # If it succeeded, then it was overridden by the user. We will use it
8608      # for the tool.
8609
8610      # First remove it from the list of overridden variables, so we can test
8611      # for unknown variables in the end.
8612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8613
8614      # Check if we try to supply an empty value
8615      if test "x$GUNZIP" = x; then
8616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8617$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8619$as_echo_n "checking for GUNZIP... " >&6; }
8620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8621$as_echo "disabled" >&6; }
8622      else
8623        # Check if the provided tool contains a complete path.
8624        tool_specified="$GUNZIP"
8625        tool_basename="${tool_specified##*/}"
8626        if test "x$tool_basename" = "x$tool_specified"; then
8627          # A command without a complete path is provided, search $PATH.
8628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8629$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8630          # Extract the first word of "$tool_basename", so it can be a program name with args.
8631set dummy $tool_basename; ac_word=$2
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633$as_echo_n "checking for $ac_word... " >&6; }
8634if ${ac_cv_path_GUNZIP+:} false; then :
8635  $as_echo_n "(cached) " >&6
8636else
8637  case $GUNZIP in
8638  [\\/]* | ?:[\\/]*)
8639  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8640  ;;
8641  *)
8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645  IFS=$as_save_IFS
8646  test -z "$as_dir" && as_dir=.
8647    for ac_exec_ext in '' $ac_executable_extensions; do
8648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651    break 2
8652  fi
8653done
8654  done
8655IFS=$as_save_IFS
8656
8657  ;;
8658esac
8659fi
8660GUNZIP=$ac_cv_path_GUNZIP
8661if test -n "$GUNZIP"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8663$as_echo "$GUNZIP" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
8667fi
8668
8669
8670          if test "x$GUNZIP" = x; then
8671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8672          fi
8673        else
8674          # Otherwise we believe it is a complete path. Use it as it is.
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8676$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8678$as_echo_n "checking for GUNZIP... " >&6; }
8679          if test ! -x "$tool_specified"; then
8680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8681$as_echo "not found" >&6; }
8682            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8683          fi
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8685$as_echo "$tool_specified" >&6; }
8686        fi
8687      fi
8688    fi
8689
8690  fi
8691
8692
8693
8694  if test "x$GUNZIP" = x; then
8695    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8696  fi
8697
8698
8699
8700
8701
8702  # Publish this variable in the help.
8703
8704
8705  if [ -z "${GZIP+x}" ]; then
8706    # The variable is not set by user, try to locate tool using the code snippet
8707    for ac_prog in pigz gzip
8708do
8709  # Extract the first word of "$ac_prog", so it can be a program name with args.
8710set dummy $ac_prog; ac_word=$2
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712$as_echo_n "checking for $ac_word... " >&6; }
8713if ${ac_cv_path_GZIP+:} false; then :
8714  $as_echo_n "(cached) " >&6
8715else
8716  case $GZIP in
8717  [\\/]* | ?:[\\/]*)
8718  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8719  ;;
8720  *)
8721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8722for as_dir in $PATH
8723do
8724  IFS=$as_save_IFS
8725  test -z "$as_dir" && as_dir=.
8726    for ac_exec_ext in '' $ac_executable_extensions; do
8727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8728    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8730    break 2
8731  fi
8732done
8733  done
8734IFS=$as_save_IFS
8735
8736  ;;
8737esac
8738fi
8739GZIP=$ac_cv_path_GZIP
8740if test -n "$GZIP"; then
8741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8742$as_echo "$GZIP" >&6; }
8743else
8744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745$as_echo "no" >&6; }
8746fi
8747
8748
8749  test -n "$GZIP" && break
8750done
8751
8752  else
8753    # The variable is set, but is it from the command line or the environment?
8754
8755    # Try to remove the string !GZIP! from our list.
8756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8758      # If it failed, the variable was not from the command line. Ignore it,
8759      # but warn the user (except for BASH, which is always set by the calling BASH).
8760      if test "xGZIP" != xBASH; then
8761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8762$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8763      fi
8764      # Try to locate tool using the code snippet
8765      for ac_prog in pigz gzip
8766do
8767  # Extract the first word of "$ac_prog", so it can be a program name with args.
8768set dummy $ac_prog; ac_word=$2
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if ${ac_cv_path_GZIP+:} false; then :
8772  $as_echo_n "(cached) " >&6
8773else
8774  case $GZIP in
8775  [\\/]* | ?:[\\/]*)
8776  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8777  ;;
8778  *)
8779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780for as_dir in $PATH
8781do
8782  IFS=$as_save_IFS
8783  test -z "$as_dir" && as_dir=.
8784    for ac_exec_ext in '' $ac_executable_extensions; do
8785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788    break 2
8789  fi
8790done
8791  done
8792IFS=$as_save_IFS
8793
8794  ;;
8795esac
8796fi
8797GZIP=$ac_cv_path_GZIP
8798if test -n "$GZIP"; then
8799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8800$as_echo "$GZIP" >&6; }
8801else
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
8804fi
8805
8806
8807  test -n "$GZIP" && break
8808done
8809
8810    else
8811      # If it succeeded, then it was overridden by the user. We will use it
8812      # for the tool.
8813
8814      # First remove it from the list of overridden variables, so we can test
8815      # for unknown variables in the end.
8816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8817
8818      # Check if we try to supply an empty value
8819      if test "x$GZIP" = x; then
8820        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8821$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8823$as_echo_n "checking for GZIP... " >&6; }
8824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8825$as_echo "disabled" >&6; }
8826      else
8827        # Check if the provided tool contains a complete path.
8828        tool_specified="$GZIP"
8829        tool_basename="${tool_specified##*/}"
8830        if test "x$tool_basename" = "x$tool_specified"; then
8831          # A command without a complete path is provided, search $PATH.
8832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8833$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8834          # Extract the first word of "$tool_basename", so it can be a program name with args.
8835set dummy $tool_basename; ac_word=$2
8836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837$as_echo_n "checking for $ac_word... " >&6; }
8838if ${ac_cv_path_GZIP+:} false; then :
8839  $as_echo_n "(cached) " >&6
8840else
8841  case $GZIP in
8842  [\\/]* | ?:[\\/]*)
8843  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8844  ;;
8845  *)
8846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847for as_dir in $PATH
8848do
8849  IFS=$as_save_IFS
8850  test -z "$as_dir" && as_dir=.
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861  ;;
8862esac
8863fi
8864GZIP=$ac_cv_path_GZIP
8865if test -n "$GZIP"; then
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8867$as_echo "$GZIP" >&6; }
8868else
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870$as_echo "no" >&6; }
8871fi
8872
8873
8874          if test "x$GZIP" = x; then
8875            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8876          fi
8877        else
8878          # Otherwise we believe it is a complete path. Use it as it is.
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8880$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8881          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8882$as_echo_n "checking for GZIP... " >&6; }
8883          if test ! -x "$tool_specified"; then
8884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8885$as_echo "not found" >&6; }
8886            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8887          fi
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8889$as_echo "$tool_specified" >&6; }
8890        fi
8891      fi
8892    fi
8893
8894  fi
8895
8896
8897
8898  if test "x$GZIP" = x; then
8899    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8900  fi
8901
8902
8903
8904
8905
8906  # Publish this variable in the help.
8907
8908
8909  if [ -z "${LN+x}" ]; then
8910    # The variable is not set by user, try to locate tool using the code snippet
8911    for ac_prog in ln
8912do
8913  # Extract the first word of "$ac_prog", so it can be a program name with args.
8914set dummy $ac_prog; ac_word=$2
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916$as_echo_n "checking for $ac_word... " >&6; }
8917if ${ac_cv_path_LN+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  case $LN in
8921  [\\/]* | ?:[\\/]*)
8922  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8923  ;;
8924  *)
8925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926for as_dir in $PATH
8927do
8928  IFS=$as_save_IFS
8929  test -z "$as_dir" && as_dir=.
8930    for ac_exec_ext in '' $ac_executable_extensions; do
8931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8934    break 2
8935  fi
8936done
8937  done
8938IFS=$as_save_IFS
8939
8940  ;;
8941esac
8942fi
8943LN=$ac_cv_path_LN
8944if test -n "$LN"; then
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8946$as_echo "$LN" >&6; }
8947else
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
8950fi
8951
8952
8953  test -n "$LN" && break
8954done
8955
8956  else
8957    # The variable is set, but is it from the command line or the environment?
8958
8959    # Try to remove the string !LN! from our list.
8960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8962      # If it failed, the variable was not from the command line. Ignore it,
8963      # but warn the user (except for BASH, which is always set by the calling BASH).
8964      if test "xLN" != xBASH; then
8965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8966$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8967      fi
8968      # Try to locate tool using the code snippet
8969      for ac_prog in ln
8970do
8971  # Extract the first word of "$ac_prog", so it can be a program name with args.
8972set dummy $ac_prog; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_LN+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $LN in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001LN=$ac_cv_path_LN
9002if test -n "$LN"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9004$as_echo "$LN" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011  test -n "$LN" && break
9012done
9013
9014    else
9015      # If it succeeded, then it was overridden by the user. We will use it
9016      # for the tool.
9017
9018      # First remove it from the list of overridden variables, so we can test
9019      # for unknown variables in the end.
9020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9021
9022      # Check if we try to supply an empty value
9023      if test "x$LN" = x; then
9024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9025$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9027$as_echo_n "checking for LN... " >&6; }
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9029$as_echo "disabled" >&6; }
9030      else
9031        # Check if the provided tool contains a complete path.
9032        tool_specified="$LN"
9033        tool_basename="${tool_specified##*/}"
9034        if test "x$tool_basename" = "x$tool_specified"; then
9035          # A command without a complete path is provided, search $PATH.
9036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9037$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9038          # Extract the first word of "$tool_basename", so it can be a program name with args.
9039set dummy $tool_basename; ac_word=$2
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
9042if ${ac_cv_path_LN+:} false; then :
9043  $as_echo_n "(cached) " >&6
9044else
9045  case $LN in
9046  [\\/]* | ?:[\\/]*)
9047  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9048  ;;
9049  *)
9050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053  IFS=$as_save_IFS
9054  test -z "$as_dir" && as_dir=.
9055    for ac_exec_ext in '' $ac_executable_extensions; do
9056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059    break 2
9060  fi
9061done
9062  done
9063IFS=$as_save_IFS
9064
9065  ;;
9066esac
9067fi
9068LN=$ac_cv_path_LN
9069if test -n "$LN"; then
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9071$as_echo "$LN" >&6; }
9072else
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
9076
9077
9078          if test "x$LN" = x; then
9079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9080          fi
9081        else
9082          # Otherwise we believe it is a complete path. Use it as it is.
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9084$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9086$as_echo_n "checking for LN... " >&6; }
9087          if test ! -x "$tool_specified"; then
9088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9089$as_echo "not found" >&6; }
9090            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9091          fi
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9093$as_echo "$tool_specified" >&6; }
9094        fi
9095      fi
9096    fi
9097
9098  fi
9099
9100
9101
9102  if test "x$LN" = x; then
9103    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9104  fi
9105
9106
9107
9108
9109
9110  # Publish this variable in the help.
9111
9112
9113  if [ -z "${LS+x}" ]; then
9114    # The variable is not set by user, try to locate tool using the code snippet
9115    for ac_prog in ls
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_LS+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $LS in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147LS=$ac_cv_path_LS
9148if test -n "$LS"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9150$as_echo "$LS" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$LS" && break
9158done
9159
9160  else
9161    # The variable is set, but is it from the command line or the environment?
9162
9163    # Try to remove the string !LS! from our list.
9164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9166      # If it failed, the variable was not from the command line. Ignore it,
9167      # but warn the user (except for BASH, which is always set by the calling BASH).
9168      if test "xLS" != xBASH; then
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9170$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9171      fi
9172      # Try to locate tool using the code snippet
9173      for ac_prog in ls
9174do
9175  # Extract the first word of "$ac_prog", so it can be a program name with args.
9176set dummy $ac_prog; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_LS+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $LS in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205LS=$ac_cv_path_LS
9206if test -n "$LS"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9208$as_echo "$LS" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215  test -n "$LS" && break
9216done
9217
9218    else
9219      # If it succeeded, then it was overridden by the user. We will use it
9220      # for the tool.
9221
9222      # First remove it from the list of overridden variables, so we can test
9223      # for unknown variables in the end.
9224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9225
9226      # Check if we try to supply an empty value
9227      if test "x$LS" = x; then
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9229$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9231$as_echo_n "checking for LS... " >&6; }
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9233$as_echo "disabled" >&6; }
9234      else
9235        # Check if the provided tool contains a complete path.
9236        tool_specified="$LS"
9237        tool_basename="${tool_specified##*/}"
9238        if test "x$tool_basename" = "x$tool_specified"; then
9239          # A command without a complete path is provided, search $PATH.
9240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9241$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9242          # Extract the first word of "$tool_basename", so it can be a program name with args.
9243set dummy $tool_basename; ac_word=$2
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if ${ac_cv_path_LS+:} false; then :
9247  $as_echo_n "(cached) " >&6
9248else
9249  case $LS in
9250  [\\/]* | ?:[\\/]*)
9251  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9252  ;;
9253  *)
9254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255for as_dir in $PATH
9256do
9257  IFS=$as_save_IFS
9258  test -z "$as_dir" && as_dir=.
9259    for ac_exec_ext in '' $ac_executable_extensions; do
9260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9261    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9263    break 2
9264  fi
9265done
9266  done
9267IFS=$as_save_IFS
9268
9269  ;;
9270esac
9271fi
9272LS=$ac_cv_path_LS
9273if test -n "$LS"; then
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9275$as_echo "$LS" >&6; }
9276else
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
9279fi
9280
9281
9282          if test "x$LS" = x; then
9283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9284          fi
9285        else
9286          # Otherwise we believe it is a complete path. Use it as it is.
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9288$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9290$as_echo_n "checking for LS... " >&6; }
9291          if test ! -x "$tool_specified"; then
9292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9293$as_echo "not found" >&6; }
9294            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9295          fi
9296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9297$as_echo "$tool_specified" >&6; }
9298        fi
9299      fi
9300    fi
9301
9302  fi
9303
9304
9305
9306  if test "x$LS" = x; then
9307    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9308  fi
9309
9310
9311
9312
9313
9314  # Publish this variable in the help.
9315
9316
9317  if [ -z "${MKDIR+x}" ]; then
9318    # The variable is not set by user, try to locate tool using the code snippet
9319    for ac_prog in mkdir
9320do
9321  # Extract the first word of "$ac_prog", so it can be a program name with args.
9322set dummy $ac_prog; ac_word=$2
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9324$as_echo_n "checking for $ac_word... " >&6; }
9325if ${ac_cv_path_MKDIR+:} false; then :
9326  $as_echo_n "(cached) " >&6
9327else
9328  case $MKDIR in
9329  [\\/]* | ?:[\\/]*)
9330  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9331  ;;
9332  *)
9333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9334for as_dir in $PATH
9335do
9336  IFS=$as_save_IFS
9337  test -z "$as_dir" && as_dir=.
9338    for ac_exec_ext in '' $ac_executable_extensions; do
9339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9340    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9342    break 2
9343  fi
9344done
9345  done
9346IFS=$as_save_IFS
9347
9348  ;;
9349esac
9350fi
9351MKDIR=$ac_cv_path_MKDIR
9352if test -n "$MKDIR"; then
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9354$as_echo "$MKDIR" >&6; }
9355else
9356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
9358fi
9359
9360
9361  test -n "$MKDIR" && break
9362done
9363
9364  else
9365    # The variable is set, but is it from the command line or the environment?
9366
9367    # Try to remove the string !MKDIR! from our list.
9368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9370      # If it failed, the variable was not from the command line. Ignore it,
9371      # but warn the user (except for BASH, which is always set by the calling BASH).
9372      if test "xMKDIR" != xBASH; then
9373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9374$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9375      fi
9376      # Try to locate tool using the code snippet
9377      for ac_prog in mkdir
9378do
9379  # Extract the first word of "$ac_prog", so it can be a program name with args.
9380set dummy $ac_prog; ac_word=$2
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9382$as_echo_n "checking for $ac_word... " >&6; }
9383if ${ac_cv_path_MKDIR+:} false; then :
9384  $as_echo_n "(cached) " >&6
9385else
9386  case $MKDIR in
9387  [\\/]* | ?:[\\/]*)
9388  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9389  ;;
9390  *)
9391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9392for as_dir in $PATH
9393do
9394  IFS=$as_save_IFS
9395  test -z "$as_dir" && as_dir=.
9396    for ac_exec_ext in '' $ac_executable_extensions; do
9397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9398    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9400    break 2
9401  fi
9402done
9403  done
9404IFS=$as_save_IFS
9405
9406  ;;
9407esac
9408fi
9409MKDIR=$ac_cv_path_MKDIR
9410if test -n "$MKDIR"; then
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9412$as_echo "$MKDIR" >&6; }
9413else
9414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
9416fi
9417
9418
9419  test -n "$MKDIR" && break
9420done
9421
9422    else
9423      # If it succeeded, then it was overridden by the user. We will use it
9424      # for the tool.
9425
9426      # First remove it from the list of overridden variables, so we can test
9427      # for unknown variables in the end.
9428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9429
9430      # Check if we try to supply an empty value
9431      if test "x$MKDIR" = x; then
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9433$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9435$as_echo_n "checking for MKDIR... " >&6; }
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9437$as_echo "disabled" >&6; }
9438      else
9439        # Check if the provided tool contains a complete path.
9440        tool_specified="$MKDIR"
9441        tool_basename="${tool_specified##*/}"
9442        if test "x$tool_basename" = "x$tool_specified"; then
9443          # A command without a complete path is provided, search $PATH.
9444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9445$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9446          # Extract the first word of "$tool_basename", so it can be a program name with args.
9447set dummy $tool_basename; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_MKDIR+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $MKDIR in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476MKDIR=$ac_cv_path_MKDIR
9477if test -n "$MKDIR"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9479$as_echo "$MKDIR" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486          if test "x$MKDIR" = x; then
9487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9488          fi
9489        else
9490          # Otherwise we believe it is a complete path. Use it as it is.
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9492$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9494$as_echo_n "checking for MKDIR... " >&6; }
9495          if test ! -x "$tool_specified"; then
9496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9497$as_echo "not found" >&6; }
9498            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9499          fi
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9501$as_echo "$tool_specified" >&6; }
9502        fi
9503      fi
9504    fi
9505
9506  fi
9507
9508
9509
9510  if test "x$MKDIR" = x; then
9511    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9512  fi
9513
9514
9515
9516
9517
9518  # Publish this variable in the help.
9519
9520
9521  if [ -z "${MKTEMP+x}" ]; then
9522    # The variable is not set by user, try to locate tool using the code snippet
9523    for ac_prog in mktemp
9524do
9525  # Extract the first word of "$ac_prog", so it can be a program name with args.
9526set dummy $ac_prog; ac_word=$2
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528$as_echo_n "checking for $ac_word... " >&6; }
9529if ${ac_cv_path_MKTEMP+:} false; then :
9530  $as_echo_n "(cached) " >&6
9531else
9532  case $MKTEMP in
9533  [\\/]* | ?:[\\/]*)
9534  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9535  ;;
9536  *)
9537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538for as_dir in $PATH
9539do
9540  IFS=$as_save_IFS
9541  test -z "$as_dir" && as_dir=.
9542    for ac_exec_ext in '' $ac_executable_extensions; do
9543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9544    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546    break 2
9547  fi
9548done
9549  done
9550IFS=$as_save_IFS
9551
9552  ;;
9553esac
9554fi
9555MKTEMP=$ac_cv_path_MKTEMP
9556if test -n "$MKTEMP"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9558$as_echo "$MKTEMP" >&6; }
9559else
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562fi
9563
9564
9565  test -n "$MKTEMP" && break
9566done
9567
9568  else
9569    # The variable is set, but is it from the command line or the environment?
9570
9571    # Try to remove the string !MKTEMP! from our list.
9572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9574      # If it failed, the variable was not from the command line. Ignore it,
9575      # but warn the user (except for BASH, which is always set by the calling BASH).
9576      if test "xMKTEMP" != xBASH; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9578$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9579      fi
9580      # Try to locate tool using the code snippet
9581      for ac_prog in mktemp
9582do
9583  # Extract the first word of "$ac_prog", so it can be a program name with args.
9584set dummy $ac_prog; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_MKTEMP+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $MKTEMP in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613MKTEMP=$ac_cv_path_MKTEMP
9614if test -n "$MKTEMP"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9616$as_echo "$MKTEMP" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623  test -n "$MKTEMP" && break
9624done
9625
9626    else
9627      # If it succeeded, then it was overridden by the user. We will use it
9628      # for the tool.
9629
9630      # First remove it from the list of overridden variables, so we can test
9631      # for unknown variables in the end.
9632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9633
9634      # Check if we try to supply an empty value
9635      if test "x$MKTEMP" = x; then
9636        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9637$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9639$as_echo_n "checking for MKTEMP... " >&6; }
9640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9641$as_echo "disabled" >&6; }
9642      else
9643        # Check if the provided tool contains a complete path.
9644        tool_specified="$MKTEMP"
9645        tool_basename="${tool_specified##*/}"
9646        if test "x$tool_basename" = "x$tool_specified"; then
9647          # A command without a complete path is provided, search $PATH.
9648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9649$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9650          # Extract the first word of "$tool_basename", so it can be a program name with args.
9651set dummy $tool_basename; ac_word=$2
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653$as_echo_n "checking for $ac_word... " >&6; }
9654if ${ac_cv_path_MKTEMP+:} false; then :
9655  $as_echo_n "(cached) " >&6
9656else
9657  case $MKTEMP in
9658  [\\/]* | ?:[\\/]*)
9659  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9660  ;;
9661  *)
9662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663for as_dir in $PATH
9664do
9665  IFS=$as_save_IFS
9666  test -z "$as_dir" && as_dir=.
9667    for ac_exec_ext in '' $ac_executable_extensions; do
9668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671    break 2
9672  fi
9673done
9674  done
9675IFS=$as_save_IFS
9676
9677  ;;
9678esac
9679fi
9680MKTEMP=$ac_cv_path_MKTEMP
9681if test -n "$MKTEMP"; then
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9683$as_echo "$MKTEMP" >&6; }
9684else
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
9687fi
9688
9689
9690          if test "x$MKTEMP" = x; then
9691            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9692          fi
9693        else
9694          # Otherwise we believe it is a complete path. Use it as it is.
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9696$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9697          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9698$as_echo_n "checking for MKTEMP... " >&6; }
9699          if test ! -x "$tool_specified"; then
9700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9701$as_echo "not found" >&6; }
9702            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9703          fi
9704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9705$as_echo "$tool_specified" >&6; }
9706        fi
9707      fi
9708    fi
9709
9710  fi
9711
9712
9713
9714  if test "x$MKTEMP" = x; then
9715    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9716  fi
9717
9718
9719
9720
9721
9722  # Publish this variable in the help.
9723
9724
9725  if [ -z "${MV+x}" ]; then
9726    # The variable is not set by user, try to locate tool using the code snippet
9727    for ac_prog in mv
9728do
9729  # Extract the first word of "$ac_prog", so it can be a program name with args.
9730set dummy $ac_prog; ac_word=$2
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732$as_echo_n "checking for $ac_word... " >&6; }
9733if ${ac_cv_path_MV+:} false; then :
9734  $as_echo_n "(cached) " >&6
9735else
9736  case $MV in
9737  [\\/]* | ?:[\\/]*)
9738  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9739  ;;
9740  *)
9741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9742for as_dir in $PATH
9743do
9744  IFS=$as_save_IFS
9745  test -z "$as_dir" && as_dir=.
9746    for ac_exec_ext in '' $ac_executable_extensions; do
9747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9748    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9750    break 2
9751  fi
9752done
9753  done
9754IFS=$as_save_IFS
9755
9756  ;;
9757esac
9758fi
9759MV=$ac_cv_path_MV
9760if test -n "$MV"; then
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9762$as_echo "$MV" >&6; }
9763else
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
9766fi
9767
9768
9769  test -n "$MV" && break
9770done
9771
9772  else
9773    # The variable is set, but is it from the command line or the environment?
9774
9775    # Try to remove the string !MV! from our list.
9776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9778      # If it failed, the variable was not from the command line. Ignore it,
9779      # but warn the user (except for BASH, which is always set by the calling BASH).
9780      if test "xMV" != xBASH; then
9781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9782$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9783      fi
9784      # Try to locate tool using the code snippet
9785      for ac_prog in mv
9786do
9787  # Extract the first word of "$ac_prog", so it can be a program name with args.
9788set dummy $ac_prog; ac_word=$2
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790$as_echo_n "checking for $ac_word... " >&6; }
9791if ${ac_cv_path_MV+:} false; then :
9792  $as_echo_n "(cached) " >&6
9793else
9794  case $MV in
9795  [\\/]* | ?:[\\/]*)
9796  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9797  ;;
9798  *)
9799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9800for as_dir in $PATH
9801do
9802  IFS=$as_save_IFS
9803  test -z "$as_dir" && as_dir=.
9804    for ac_exec_ext in '' $ac_executable_extensions; do
9805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9806    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9808    break 2
9809  fi
9810done
9811  done
9812IFS=$as_save_IFS
9813
9814  ;;
9815esac
9816fi
9817MV=$ac_cv_path_MV
9818if test -n "$MV"; then
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9820$as_echo "$MV" >&6; }
9821else
9822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
9824fi
9825
9826
9827  test -n "$MV" && break
9828done
9829
9830    else
9831      # If it succeeded, then it was overridden by the user. We will use it
9832      # for the tool.
9833
9834      # First remove it from the list of overridden variables, so we can test
9835      # for unknown variables in the end.
9836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9837
9838      # Check if we try to supply an empty value
9839      if test "x$MV" = x; then
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9841$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9843$as_echo_n "checking for MV... " >&6; }
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9845$as_echo "disabled" >&6; }
9846      else
9847        # Check if the provided tool contains a complete path.
9848        tool_specified="$MV"
9849        tool_basename="${tool_specified##*/}"
9850        if test "x$tool_basename" = "x$tool_specified"; then
9851          # A command without a complete path is provided, search $PATH.
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9853$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9854          # Extract the first word of "$tool_basename", so it can be a program name with args.
9855set dummy $tool_basename; ac_word=$2
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857$as_echo_n "checking for $ac_word... " >&6; }
9858if ${ac_cv_path_MV+:} false; then :
9859  $as_echo_n "(cached) " >&6
9860else
9861  case $MV in
9862  [\\/]* | ?:[\\/]*)
9863  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9864  ;;
9865  *)
9866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867for as_dir in $PATH
9868do
9869  IFS=$as_save_IFS
9870  test -z "$as_dir" && as_dir=.
9871    for ac_exec_ext in '' $ac_executable_extensions; do
9872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875    break 2
9876  fi
9877done
9878  done
9879IFS=$as_save_IFS
9880
9881  ;;
9882esac
9883fi
9884MV=$ac_cv_path_MV
9885if test -n "$MV"; then
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9887$as_echo "$MV" >&6; }
9888else
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890$as_echo "no" >&6; }
9891fi
9892
9893
9894          if test "x$MV" = x; then
9895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9896          fi
9897        else
9898          # Otherwise we believe it is a complete path. Use it as it is.
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9900$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9902$as_echo_n "checking for MV... " >&6; }
9903          if test ! -x "$tool_specified"; then
9904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9905$as_echo "not found" >&6; }
9906            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9907          fi
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9909$as_echo "$tool_specified" >&6; }
9910        fi
9911      fi
9912    fi
9913
9914  fi
9915
9916
9917
9918  if test "x$MV" = x; then
9919    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9920  fi
9921
9922
9923
9924
9925
9926  # Publish this variable in the help.
9927
9928
9929  if [ -z "${NAWK+x}" ]; then
9930    # The variable is not set by user, try to locate tool using the code snippet
9931    for ac_prog in nawk gawk awk
9932do
9933  # Extract the first word of "$ac_prog", so it can be a program name with args.
9934set dummy $ac_prog; ac_word=$2
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936$as_echo_n "checking for $ac_word... " >&6; }
9937if ${ac_cv_path_NAWK+:} false; then :
9938  $as_echo_n "(cached) " >&6
9939else
9940  case $NAWK in
9941  [\\/]* | ?:[\\/]*)
9942  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9943  ;;
9944  *)
9945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946for as_dir in $PATH
9947do
9948  IFS=$as_save_IFS
9949  test -z "$as_dir" && as_dir=.
9950    for ac_exec_ext in '' $ac_executable_extensions; do
9951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9952    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954    break 2
9955  fi
9956done
9957  done
9958IFS=$as_save_IFS
9959
9960  ;;
9961esac
9962fi
9963NAWK=$ac_cv_path_NAWK
9964if test -n "$NAWK"; then
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9966$as_echo "$NAWK" >&6; }
9967else
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972
9973  test -n "$NAWK" && break
9974done
9975
9976  else
9977    # The variable is set, but is it from the command line or the environment?
9978
9979    # Try to remove the string !NAWK! from our list.
9980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9982      # If it failed, the variable was not from the command line. Ignore it,
9983      # but warn the user (except for BASH, which is always set by the calling BASH).
9984      if test "xNAWK" != xBASH; then
9985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9986$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9987      fi
9988      # Try to locate tool using the code snippet
9989      for ac_prog in nawk gawk awk
9990do
9991  # Extract the first word of "$ac_prog", so it can be a program name with args.
9992set dummy $ac_prog; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_NAWK+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $NAWK in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021NAWK=$ac_cv_path_NAWK
10022if test -n "$NAWK"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10024$as_echo "$NAWK" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031  test -n "$NAWK" && break
10032done
10033
10034    else
10035      # If it succeeded, then it was overridden by the user. We will use it
10036      # for the tool.
10037
10038      # First remove it from the list of overridden variables, so we can test
10039      # for unknown variables in the end.
10040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10041
10042      # Check if we try to supply an empty value
10043      if test "x$NAWK" = x; then
10044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10045$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10047$as_echo_n "checking for NAWK... " >&6; }
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10049$as_echo "disabled" >&6; }
10050      else
10051        # Check if the provided tool contains a complete path.
10052        tool_specified="$NAWK"
10053        tool_basename="${tool_specified##*/}"
10054        if test "x$tool_basename" = "x$tool_specified"; then
10055          # A command without a complete path is provided, search $PATH.
10056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10057$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10058          # Extract the first word of "$tool_basename", so it can be a program name with args.
10059set dummy $tool_basename; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if ${ac_cv_path_NAWK+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $NAWK in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088NAWK=$ac_cv_path_NAWK
10089if test -n "$NAWK"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10091$as_echo "$NAWK" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098          if test "x$NAWK" = x; then
10099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10100          fi
10101        else
10102          # Otherwise we believe it is a complete path. Use it as it is.
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10104$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10106$as_echo_n "checking for NAWK... " >&6; }
10107          if test ! -x "$tool_specified"; then
10108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10109$as_echo "not found" >&6; }
10110            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10111          fi
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10113$as_echo "$tool_specified" >&6; }
10114        fi
10115      fi
10116    fi
10117
10118  fi
10119
10120
10121
10122  if test "x$NAWK" = x; then
10123    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10124  fi
10125
10126
10127
10128
10129
10130  # Publish this variable in the help.
10131
10132
10133  if [ -z "${PRINTF+x}" ]; then
10134    # The variable is not set by user, try to locate tool using the code snippet
10135    for ac_prog in printf
10136do
10137  # Extract the first word of "$ac_prog", so it can be a program name with args.
10138set dummy $ac_prog; ac_word=$2
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10140$as_echo_n "checking for $ac_word... " >&6; }
10141if ${ac_cv_path_PRINTF+:} false; then :
10142  $as_echo_n "(cached) " >&6
10143else
10144  case $PRINTF in
10145  [\\/]* | ?:[\\/]*)
10146  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10147  ;;
10148  *)
10149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10150for as_dir in $PATH
10151do
10152  IFS=$as_save_IFS
10153  test -z "$as_dir" && as_dir=.
10154    for ac_exec_ext in '' $ac_executable_extensions; do
10155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10156    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10158    break 2
10159  fi
10160done
10161  done
10162IFS=$as_save_IFS
10163
10164  ;;
10165esac
10166fi
10167PRINTF=$ac_cv_path_PRINTF
10168if test -n "$PRINTF"; then
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10170$as_echo "$PRINTF" >&6; }
10171else
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
10174fi
10175
10176
10177  test -n "$PRINTF" && break
10178done
10179
10180  else
10181    # The variable is set, but is it from the command line or the environment?
10182
10183    # Try to remove the string !PRINTF! from our list.
10184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10186      # If it failed, the variable was not from the command line. Ignore it,
10187      # but warn the user (except for BASH, which is always set by the calling BASH).
10188      if test "xPRINTF" != xBASH; then
10189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10190$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10191      fi
10192      # Try to locate tool using the code snippet
10193      for ac_prog in printf
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_PRINTF+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $PRINTF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10214    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225PRINTF=$ac_cv_path_PRINTF
10226if test -n "$PRINTF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10228$as_echo "$PRINTF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$PRINTF" && break
10236done
10237
10238    else
10239      # If it succeeded, then it was overridden by the user. We will use it
10240      # for the tool.
10241
10242      # First remove it from the list of overridden variables, so we can test
10243      # for unknown variables in the end.
10244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10245
10246      # Check if we try to supply an empty value
10247      if test "x$PRINTF" = x; then
10248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10249$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10251$as_echo_n "checking for PRINTF... " >&6; }
10252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10253$as_echo "disabled" >&6; }
10254      else
10255        # Check if the provided tool contains a complete path.
10256        tool_specified="$PRINTF"
10257        tool_basename="${tool_specified##*/}"
10258        if test "x$tool_basename" = "x$tool_specified"; then
10259          # A command without a complete path is provided, search $PATH.
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10261$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10262          # Extract the first word of "$tool_basename", so it can be a program name with args.
10263set dummy $tool_basename; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_PRINTF+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $PRINTF in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292PRINTF=$ac_cv_path_PRINTF
10293if test -n "$PRINTF"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10295$as_echo "$PRINTF" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302          if test "x$PRINTF" = x; then
10303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10304          fi
10305        else
10306          # Otherwise we believe it is a complete path. Use it as it is.
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10308$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10310$as_echo_n "checking for PRINTF... " >&6; }
10311          if test ! -x "$tool_specified"; then
10312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10313$as_echo "not found" >&6; }
10314            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10315          fi
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10317$as_echo "$tool_specified" >&6; }
10318        fi
10319      fi
10320    fi
10321
10322  fi
10323
10324
10325
10326  if test "x$PRINTF" = x; then
10327    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10328  fi
10329
10330
10331
10332
10333
10334  # Publish this variable in the help.
10335
10336
10337  if [ -z "${RM+x}" ]; then
10338    # The variable is not set by user, try to locate tool using the code snippet
10339    for ac_prog in rm
10340do
10341  # Extract the first word of "$ac_prog", so it can be a program name with args.
10342set dummy $ac_prog; ac_word=$2
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10344$as_echo_n "checking for $ac_word... " >&6; }
10345if ${ac_cv_path_RM+:} false; then :
10346  $as_echo_n "(cached) " >&6
10347else
10348  case $RM in
10349  [\\/]* | ?:[\\/]*)
10350  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10351  ;;
10352  *)
10353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354for as_dir in $PATH
10355do
10356  IFS=$as_save_IFS
10357  test -z "$as_dir" && as_dir=.
10358    for ac_exec_ext in '' $ac_executable_extensions; do
10359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10360    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362    break 2
10363  fi
10364done
10365  done
10366IFS=$as_save_IFS
10367
10368  ;;
10369esac
10370fi
10371RM=$ac_cv_path_RM
10372if test -n "$RM"; then
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10374$as_echo "$RM" >&6; }
10375else
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
10378fi
10379
10380
10381  test -n "$RM" && break
10382done
10383
10384  else
10385    # The variable is set, but is it from the command line or the environment?
10386
10387    # Try to remove the string !RM! from our list.
10388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10390      # If it failed, the variable was not from the command line. Ignore it,
10391      # but warn the user (except for BASH, which is always set by the calling BASH).
10392      if test "xRM" != xBASH; then
10393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10394$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10395      fi
10396      # Try to locate tool using the code snippet
10397      for ac_prog in rm
10398do
10399  # Extract the first word of "$ac_prog", so it can be a program name with args.
10400set dummy $ac_prog; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if ${ac_cv_path_RM+:} false; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $RM in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10418    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429RM=$ac_cv_path_RM
10430if test -n "$RM"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10432$as_echo "$RM" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439  test -n "$RM" && break
10440done
10441
10442    else
10443      # If it succeeded, then it was overridden by the user. We will use it
10444      # for the tool.
10445
10446      # First remove it from the list of overridden variables, so we can test
10447      # for unknown variables in the end.
10448      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10449
10450      # Check if we try to supply an empty value
10451      if test "x$RM" = x; then
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10453$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10455$as_echo_n "checking for RM... " >&6; }
10456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10457$as_echo "disabled" >&6; }
10458      else
10459        # Check if the provided tool contains a complete path.
10460        tool_specified="$RM"
10461        tool_basename="${tool_specified##*/}"
10462        if test "x$tool_basename" = "x$tool_specified"; then
10463          # A command without a complete path is provided, search $PATH.
10464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10465$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10466          # Extract the first word of "$tool_basename", so it can be a program name with args.
10467set dummy $tool_basename; ac_word=$2
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10469$as_echo_n "checking for $ac_word... " >&6; }
10470if ${ac_cv_path_RM+:} false; then :
10471  $as_echo_n "(cached) " >&6
10472else
10473  case $RM in
10474  [\\/]* | ?:[\\/]*)
10475  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10476  ;;
10477  *)
10478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10479for as_dir in $PATH
10480do
10481  IFS=$as_save_IFS
10482  test -z "$as_dir" && as_dir=.
10483    for ac_exec_ext in '' $ac_executable_extensions; do
10484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10485    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10487    break 2
10488  fi
10489done
10490  done
10491IFS=$as_save_IFS
10492
10493  ;;
10494esac
10495fi
10496RM=$ac_cv_path_RM
10497if test -n "$RM"; then
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10499$as_echo "$RM" >&6; }
10500else
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
10503fi
10504
10505
10506          if test "x$RM" = x; then
10507            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10508          fi
10509        else
10510          # Otherwise we believe it is a complete path. Use it as it is.
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10512$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10513          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10514$as_echo_n "checking for RM... " >&6; }
10515          if test ! -x "$tool_specified"; then
10516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10517$as_echo "not found" >&6; }
10518            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10519          fi
10520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10521$as_echo "$tool_specified" >&6; }
10522        fi
10523      fi
10524    fi
10525
10526  fi
10527
10528
10529
10530  if test "x$RM" = x; then
10531    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10532  fi
10533
10534
10535
10536
10537
10538  # Publish this variable in the help.
10539
10540
10541  if [ -z "${RMDIR+x}" ]; then
10542    # The variable is not set by user, try to locate tool using the code snippet
10543    for ac_prog in rmdir
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_path_RMDIR+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  case $RMDIR in
10553  [\\/]* | ?:[\\/]*)
10554  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10555  ;;
10556  *)
10557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558for as_dir in $PATH
10559do
10560  IFS=$as_save_IFS
10561  test -z "$as_dir" && as_dir=.
10562    for ac_exec_ext in '' $ac_executable_extensions; do
10563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566    break 2
10567  fi
10568done
10569  done
10570IFS=$as_save_IFS
10571
10572  ;;
10573esac
10574fi
10575RMDIR=$ac_cv_path_RMDIR
10576if test -n "$RMDIR"; then
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10578$as_echo "$RMDIR" >&6; }
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582fi
10583
10584
10585  test -n "$RMDIR" && break
10586done
10587
10588  else
10589    # The variable is set, but is it from the command line or the environment?
10590
10591    # Try to remove the string !RMDIR! from our list.
10592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10594      # If it failed, the variable was not from the command line. Ignore it,
10595      # but warn the user (except for BASH, which is always set by the calling BASH).
10596      if test "xRMDIR" != xBASH; then
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10598$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10599      fi
10600      # Try to locate tool using the code snippet
10601      for ac_prog in rmdir
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_RMDIR+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $RMDIR in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633RMDIR=$ac_cv_path_RMDIR
10634if test -n "$RMDIR"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10636$as_echo "$RMDIR" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$RMDIR" && break
10644done
10645
10646    else
10647      # If it succeeded, then it was overridden by the user. We will use it
10648      # for the tool.
10649
10650      # First remove it from the list of overridden variables, so we can test
10651      # for unknown variables in the end.
10652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10653
10654      # Check if we try to supply an empty value
10655      if test "x$RMDIR" = x; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10657$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10659$as_echo_n "checking for RMDIR... " >&6; }
10660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10661$as_echo "disabled" >&6; }
10662      else
10663        # Check if the provided tool contains a complete path.
10664        tool_specified="$RMDIR"
10665        tool_basename="${tool_specified##*/}"
10666        if test "x$tool_basename" = "x$tool_specified"; then
10667          # A command without a complete path is provided, search $PATH.
10668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10669$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10670          # Extract the first word of "$tool_basename", so it can be a program name with args.
10671set dummy $tool_basename; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if ${ac_cv_path_RMDIR+:} false; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  case $RMDIR in
10678  [\\/]* | ?:[\\/]*)
10679  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10680  ;;
10681  *)
10682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10683for as_dir in $PATH
10684do
10685  IFS=$as_save_IFS
10686  test -z "$as_dir" && as_dir=.
10687    for ac_exec_ext in '' $ac_executable_extensions; do
10688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10689    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10691    break 2
10692  fi
10693done
10694  done
10695IFS=$as_save_IFS
10696
10697  ;;
10698esac
10699fi
10700RMDIR=$ac_cv_path_RMDIR
10701if test -n "$RMDIR"; then
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10703$as_echo "$RMDIR" >&6; }
10704else
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
10707fi
10708
10709
10710          if test "x$RMDIR" = x; then
10711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10712          fi
10713        else
10714          # Otherwise we believe it is a complete path. Use it as it is.
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10716$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10718$as_echo_n "checking for RMDIR... " >&6; }
10719          if test ! -x "$tool_specified"; then
10720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10721$as_echo "not found" >&6; }
10722            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10723          fi
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10725$as_echo "$tool_specified" >&6; }
10726        fi
10727      fi
10728    fi
10729
10730  fi
10731
10732
10733
10734  if test "x$RMDIR" = x; then
10735    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10736  fi
10737
10738
10739
10740
10741
10742  # Publish this variable in the help.
10743
10744
10745  if [ -z "${SH+x}" ]; then
10746    # The variable is not set by user, try to locate tool using the code snippet
10747    for ac_prog in sh
10748do
10749  # Extract the first word of "$ac_prog", so it can be a program name with args.
10750set dummy $ac_prog; ac_word=$2
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752$as_echo_n "checking for $ac_word... " >&6; }
10753if ${ac_cv_path_SH+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  case $SH in
10757  [\\/]* | ?:[\\/]*)
10758  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10759  ;;
10760  *)
10761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776  ;;
10777esac
10778fi
10779SH=$ac_cv_path_SH
10780if test -n "$SH"; then
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10782$as_echo "$SH" >&6; }
10783else
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786fi
10787
10788
10789  test -n "$SH" && break
10790done
10791
10792  else
10793    # The variable is set, but is it from the command line or the environment?
10794
10795    # Try to remove the string !SH! from our list.
10796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10798      # If it failed, the variable was not from the command line. Ignore it,
10799      # but warn the user (except for BASH, which is always set by the calling BASH).
10800      if test "xSH" != xBASH; then
10801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10802$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10803      fi
10804      # Try to locate tool using the code snippet
10805      for ac_prog in sh
10806do
10807  # Extract the first word of "$ac_prog", so it can be a program name with args.
10808set dummy $ac_prog; ac_word=$2
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810$as_echo_n "checking for $ac_word... " >&6; }
10811if ${ac_cv_path_SH+:} false; then :
10812  $as_echo_n "(cached) " >&6
10813else
10814  case $SH in
10815  [\\/]* | ?:[\\/]*)
10816  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10817  ;;
10818  *)
10819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834  ;;
10835esac
10836fi
10837SH=$ac_cv_path_SH
10838if test -n "$SH"; then
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10840$as_echo "$SH" >&6; }
10841else
10842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844fi
10845
10846
10847  test -n "$SH" && break
10848done
10849
10850    else
10851      # If it succeeded, then it was overridden by the user. We will use it
10852      # for the tool.
10853
10854      # First remove it from the list of overridden variables, so we can test
10855      # for unknown variables in the end.
10856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10857
10858      # Check if we try to supply an empty value
10859      if test "x$SH" = x; then
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10861$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10862        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10863$as_echo_n "checking for SH... " >&6; }
10864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10865$as_echo "disabled" >&6; }
10866      else
10867        # Check if the provided tool contains a complete path.
10868        tool_specified="$SH"
10869        tool_basename="${tool_specified##*/}"
10870        if test "x$tool_basename" = "x$tool_specified"; then
10871          # A command without a complete path is provided, search $PATH.
10872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10873$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10874          # Extract the first word of "$tool_basename", so it can be a program name with args.
10875set dummy $tool_basename; ac_word=$2
10876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877$as_echo_n "checking for $ac_word... " >&6; }
10878if ${ac_cv_path_SH+:} false; then :
10879  $as_echo_n "(cached) " >&6
10880else
10881  case $SH in
10882  [\\/]* | ?:[\\/]*)
10883  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10884  ;;
10885  *)
10886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887for as_dir in $PATH
10888do
10889  IFS=$as_save_IFS
10890  test -z "$as_dir" && as_dir=.
10891    for ac_exec_ext in '' $ac_executable_extensions; do
10892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895    break 2
10896  fi
10897done
10898  done
10899IFS=$as_save_IFS
10900
10901  ;;
10902esac
10903fi
10904SH=$ac_cv_path_SH
10905if test -n "$SH"; then
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10907$as_echo "$SH" >&6; }
10908else
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
10911fi
10912
10913
10914          if test "x$SH" = x; then
10915            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10916          fi
10917        else
10918          # Otherwise we believe it is a complete path. Use it as it is.
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10920$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10921          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10922$as_echo_n "checking for SH... " >&6; }
10923          if test ! -x "$tool_specified"; then
10924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10925$as_echo "not found" >&6; }
10926            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10927          fi
10928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10929$as_echo "$tool_specified" >&6; }
10930        fi
10931      fi
10932    fi
10933
10934  fi
10935
10936
10937
10938  if test "x$SH" = x; then
10939    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10940  fi
10941
10942
10943
10944
10945
10946  # Publish this variable in the help.
10947
10948
10949  if [ -z "${SORT+x}" ]; then
10950    # The variable is not set by user, try to locate tool using the code snippet
10951    for ac_prog in sort
10952do
10953  # Extract the first word of "$ac_prog", so it can be a program name with args.
10954set dummy $ac_prog; ac_word=$2
10955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10956$as_echo_n "checking for $ac_word... " >&6; }
10957if ${ac_cv_path_SORT+:} false; then :
10958  $as_echo_n "(cached) " >&6
10959else
10960  case $SORT in
10961  [\\/]* | ?:[\\/]*)
10962  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10963  ;;
10964  *)
10965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10966for as_dir in $PATH
10967do
10968  IFS=$as_save_IFS
10969  test -z "$as_dir" && as_dir=.
10970    for ac_exec_ext in '' $ac_executable_extensions; do
10971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10972    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10974    break 2
10975  fi
10976done
10977  done
10978IFS=$as_save_IFS
10979
10980  ;;
10981esac
10982fi
10983SORT=$ac_cv_path_SORT
10984if test -n "$SORT"; then
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10986$as_echo "$SORT" >&6; }
10987else
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
10990fi
10991
10992
10993  test -n "$SORT" && break
10994done
10995
10996  else
10997    # The variable is set, but is it from the command line or the environment?
10998
10999    # Try to remove the string !SORT! from our list.
11000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11002      # If it failed, the variable was not from the command line. Ignore it,
11003      # but warn the user (except for BASH, which is always set by the calling BASH).
11004      if test "xSORT" != xBASH; then
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11006$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11007      fi
11008      # Try to locate tool using the code snippet
11009      for ac_prog in sort
11010do
11011  # Extract the first word of "$ac_prog", so it can be a program name with args.
11012set dummy $ac_prog; ac_word=$2
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014$as_echo_n "checking for $ac_word... " >&6; }
11015if ${ac_cv_path_SORT+:} false; then :
11016  $as_echo_n "(cached) " >&6
11017else
11018  case $SORT in
11019  [\\/]* | ?:[\\/]*)
11020  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11021  ;;
11022  *)
11023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024for as_dir in $PATH
11025do
11026  IFS=$as_save_IFS
11027  test -z "$as_dir" && as_dir=.
11028    for ac_exec_ext in '' $ac_executable_extensions; do
11029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11030    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032    break 2
11033  fi
11034done
11035  done
11036IFS=$as_save_IFS
11037
11038  ;;
11039esac
11040fi
11041SORT=$ac_cv_path_SORT
11042if test -n "$SORT"; then
11043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11044$as_echo "$SORT" >&6; }
11045else
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
11048fi
11049
11050
11051  test -n "$SORT" && break
11052done
11053
11054    else
11055      # If it succeeded, then it was overridden by the user. We will use it
11056      # for the tool.
11057
11058      # First remove it from the list of overridden variables, so we can test
11059      # for unknown variables in the end.
11060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11061
11062      # Check if we try to supply an empty value
11063      if test "x$SORT" = x; then
11064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11065$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11067$as_echo_n "checking for SORT... " >&6; }
11068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11069$as_echo "disabled" >&6; }
11070      else
11071        # Check if the provided tool contains a complete path.
11072        tool_specified="$SORT"
11073        tool_basename="${tool_specified##*/}"
11074        if test "x$tool_basename" = "x$tool_specified"; then
11075          # A command without a complete path is provided, search $PATH.
11076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11077$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11078          # Extract the first word of "$tool_basename", so it can be a program name with args.
11079set dummy $tool_basename; ac_word=$2
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081$as_echo_n "checking for $ac_word... " >&6; }
11082if ${ac_cv_path_SORT+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  case $SORT in
11086  [\\/]* | ?:[\\/]*)
11087  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11088  ;;
11089  *)
11090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091for as_dir in $PATH
11092do
11093  IFS=$as_save_IFS
11094  test -z "$as_dir" && as_dir=.
11095    for ac_exec_ext in '' $ac_executable_extensions; do
11096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099    break 2
11100  fi
11101done
11102  done
11103IFS=$as_save_IFS
11104
11105  ;;
11106esac
11107fi
11108SORT=$ac_cv_path_SORT
11109if test -n "$SORT"; then
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11111$as_echo "$SORT" >&6; }
11112else
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
11115fi
11116
11117
11118          if test "x$SORT" = x; then
11119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11120          fi
11121        else
11122          # Otherwise we believe it is a complete path. Use it as it is.
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11124$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11126$as_echo_n "checking for SORT... " >&6; }
11127          if test ! -x "$tool_specified"; then
11128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11129$as_echo "not found" >&6; }
11130            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11131          fi
11132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11133$as_echo "$tool_specified" >&6; }
11134        fi
11135      fi
11136    fi
11137
11138  fi
11139
11140
11141
11142  if test "x$SORT" = x; then
11143    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11144  fi
11145
11146
11147
11148
11149
11150  # Publish this variable in the help.
11151
11152
11153  if [ -z "${TAIL+x}" ]; then
11154    # The variable is not set by user, try to locate tool using the code snippet
11155    for ac_prog in tail
11156do
11157  # Extract the first word of "$ac_prog", so it can be a program name with args.
11158set dummy $ac_prog; ac_word=$2
11159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11160$as_echo_n "checking for $ac_word... " >&6; }
11161if ${ac_cv_path_TAIL+:} false; then :
11162  $as_echo_n "(cached) " >&6
11163else
11164  case $TAIL in
11165  [\\/]* | ?:[\\/]*)
11166  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11167  ;;
11168  *)
11169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11170for as_dir in $PATH
11171do
11172  IFS=$as_save_IFS
11173  test -z "$as_dir" && as_dir=.
11174    for ac_exec_ext in '' $ac_executable_extensions; do
11175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11176    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11178    break 2
11179  fi
11180done
11181  done
11182IFS=$as_save_IFS
11183
11184  ;;
11185esac
11186fi
11187TAIL=$ac_cv_path_TAIL
11188if test -n "$TAIL"; then
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11190$as_echo "$TAIL" >&6; }
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195
11196
11197  test -n "$TAIL" && break
11198done
11199
11200  else
11201    # The variable is set, but is it from the command line or the environment?
11202
11203    # Try to remove the string !TAIL! from our list.
11204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11206      # If it failed, the variable was not from the command line. Ignore it,
11207      # but warn the user (except for BASH, which is always set by the calling BASH).
11208      if test "xTAIL" != xBASH; then
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11210$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11211      fi
11212      # Try to locate tool using the code snippet
11213      for ac_prog in tail
11214do
11215  # Extract the first word of "$ac_prog", so it can be a program name with args.
11216set dummy $ac_prog; ac_word=$2
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11218$as_echo_n "checking for $ac_word... " >&6; }
11219if ${ac_cv_path_TAIL+:} false; then :
11220  $as_echo_n "(cached) " >&6
11221else
11222  case $TAIL in
11223  [\\/]* | ?:[\\/]*)
11224  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11225  ;;
11226  *)
11227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11228for as_dir in $PATH
11229do
11230  IFS=$as_save_IFS
11231  test -z "$as_dir" && as_dir=.
11232    for ac_exec_ext in '' $ac_executable_extensions; do
11233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11234    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11236    break 2
11237  fi
11238done
11239  done
11240IFS=$as_save_IFS
11241
11242  ;;
11243esac
11244fi
11245TAIL=$ac_cv_path_TAIL
11246if test -n "$TAIL"; then
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11248$as_echo "$TAIL" >&6; }
11249else
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252fi
11253
11254
11255  test -n "$TAIL" && break
11256done
11257
11258    else
11259      # If it succeeded, then it was overridden by the user. We will use it
11260      # for the tool.
11261
11262      # First remove it from the list of overridden variables, so we can test
11263      # for unknown variables in the end.
11264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11265
11266      # Check if we try to supply an empty value
11267      if test "x$TAIL" = x; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11269$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11271$as_echo_n "checking for TAIL... " >&6; }
11272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11273$as_echo "disabled" >&6; }
11274      else
11275        # Check if the provided tool contains a complete path.
11276        tool_specified="$TAIL"
11277        tool_basename="${tool_specified##*/}"
11278        if test "x$tool_basename" = "x$tool_specified"; then
11279          # A command without a complete path is provided, search $PATH.
11280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11281$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11282          # Extract the first word of "$tool_basename", so it can be a program name with args.
11283set dummy $tool_basename; ac_word=$2
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285$as_echo_n "checking for $ac_word... " >&6; }
11286if ${ac_cv_path_TAIL+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  case $TAIL in
11290  [\\/]* | ?:[\\/]*)
11291  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11292  ;;
11293  *)
11294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295for as_dir in $PATH
11296do
11297  IFS=$as_save_IFS
11298  test -z "$as_dir" && as_dir=.
11299    for ac_exec_ext in '' $ac_executable_extensions; do
11300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303    break 2
11304  fi
11305done
11306  done
11307IFS=$as_save_IFS
11308
11309  ;;
11310esac
11311fi
11312TAIL=$ac_cv_path_TAIL
11313if test -n "$TAIL"; then
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11315$as_echo "$TAIL" >&6; }
11316else
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319fi
11320
11321
11322          if test "x$TAIL" = x; then
11323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11324          fi
11325        else
11326          # Otherwise we believe it is a complete path. Use it as it is.
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11328$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11330$as_echo_n "checking for TAIL... " >&6; }
11331          if test ! -x "$tool_specified"; then
11332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11333$as_echo "not found" >&6; }
11334            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11335          fi
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11337$as_echo "$tool_specified" >&6; }
11338        fi
11339      fi
11340    fi
11341
11342  fi
11343
11344
11345
11346  if test "x$TAIL" = x; then
11347    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11348  fi
11349
11350
11351
11352
11353
11354  # Publish this variable in the help.
11355
11356
11357  if [ -z "${TAR+x}" ]; then
11358    # The variable is not set by user, try to locate tool using the code snippet
11359    for ac_prog in gtar tar
11360do
11361  # Extract the first word of "$ac_prog", so it can be a program name with args.
11362set dummy $ac_prog; ac_word=$2
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11364$as_echo_n "checking for $ac_word... " >&6; }
11365if ${ac_cv_path_TAR+:} false; then :
11366  $as_echo_n "(cached) " >&6
11367else
11368  case $TAR in
11369  [\\/]* | ?:[\\/]*)
11370  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11371  ;;
11372  *)
11373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11374for as_dir in $PATH
11375do
11376  IFS=$as_save_IFS
11377  test -z "$as_dir" && as_dir=.
11378    for ac_exec_ext in '' $ac_executable_extensions; do
11379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11380    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11382    break 2
11383  fi
11384done
11385  done
11386IFS=$as_save_IFS
11387
11388  ;;
11389esac
11390fi
11391TAR=$ac_cv_path_TAR
11392if test -n "$TAR"; then
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11394$as_echo "$TAR" >&6; }
11395else
11396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
11398fi
11399
11400
11401  test -n "$TAR" && break
11402done
11403
11404  else
11405    # The variable is set, but is it from the command line or the environment?
11406
11407    # Try to remove the string !TAR! from our list.
11408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11410      # If it failed, the variable was not from the command line. Ignore it,
11411      # but warn the user (except for BASH, which is always set by the calling BASH).
11412      if test "xTAR" != xBASH; then
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11414$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11415      fi
11416      # Try to locate tool using the code snippet
11417      for ac_prog in gtar tar
11418do
11419  # Extract the first word of "$ac_prog", so it can be a program name with args.
11420set dummy $ac_prog; ac_word=$2
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11422$as_echo_n "checking for $ac_word... " >&6; }
11423if ${ac_cv_path_TAR+:} false; then :
11424  $as_echo_n "(cached) " >&6
11425else
11426  case $TAR in
11427  [\\/]* | ?:[\\/]*)
11428  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11429  ;;
11430  *)
11431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11432for as_dir in $PATH
11433do
11434  IFS=$as_save_IFS
11435  test -z "$as_dir" && as_dir=.
11436    for ac_exec_ext in '' $ac_executable_extensions; do
11437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11438    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11440    break 2
11441  fi
11442done
11443  done
11444IFS=$as_save_IFS
11445
11446  ;;
11447esac
11448fi
11449TAR=$ac_cv_path_TAR
11450if test -n "$TAR"; then
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11452$as_echo "$TAR" >&6; }
11453else
11454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
11456fi
11457
11458
11459  test -n "$TAR" && break
11460done
11461
11462    else
11463      # If it succeeded, then it was overridden by the user. We will use it
11464      # for the tool.
11465
11466      # First remove it from the list of overridden variables, so we can test
11467      # for unknown variables in the end.
11468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11469
11470      # Check if we try to supply an empty value
11471      if test "x$TAR" = x; then
11472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11473$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11475$as_echo_n "checking for TAR... " >&6; }
11476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11477$as_echo "disabled" >&6; }
11478      else
11479        # Check if the provided tool contains a complete path.
11480        tool_specified="$TAR"
11481        tool_basename="${tool_specified##*/}"
11482        if test "x$tool_basename" = "x$tool_specified"; then
11483          # A command without a complete path is provided, search $PATH.
11484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11485$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11486          # Extract the first word of "$tool_basename", so it can be a program name with args.
11487set dummy $tool_basename; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_TAR+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $TAR in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516TAR=$ac_cv_path_TAR
11517if test -n "$TAR"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11519$as_echo "$TAR" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526          if test "x$TAR" = x; then
11527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11528          fi
11529        else
11530          # Otherwise we believe it is a complete path. Use it as it is.
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11532$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11534$as_echo_n "checking for TAR... " >&6; }
11535          if test ! -x "$tool_specified"; then
11536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11537$as_echo "not found" >&6; }
11538            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11539          fi
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11541$as_echo "$tool_specified" >&6; }
11542        fi
11543      fi
11544    fi
11545
11546  fi
11547
11548
11549
11550  if test "x$TAR" = x; then
11551    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11552  fi
11553
11554
11555
11556
11557
11558  # Publish this variable in the help.
11559
11560
11561  if [ -z "${TEE+x}" ]; then
11562    # The variable is not set by user, try to locate tool using the code snippet
11563    for ac_prog in tee
11564do
11565  # Extract the first word of "$ac_prog", so it can be a program name with args.
11566set dummy $ac_prog; ac_word=$2
11567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11568$as_echo_n "checking for $ac_word... " >&6; }
11569if ${ac_cv_path_TEE+:} false; then :
11570  $as_echo_n "(cached) " >&6
11571else
11572  case $TEE in
11573  [\\/]* | ?:[\\/]*)
11574  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11575  ;;
11576  *)
11577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11578for as_dir in $PATH
11579do
11580  IFS=$as_save_IFS
11581  test -z "$as_dir" && as_dir=.
11582    for ac_exec_ext in '' $ac_executable_extensions; do
11583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11584    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11586    break 2
11587  fi
11588done
11589  done
11590IFS=$as_save_IFS
11591
11592  ;;
11593esac
11594fi
11595TEE=$ac_cv_path_TEE
11596if test -n "$TEE"; then
11597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11598$as_echo "$TEE" >&6; }
11599else
11600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
11602fi
11603
11604
11605  test -n "$TEE" && break
11606done
11607
11608  else
11609    # The variable is set, but is it from the command line or the environment?
11610
11611    # Try to remove the string !TEE! from our list.
11612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11614      # If it failed, the variable was not from the command line. Ignore it,
11615      # but warn the user (except for BASH, which is always set by the calling BASH).
11616      if test "xTEE" != xBASH; then
11617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11618$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11619      fi
11620      # Try to locate tool using the code snippet
11621      for ac_prog in tee
11622do
11623  # Extract the first word of "$ac_prog", so it can be a program name with args.
11624set dummy $ac_prog; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if ${ac_cv_path_TEE+:} false; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  case $TEE in
11631  [\\/]* | ?:[\\/]*)
11632  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11633  ;;
11634  *)
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650  ;;
11651esac
11652fi
11653TEE=$ac_cv_path_TEE
11654if test -n "$TEE"; then
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11656$as_echo "$TEE" >&6; }
11657else
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663  test -n "$TEE" && break
11664done
11665
11666    else
11667      # If it succeeded, then it was overridden by the user. We will use it
11668      # for the tool.
11669
11670      # First remove it from the list of overridden variables, so we can test
11671      # for unknown variables in the end.
11672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11673
11674      # Check if we try to supply an empty value
11675      if test "x$TEE" = x; then
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11677$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11679$as_echo_n "checking for TEE... " >&6; }
11680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11681$as_echo "disabled" >&6; }
11682      else
11683        # Check if the provided tool contains a complete path.
11684        tool_specified="$TEE"
11685        tool_basename="${tool_specified##*/}"
11686        if test "x$tool_basename" = "x$tool_specified"; then
11687          # A command without a complete path is provided, search $PATH.
11688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11689$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11690          # Extract the first word of "$tool_basename", so it can be a program name with args.
11691set dummy $tool_basename; ac_word=$2
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11693$as_echo_n "checking for $ac_word... " >&6; }
11694if ${ac_cv_path_TEE+:} false; then :
11695  $as_echo_n "(cached) " >&6
11696else
11697  case $TEE in
11698  [\\/]* | ?:[\\/]*)
11699  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11700  ;;
11701  *)
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_exec_ext in '' $ac_executable_extensions; do
11708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11709    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11711    break 2
11712  fi
11713done
11714  done
11715IFS=$as_save_IFS
11716
11717  ;;
11718esac
11719fi
11720TEE=$ac_cv_path_TEE
11721if test -n "$TEE"; then
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11723$as_echo "$TEE" >&6; }
11724else
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727fi
11728
11729
11730          if test "x$TEE" = x; then
11731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11732          fi
11733        else
11734          # Otherwise we believe it is a complete path. Use it as it is.
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11736$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11738$as_echo_n "checking for TEE... " >&6; }
11739          if test ! -x "$tool_specified"; then
11740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11741$as_echo "not found" >&6; }
11742            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11743          fi
11744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11745$as_echo "$tool_specified" >&6; }
11746        fi
11747      fi
11748    fi
11749
11750  fi
11751
11752
11753
11754  if test "x$TEE" = x; then
11755    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11756  fi
11757
11758
11759
11760
11761
11762  # Publish this variable in the help.
11763
11764
11765  if [ -z "${TOUCH+x}" ]; then
11766    # The variable is not set by user, try to locate tool using the code snippet
11767    for ac_prog in touch
11768do
11769  # Extract the first word of "$ac_prog", so it can be a program name with args.
11770set dummy $ac_prog; ac_word=$2
11771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11772$as_echo_n "checking for $ac_word... " >&6; }
11773if ${ac_cv_path_TOUCH+:} false; then :
11774  $as_echo_n "(cached) " >&6
11775else
11776  case $TOUCH in
11777  [\\/]* | ?:[\\/]*)
11778  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11779  ;;
11780  *)
11781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11782for as_dir in $PATH
11783do
11784  IFS=$as_save_IFS
11785  test -z "$as_dir" && as_dir=.
11786    for ac_exec_ext in '' $ac_executable_extensions; do
11787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11788    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11790    break 2
11791  fi
11792done
11793  done
11794IFS=$as_save_IFS
11795
11796  ;;
11797esac
11798fi
11799TOUCH=$ac_cv_path_TOUCH
11800if test -n "$TOUCH"; then
11801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11802$as_echo "$TOUCH" >&6; }
11803else
11804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806fi
11807
11808
11809  test -n "$TOUCH" && break
11810done
11811
11812  else
11813    # The variable is set, but is it from the command line or the environment?
11814
11815    # Try to remove the string !TOUCH! from our list.
11816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11818      # If it failed, the variable was not from the command line. Ignore it,
11819      # but warn the user (except for BASH, which is always set by the calling BASH).
11820      if test "xTOUCH" != xBASH; then
11821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11822$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11823      fi
11824      # Try to locate tool using the code snippet
11825      for ac_prog in touch
11826do
11827  # Extract the first word of "$ac_prog", so it can be a program name with args.
11828set dummy $ac_prog; ac_word=$2
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11830$as_echo_n "checking for $ac_word... " >&6; }
11831if ${ac_cv_path_TOUCH+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  case $TOUCH in
11835  [\\/]* | ?:[\\/]*)
11836  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11837  ;;
11838  *)
11839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH
11841do
11842  IFS=$as_save_IFS
11843  test -z "$as_dir" && as_dir=.
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11846    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11848    break 2
11849  fi
11850done
11851  done
11852IFS=$as_save_IFS
11853
11854  ;;
11855esac
11856fi
11857TOUCH=$ac_cv_path_TOUCH
11858if test -n "$TOUCH"; then
11859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11860$as_echo "$TOUCH" >&6; }
11861else
11862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
11864fi
11865
11866
11867  test -n "$TOUCH" && break
11868done
11869
11870    else
11871      # If it succeeded, then it was overridden by the user. We will use it
11872      # for the tool.
11873
11874      # First remove it from the list of overridden variables, so we can test
11875      # for unknown variables in the end.
11876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11877
11878      # Check if we try to supply an empty value
11879      if test "x$TOUCH" = x; then
11880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11881$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11883$as_echo_n "checking for TOUCH... " >&6; }
11884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11885$as_echo "disabled" >&6; }
11886      else
11887        # Check if the provided tool contains a complete path.
11888        tool_specified="$TOUCH"
11889        tool_basename="${tool_specified##*/}"
11890        if test "x$tool_basename" = "x$tool_specified"; then
11891          # A command without a complete path is provided, search $PATH.
11892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11893$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11894          # Extract the first word of "$tool_basename", so it can be a program name with args.
11895set dummy $tool_basename; ac_word=$2
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897$as_echo_n "checking for $ac_word... " >&6; }
11898if ${ac_cv_path_TOUCH+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  case $TOUCH in
11902  [\\/]* | ?:[\\/]*)
11903  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11904  ;;
11905  *)
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_exec_ext in '' $ac_executable_extensions; do
11912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915    break 2
11916  fi
11917done
11918  done
11919IFS=$as_save_IFS
11920
11921  ;;
11922esac
11923fi
11924TOUCH=$ac_cv_path_TOUCH
11925if test -n "$TOUCH"; then
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11927$as_echo "$TOUCH" >&6; }
11928else
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
11931fi
11932
11933
11934          if test "x$TOUCH" = x; then
11935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11936          fi
11937        else
11938          # Otherwise we believe it is a complete path. Use it as it is.
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11940$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11942$as_echo_n "checking for TOUCH... " >&6; }
11943          if test ! -x "$tool_specified"; then
11944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11945$as_echo "not found" >&6; }
11946            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11947          fi
11948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11949$as_echo "$tool_specified" >&6; }
11950        fi
11951      fi
11952    fi
11953
11954  fi
11955
11956
11957
11958  if test "x$TOUCH" = x; then
11959    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11960  fi
11961
11962
11963
11964
11965
11966  # Publish this variable in the help.
11967
11968
11969  if [ -z "${TR+x}" ]; then
11970    # The variable is not set by user, try to locate tool using the code snippet
11971    for ac_prog in tr
11972do
11973  # Extract the first word of "$ac_prog", so it can be a program name with args.
11974set dummy $ac_prog; ac_word=$2
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11976$as_echo_n "checking for $ac_word... " >&6; }
11977if ${ac_cv_path_TR+:} false; then :
11978  $as_echo_n "(cached) " >&6
11979else
11980  case $TR in
11981  [\\/]* | ?:[\\/]*)
11982  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11983  ;;
11984  *)
11985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11986for as_dir in $PATH
11987do
11988  IFS=$as_save_IFS
11989  test -z "$as_dir" && as_dir=.
11990    for ac_exec_ext in '' $ac_executable_extensions; do
11991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11992    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11994    break 2
11995  fi
11996done
11997  done
11998IFS=$as_save_IFS
11999
12000  ;;
12001esac
12002fi
12003TR=$ac_cv_path_TR
12004if test -n "$TR"; then
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12006$as_echo "$TR" >&6; }
12007else
12008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010fi
12011
12012
12013  test -n "$TR" && break
12014done
12015
12016  else
12017    # The variable is set, but is it from the command line or the environment?
12018
12019    # Try to remove the string !TR! from our list.
12020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12022      # If it failed, the variable was not from the command line. Ignore it,
12023      # but warn the user (except for BASH, which is always set by the calling BASH).
12024      if test "xTR" != xBASH; then
12025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12026$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12027      fi
12028      # Try to locate tool using the code snippet
12029      for ac_prog in tr
12030do
12031  # Extract the first word of "$ac_prog", so it can be a program name with args.
12032set dummy $ac_prog; ac_word=$2
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034$as_echo_n "checking for $ac_word... " >&6; }
12035if ${ac_cv_path_TR+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  case $TR in
12039  [\\/]* | ?:[\\/]*)
12040  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12041  ;;
12042  *)
12043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044for as_dir in $PATH
12045do
12046  IFS=$as_save_IFS
12047  test -z "$as_dir" && as_dir=.
12048    for ac_exec_ext in '' $ac_executable_extensions; do
12049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12050    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052    break 2
12053  fi
12054done
12055  done
12056IFS=$as_save_IFS
12057
12058  ;;
12059esac
12060fi
12061TR=$ac_cv_path_TR
12062if test -n "$TR"; then
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12064$as_echo "$TR" >&6; }
12065else
12066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
12068fi
12069
12070
12071  test -n "$TR" && break
12072done
12073
12074    else
12075      # If it succeeded, then it was overridden by the user. We will use it
12076      # for the tool.
12077
12078      # First remove it from the list of overridden variables, so we can test
12079      # for unknown variables in the end.
12080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12081
12082      # Check if we try to supply an empty value
12083      if test "x$TR" = x; then
12084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12085$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12087$as_echo_n "checking for TR... " >&6; }
12088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12089$as_echo "disabled" >&6; }
12090      else
12091        # Check if the provided tool contains a complete path.
12092        tool_specified="$TR"
12093        tool_basename="${tool_specified##*/}"
12094        if test "x$tool_basename" = "x$tool_specified"; then
12095          # A command without a complete path is provided, search $PATH.
12096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12097$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12098          # Extract the first word of "$tool_basename", so it can be a program name with args.
12099set dummy $tool_basename; ac_word=$2
12100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12101$as_echo_n "checking for $ac_word... " >&6; }
12102if ${ac_cv_path_TR+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  case $TR in
12106  [\\/]* | ?:[\\/]*)
12107  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12108  ;;
12109  *)
12110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12111for as_dir in $PATH
12112do
12113  IFS=$as_save_IFS
12114  test -z "$as_dir" && as_dir=.
12115    for ac_exec_ext in '' $ac_executable_extensions; do
12116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12117    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12119    break 2
12120  fi
12121done
12122  done
12123IFS=$as_save_IFS
12124
12125  ;;
12126esac
12127fi
12128TR=$ac_cv_path_TR
12129if test -n "$TR"; then
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12131$as_echo "$TR" >&6; }
12132else
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
12135fi
12136
12137
12138          if test "x$TR" = x; then
12139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12140          fi
12141        else
12142          # Otherwise we believe it is a complete path. Use it as it is.
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12144$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12146$as_echo_n "checking for TR... " >&6; }
12147          if test ! -x "$tool_specified"; then
12148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12149$as_echo "not found" >&6; }
12150            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12151          fi
12152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12153$as_echo "$tool_specified" >&6; }
12154        fi
12155      fi
12156    fi
12157
12158  fi
12159
12160
12161
12162  if test "x$TR" = x; then
12163    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12164  fi
12165
12166
12167
12168
12169
12170  # Publish this variable in the help.
12171
12172
12173  if [ -z "${UNAME+x}" ]; then
12174    # The variable is not set by user, try to locate tool using the code snippet
12175    for ac_prog in uname
12176do
12177  # Extract the first word of "$ac_prog", so it can be a program name with args.
12178set dummy $ac_prog; ac_word=$2
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12180$as_echo_n "checking for $ac_word... " >&6; }
12181if ${ac_cv_path_UNAME+:} false; then :
12182  $as_echo_n "(cached) " >&6
12183else
12184  case $UNAME in
12185  [\\/]* | ?:[\\/]*)
12186  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12187  ;;
12188  *)
12189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12190for as_dir in $PATH
12191do
12192  IFS=$as_save_IFS
12193  test -z "$as_dir" && as_dir=.
12194    for ac_exec_ext in '' $ac_executable_extensions; do
12195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12196    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12198    break 2
12199  fi
12200done
12201  done
12202IFS=$as_save_IFS
12203
12204  ;;
12205esac
12206fi
12207UNAME=$ac_cv_path_UNAME
12208if test -n "$UNAME"; then
12209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12210$as_echo "$UNAME" >&6; }
12211else
12212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12213$as_echo "no" >&6; }
12214fi
12215
12216
12217  test -n "$UNAME" && break
12218done
12219
12220  else
12221    # The variable is set, but is it from the command line or the environment?
12222
12223    # Try to remove the string !UNAME! from our list.
12224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12226      # If it failed, the variable was not from the command line. Ignore it,
12227      # but warn the user (except for BASH, which is always set by the calling BASH).
12228      if test "xUNAME" != xBASH; then
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12230$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12231      fi
12232      # Try to locate tool using the code snippet
12233      for ac_prog in uname
12234do
12235  # Extract the first word of "$ac_prog", so it can be a program name with args.
12236set dummy $ac_prog; ac_word=$2
12237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12238$as_echo_n "checking for $ac_word... " >&6; }
12239if ${ac_cv_path_UNAME+:} false; then :
12240  $as_echo_n "(cached) " >&6
12241else
12242  case $UNAME in
12243  [\\/]* | ?:[\\/]*)
12244  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12245  ;;
12246  *)
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_exec_ext in '' $ac_executable_extensions; do
12253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12254    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12256    break 2
12257  fi
12258done
12259  done
12260IFS=$as_save_IFS
12261
12262  ;;
12263esac
12264fi
12265UNAME=$ac_cv_path_UNAME
12266if test -n "$UNAME"; then
12267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12268$as_echo "$UNAME" >&6; }
12269else
12270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
12272fi
12273
12274
12275  test -n "$UNAME" && break
12276done
12277
12278    else
12279      # If it succeeded, then it was overridden by the user. We will use it
12280      # for the tool.
12281
12282      # First remove it from the list of overridden variables, so we can test
12283      # for unknown variables in the end.
12284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12285
12286      # Check if we try to supply an empty value
12287      if test "x$UNAME" = x; then
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12289$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12291$as_echo_n "checking for UNAME... " >&6; }
12292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12293$as_echo "disabled" >&6; }
12294      else
12295        # Check if the provided tool contains a complete path.
12296        tool_specified="$UNAME"
12297        tool_basename="${tool_specified##*/}"
12298        if test "x$tool_basename" = "x$tool_specified"; then
12299          # A command without a complete path is provided, search $PATH.
12300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12301$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12302          # Extract the first word of "$tool_basename", so it can be a program name with args.
12303set dummy $tool_basename; ac_word=$2
12304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12305$as_echo_n "checking for $ac_word... " >&6; }
12306if ${ac_cv_path_UNAME+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309  case $UNAME in
12310  [\\/]* | ?:[\\/]*)
12311  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12312  ;;
12313  *)
12314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315for as_dir in $PATH
12316do
12317  IFS=$as_save_IFS
12318  test -z "$as_dir" && as_dir=.
12319    for ac_exec_ext in '' $ac_executable_extensions; do
12320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12321    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12323    break 2
12324  fi
12325done
12326  done
12327IFS=$as_save_IFS
12328
12329  ;;
12330esac
12331fi
12332UNAME=$ac_cv_path_UNAME
12333if test -n "$UNAME"; then
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12335$as_echo "$UNAME" >&6; }
12336else
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338$as_echo "no" >&6; }
12339fi
12340
12341
12342          if test "x$UNAME" = x; then
12343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12344          fi
12345        else
12346          # Otherwise we believe it is a complete path. Use it as it is.
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12348$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12350$as_echo_n "checking for UNAME... " >&6; }
12351          if test ! -x "$tool_specified"; then
12352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12353$as_echo "not found" >&6; }
12354            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12355          fi
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12357$as_echo "$tool_specified" >&6; }
12358        fi
12359      fi
12360    fi
12361
12362  fi
12363
12364
12365
12366  if test "x$UNAME" = x; then
12367    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12368  fi
12369
12370
12371
12372
12373
12374  # Publish this variable in the help.
12375
12376
12377  if [ -z "${UNIQ+x}" ]; then
12378    # The variable is not set by user, try to locate tool using the code snippet
12379    for ac_prog in uniq
12380do
12381  # Extract the first word of "$ac_prog", so it can be a program name with args.
12382set dummy $ac_prog; ac_word=$2
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12384$as_echo_n "checking for $ac_word... " >&6; }
12385if ${ac_cv_path_UNIQ+:} false; then :
12386  $as_echo_n "(cached) " >&6
12387else
12388  case $UNIQ in
12389  [\\/]* | ?:[\\/]*)
12390  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12391  ;;
12392  *)
12393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12394for as_dir in $PATH
12395do
12396  IFS=$as_save_IFS
12397  test -z "$as_dir" && as_dir=.
12398    for ac_exec_ext in '' $ac_executable_extensions; do
12399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12400    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12402    break 2
12403  fi
12404done
12405  done
12406IFS=$as_save_IFS
12407
12408  ;;
12409esac
12410fi
12411UNIQ=$ac_cv_path_UNIQ
12412if test -n "$UNIQ"; then
12413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12414$as_echo "$UNIQ" >&6; }
12415else
12416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
12418fi
12419
12420
12421  test -n "$UNIQ" && break
12422done
12423
12424  else
12425    # The variable is set, but is it from the command line or the environment?
12426
12427    # Try to remove the string !UNIQ! from our list.
12428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12430      # If it failed, the variable was not from the command line. Ignore it,
12431      # but warn the user (except for BASH, which is always set by the calling BASH).
12432      if test "xUNIQ" != xBASH; then
12433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12434$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12435      fi
12436      # Try to locate tool using the code snippet
12437      for ac_prog in uniq
12438do
12439  # Extract the first word of "$ac_prog", so it can be a program name with args.
12440set dummy $ac_prog; ac_word=$2
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12442$as_echo_n "checking for $ac_word... " >&6; }
12443if ${ac_cv_path_UNIQ+:} false; then :
12444  $as_echo_n "(cached) " >&6
12445else
12446  case $UNIQ in
12447  [\\/]* | ?:[\\/]*)
12448  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12449  ;;
12450  *)
12451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12452for as_dir in $PATH
12453do
12454  IFS=$as_save_IFS
12455  test -z "$as_dir" && as_dir=.
12456    for ac_exec_ext in '' $ac_executable_extensions; do
12457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12458    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12460    break 2
12461  fi
12462done
12463  done
12464IFS=$as_save_IFS
12465
12466  ;;
12467esac
12468fi
12469UNIQ=$ac_cv_path_UNIQ
12470if test -n "$UNIQ"; then
12471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12472$as_echo "$UNIQ" >&6; }
12473else
12474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475$as_echo "no" >&6; }
12476fi
12477
12478
12479  test -n "$UNIQ" && break
12480done
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if we try to supply an empty value
12491      if test "x$UNIQ" = x; then
12492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12493$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12495$as_echo_n "checking for UNIQ... " >&6; }
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12497$as_echo "disabled" >&6; }
12498      else
12499        # Check if the provided tool contains a complete path.
12500        tool_specified="$UNIQ"
12501        tool_basename="${tool_specified##*/}"
12502        if test "x$tool_basename" = "x$tool_specified"; then
12503          # A command without a complete path is provided, search $PATH.
12504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12505$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12506          # Extract the first word of "$tool_basename", so it can be a program name with args.
12507set dummy $tool_basename; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_UNIQ+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $UNIQ in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536UNIQ=$ac_cv_path_UNIQ
12537if test -n "$UNIQ"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12539$as_echo "$UNIQ" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546          if test "x$UNIQ" = x; then
12547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12548          fi
12549        else
12550          # Otherwise we believe it is a complete path. Use it as it is.
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12552$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12554$as_echo_n "checking for UNIQ... " >&6; }
12555          if test ! -x "$tool_specified"; then
12556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12557$as_echo "not found" >&6; }
12558            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12559          fi
12560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12561$as_echo "$tool_specified" >&6; }
12562        fi
12563      fi
12564    fi
12565
12566  fi
12567
12568
12569
12570  if test "x$UNIQ" = x; then
12571    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12572  fi
12573
12574
12575
12576
12577
12578  # Publish this variable in the help.
12579
12580
12581  if [ -z "${WC+x}" ]; then
12582    # The variable is not set by user, try to locate tool using the code snippet
12583    for ac_prog in wc
12584do
12585  # Extract the first word of "$ac_prog", so it can be a program name with args.
12586set dummy $ac_prog; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_WC+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $WC in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615WC=$ac_cv_path_WC
12616if test -n "$WC"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12618$as_echo "$WC" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625  test -n "$WC" && break
12626done
12627
12628  else
12629    # The variable is set, but is it from the command line or the environment?
12630
12631    # Try to remove the string !WC! from our list.
12632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12634      # If it failed, the variable was not from the command line. Ignore it,
12635      # but warn the user (except for BASH, which is always set by the calling BASH).
12636      if test "xWC" != xBASH; then
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12638$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12639      fi
12640      # Try to locate tool using the code snippet
12641      for ac_prog in wc
12642do
12643  # Extract the first word of "$ac_prog", so it can be a program name with args.
12644set dummy $ac_prog; ac_word=$2
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646$as_echo_n "checking for $ac_word... " >&6; }
12647if ${ac_cv_path_WC+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  case $WC in
12651  [\\/]* | ?:[\\/]*)
12652  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12653  ;;
12654  *)
12655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH
12657do
12658  IFS=$as_save_IFS
12659  test -z "$as_dir" && as_dir=.
12660    for ac_exec_ext in '' $ac_executable_extensions; do
12661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664    break 2
12665  fi
12666done
12667  done
12668IFS=$as_save_IFS
12669
12670  ;;
12671esac
12672fi
12673WC=$ac_cv_path_WC
12674if test -n "$WC"; then
12675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12676$as_echo "$WC" >&6; }
12677else
12678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680fi
12681
12682
12683  test -n "$WC" && break
12684done
12685
12686    else
12687      # If it succeeded, then it was overridden by the user. We will use it
12688      # for the tool.
12689
12690      # First remove it from the list of overridden variables, so we can test
12691      # for unknown variables in the end.
12692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12693
12694      # Check if we try to supply an empty value
12695      if test "x$WC" = x; then
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12697$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12699$as_echo_n "checking for WC... " >&6; }
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12701$as_echo "disabled" >&6; }
12702      else
12703        # Check if the provided tool contains a complete path.
12704        tool_specified="$WC"
12705        tool_basename="${tool_specified##*/}"
12706        if test "x$tool_basename" = "x$tool_specified"; then
12707          # A command without a complete path is provided, search $PATH.
12708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12709$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12710          # Extract the first word of "$tool_basename", so it can be a program name with args.
12711set dummy $tool_basename; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_WC+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $WC in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740WC=$ac_cv_path_WC
12741if test -n "$WC"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12743$as_echo "$WC" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750          if test "x$WC" = x; then
12751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12752          fi
12753        else
12754          # Otherwise we believe it is a complete path. Use it as it is.
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12756$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12758$as_echo_n "checking for WC... " >&6; }
12759          if test ! -x "$tool_specified"; then
12760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12761$as_echo "not found" >&6; }
12762            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12763          fi
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12765$as_echo "$tool_specified" >&6; }
12766        fi
12767      fi
12768    fi
12769
12770  fi
12771
12772
12773
12774  if test "x$WC" = x; then
12775    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12776  fi
12777
12778
12779
12780
12781
12782  # Publish this variable in the help.
12783
12784
12785  if [ -z "${WHICH+x}" ]; then
12786    # The variable is not set by user, try to locate tool using the code snippet
12787    for ac_prog in which
12788do
12789  # Extract the first word of "$ac_prog", so it can be a program name with args.
12790set dummy $ac_prog; ac_word=$2
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12792$as_echo_n "checking for $ac_word... " >&6; }
12793if ${ac_cv_path_WHICH+:} false; then :
12794  $as_echo_n "(cached) " >&6
12795else
12796  case $WHICH in
12797  [\\/]* | ?:[\\/]*)
12798  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12799  ;;
12800  *)
12801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12802for as_dir in $PATH
12803do
12804  IFS=$as_save_IFS
12805  test -z "$as_dir" && as_dir=.
12806    for ac_exec_ext in '' $ac_executable_extensions; do
12807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12808    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12810    break 2
12811  fi
12812done
12813  done
12814IFS=$as_save_IFS
12815
12816  ;;
12817esac
12818fi
12819WHICH=$ac_cv_path_WHICH
12820if test -n "$WHICH"; then
12821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12822$as_echo "$WHICH" >&6; }
12823else
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12825$as_echo "no" >&6; }
12826fi
12827
12828
12829  test -n "$WHICH" && break
12830done
12831
12832  else
12833    # The variable is set, but is it from the command line or the environment?
12834
12835    # Try to remove the string !WHICH! from our list.
12836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12838      # If it failed, the variable was not from the command line. Ignore it,
12839      # but warn the user (except for BASH, which is always set by the calling BASH).
12840      if test "xWHICH" != xBASH; then
12841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12842$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12843      fi
12844      # Try to locate tool using the code snippet
12845      for ac_prog in which
12846do
12847  # Extract the first word of "$ac_prog", so it can be a program name with args.
12848set dummy $ac_prog; ac_word=$2
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12850$as_echo_n "checking for $ac_word... " >&6; }
12851if ${ac_cv_path_WHICH+:} false; then :
12852  $as_echo_n "(cached) " >&6
12853else
12854  case $WHICH in
12855  [\\/]* | ?:[\\/]*)
12856  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12857  ;;
12858  *)
12859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12860for as_dir in $PATH
12861do
12862  IFS=$as_save_IFS
12863  test -z "$as_dir" && as_dir=.
12864    for ac_exec_ext in '' $ac_executable_extensions; do
12865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12866    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12868    break 2
12869  fi
12870done
12871  done
12872IFS=$as_save_IFS
12873
12874  ;;
12875esac
12876fi
12877WHICH=$ac_cv_path_WHICH
12878if test -n "$WHICH"; then
12879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12880$as_echo "$WHICH" >&6; }
12881else
12882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12883$as_echo "no" >&6; }
12884fi
12885
12886
12887  test -n "$WHICH" && break
12888done
12889
12890    else
12891      # If it succeeded, then it was overridden by the user. We will use it
12892      # for the tool.
12893
12894      # First remove it from the list of overridden variables, so we can test
12895      # for unknown variables in the end.
12896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12897
12898      # Check if we try to supply an empty value
12899      if test "x$WHICH" = x; then
12900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12901$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12903$as_echo_n "checking for WHICH... " >&6; }
12904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12905$as_echo "disabled" >&6; }
12906      else
12907        # Check if the provided tool contains a complete path.
12908        tool_specified="$WHICH"
12909        tool_basename="${tool_specified##*/}"
12910        if test "x$tool_basename" = "x$tool_specified"; then
12911          # A command without a complete path is provided, search $PATH.
12912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12913$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12914          # Extract the first word of "$tool_basename", so it can be a program name with args.
12915set dummy $tool_basename; ac_word=$2
12916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12917$as_echo_n "checking for $ac_word... " >&6; }
12918if ${ac_cv_path_WHICH+:} false; then :
12919  $as_echo_n "(cached) " >&6
12920else
12921  case $WHICH in
12922  [\\/]* | ?:[\\/]*)
12923  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12924  ;;
12925  *)
12926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12927for as_dir in $PATH
12928do
12929  IFS=$as_save_IFS
12930  test -z "$as_dir" && as_dir=.
12931    for ac_exec_ext in '' $ac_executable_extensions; do
12932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12933    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12935    break 2
12936  fi
12937done
12938  done
12939IFS=$as_save_IFS
12940
12941  ;;
12942esac
12943fi
12944WHICH=$ac_cv_path_WHICH
12945if test -n "$WHICH"; then
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12947$as_echo "$WHICH" >&6; }
12948else
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950$as_echo "no" >&6; }
12951fi
12952
12953
12954          if test "x$WHICH" = x; then
12955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12956          fi
12957        else
12958          # Otherwise we believe it is a complete path. Use it as it is.
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12960$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12962$as_echo_n "checking for WHICH... " >&6; }
12963          if test ! -x "$tool_specified"; then
12964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12965$as_echo "not found" >&6; }
12966            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12967          fi
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12969$as_echo "$tool_specified" >&6; }
12970        fi
12971      fi
12972    fi
12973
12974  fi
12975
12976
12977
12978  if test "x$WHICH" = x; then
12979    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12980  fi
12981
12982
12983
12984
12985
12986  # Publish this variable in the help.
12987
12988
12989  if [ -z "${XARGS+x}" ]; then
12990    # The variable is not set by user, try to locate tool using the code snippet
12991    for ac_prog in xargs
12992do
12993  # Extract the first word of "$ac_prog", so it can be a program name with args.
12994set dummy $ac_prog; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_XARGS+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $XARGS in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023XARGS=$ac_cv_path_XARGS
13024if test -n "$XARGS"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13026$as_echo "$XARGS" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033  test -n "$XARGS" && break
13034done
13035
13036  else
13037    # The variable is set, but is it from the command line or the environment?
13038
13039    # Try to remove the string !XARGS! from our list.
13040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13042      # If it failed, the variable was not from the command line. Ignore it,
13043      # but warn the user (except for BASH, which is always set by the calling BASH).
13044      if test "xXARGS" != xBASH; then
13045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13046$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13047      fi
13048      # Try to locate tool using the code snippet
13049      for ac_prog in xargs
13050do
13051  # Extract the first word of "$ac_prog", so it can be a program name with args.
13052set dummy $ac_prog; ac_word=$2
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13054$as_echo_n "checking for $ac_word... " >&6; }
13055if ${ac_cv_path_XARGS+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  case $XARGS in
13059  [\\/]* | ?:[\\/]*)
13060  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13061  ;;
13062  *)
13063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13064for as_dir in $PATH
13065do
13066  IFS=$as_save_IFS
13067  test -z "$as_dir" && as_dir=.
13068    for ac_exec_ext in '' $ac_executable_extensions; do
13069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13070    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13072    break 2
13073  fi
13074done
13075  done
13076IFS=$as_save_IFS
13077
13078  ;;
13079esac
13080fi
13081XARGS=$ac_cv_path_XARGS
13082if test -n "$XARGS"; then
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13084$as_echo "$XARGS" >&6; }
13085else
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
13088fi
13089
13090
13091  test -n "$XARGS" && break
13092done
13093
13094    else
13095      # If it succeeded, then it was overridden by the user. We will use it
13096      # for the tool.
13097
13098      # First remove it from the list of overridden variables, so we can test
13099      # for unknown variables in the end.
13100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13101
13102      # Check if we try to supply an empty value
13103      if test "x$XARGS" = x; then
13104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13105$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13107$as_echo_n "checking for XARGS... " >&6; }
13108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13109$as_echo "disabled" >&6; }
13110      else
13111        # Check if the provided tool contains a complete path.
13112        tool_specified="$XARGS"
13113        tool_basename="${tool_specified##*/}"
13114        if test "x$tool_basename" = "x$tool_specified"; then
13115          # A command without a complete path is provided, search $PATH.
13116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13117$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13118          # Extract the first word of "$tool_basename", so it can be a program name with args.
13119set dummy $tool_basename; ac_word=$2
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13121$as_echo_n "checking for $ac_word... " >&6; }
13122if ${ac_cv_path_XARGS+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125  case $XARGS in
13126  [\\/]* | ?:[\\/]*)
13127  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13128  ;;
13129  *)
13130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145  ;;
13146esac
13147fi
13148XARGS=$ac_cv_path_XARGS
13149if test -n "$XARGS"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13151$as_echo "$XARGS" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158          if test "x$XARGS" = x; then
13159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13160          fi
13161        else
13162          # Otherwise we believe it is a complete path. Use it as it is.
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13164$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13166$as_echo_n "checking for XARGS... " >&6; }
13167          if test ! -x "$tool_specified"; then
13168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13169$as_echo "not found" >&6; }
13170            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13171          fi
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13173$as_echo "$tool_specified" >&6; }
13174        fi
13175      fi
13176    fi
13177
13178  fi
13179
13180
13181
13182  if test "x$XARGS" = x; then
13183    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13184  fi
13185
13186
13187
13188  # Then required tools that require some special treatment.
13189
13190
13191  # Publish this variable in the help.
13192
13193
13194  if [ -z "${AWK+x}" ]; then
13195    # The variable is not set by user, try to locate tool using the code snippet
13196    for ac_prog in gawk mawk nawk awk
13197do
13198  # Extract the first word of "$ac_prog", so it can be a program name with args.
13199set dummy $ac_prog; ac_word=$2
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13201$as_echo_n "checking for $ac_word... " >&6; }
13202if ${ac_cv_prog_AWK+:} false; then :
13203  $as_echo_n "(cached) " >&6
13204else
13205  if test -n "$AWK"; then
13206  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13207else
13208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13209for as_dir in $PATH
13210do
13211  IFS=$as_save_IFS
13212  test -z "$as_dir" && as_dir=.
13213    for ac_exec_ext in '' $ac_executable_extensions; do
13214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13215    ac_cv_prog_AWK="$ac_prog"
13216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13217    break 2
13218  fi
13219done
13220  done
13221IFS=$as_save_IFS
13222
13223fi
13224fi
13225AWK=$ac_cv_prog_AWK
13226if test -n "$AWK"; then
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13228$as_echo "$AWK" >&6; }
13229else
13230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
13232fi
13233
13234
13235  test -n "$AWK" && break
13236done
13237
13238  else
13239    # The variable is set, but is it from the command line or the environment?
13240
13241    # Try to remove the string !AWK! from our list.
13242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13244      # If it failed, the variable was not from the command line. Ignore it,
13245      # but warn the user (except for BASH, which is always set by the calling BASH).
13246      if test "xAWK" != xBASH; then
13247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13248$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13249      fi
13250      # Try to locate tool using the code snippet
13251      for ac_prog in gawk mawk nawk awk
13252do
13253  # Extract the first word of "$ac_prog", so it can be a program name with args.
13254set dummy $ac_prog; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_prog_AWK+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  if test -n "$AWK"; then
13261  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13262else
13263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13264for as_dir in $PATH
13265do
13266  IFS=$as_save_IFS
13267  test -z "$as_dir" && as_dir=.
13268    for ac_exec_ext in '' $ac_executable_extensions; do
13269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13270    ac_cv_prog_AWK="$ac_prog"
13271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13272    break 2
13273  fi
13274done
13275  done
13276IFS=$as_save_IFS
13277
13278fi
13279fi
13280AWK=$ac_cv_prog_AWK
13281if test -n "$AWK"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13283$as_echo "$AWK" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290  test -n "$AWK" && break
13291done
13292
13293    else
13294      # If it succeeded, then it was overridden by the user. We will use it
13295      # for the tool.
13296
13297      # First remove it from the list of overridden variables, so we can test
13298      # for unknown variables in the end.
13299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13300
13301      # Check if we try to supply an empty value
13302      if test "x$AWK" = x; then
13303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13304$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13306$as_echo_n "checking for AWK... " >&6; }
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13308$as_echo "disabled" >&6; }
13309      else
13310        # Check if the provided tool contains a complete path.
13311        tool_specified="$AWK"
13312        tool_basename="${tool_specified##*/}"
13313        if test "x$tool_basename" = "x$tool_specified"; then
13314          # A command without a complete path is provided, search $PATH.
13315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13316$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13317          # Extract the first word of "$tool_basename", so it can be a program name with args.
13318set dummy $tool_basename; ac_word=$2
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13320$as_echo_n "checking for $ac_word... " >&6; }
13321if ${ac_cv_path_AWK+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  case $AWK in
13325  [\\/]* | ?:[\\/]*)
13326  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13327  ;;
13328  *)
13329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13330for as_dir in $PATH
13331do
13332  IFS=$as_save_IFS
13333  test -z "$as_dir" && as_dir=.
13334    for ac_exec_ext in '' $ac_executable_extensions; do
13335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13336    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13338    break 2
13339  fi
13340done
13341  done
13342IFS=$as_save_IFS
13343
13344  ;;
13345esac
13346fi
13347AWK=$ac_cv_path_AWK
13348if test -n "$AWK"; then
13349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13350$as_echo "$AWK" >&6; }
13351else
13352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13353$as_echo "no" >&6; }
13354fi
13355
13356
13357          if test "x$AWK" = x; then
13358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13359          fi
13360        else
13361          # Otherwise we believe it is a complete path. Use it as it is.
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13363$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13365$as_echo_n "checking for AWK... " >&6; }
13366          if test ! -x "$tool_specified"; then
13367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13368$as_echo "not found" >&6; }
13369            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13370          fi
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13372$as_echo "$tool_specified" >&6; }
13373        fi
13374      fi
13375    fi
13376
13377  fi
13378
13379
13380  if test "x$AWK" = x; then
13381    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13382  fi
13383
13384
13385
13386
13387  # Publish this variable in the help.
13388
13389
13390  if [ -z "${GREP+x}" ]; then
13391    # The variable is not set by user, try to locate tool using the code snippet
13392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455  else
13456    # The variable is set, but is it from the command line or the environment?
13457
13458    # Try to remove the string !GREP! from our list.
13459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13461      # If it failed, the variable was not from the command line. Ignore it,
13462      # but warn the user (except for BASH, which is always set by the calling BASH).
13463      if test "xGREP" != xBASH; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13465$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13466      fi
13467      # Try to locate tool using the code snippet
13468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13469$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13470if ${ac_cv_path_GREP+:} false; then :
13471  $as_echo_n "(cached) " >&6
13472else
13473  if test -z "$GREP"; then
13474  ac_path_GREP_found=false
13475  # Loop through the user's path and test for each of PROGNAME-LIST
13476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13477for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13478do
13479  IFS=$as_save_IFS
13480  test -z "$as_dir" && as_dir=.
13481    for ac_prog in grep ggrep; do
13482    for ac_exec_ext in '' $ac_executable_extensions; do
13483      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13484      as_fn_executable_p "$ac_path_GREP" || continue
13485# Check for GNU ac_path_GREP and select it if it is found.
13486  # Check for GNU $ac_path_GREP
13487case `"$ac_path_GREP" --version 2>&1` in
13488*GNU*)
13489  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13490*)
13491  ac_count=0
13492  $as_echo_n 0123456789 >"conftest.in"
13493  while :
13494  do
13495    cat "conftest.in" "conftest.in" >"conftest.tmp"
13496    mv "conftest.tmp" "conftest.in"
13497    cp "conftest.in" "conftest.nl"
13498    $as_echo 'GREP' >> "conftest.nl"
13499    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13500    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13501    as_fn_arith $ac_count + 1 && ac_count=$as_val
13502    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13503      # Best one so far, save it but keep looking for a better one
13504      ac_cv_path_GREP="$ac_path_GREP"
13505      ac_path_GREP_max=$ac_count
13506    fi
13507    # 10*(2^10) chars as input seems more than enough
13508    test $ac_count -gt 10 && break
13509  done
13510  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13511esac
13512
13513      $ac_path_GREP_found && break 3
13514    done
13515  done
13516  done
13517IFS=$as_save_IFS
13518  if test -z "$ac_cv_path_GREP"; then
13519    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13520  fi
13521else
13522  ac_cv_path_GREP=$GREP
13523fi
13524
13525fi
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13527$as_echo "$ac_cv_path_GREP" >&6; }
13528 GREP="$ac_cv_path_GREP"
13529
13530
13531    else
13532      # If it succeeded, then it was overridden by the user. We will use it
13533      # for the tool.
13534
13535      # First remove it from the list of overridden variables, so we can test
13536      # for unknown variables in the end.
13537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13538
13539      # Check if we try to supply an empty value
13540      if test "x$GREP" = x; then
13541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13542$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13544$as_echo_n "checking for GREP... " >&6; }
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13546$as_echo "disabled" >&6; }
13547      else
13548        # Check if the provided tool contains a complete path.
13549        tool_specified="$GREP"
13550        tool_basename="${tool_specified##*/}"
13551        if test "x$tool_basename" = "x$tool_specified"; then
13552          # A command without a complete path is provided, search $PATH.
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13554$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13555          # Extract the first word of "$tool_basename", so it can be a program name with args.
13556set dummy $tool_basename; ac_word=$2
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13558$as_echo_n "checking for $ac_word... " >&6; }
13559if ${ac_cv_path_GREP+:} false; then :
13560  $as_echo_n "(cached) " >&6
13561else
13562  case $GREP in
13563  [\\/]* | ?:[\\/]*)
13564  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13565  ;;
13566  *)
13567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13568for as_dir in $PATH
13569do
13570  IFS=$as_save_IFS
13571  test -z "$as_dir" && as_dir=.
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13574    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13576    break 2
13577  fi
13578done
13579  done
13580IFS=$as_save_IFS
13581
13582  ;;
13583esac
13584fi
13585GREP=$ac_cv_path_GREP
13586if test -n "$GREP"; then
13587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13588$as_echo "$GREP" >&6; }
13589else
13590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
13592fi
13593
13594
13595          if test "x$GREP" = x; then
13596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13597          fi
13598        else
13599          # Otherwise we believe it is a complete path. Use it as it is.
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13601$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13603$as_echo_n "checking for GREP... " >&6; }
13604          if test ! -x "$tool_specified"; then
13605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13606$as_echo "not found" >&6; }
13607            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13608          fi
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13610$as_echo "$tool_specified" >&6; }
13611        fi
13612      fi
13613    fi
13614
13615  fi
13616
13617
13618  if test "x$GREP" = x; then
13619    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13620  fi
13621
13622
13623
13624
13625  # Publish this variable in the help.
13626
13627
13628  if [ -z "${EGREP+x}" ]; then
13629    # The variable is not set by user, try to locate tool using the code snippet
13630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13631$as_echo_n "checking for egrep... " >&6; }
13632if ${ac_cv_path_EGREP+:} false; then :
13633  $as_echo_n "(cached) " >&6
13634else
13635  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13636   then ac_cv_path_EGREP="$GREP -E"
13637   else
13638     if test -z "$EGREP"; then
13639  ac_path_EGREP_found=false
13640  # Loop through the user's path and test for each of PROGNAME-LIST
13641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13642for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13643do
13644  IFS=$as_save_IFS
13645  test -z "$as_dir" && as_dir=.
13646    for ac_prog in egrep; do
13647    for ac_exec_ext in '' $ac_executable_extensions; do
13648      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13649      as_fn_executable_p "$ac_path_EGREP" || continue
13650# Check for GNU ac_path_EGREP and select it if it is found.
13651  # Check for GNU $ac_path_EGREP
13652case `"$ac_path_EGREP" --version 2>&1` in
13653*GNU*)
13654  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13655*)
13656  ac_count=0
13657  $as_echo_n 0123456789 >"conftest.in"
13658  while :
13659  do
13660    cat "conftest.in" "conftest.in" >"conftest.tmp"
13661    mv "conftest.tmp" "conftest.in"
13662    cp "conftest.in" "conftest.nl"
13663    $as_echo 'EGREP' >> "conftest.nl"
13664    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13665    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13666    as_fn_arith $ac_count + 1 && ac_count=$as_val
13667    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13668      # Best one so far, save it but keep looking for a better one
13669      ac_cv_path_EGREP="$ac_path_EGREP"
13670      ac_path_EGREP_max=$ac_count
13671    fi
13672    # 10*(2^10) chars as input seems more than enough
13673    test $ac_count -gt 10 && break
13674  done
13675  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13676esac
13677
13678      $ac_path_EGREP_found && break 3
13679    done
13680  done
13681  done
13682IFS=$as_save_IFS
13683  if test -z "$ac_cv_path_EGREP"; then
13684    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13685  fi
13686else
13687  ac_cv_path_EGREP=$EGREP
13688fi
13689
13690   fi
13691fi
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13693$as_echo "$ac_cv_path_EGREP" >&6; }
13694 EGREP="$ac_cv_path_EGREP"
13695
13696
13697  else
13698    # The variable is set, but is it from the command line or the environment?
13699
13700    # Try to remove the string !EGREP! from our list.
13701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13703      # If it failed, the variable was not from the command line. Ignore it,
13704      # but warn the user (except for BASH, which is always set by the calling BASH).
13705      if test "xEGREP" != xBASH; then
13706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13707$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13708      fi
13709      # Try to locate tool using the code snippet
13710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13711$as_echo_n "checking for egrep... " >&6; }
13712if ${ac_cv_path_EGREP+:} false; then :
13713  $as_echo_n "(cached) " >&6
13714else
13715  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13716   then ac_cv_path_EGREP="$GREP -E"
13717   else
13718     if test -z "$EGREP"; then
13719  ac_path_EGREP_found=false
13720  # Loop through the user's path and test for each of PROGNAME-LIST
13721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13722for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13723do
13724  IFS=$as_save_IFS
13725  test -z "$as_dir" && as_dir=.
13726    for ac_prog in egrep; do
13727    for ac_exec_ext in '' $ac_executable_extensions; do
13728      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13729      as_fn_executable_p "$ac_path_EGREP" || continue
13730# Check for GNU ac_path_EGREP and select it if it is found.
13731  # Check for GNU $ac_path_EGREP
13732case `"$ac_path_EGREP" --version 2>&1` in
13733*GNU*)
13734  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13735*)
13736  ac_count=0
13737  $as_echo_n 0123456789 >"conftest.in"
13738  while :
13739  do
13740    cat "conftest.in" "conftest.in" >"conftest.tmp"
13741    mv "conftest.tmp" "conftest.in"
13742    cp "conftest.in" "conftest.nl"
13743    $as_echo 'EGREP' >> "conftest.nl"
13744    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13745    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13746    as_fn_arith $ac_count + 1 && ac_count=$as_val
13747    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13748      # Best one so far, save it but keep looking for a better one
13749      ac_cv_path_EGREP="$ac_path_EGREP"
13750      ac_path_EGREP_max=$ac_count
13751    fi
13752    # 10*(2^10) chars as input seems more than enough
13753    test $ac_count -gt 10 && break
13754  done
13755  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13756esac
13757
13758      $ac_path_EGREP_found && break 3
13759    done
13760  done
13761  done
13762IFS=$as_save_IFS
13763  if test -z "$ac_cv_path_EGREP"; then
13764    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13765  fi
13766else
13767  ac_cv_path_EGREP=$EGREP
13768fi
13769
13770   fi
13771fi
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13773$as_echo "$ac_cv_path_EGREP" >&6; }
13774 EGREP="$ac_cv_path_EGREP"
13775
13776
13777    else
13778      # If it succeeded, then it was overridden by the user. We will use it
13779      # for the tool.
13780
13781      # First remove it from the list of overridden variables, so we can test
13782      # for unknown variables in the end.
13783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13784
13785      # Check if we try to supply an empty value
13786      if test "x$EGREP" = x; then
13787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13788$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13790$as_echo_n "checking for EGREP... " >&6; }
13791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13792$as_echo "disabled" >&6; }
13793      else
13794        # Check if the provided tool contains a complete path.
13795        tool_specified="$EGREP"
13796        tool_basename="${tool_specified##*/}"
13797        if test "x$tool_basename" = "x$tool_specified"; then
13798          # A command without a complete path is provided, search $PATH.
13799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13800$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13801          # Extract the first word of "$tool_basename", so it can be a program name with args.
13802set dummy $tool_basename; ac_word=$2
13803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13804$as_echo_n "checking for $ac_word... " >&6; }
13805if ${ac_cv_path_EGREP+:} false; then :
13806  $as_echo_n "(cached) " >&6
13807else
13808  case $EGREP in
13809  [\\/]* | ?:[\\/]*)
13810  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13811  ;;
13812  *)
13813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13814for as_dir in $PATH
13815do
13816  IFS=$as_save_IFS
13817  test -z "$as_dir" && as_dir=.
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13820    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13822    break 2
13823  fi
13824done
13825  done
13826IFS=$as_save_IFS
13827
13828  ;;
13829esac
13830fi
13831EGREP=$ac_cv_path_EGREP
13832if test -n "$EGREP"; then
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13834$as_echo "$EGREP" >&6; }
13835else
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13837$as_echo "no" >&6; }
13838fi
13839
13840
13841          if test "x$EGREP" = x; then
13842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13843          fi
13844        else
13845          # Otherwise we believe it is a complete path. Use it as it is.
13846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13847$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13849$as_echo_n "checking for EGREP... " >&6; }
13850          if test ! -x "$tool_specified"; then
13851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13852$as_echo "not found" >&6; }
13853            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13854          fi
13855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13856$as_echo "$tool_specified" >&6; }
13857        fi
13858      fi
13859    fi
13860
13861  fi
13862
13863
13864  if test "x$EGREP" = x; then
13865    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13866  fi
13867
13868
13869
13870
13871  # Publish this variable in the help.
13872
13873
13874  if [ -z "${FGREP+x}" ]; then
13875    # The variable is not set by user, try to locate tool using the code snippet
13876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13877$as_echo_n "checking for fgrep... " >&6; }
13878if ${ac_cv_path_FGREP+:} false; then :
13879  $as_echo_n "(cached) " >&6
13880else
13881  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13882   then ac_cv_path_FGREP="$GREP -F"
13883   else
13884     if test -z "$FGREP"; then
13885  ac_path_FGREP_found=false
13886  # Loop through the user's path and test for each of PROGNAME-LIST
13887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13889do
13890  IFS=$as_save_IFS
13891  test -z "$as_dir" && as_dir=.
13892    for ac_prog in fgrep; do
13893    for ac_exec_ext in '' $ac_executable_extensions; do
13894      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13895      as_fn_executable_p "$ac_path_FGREP" || continue
13896# Check for GNU ac_path_FGREP and select it if it is found.
13897  # Check for GNU $ac_path_FGREP
13898case `"$ac_path_FGREP" --version 2>&1` in
13899*GNU*)
13900  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13901*)
13902  ac_count=0
13903  $as_echo_n 0123456789 >"conftest.in"
13904  while :
13905  do
13906    cat "conftest.in" "conftest.in" >"conftest.tmp"
13907    mv "conftest.tmp" "conftest.in"
13908    cp "conftest.in" "conftest.nl"
13909    $as_echo 'FGREP' >> "conftest.nl"
13910    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13911    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13912    as_fn_arith $ac_count + 1 && ac_count=$as_val
13913    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13914      # Best one so far, save it but keep looking for a better one
13915      ac_cv_path_FGREP="$ac_path_FGREP"
13916      ac_path_FGREP_max=$ac_count
13917    fi
13918    # 10*(2^10) chars as input seems more than enough
13919    test $ac_count -gt 10 && break
13920  done
13921  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13922esac
13923
13924      $ac_path_FGREP_found && break 3
13925    done
13926  done
13927  done
13928IFS=$as_save_IFS
13929  if test -z "$ac_cv_path_FGREP"; then
13930    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13931  fi
13932else
13933  ac_cv_path_FGREP=$FGREP
13934fi
13935
13936   fi
13937fi
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13939$as_echo "$ac_cv_path_FGREP" >&6; }
13940 FGREP="$ac_cv_path_FGREP"
13941
13942
13943  else
13944    # The variable is set, but is it from the command line or the environment?
13945
13946    # Try to remove the string !FGREP! from our list.
13947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13949      # If it failed, the variable was not from the command line. Ignore it,
13950      # but warn the user (except for BASH, which is always set by the calling BASH).
13951      if test "xFGREP" != xBASH; then
13952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13953$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13954      fi
13955      # Try to locate tool using the code snippet
13956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13957$as_echo_n "checking for fgrep... " >&6; }
13958if ${ac_cv_path_FGREP+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13962   then ac_cv_path_FGREP="$GREP -F"
13963   else
13964     if test -z "$FGREP"; then
13965  ac_path_FGREP_found=false
13966  # Loop through the user's path and test for each of PROGNAME-LIST
13967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13969do
13970  IFS=$as_save_IFS
13971  test -z "$as_dir" && as_dir=.
13972    for ac_prog in fgrep; do
13973    for ac_exec_ext in '' $ac_executable_extensions; do
13974      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13975      as_fn_executable_p "$ac_path_FGREP" || continue
13976# Check for GNU ac_path_FGREP and select it if it is found.
13977  # Check for GNU $ac_path_FGREP
13978case `"$ac_path_FGREP" --version 2>&1` in
13979*GNU*)
13980  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13981*)
13982  ac_count=0
13983  $as_echo_n 0123456789 >"conftest.in"
13984  while :
13985  do
13986    cat "conftest.in" "conftest.in" >"conftest.tmp"
13987    mv "conftest.tmp" "conftest.in"
13988    cp "conftest.in" "conftest.nl"
13989    $as_echo 'FGREP' >> "conftest.nl"
13990    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13991    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13992    as_fn_arith $ac_count + 1 && ac_count=$as_val
13993    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13994      # Best one so far, save it but keep looking for a better one
13995      ac_cv_path_FGREP="$ac_path_FGREP"
13996      ac_path_FGREP_max=$ac_count
13997    fi
13998    # 10*(2^10) chars as input seems more than enough
13999    test $ac_count -gt 10 && break
14000  done
14001  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14002esac
14003
14004      $ac_path_FGREP_found && break 3
14005    done
14006  done
14007  done
14008IFS=$as_save_IFS
14009  if test -z "$ac_cv_path_FGREP"; then
14010    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14011  fi
14012else
14013  ac_cv_path_FGREP=$FGREP
14014fi
14015
14016   fi
14017fi
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14019$as_echo "$ac_cv_path_FGREP" >&6; }
14020 FGREP="$ac_cv_path_FGREP"
14021
14022
14023    else
14024      # If it succeeded, then it was overridden by the user. We will use it
14025      # for the tool.
14026
14027      # First remove it from the list of overridden variables, so we can test
14028      # for unknown variables in the end.
14029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14030
14031      # Check if we try to supply an empty value
14032      if test "x$FGREP" = x; then
14033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14034$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14036$as_echo_n "checking for FGREP... " >&6; }
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14038$as_echo "disabled" >&6; }
14039      else
14040        # Check if the provided tool contains a complete path.
14041        tool_specified="$FGREP"
14042        tool_basename="${tool_specified##*/}"
14043        if test "x$tool_basename" = "x$tool_specified"; then
14044          # A command without a complete path is provided, search $PATH.
14045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14046$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14047          # Extract the first word of "$tool_basename", so it can be a program name with args.
14048set dummy $tool_basename; ac_word=$2
14049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14050$as_echo_n "checking for $ac_word... " >&6; }
14051if ${ac_cv_path_FGREP+:} false; then :
14052  $as_echo_n "(cached) " >&6
14053else
14054  case $FGREP in
14055  [\\/]* | ?:[\\/]*)
14056  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14057  ;;
14058  *)
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_exec_ext in '' $ac_executable_extensions; do
14065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14066    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14068    break 2
14069  fi
14070done
14071  done
14072IFS=$as_save_IFS
14073
14074  ;;
14075esac
14076fi
14077FGREP=$ac_cv_path_FGREP
14078if test -n "$FGREP"; then
14079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14080$as_echo "$FGREP" >&6; }
14081else
14082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14083$as_echo "no" >&6; }
14084fi
14085
14086
14087          if test "x$FGREP" = x; then
14088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14089          fi
14090        else
14091          # Otherwise we believe it is a complete path. Use it as it is.
14092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14093$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14095$as_echo_n "checking for FGREP... " >&6; }
14096          if test ! -x "$tool_specified"; then
14097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14098$as_echo "not found" >&6; }
14099            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14100          fi
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14102$as_echo "$tool_specified" >&6; }
14103        fi
14104      fi
14105    fi
14106
14107  fi
14108
14109
14110  if test "x$FGREP" = x; then
14111    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14112  fi
14113
14114
14115
14116
14117  # Publish this variable in the help.
14118
14119
14120  if [ -z "${SED+x}" ]; then
14121    # The variable is not set by user, try to locate tool using the code snippet
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14123$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14124if ${ac_cv_path_SED+:} false; then :
14125  $as_echo_n "(cached) " >&6
14126else
14127            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14128     for ac_i in 1 2 3 4 5 6 7; do
14129       ac_script="$ac_script$as_nl$ac_script"
14130     done
14131     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14132     { ac_script=; unset ac_script;}
14133     if test -z "$SED"; then
14134  ac_path_SED_found=false
14135  # Loop through the user's path and test for each of PROGNAME-LIST
14136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14137for as_dir in $PATH
14138do
14139  IFS=$as_save_IFS
14140  test -z "$as_dir" && as_dir=.
14141    for ac_prog in sed gsed; do
14142    for ac_exec_ext in '' $ac_executable_extensions; do
14143      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14144      as_fn_executable_p "$ac_path_SED" || continue
14145# Check for GNU ac_path_SED and select it if it is found.
14146  # Check for GNU $ac_path_SED
14147case `"$ac_path_SED" --version 2>&1` in
14148*GNU*)
14149  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14150*)
14151  ac_count=0
14152  $as_echo_n 0123456789 >"conftest.in"
14153  while :
14154  do
14155    cat "conftest.in" "conftest.in" >"conftest.tmp"
14156    mv "conftest.tmp" "conftest.in"
14157    cp "conftest.in" "conftest.nl"
14158    $as_echo '' >> "conftest.nl"
14159    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14161    as_fn_arith $ac_count + 1 && ac_count=$as_val
14162    if test $ac_count -gt ${ac_path_SED_max-0}; then
14163      # Best one so far, save it but keep looking for a better one
14164      ac_cv_path_SED="$ac_path_SED"
14165      ac_path_SED_max=$ac_count
14166    fi
14167    # 10*(2^10) chars as input seems more than enough
14168    test $ac_count -gt 10 && break
14169  done
14170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14171esac
14172
14173      $ac_path_SED_found && break 3
14174    done
14175  done
14176  done
14177IFS=$as_save_IFS
14178  if test -z "$ac_cv_path_SED"; then
14179    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14180  fi
14181else
14182  ac_cv_path_SED=$SED
14183fi
14184
14185fi
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14187$as_echo "$ac_cv_path_SED" >&6; }
14188 SED="$ac_cv_path_SED"
14189  rm -f conftest.sed
14190
14191  else
14192    # The variable is set, but is it from the command line or the environment?
14193
14194    # Try to remove the string !SED! from our list.
14195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14197      # If it failed, the variable was not from the command line. Ignore it,
14198      # but warn the user (except for BASH, which is always set by the calling BASH).
14199      if test "xSED" != xBASH; then
14200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14201$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14202      fi
14203      # Try to locate tool using the code snippet
14204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14205$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14206if ${ac_cv_path_SED+:} false; then :
14207  $as_echo_n "(cached) " >&6
14208else
14209            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14210     for ac_i in 1 2 3 4 5 6 7; do
14211       ac_script="$ac_script$as_nl$ac_script"
14212     done
14213     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14214     { ac_script=; unset ac_script;}
14215     if test -z "$SED"; then
14216  ac_path_SED_found=false
14217  # Loop through the user's path and test for each of PROGNAME-LIST
14218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14219for as_dir in $PATH
14220do
14221  IFS=$as_save_IFS
14222  test -z "$as_dir" && as_dir=.
14223    for ac_prog in sed gsed; do
14224    for ac_exec_ext in '' $ac_executable_extensions; do
14225      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14226      as_fn_executable_p "$ac_path_SED" || continue
14227# Check for GNU ac_path_SED and select it if it is found.
14228  # Check for GNU $ac_path_SED
14229case `"$ac_path_SED" --version 2>&1` in
14230*GNU*)
14231  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14232*)
14233  ac_count=0
14234  $as_echo_n 0123456789 >"conftest.in"
14235  while :
14236  do
14237    cat "conftest.in" "conftest.in" >"conftest.tmp"
14238    mv "conftest.tmp" "conftest.in"
14239    cp "conftest.in" "conftest.nl"
14240    $as_echo '' >> "conftest.nl"
14241    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14243    as_fn_arith $ac_count + 1 && ac_count=$as_val
14244    if test $ac_count -gt ${ac_path_SED_max-0}; then
14245      # Best one so far, save it but keep looking for a better one
14246      ac_cv_path_SED="$ac_path_SED"
14247      ac_path_SED_max=$ac_count
14248    fi
14249    # 10*(2^10) chars as input seems more than enough
14250    test $ac_count -gt 10 && break
14251  done
14252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14253esac
14254
14255      $ac_path_SED_found && break 3
14256    done
14257  done
14258  done
14259IFS=$as_save_IFS
14260  if test -z "$ac_cv_path_SED"; then
14261    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14262  fi
14263else
14264  ac_cv_path_SED=$SED
14265fi
14266
14267fi
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14269$as_echo "$ac_cv_path_SED" >&6; }
14270 SED="$ac_cv_path_SED"
14271  rm -f conftest.sed
14272
14273    else
14274      # If it succeeded, then it was overridden by the user. We will use it
14275      # for the tool.
14276
14277      # First remove it from the list of overridden variables, so we can test
14278      # for unknown variables in the end.
14279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14280
14281      # Check if we try to supply an empty value
14282      if test "x$SED" = x; then
14283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14284$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14286$as_echo_n "checking for SED... " >&6; }
14287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14288$as_echo "disabled" >&6; }
14289      else
14290        # Check if the provided tool contains a complete path.
14291        tool_specified="$SED"
14292        tool_basename="${tool_specified##*/}"
14293        if test "x$tool_basename" = "x$tool_specified"; then
14294          # A command without a complete path is provided, search $PATH.
14295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14296$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14297          # Extract the first word of "$tool_basename", so it can be a program name with args.
14298set dummy $tool_basename; ac_word=$2
14299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14300$as_echo_n "checking for $ac_word... " >&6; }
14301if ${ac_cv_path_SED+:} false; then :
14302  $as_echo_n "(cached) " >&6
14303else
14304  case $SED in
14305  [\\/]* | ?:[\\/]*)
14306  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14307  ;;
14308  *)
14309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14310for as_dir in $PATH
14311do
14312  IFS=$as_save_IFS
14313  test -z "$as_dir" && as_dir=.
14314    for ac_exec_ext in '' $ac_executable_extensions; do
14315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14316    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14318    break 2
14319  fi
14320done
14321  done
14322IFS=$as_save_IFS
14323
14324  ;;
14325esac
14326fi
14327SED=$ac_cv_path_SED
14328if test -n "$SED"; then
14329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14330$as_echo "$SED" >&6; }
14331else
14332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14333$as_echo "no" >&6; }
14334fi
14335
14336
14337          if test "x$SED" = x; then
14338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14339          fi
14340        else
14341          # Otherwise we believe it is a complete path. Use it as it is.
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14343$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14345$as_echo_n "checking for SED... " >&6; }
14346          if test ! -x "$tool_specified"; then
14347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14348$as_echo "not found" >&6; }
14349            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14350          fi
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14352$as_echo "$tool_specified" >&6; }
14353        fi
14354      fi
14355    fi
14356
14357  fi
14358
14359
14360  if test "x$SED" = x; then
14361    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14362  fi
14363
14364
14365
14366  # Always force rm.
14367  RM="$RM -f"
14368
14369  # pwd behaves differently on various platforms and some don't support the -L flag.
14370  # Always use the bash builtin pwd to get uniform behavior.
14371  THEPWDCMD=pwd
14372
14373  # These are not required on all platforms
14374
14375
14376  # Publish this variable in the help.
14377
14378
14379  if [ -z "${CYGPATH+x}" ]; then
14380    # The variable is not set by user, try to locate tool using the code snippet
14381    for ac_prog in cygpath
14382do
14383  # Extract the first word of "$ac_prog", so it can be a program name with args.
14384set dummy $ac_prog; ac_word=$2
14385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14386$as_echo_n "checking for $ac_word... " >&6; }
14387if ${ac_cv_path_CYGPATH+:} false; then :
14388  $as_echo_n "(cached) " >&6
14389else
14390  case $CYGPATH in
14391  [\\/]* | ?:[\\/]*)
14392  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14393  ;;
14394  *)
14395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14396for as_dir in $PATH
14397do
14398  IFS=$as_save_IFS
14399  test -z "$as_dir" && as_dir=.
14400    for ac_exec_ext in '' $ac_executable_extensions; do
14401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14402    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14404    break 2
14405  fi
14406done
14407  done
14408IFS=$as_save_IFS
14409
14410  ;;
14411esac
14412fi
14413CYGPATH=$ac_cv_path_CYGPATH
14414if test -n "$CYGPATH"; then
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14416$as_echo "$CYGPATH" >&6; }
14417else
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14419$as_echo "no" >&6; }
14420fi
14421
14422
14423  test -n "$CYGPATH" && break
14424done
14425
14426  else
14427    # The variable is set, but is it from the command line or the environment?
14428
14429    # Try to remove the string !CYGPATH! from our list.
14430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14432      # If it failed, the variable was not from the command line. Ignore it,
14433      # but warn the user (except for BASH, which is always set by the calling BASH).
14434      if test "xCYGPATH" != xBASH; then
14435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14436$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14437      fi
14438      # Try to locate tool using the code snippet
14439      for ac_prog in cygpath
14440do
14441  # Extract the first word of "$ac_prog", so it can be a program name with args.
14442set dummy $ac_prog; ac_word=$2
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14444$as_echo_n "checking for $ac_word... " >&6; }
14445if ${ac_cv_path_CYGPATH+:} false; then :
14446  $as_echo_n "(cached) " >&6
14447else
14448  case $CYGPATH in
14449  [\\/]* | ?:[\\/]*)
14450  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14451  ;;
14452  *)
14453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14454for as_dir in $PATH
14455do
14456  IFS=$as_save_IFS
14457  test -z "$as_dir" && as_dir=.
14458    for ac_exec_ext in '' $ac_executable_extensions; do
14459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14460    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14462    break 2
14463  fi
14464done
14465  done
14466IFS=$as_save_IFS
14467
14468  ;;
14469esac
14470fi
14471CYGPATH=$ac_cv_path_CYGPATH
14472if test -n "$CYGPATH"; then
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14474$as_echo "$CYGPATH" >&6; }
14475else
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14477$as_echo "no" >&6; }
14478fi
14479
14480
14481  test -n "$CYGPATH" && break
14482done
14483
14484    else
14485      # If it succeeded, then it was overridden by the user. We will use it
14486      # for the tool.
14487
14488      # First remove it from the list of overridden variables, so we can test
14489      # for unknown variables in the end.
14490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14491
14492      # Check if we try to supply an empty value
14493      if test "x$CYGPATH" = x; then
14494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14495$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14497$as_echo_n "checking for CYGPATH... " >&6; }
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14499$as_echo "disabled" >&6; }
14500      else
14501        # Check if the provided tool contains a complete path.
14502        tool_specified="$CYGPATH"
14503        tool_basename="${tool_specified##*/}"
14504        if test "x$tool_basename" = "x$tool_specified"; then
14505          # A command without a complete path is provided, search $PATH.
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14507$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14508          # Extract the first word of "$tool_basename", so it can be a program name with args.
14509set dummy $tool_basename; ac_word=$2
14510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14511$as_echo_n "checking for $ac_word... " >&6; }
14512if ${ac_cv_path_CYGPATH+:} false; then :
14513  $as_echo_n "(cached) " >&6
14514else
14515  case $CYGPATH in
14516  [\\/]* | ?:[\\/]*)
14517  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14518  ;;
14519  *)
14520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14521for as_dir in $PATH
14522do
14523  IFS=$as_save_IFS
14524  test -z "$as_dir" && as_dir=.
14525    for ac_exec_ext in '' $ac_executable_extensions; do
14526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14527    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14529    break 2
14530  fi
14531done
14532  done
14533IFS=$as_save_IFS
14534
14535  ;;
14536esac
14537fi
14538CYGPATH=$ac_cv_path_CYGPATH
14539if test -n "$CYGPATH"; then
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14541$as_echo "$CYGPATH" >&6; }
14542else
14543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14544$as_echo "no" >&6; }
14545fi
14546
14547
14548          if test "x$CYGPATH" = x; then
14549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14550          fi
14551        else
14552          # Otherwise we believe it is a complete path. Use it as it is.
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14554$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14556$as_echo_n "checking for CYGPATH... " >&6; }
14557          if test ! -x "$tool_specified"; then
14558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14559$as_echo "not found" >&6; }
14560            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14561          fi
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14563$as_echo "$tool_specified" >&6; }
14564        fi
14565      fi
14566    fi
14567
14568  fi
14569
14570
14571
14572
14573  # Publish this variable in the help.
14574
14575
14576  if [ -z "${READLINK+x}" ]; then
14577    # The variable is not set by user, try to locate tool using the code snippet
14578    for ac_prog in greadlink readlink
14579do
14580  # Extract the first word of "$ac_prog", so it can be a program name with args.
14581set dummy $ac_prog; ac_word=$2
14582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14583$as_echo_n "checking for $ac_word... " >&6; }
14584if ${ac_cv_path_READLINK+:} false; then :
14585  $as_echo_n "(cached) " >&6
14586else
14587  case $READLINK in
14588  [\\/]* | ?:[\\/]*)
14589  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14590  ;;
14591  *)
14592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14593for as_dir in $PATH
14594do
14595  IFS=$as_save_IFS
14596  test -z "$as_dir" && as_dir=.
14597    for ac_exec_ext in '' $ac_executable_extensions; do
14598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14599    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14601    break 2
14602  fi
14603done
14604  done
14605IFS=$as_save_IFS
14606
14607  ;;
14608esac
14609fi
14610READLINK=$ac_cv_path_READLINK
14611if test -n "$READLINK"; then
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14613$as_echo "$READLINK" >&6; }
14614else
14615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616$as_echo "no" >&6; }
14617fi
14618
14619
14620  test -n "$READLINK" && break
14621done
14622
14623  else
14624    # The variable is set, but is it from the command line or the environment?
14625
14626    # Try to remove the string !READLINK! from our list.
14627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14629      # If it failed, the variable was not from the command line. Ignore it,
14630      # but warn the user (except for BASH, which is always set by the calling BASH).
14631      if test "xREADLINK" != xBASH; then
14632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14633$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14634      fi
14635      # Try to locate tool using the code snippet
14636      for ac_prog in greadlink readlink
14637do
14638  # Extract the first word of "$ac_prog", so it can be a program name with args.
14639set dummy $ac_prog; ac_word=$2
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14641$as_echo_n "checking for $ac_word... " >&6; }
14642if ${ac_cv_path_READLINK+:} false; then :
14643  $as_echo_n "(cached) " >&6
14644else
14645  case $READLINK in
14646  [\\/]* | ?:[\\/]*)
14647  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14648  ;;
14649  *)
14650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14651for as_dir in $PATH
14652do
14653  IFS=$as_save_IFS
14654  test -z "$as_dir" && as_dir=.
14655    for ac_exec_ext in '' $ac_executable_extensions; do
14656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14657    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14659    break 2
14660  fi
14661done
14662  done
14663IFS=$as_save_IFS
14664
14665  ;;
14666esac
14667fi
14668READLINK=$ac_cv_path_READLINK
14669if test -n "$READLINK"; then
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14671$as_echo "$READLINK" >&6; }
14672else
14673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14674$as_echo "no" >&6; }
14675fi
14676
14677
14678  test -n "$READLINK" && break
14679done
14680
14681    else
14682      # If it succeeded, then it was overridden by the user. We will use it
14683      # for the tool.
14684
14685      # First remove it from the list of overridden variables, so we can test
14686      # for unknown variables in the end.
14687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14688
14689      # Check if we try to supply an empty value
14690      if test "x$READLINK" = x; then
14691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14692$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14694$as_echo_n "checking for READLINK... " >&6; }
14695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14696$as_echo "disabled" >&6; }
14697      else
14698        # Check if the provided tool contains a complete path.
14699        tool_specified="$READLINK"
14700        tool_basename="${tool_specified##*/}"
14701        if test "x$tool_basename" = "x$tool_specified"; then
14702          # A command without a complete path is provided, search $PATH.
14703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14704$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14705          # Extract the first word of "$tool_basename", so it can be a program name with args.
14706set dummy $tool_basename; ac_word=$2
14707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14708$as_echo_n "checking for $ac_word... " >&6; }
14709if ${ac_cv_path_READLINK+:} false; then :
14710  $as_echo_n "(cached) " >&6
14711else
14712  case $READLINK in
14713  [\\/]* | ?:[\\/]*)
14714  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14715  ;;
14716  *)
14717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14718for as_dir in $PATH
14719do
14720  IFS=$as_save_IFS
14721  test -z "$as_dir" && as_dir=.
14722    for ac_exec_ext in '' $ac_executable_extensions; do
14723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14724    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14726    break 2
14727  fi
14728done
14729  done
14730IFS=$as_save_IFS
14731
14732  ;;
14733esac
14734fi
14735READLINK=$ac_cv_path_READLINK
14736if test -n "$READLINK"; then
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14738$as_echo "$READLINK" >&6; }
14739else
14740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14741$as_echo "no" >&6; }
14742fi
14743
14744
14745          if test "x$READLINK" = x; then
14746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14747          fi
14748        else
14749          # Otherwise we believe it is a complete path. Use it as it is.
14750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14751$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14753$as_echo_n "checking for READLINK... " >&6; }
14754          if test ! -x "$tool_specified"; then
14755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14756$as_echo "not found" >&6; }
14757            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14758          fi
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14760$as_echo "$tool_specified" >&6; }
14761        fi
14762      fi
14763    fi
14764
14765  fi
14766
14767
14768
14769
14770  # Publish this variable in the help.
14771
14772
14773  if [ -z "${DF+x}" ]; then
14774    # The variable is not set by user, try to locate tool using the code snippet
14775    for ac_prog in df
14776do
14777  # Extract the first word of "$ac_prog", so it can be a program name with args.
14778set dummy $ac_prog; ac_word=$2
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14780$as_echo_n "checking for $ac_word... " >&6; }
14781if ${ac_cv_path_DF+:} false; then :
14782  $as_echo_n "(cached) " >&6
14783else
14784  case $DF in
14785  [\\/]* | ?:[\\/]*)
14786  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14787  ;;
14788  *)
14789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14790for as_dir in $PATH
14791do
14792  IFS=$as_save_IFS
14793  test -z "$as_dir" && as_dir=.
14794    for ac_exec_ext in '' $ac_executable_extensions; do
14795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14796    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14798    break 2
14799  fi
14800done
14801  done
14802IFS=$as_save_IFS
14803
14804  ;;
14805esac
14806fi
14807DF=$ac_cv_path_DF
14808if test -n "$DF"; then
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14810$as_echo "$DF" >&6; }
14811else
14812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14813$as_echo "no" >&6; }
14814fi
14815
14816
14817  test -n "$DF" && break
14818done
14819
14820  else
14821    # The variable is set, but is it from the command line or the environment?
14822
14823    # Try to remove the string !DF! from our list.
14824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14826      # If it failed, the variable was not from the command line. Ignore it,
14827      # but warn the user (except for BASH, which is always set by the calling BASH).
14828      if test "xDF" != xBASH; then
14829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14830$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14831      fi
14832      # Try to locate tool using the code snippet
14833      for ac_prog in df
14834do
14835  # Extract the first word of "$ac_prog", so it can be a program name with args.
14836set dummy $ac_prog; ac_word=$2
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14838$as_echo_n "checking for $ac_word... " >&6; }
14839if ${ac_cv_path_DF+:} false; then :
14840  $as_echo_n "(cached) " >&6
14841else
14842  case $DF in
14843  [\\/]* | ?:[\\/]*)
14844  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14845  ;;
14846  *)
14847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14848for as_dir in $PATH
14849do
14850  IFS=$as_save_IFS
14851  test -z "$as_dir" && as_dir=.
14852    for ac_exec_ext in '' $ac_executable_extensions; do
14853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14854    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14856    break 2
14857  fi
14858done
14859  done
14860IFS=$as_save_IFS
14861
14862  ;;
14863esac
14864fi
14865DF=$ac_cv_path_DF
14866if test -n "$DF"; then
14867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14868$as_echo "$DF" >&6; }
14869else
14870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14871$as_echo "no" >&6; }
14872fi
14873
14874
14875  test -n "$DF" && break
14876done
14877
14878    else
14879      # If it succeeded, then it was overridden by the user. We will use it
14880      # for the tool.
14881
14882      # First remove it from the list of overridden variables, so we can test
14883      # for unknown variables in the end.
14884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14885
14886      # Check if we try to supply an empty value
14887      if test "x$DF" = x; then
14888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14889$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14891$as_echo_n "checking for DF... " >&6; }
14892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14893$as_echo "disabled" >&6; }
14894      else
14895        # Check if the provided tool contains a complete path.
14896        tool_specified="$DF"
14897        tool_basename="${tool_specified##*/}"
14898        if test "x$tool_basename" = "x$tool_specified"; then
14899          # A command without a complete path is provided, search $PATH.
14900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14901$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14902          # Extract the first word of "$tool_basename", so it can be a program name with args.
14903set dummy $tool_basename; ac_word=$2
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14905$as_echo_n "checking for $ac_word... " >&6; }
14906if ${ac_cv_path_DF+:} false; then :
14907  $as_echo_n "(cached) " >&6
14908else
14909  case $DF in
14910  [\\/]* | ?:[\\/]*)
14911  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14912  ;;
14913  *)
14914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14915for as_dir in $PATH
14916do
14917  IFS=$as_save_IFS
14918  test -z "$as_dir" && as_dir=.
14919    for ac_exec_ext in '' $ac_executable_extensions; do
14920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14921    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14923    break 2
14924  fi
14925done
14926  done
14927IFS=$as_save_IFS
14928
14929  ;;
14930esac
14931fi
14932DF=$ac_cv_path_DF
14933if test -n "$DF"; then
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14935$as_echo "$DF" >&6; }
14936else
14937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14938$as_echo "no" >&6; }
14939fi
14940
14941
14942          if test "x$DF" = x; then
14943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14944          fi
14945        else
14946          # Otherwise we believe it is a complete path. Use it as it is.
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14948$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14950$as_echo_n "checking for DF... " >&6; }
14951          if test ! -x "$tool_specified"; then
14952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14953$as_echo "not found" >&6; }
14954            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14955          fi
14956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14957$as_echo "$tool_specified" >&6; }
14958        fi
14959      fi
14960    fi
14961
14962  fi
14963
14964
14965
14966
14967  # Publish this variable in the help.
14968
14969
14970  if [ -z "${CPIO+x}" ]; then
14971    # The variable is not set by user, try to locate tool using the code snippet
14972    for ac_prog in cpio bsdcpio
14973do
14974  # Extract the first word of "$ac_prog", so it can be a program name with args.
14975set dummy $ac_prog; ac_word=$2
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14977$as_echo_n "checking for $ac_word... " >&6; }
14978if ${ac_cv_path_CPIO+:} false; then :
14979  $as_echo_n "(cached) " >&6
14980else
14981  case $CPIO in
14982  [\\/]* | ?:[\\/]*)
14983  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14984  ;;
14985  *)
14986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14987for as_dir in $PATH
14988do
14989  IFS=$as_save_IFS
14990  test -z "$as_dir" && as_dir=.
14991    for ac_exec_ext in '' $ac_executable_extensions; do
14992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14993    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14995    break 2
14996  fi
14997done
14998  done
14999IFS=$as_save_IFS
15000
15001  ;;
15002esac
15003fi
15004CPIO=$ac_cv_path_CPIO
15005if test -n "$CPIO"; then
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15007$as_echo "$CPIO" >&6; }
15008else
15009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15010$as_echo "no" >&6; }
15011fi
15012
15013
15014  test -n "$CPIO" && break
15015done
15016
15017  else
15018    # The variable is set, but is it from the command line or the environment?
15019
15020    # Try to remove the string !CPIO! from our list.
15021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15023      # If it failed, the variable was not from the command line. Ignore it,
15024      # but warn the user (except for BASH, which is always set by the calling BASH).
15025      if test "xCPIO" != xBASH; then
15026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15027$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15028      fi
15029      # Try to locate tool using the code snippet
15030      for ac_prog in cpio bsdcpio
15031do
15032  # Extract the first word of "$ac_prog", so it can be a program name with args.
15033set dummy $ac_prog; ac_word=$2
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15035$as_echo_n "checking for $ac_word... " >&6; }
15036if ${ac_cv_path_CPIO+:} false; then :
15037  $as_echo_n "(cached) " >&6
15038else
15039  case $CPIO in
15040  [\\/]* | ?:[\\/]*)
15041  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15042  ;;
15043  *)
15044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15045for as_dir in $PATH
15046do
15047  IFS=$as_save_IFS
15048  test -z "$as_dir" && as_dir=.
15049    for ac_exec_ext in '' $ac_executable_extensions; do
15050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15051    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15053    break 2
15054  fi
15055done
15056  done
15057IFS=$as_save_IFS
15058
15059  ;;
15060esac
15061fi
15062CPIO=$ac_cv_path_CPIO
15063if test -n "$CPIO"; then
15064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15065$as_echo "$CPIO" >&6; }
15066else
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15068$as_echo "no" >&6; }
15069fi
15070
15071
15072  test -n "$CPIO" && break
15073done
15074
15075    else
15076      # If it succeeded, then it was overridden by the user. We will use it
15077      # for the tool.
15078
15079      # First remove it from the list of overridden variables, so we can test
15080      # for unknown variables in the end.
15081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15082
15083      # Check if we try to supply an empty value
15084      if test "x$CPIO" = x; then
15085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15086$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15088$as_echo_n "checking for CPIO... " >&6; }
15089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15090$as_echo "disabled" >&6; }
15091      else
15092        # Check if the provided tool contains a complete path.
15093        tool_specified="$CPIO"
15094        tool_basename="${tool_specified##*/}"
15095        if test "x$tool_basename" = "x$tool_specified"; then
15096          # A command without a complete path is provided, search $PATH.
15097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15098$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15099          # Extract the first word of "$tool_basename", so it can be a program name with args.
15100set dummy $tool_basename; ac_word=$2
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15102$as_echo_n "checking for $ac_word... " >&6; }
15103if ${ac_cv_path_CPIO+:} false; then :
15104  $as_echo_n "(cached) " >&6
15105else
15106  case $CPIO in
15107  [\\/]* | ?:[\\/]*)
15108  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15109  ;;
15110  *)
15111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15112for as_dir in $PATH
15113do
15114  IFS=$as_save_IFS
15115  test -z "$as_dir" && as_dir=.
15116    for ac_exec_ext in '' $ac_executable_extensions; do
15117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15118    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15120    break 2
15121  fi
15122done
15123  done
15124IFS=$as_save_IFS
15125
15126  ;;
15127esac
15128fi
15129CPIO=$ac_cv_path_CPIO
15130if test -n "$CPIO"; then
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15132$as_echo "$CPIO" >&6; }
15133else
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15135$as_echo "no" >&6; }
15136fi
15137
15138
15139          if test "x$CPIO" = x; then
15140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15141          fi
15142        else
15143          # Otherwise we believe it is a complete path. Use it as it is.
15144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15145$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15147$as_echo_n "checking for CPIO... " >&6; }
15148          if test ! -x "$tool_specified"; then
15149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15150$as_echo "not found" >&6; }
15151            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15152          fi
15153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15154$as_echo "$tool_specified" >&6; }
15155        fi
15156      fi
15157    fi
15158
15159  fi
15160
15161
15162
15163
15164  # Publish this variable in the help.
15165
15166
15167  if [ -z "${NICE+x}" ]; then
15168    # The variable is not set by user, try to locate tool using the code snippet
15169    for ac_prog in nice
15170do
15171  # Extract the first word of "$ac_prog", so it can be a program name with args.
15172set dummy $ac_prog; ac_word=$2
15173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15174$as_echo_n "checking for $ac_word... " >&6; }
15175if ${ac_cv_path_NICE+:} false; then :
15176  $as_echo_n "(cached) " >&6
15177else
15178  case $NICE in
15179  [\\/]* | ?:[\\/]*)
15180  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15181  ;;
15182  *)
15183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15184for as_dir in $PATH
15185do
15186  IFS=$as_save_IFS
15187  test -z "$as_dir" && as_dir=.
15188    for ac_exec_ext in '' $ac_executable_extensions; do
15189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15190    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15192    break 2
15193  fi
15194done
15195  done
15196IFS=$as_save_IFS
15197
15198  ;;
15199esac
15200fi
15201NICE=$ac_cv_path_NICE
15202if test -n "$NICE"; then
15203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15204$as_echo "$NICE" >&6; }
15205else
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207$as_echo "no" >&6; }
15208fi
15209
15210
15211  test -n "$NICE" && break
15212done
15213
15214  else
15215    # The variable is set, but is it from the command line or the environment?
15216
15217    # Try to remove the string !NICE! from our list.
15218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15220      # If it failed, the variable was not from the command line. Ignore it,
15221      # but warn the user (except for BASH, which is always set by the calling BASH).
15222      if test "xNICE" != xBASH; then
15223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15224$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15225      fi
15226      # Try to locate tool using the code snippet
15227      for ac_prog in nice
15228do
15229  # Extract the first word of "$ac_prog", so it can be a program name with args.
15230set dummy $ac_prog; ac_word=$2
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15232$as_echo_n "checking for $ac_word... " >&6; }
15233if ${ac_cv_path_NICE+:} false; then :
15234  $as_echo_n "(cached) " >&6
15235else
15236  case $NICE in
15237  [\\/]* | ?:[\\/]*)
15238  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15239  ;;
15240  *)
15241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15242for as_dir in $PATH
15243do
15244  IFS=$as_save_IFS
15245  test -z "$as_dir" && as_dir=.
15246    for ac_exec_ext in '' $ac_executable_extensions; do
15247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15248    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15250    break 2
15251  fi
15252done
15253  done
15254IFS=$as_save_IFS
15255
15256  ;;
15257esac
15258fi
15259NICE=$ac_cv_path_NICE
15260if test -n "$NICE"; then
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15262$as_echo "$NICE" >&6; }
15263else
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15265$as_echo "no" >&6; }
15266fi
15267
15268
15269  test -n "$NICE" && break
15270done
15271
15272    else
15273      # If it succeeded, then it was overridden by the user. We will use it
15274      # for the tool.
15275
15276      # First remove it from the list of overridden variables, so we can test
15277      # for unknown variables in the end.
15278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15279
15280      # Check if we try to supply an empty value
15281      if test "x$NICE" = x; then
15282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15283$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15285$as_echo_n "checking for NICE... " >&6; }
15286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15287$as_echo "disabled" >&6; }
15288      else
15289        # Check if the provided tool contains a complete path.
15290        tool_specified="$NICE"
15291        tool_basename="${tool_specified##*/}"
15292        if test "x$tool_basename" = "x$tool_specified"; then
15293          # A command without a complete path is provided, search $PATH.
15294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15295$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15296          # Extract the first word of "$tool_basename", so it can be a program name with args.
15297set dummy $tool_basename; ac_word=$2
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15299$as_echo_n "checking for $ac_word... " >&6; }
15300if ${ac_cv_path_NICE+:} false; then :
15301  $as_echo_n "(cached) " >&6
15302else
15303  case $NICE in
15304  [\\/]* | ?:[\\/]*)
15305  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15306  ;;
15307  *)
15308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15309for as_dir in $PATH
15310do
15311  IFS=$as_save_IFS
15312  test -z "$as_dir" && as_dir=.
15313    for ac_exec_ext in '' $ac_executable_extensions; do
15314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15315    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15317    break 2
15318  fi
15319done
15320  done
15321IFS=$as_save_IFS
15322
15323  ;;
15324esac
15325fi
15326NICE=$ac_cv_path_NICE
15327if test -n "$NICE"; then
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15329$as_echo "$NICE" >&6; }
15330else
15331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15332$as_echo "no" >&6; }
15333fi
15334
15335
15336          if test "x$NICE" = x; then
15337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15338          fi
15339        else
15340          # Otherwise we believe it is a complete path. Use it as it is.
15341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15342$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15344$as_echo_n "checking for NICE... " >&6; }
15345          if test ! -x "$tool_specified"; then
15346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15347$as_echo "not found" >&6; }
15348            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15349          fi
15350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15351$as_echo "$tool_specified" >&6; }
15352        fi
15353      fi
15354    fi
15355
15356  fi
15357
15358
15359
15360
15361# Now we can determine OpenJDK build and target platforms. This is required to
15362# have early on.
15363# Make sure we can run config.sub.
15364$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15365  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15368$as_echo_n "checking build system type... " >&6; }
15369if ${ac_cv_build+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372  ac_build_alias=$build_alias
15373test "x$ac_build_alias" = x &&
15374  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15375test "x$ac_build_alias" = x &&
15376  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15377ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15378  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15379
15380fi
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15382$as_echo "$ac_cv_build" >&6; }
15383case $ac_cv_build in
15384*-*-*) ;;
15385*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15386esac
15387build=$ac_cv_build
15388ac_save_IFS=$IFS; IFS='-'
15389set x $ac_cv_build
15390shift
15391build_cpu=$1
15392build_vendor=$2
15393shift; shift
15394# Remember, the first character of IFS is used to create $*,
15395# except with old shells:
15396build_os=$*
15397IFS=$ac_save_IFS
15398case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15399
15400
15401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15402$as_echo_n "checking host system type... " >&6; }
15403if ${ac_cv_host+:} false; then :
15404  $as_echo_n "(cached) " >&6
15405else
15406  if test "x$host_alias" = x; then
15407  ac_cv_host=$ac_cv_build
15408else
15409  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15410    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15411fi
15412
15413fi
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15415$as_echo "$ac_cv_host" >&6; }
15416case $ac_cv_host in
15417*-*-*) ;;
15418*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15419esac
15420host=$ac_cv_host
15421ac_save_IFS=$IFS; IFS='-'
15422set x $ac_cv_host
15423shift
15424host_cpu=$1
15425host_vendor=$2
15426shift; shift
15427# Remember, the first character of IFS is used to create $*,
15428# except with old shells:
15429host_os=$*
15430IFS=$ac_save_IFS
15431case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15432
15433
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15435$as_echo_n "checking target system type... " >&6; }
15436if ${ac_cv_target+:} false; then :
15437  $as_echo_n "(cached) " >&6
15438else
15439  if test "x$target_alias" = x; then
15440  ac_cv_target=$ac_cv_host
15441else
15442  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15443    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15444fi
15445
15446fi
15447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15448$as_echo "$ac_cv_target" >&6; }
15449case $ac_cv_target in
15450*-*-*) ;;
15451*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15452esac
15453target=$ac_cv_target
15454ac_save_IFS=$IFS; IFS='-'
15455set x $ac_cv_target
15456shift
15457target_cpu=$1
15458target_vendor=$2
15459shift; shift
15460# Remember, the first character of IFS is used to create $*,
15461# except with old shells:
15462target_os=$*
15463IFS=$ac_save_IFS
15464case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15465
15466
15467# The aliases save the names the user supplied, while $host etc.
15468# will get canonicalized.
15469test -n "$target_alias" &&
15470  test "$program_prefix$program_suffix$program_transform_name" = \
15471    NONENONEs,x,x, &&
15472  program_prefix=${target_alias}-
15473
15474  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15475  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15476  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15477  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15478  # to use the configure naming style.
15479
15480
15481
15482
15483
15484  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15485  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15486  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15487  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15488  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15489  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15490
15491
15492
15493  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15494
15495  case "$build_os" in
15496    *linux*)
15497      VAR_OS=linux
15498      VAR_OS_TYPE=unix
15499      ;;
15500    *solaris*)
15501      VAR_OS=solaris
15502      VAR_OS_TYPE=unix
15503      ;;
15504    *darwin*)
15505      VAR_OS=macosx
15506      VAR_OS_TYPE=unix
15507      ;;
15508    *bsd*)
15509      VAR_OS=bsd
15510      VAR_OS_TYPE=unix
15511      ;;
15512    *cygwin*)
15513      VAR_OS=windows
15514      VAR_OS_ENV=windows.cygwin
15515      ;;
15516    *mingw*)
15517      VAR_OS=windows
15518      VAR_OS_ENV=windows.msys
15519      ;;
15520    *aix*)
15521      VAR_OS=aix
15522      VAR_OS_TYPE=unix
15523      ;;
15524    *)
15525      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15526      ;;
15527  esac
15528
15529
15530  # First argument is the cpu name from the trip/quad
15531  case "$build_cpu" in
15532    x86_64)
15533      VAR_CPU=x86_64
15534      VAR_CPU_ARCH=x86
15535      VAR_CPU_BITS=64
15536      VAR_CPU_ENDIAN=little
15537      ;;
15538    i?86)
15539      VAR_CPU=x86
15540      VAR_CPU_ARCH=x86
15541      VAR_CPU_BITS=32
15542      VAR_CPU_ENDIAN=little
15543      ;;
15544    arm*)
15545      VAR_CPU=arm
15546      VAR_CPU_ARCH=arm
15547      VAR_CPU_BITS=32
15548      VAR_CPU_ENDIAN=little
15549      ;;
15550    aarch64)
15551      VAR_CPU=aarch64
15552      VAR_CPU_ARCH=aarch64
15553      VAR_CPU_BITS=64
15554      VAR_CPU_ENDIAN=little
15555      ;;
15556    powerpc)
15557      VAR_CPU=ppc
15558      VAR_CPU_ARCH=ppc
15559      VAR_CPU_BITS=32
15560      VAR_CPU_ENDIAN=big
15561      ;;
15562    powerpc64)
15563      VAR_CPU=ppc64
15564      VAR_CPU_ARCH=ppc
15565      VAR_CPU_BITS=64
15566      VAR_CPU_ENDIAN=big
15567      ;;
15568    powerpc64le)
15569      VAR_CPU=ppc64le
15570      VAR_CPU_ARCH=ppc
15571      VAR_CPU_BITS=64
15572      VAR_CPU_ENDIAN=little
15573      ;;
15574    s390)
15575      VAR_CPU=s390
15576      VAR_CPU_ARCH=s390
15577      VAR_CPU_BITS=32
15578      VAR_CPU_ENDIAN=big
15579      ;;
15580    s390x)
15581      VAR_CPU=s390x
15582      VAR_CPU_ARCH=s390
15583      VAR_CPU_BITS=64
15584      VAR_CPU_ENDIAN=big
15585      ;;
15586    sparc)
15587      VAR_CPU=sparc
15588      VAR_CPU_ARCH=sparc
15589      VAR_CPU_BITS=32
15590      VAR_CPU_ENDIAN=big
15591      ;;
15592    sparcv9|sparc64)
15593      VAR_CPU=sparcv9
15594      VAR_CPU_ARCH=sparc
15595      VAR_CPU_BITS=64
15596      VAR_CPU_ENDIAN=big
15597      ;;
15598    *)
15599      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15600      ;;
15601  esac
15602
15603  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15604  OPENJDK_BUILD_OS="$VAR_OS"
15605  if test "x$VAR_OS_TYPE" != x; then
15606    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15607  else
15608    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15609  fi
15610  if test "x$VAR_OS_ENV" != x; then
15611    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15612  else
15613    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15614  fi
15615  OPENJDK_BUILD_CPU="$VAR_CPU"
15616  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15617  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15618  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15619
15620
15621
15622
15623
15624
15625
15626
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15628$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15630$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15631
15632  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15633
15634  case "$host_os" in
15635    *linux*)
15636      VAR_OS=linux
15637      VAR_OS_TYPE=unix
15638      ;;
15639    *solaris*)
15640      VAR_OS=solaris
15641      VAR_OS_TYPE=unix
15642      ;;
15643    *darwin*)
15644      VAR_OS=macosx
15645      VAR_OS_TYPE=unix
15646      ;;
15647    *bsd*)
15648      VAR_OS=bsd
15649      VAR_OS_TYPE=unix
15650      ;;
15651    *cygwin*)
15652      VAR_OS=windows
15653      VAR_OS_ENV=windows.cygwin
15654      ;;
15655    *mingw*)
15656      VAR_OS=windows
15657      VAR_OS_ENV=windows.msys
15658      ;;
15659    *aix*)
15660      VAR_OS=aix
15661      VAR_OS_TYPE=unix
15662      ;;
15663    *)
15664      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15665      ;;
15666  esac
15667
15668
15669  # First argument is the cpu name from the trip/quad
15670  case "$host_cpu" in
15671    x86_64)
15672      VAR_CPU=x86_64
15673      VAR_CPU_ARCH=x86
15674      VAR_CPU_BITS=64
15675      VAR_CPU_ENDIAN=little
15676      ;;
15677    i?86)
15678      VAR_CPU=x86
15679      VAR_CPU_ARCH=x86
15680      VAR_CPU_BITS=32
15681      VAR_CPU_ENDIAN=little
15682      ;;
15683    arm*)
15684      VAR_CPU=arm
15685      VAR_CPU_ARCH=arm
15686      VAR_CPU_BITS=32
15687      VAR_CPU_ENDIAN=little
15688      ;;
15689    aarch64)
15690      VAR_CPU=aarch64
15691      VAR_CPU_ARCH=aarch64
15692      VAR_CPU_BITS=64
15693      VAR_CPU_ENDIAN=little
15694      ;;
15695    powerpc)
15696      VAR_CPU=ppc
15697      VAR_CPU_ARCH=ppc
15698      VAR_CPU_BITS=32
15699      VAR_CPU_ENDIAN=big
15700      ;;
15701    powerpc64)
15702      VAR_CPU=ppc64
15703      VAR_CPU_ARCH=ppc
15704      VAR_CPU_BITS=64
15705      VAR_CPU_ENDIAN=big
15706      ;;
15707    powerpc64le)
15708      VAR_CPU=ppc64le
15709      VAR_CPU_ARCH=ppc
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    s390)
15714      VAR_CPU=s390
15715      VAR_CPU_ARCH=s390
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=big
15718      ;;
15719    s390x)
15720      VAR_CPU=s390x
15721      VAR_CPU_ARCH=s390
15722      VAR_CPU_BITS=64
15723      VAR_CPU_ENDIAN=big
15724      ;;
15725    sparc)
15726      VAR_CPU=sparc
15727      VAR_CPU_ARCH=sparc
15728      VAR_CPU_BITS=32
15729      VAR_CPU_ENDIAN=big
15730      ;;
15731    sparcv9|sparc64)
15732      VAR_CPU=sparcv9
15733      VAR_CPU_ARCH=sparc
15734      VAR_CPU_BITS=64
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    *)
15738      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15739      ;;
15740  esac
15741
15742  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15743  OPENJDK_TARGET_OS="$VAR_OS"
15744  if test "x$VAR_OS_TYPE" != x; then
15745    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15746  else
15747    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15748  fi
15749  if test "x$VAR_OS_ENV" != x; then
15750    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15751  else
15752    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15753  fi
15754  OPENJDK_TARGET_CPU="$VAR_CPU"
15755  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15756  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15757  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15758
15759
15760
15761
15762
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15767$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15769$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15770
15771
15772
15773# Check whether --with-target-bits was given.
15774if test "${with_target_bits+set}" = set; then :
15775  withval=$with_target_bits;
15776fi
15777
15778
15779  # We have three types of compiles:
15780  # native  == normal compilation, target system == build system
15781  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15782  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15783  #
15784  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15785    # We're doing a proper cross-compilation
15786    COMPILE_TYPE="cross"
15787  else
15788    COMPILE_TYPE="native"
15789  fi
15790
15791  if test "x$with_target_bits" != x; then
15792    if test "x$COMPILE_TYPE" = "xcross"; then
15793      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15794    fi
15795
15796    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15797      # A reduced build is requested
15798      COMPILE_TYPE="reduced"
15799      OPENJDK_TARGET_CPU_BITS=32
15800      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15801        OPENJDK_TARGET_CPU=x86
15802      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15803        OPENJDK_TARGET_CPU=sparc
15804      else
15805        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15806      fi
15807    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15808      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
15809    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15811$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15812    else
15813      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15814    fi
15815  fi
15816
15817
15818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15819$as_echo_n "checking compilation type... " >&6; }
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15821$as_echo "$COMPILE_TYPE" >&6; }
15822
15823
15824  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15825    REQUIRED_OS_NAME=SunOS
15826    REQUIRED_OS_VERSION=5.10
15827  fi
15828  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15829    REQUIRED_OS_NAME=Linux
15830    REQUIRED_OS_VERSION=2.6
15831  fi
15832  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15833    REQUIRED_OS_NAME=Windows
15834    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15835      REQUIRED_OS_VERSION=5.2
15836    else
15837      REQUIRED_OS_VERSION=5.1
15838    fi
15839  fi
15840  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15841    REQUIRED_OS_NAME=Darwin
15842    REQUIRED_OS_VERSION=11.2
15843  fi
15844  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15845    REQUIRED_OS_NAME=AIX
15846    REQUIRED_OS_VERSION=7.1
15847  fi
15848
15849
15850
15851
15852
15853
15854  # Also store the legacy naming of the cpu.
15855  # Ie i586 and amd64 instead of x86 and x86_64
15856  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15857  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15858    OPENJDK_TARGET_CPU_LEGACY="i586"
15859  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15860    # On all platforms except MacOSX replace x86_64 with amd64.
15861    OPENJDK_TARGET_CPU_LEGACY="amd64"
15862  fi
15863
15864
15865  # And the second legacy naming of the cpu.
15866  # Ie i386 and amd64 instead of x86 and x86_64.
15867  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15868  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15869    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15870  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15871    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15872  fi
15873
15874
15875  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15876  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15877  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15878  OPENJDK_TARGET_CPU_ISADIR=""
15879  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15880    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15881      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15882    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15883      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15884    fi
15885  fi
15886
15887
15888  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15889  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15890  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15891    # On linux only, we replace x86 with i386.
15892    OPENJDK_TARGET_CPU_OSARCH="i386"
15893  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15894    # On all platforms except macosx, we replace x86_64 with amd64.
15895    OPENJDK_TARGET_CPU_OSARCH="amd64"
15896  fi
15897
15898
15899  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15900  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    OPENJDK_TARGET_CPU_JLI="i386"
15902  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15903    # On all platforms except macosx, we replace x86_64 with amd64.
15904    OPENJDK_TARGET_CPU_JLI="amd64"
15905  fi
15906
15907  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15908      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15909  else
15910      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15911  fi
15912
15913
15914  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15915  # Macosx is osx and x86_64 is x64
15916  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15917    OPENJDK_TARGET_OS_BUNDLE="osx"
15918  else
15919    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15920  fi
15921  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15922    OPENJDK_TARGET_CPU_BUNDLE="x64"
15923  else
15924    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15925  fi
15926  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15927
15928
15929
15930
15931  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15932    A_LP64="LP64:="
15933    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15934    # unpack200.exe
15935    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15936      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15937    fi
15938  fi
15939  LP64=$A_LP64
15940
15941
15942  if test "x$COMPILE_TYPE" = "xcross"; then
15943    # FIXME: ... or should this include reduced builds..?
15944    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15945  else
15946    DEFINE_CROSS_COMPILE_ARCH=""
15947  fi
15948
15949
15950  # Convert openjdk platform names to hotspot names
15951
15952  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15953  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15954    HOTSPOT_TARGET_OS=bsd
15955  fi
15956
15957
15958  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15959  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15960    HOTSPOT_TARGET_OS_TYPE=posix
15961  fi
15962
15963
15964  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15965  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15966    HOTSPOT_TARGET_CPU=x86_32
15967  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15968    HOTSPOT_TARGET_CPU=sparc
15969  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15970    HOTSPOT_TARGET_CPU=ppc_64
15971  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15972    HOTSPOT_TARGET_CPU=ppc_64
15973  fi
15974
15975
15976  # This is identical with OPENJDK_*, but define anyway for consistency.
15977  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15978
15979
15980  # Setup HOTSPOT_TARGET_CPU_DEFINE
15981  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15982    HOTSPOT_TARGET_CPU_DEFINE=IA32
15983  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15984    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15985  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15986    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15987  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15988    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15989  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15990    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15991  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15992    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15993
15994  # The cpu defines below are for zero, we don't support them directly.
15995  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15996    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15997  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15998    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15999  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16000    HOTSPOT_TARGET_CPU_DEFINE=S390
16001  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16002    HOTSPOT_TARGET_CPU_DEFINE=S390
16003  elif test "x$OPENJDK_TARGET_CPU" != x; then
16004    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16005  fi
16006
16007
16008
16009
16010  # Also store the legacy naming of the cpu.
16011  # Ie i586 and amd64 instead of x86 and x86_64
16012  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16013  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16014    OPENJDK_BUILD_CPU_LEGACY="i586"
16015  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16016    # On all platforms except MacOSX replace x86_64 with amd64.
16017    OPENJDK_BUILD_CPU_LEGACY="amd64"
16018  fi
16019
16020
16021  # And the second legacy naming of the cpu.
16022  # Ie i386 and amd64 instead of x86 and x86_64.
16023  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16024  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16025    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16026  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16027    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16028  fi
16029
16030
16031  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16032  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16033  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16034  OPENJDK_BUILD_CPU_ISADIR=""
16035  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16036    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16037      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16038    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16039      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16040    fi
16041  fi
16042
16043
16044  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16045  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16046  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16047    # On linux only, we replace x86 with i386.
16048    OPENJDK_BUILD_CPU_OSARCH="i386"
16049  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16050    # On all platforms except macosx, we replace x86_64 with amd64.
16051    OPENJDK_BUILD_CPU_OSARCH="amd64"
16052  fi
16053
16054
16055  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16056  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16057    OPENJDK_BUILD_CPU_JLI="i386"
16058  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16059    # On all platforms except macosx, we replace x86_64 with amd64.
16060    OPENJDK_BUILD_CPU_JLI="amd64"
16061  fi
16062
16063  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16064      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16065  else
16066      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16067  fi
16068
16069
16070  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16071  # Macosx is osx and x86_64 is x64
16072  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16073    OPENJDK_BUILD_OS_BUNDLE="osx"
16074  else
16075    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16076  fi
16077  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16078    OPENJDK_BUILD_CPU_BUNDLE="x64"
16079  else
16080    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16081  fi
16082  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16083
16084
16085
16086
16087  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16088    A_LP64="LP64:="
16089    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16090    # unpack200.exe
16091    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16092      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16093    fi
16094  fi
16095  LP64=$A_LP64
16096
16097
16098  if test "x$COMPILE_TYPE" = "xcross"; then
16099    # FIXME: ... or should this include reduced builds..?
16100    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16101  else
16102    DEFINE_CROSS_COMPILE_ARCH=""
16103  fi
16104
16105
16106  # Convert openjdk platform names to hotspot names
16107
16108  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16109  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16110    HOTSPOT_BUILD_OS=bsd
16111  fi
16112
16113
16114  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16115  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16116    HOTSPOT_BUILD_OS_TYPE=posix
16117  fi
16118
16119
16120  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16121  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16122    HOTSPOT_BUILD_CPU=x86_32
16123  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16124    HOTSPOT_BUILD_CPU=sparc
16125  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16126    HOTSPOT_BUILD_CPU=ppc_64
16127  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16128    HOTSPOT_BUILD_CPU=ppc_64
16129  fi
16130
16131
16132  # This is identical with OPENJDK_*, but define anyway for consistency.
16133  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16134
16135
16136  # Setup HOTSPOT_BUILD_CPU_DEFINE
16137  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16138    HOTSPOT_BUILD_CPU_DEFINE=IA32
16139  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16140    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16141  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16142    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16143  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16144    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16145  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16146    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16147  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16148    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16149
16150  # The cpu defines below are for zero, we don't support them directly.
16151  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16152    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16153  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16154    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16155  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16156    HOTSPOT_BUILD_CPU_DEFINE=S390
16157  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16158    HOTSPOT_BUILD_CPU_DEFINE=S390
16159  elif test "x$OPENJDK_BUILD_CPU" != x; then
16160    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16161  fi
16162
16163
16164
16165
16166  # ZERO_ARCHDEF is used to enable architecture-specific code.
16167  # This is used in legacy hotspot build.
16168  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16169
16170
16171
16172
16173
16174# Continue setting up basic stuff. Most remaining code require fundamental tools.
16175
16176  # Save the current directory this script was started from
16177  CURDIR="$PWD"
16178
16179  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16180  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16181  # was not available at that time.
16182  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16183  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16184    ORIGINAL_PATH="$REWRITTEN_PATH"
16185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16186$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16187  fi
16188
16189  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16190    PATH_SEP=";"
16191
16192  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16193  if test $SRC_ROOT_LENGTH -gt 100; then
16194    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16195  fi
16196
16197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16199$as_echo_n "checking cygwin release... " >&6; }
16200    CYGWIN_VERSION=`$UNAME -r`
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16202$as_echo "$CYGWIN_VERSION" >&6; }
16203    WINDOWS_ENV_VENDOR='cygwin'
16204    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16205
16206    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16207    if test "x$CYGWIN_VERSION_OLD" != x; then
16208      { $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
16209$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;}
16210      as_fn_error $? "Cannot continue" "$LINENO" 5
16211    fi
16212    if test "x$CYGPATH" = x; then
16213      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16214    fi
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16216$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16217    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16218    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16219    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16220    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16222$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16223    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16224    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16225    if test "x$test_cygdrive_prefix" = x; then
16226      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16227    fi
16228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16230$as_echo_n "checking msys release... " >&6; }
16231    MSYS_VERSION=`$UNAME -r`
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16233$as_echo "$MSYS_VERSION" >&6; }
16234
16235    WINDOWS_ENV_VENDOR='msys'
16236    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16237
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16239$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16240    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16241    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16242
16243  windows_path="$MSYS_ROOT_PATH"
16244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16245    unix_path=`$CYGPATH -u "$windows_path"`
16246    MSYS_ROOT_PATH="$unix_path"
16247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16249    MSYS_ROOT_PATH="$unix_path"
16250  fi
16251
16252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16253$as_echo "$MSYS_ROOT_PATH" >&6; }
16254    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16255  else
16256    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16257  fi
16258
16259  # Test if windows or unix (cygwin/msys) find is first in path.
16260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16261$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16262  FIND_BINARY_OUTPUT=`find --version 2>&1`
16263  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16265$as_echo "unix style" >&6; }
16266  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16268$as_echo "Windows" >&6; }
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16270$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16271    { $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
16272$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16273    as_fn_error $? "Cannot continue" "$LINENO" 5
16274  else
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16276$as_echo "unknown" >&6; }
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16278$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16279  fi
16280
16281  else
16282    PATH_SEP=":"
16283  fi
16284
16285
16286  # We get the top-level directory from the supporting wrappers.
16287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16288$as_echo_n "checking for top-level directory... " >&6; }
16289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16290$as_echo "$TOPDIR" >&6; }
16291
16292
16293  # Save the original version of TOPDIR for string comparisons
16294  ORIGINAL_TOPDIR="$TOPDIR"
16295
16296
16297  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16298
16299  # Only process if variable expands to non-empty
16300
16301  if test "x$CURDIR" != x; then
16302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16303
16304  # Input might be given as Windows format, start by converting to
16305  # unix format.
16306  path="$CURDIR"
16307  new_path=`$CYGPATH -u "$path"`
16308
16309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16312  # "foo.exe" is OK but "foo" is an error.
16313  #
16314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16315  # It is also a way to make sure we got the proper file name for the real test later on.
16316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16317  if test "x$test_shortpath" = x; then
16318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16319$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16320    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16321  fi
16322
16323  # Call helper function which possibly converts this using DOS-style short mode.
16324  # If so, the updated path is stored in $new_path.
16325
16326  input_path="$new_path"
16327  # Check if we need to convert this using DOS-style short mode. If the path
16328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16329  # take no chances and rewrite it.
16330  # Note: m4 eats our [], so we need to use [ and ] instead.
16331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16332  if test "x$has_forbidden_chars" != x; then
16333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16337      # Going to short mode and back again did indeed matter. Since short mode is
16338      # case insensitive, let's make it lowercase to improve readability.
16339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16340      # Now convert it back to Unix-style (cygpath)
16341      input_path=`$CYGPATH -u "$shortmode_path"`
16342      new_path="$input_path"
16343    fi
16344  fi
16345
16346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16347  if test "x$test_cygdrive_prefix" = x; then
16348    # As a simple fix, exclude /usr/bin since it's not a real path.
16349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16351      # a path prefixed by /cygdrive for fixpath to work.
16352      new_path="$CYGWIN_ROOT_PATH$input_path"
16353    fi
16354  fi
16355
16356
16357  if test "x$path" != "x$new_path"; then
16358    CURDIR="$new_path"
16359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16360$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16361  fi
16362
16363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16364
16365  path="$CURDIR"
16366  has_colon=`$ECHO $path | $GREP ^.:`
16367  new_path="$path"
16368  if test "x$has_colon" = x; then
16369    # Not in mixed or Windows style, start by that.
16370    new_path=`cmd //c echo $path`
16371  fi
16372
16373
16374  input_path="$new_path"
16375  # Check if we need to convert this using DOS-style short mode. If the path
16376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16377  # take no chances and rewrite it.
16378  # Note: m4 eats our [], so we need to use [ and ] instead.
16379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16380  if test "x$has_forbidden_chars" != x; then
16381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16383  fi
16384
16385
16386  windows_path="$new_path"
16387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16388    unix_path=`$CYGPATH -u "$windows_path"`
16389    new_path="$unix_path"
16390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16392    new_path="$unix_path"
16393  fi
16394
16395  if test "x$path" != "x$new_path"; then
16396    CURDIR="$new_path"
16397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16398$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16399  fi
16400
16401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16403
16404    else
16405      # We're on a unix platform. Hooray! :)
16406      path="$CURDIR"
16407      has_space=`$ECHO "$path" | $GREP " "`
16408      if test "x$has_space" != x; then
16409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16410$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16412      fi
16413
16414      # Use eval to expand a potential ~
16415      eval path="$path"
16416      if test ! -f "$path" && test ! -d "$path"; then
16417        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16418      fi
16419
16420      if test -d "$path"; then
16421        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16422      else
16423        dir="`$DIRNAME "$path"`"
16424        base="`$BASENAME "$path"`"
16425        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16426      fi
16427    fi
16428  fi
16429
16430
16431  # Only process if variable expands to non-empty
16432
16433  if test "x$TOPDIR" != x; then
16434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16435
16436  # Input might be given as Windows format, start by converting to
16437  # unix format.
16438  path="$TOPDIR"
16439  new_path=`$CYGPATH -u "$path"`
16440
16441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16444  # "foo.exe" is OK but "foo" is an error.
16445  #
16446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16447  # It is also a way to make sure we got the proper file name for the real test later on.
16448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16449  if test "x$test_shortpath" = x; then
16450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16451$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16452    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16453  fi
16454
16455  # Call helper function which possibly converts this using DOS-style short mode.
16456  # If so, the updated path is stored in $new_path.
16457
16458  input_path="$new_path"
16459  # Check if we need to convert this using DOS-style short mode. If the path
16460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16461  # take no chances and rewrite it.
16462  # Note: m4 eats our [], so we need to use [ and ] instead.
16463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16464  if test "x$has_forbidden_chars" != x; then
16465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16469      # Going to short mode and back again did indeed matter. Since short mode is
16470      # case insensitive, let's make it lowercase to improve readability.
16471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16472      # Now convert it back to Unix-style (cygpath)
16473      input_path=`$CYGPATH -u "$shortmode_path"`
16474      new_path="$input_path"
16475    fi
16476  fi
16477
16478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16479  if test "x$test_cygdrive_prefix" = x; then
16480    # As a simple fix, exclude /usr/bin since it's not a real path.
16481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16483      # a path prefixed by /cygdrive for fixpath to work.
16484      new_path="$CYGWIN_ROOT_PATH$input_path"
16485    fi
16486  fi
16487
16488
16489  if test "x$path" != "x$new_path"; then
16490    TOPDIR="$new_path"
16491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16492$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16493  fi
16494
16495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16496
16497  path="$TOPDIR"
16498  has_colon=`$ECHO $path | $GREP ^.:`
16499  new_path="$path"
16500  if test "x$has_colon" = x; then
16501    # Not in mixed or Windows style, start by that.
16502    new_path=`cmd //c echo $path`
16503  fi
16504
16505
16506  input_path="$new_path"
16507  # Check if we need to convert this using DOS-style short mode. If the path
16508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16509  # take no chances and rewrite it.
16510  # Note: m4 eats our [], so we need to use [ and ] instead.
16511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16512  if test "x$has_forbidden_chars" != x; then
16513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16515  fi
16516
16517
16518  windows_path="$new_path"
16519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16520    unix_path=`$CYGPATH -u "$windows_path"`
16521    new_path="$unix_path"
16522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16524    new_path="$unix_path"
16525  fi
16526
16527  if test "x$path" != "x$new_path"; then
16528    TOPDIR="$new_path"
16529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16530$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16531  fi
16532
16533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16535
16536    else
16537      # We're on a unix platform. Hooray! :)
16538      path="$TOPDIR"
16539      has_space=`$ECHO "$path" | $GREP " "`
16540      if test "x$has_space" != x; then
16541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16542$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16544      fi
16545
16546      # Use eval to expand a potential ~
16547      eval path="$path"
16548      if test ! -f "$path" && test ! -d "$path"; then
16549        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16550      fi
16551
16552      if test -d "$path"; then
16553        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16554      else
16555        dir="`$DIRNAME "$path"`"
16556        base="`$BASENAME "$path"`"
16557        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16558      fi
16559    fi
16560  fi
16561
16562  # SRC_ROOT is a traditional alias for TOPDIR.
16563  SRC_ROOT=$TOPDIR
16564
16565  # Calculate a canonical version of TOPDIR for string comparisons
16566  CANONICAL_TOPDIR=$TOPDIR
16567
16568  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16569    # Follow a chain of symbolic links. Use readlink
16570    # where it exists, else fall back to horribly
16571    # complicated shell code.
16572    if test "x$READLINK_TESTED" != yes; then
16573      # On MacOSX there is a readlink tool with a different
16574      # purpose than the GNU readlink tool. Check the found readlink.
16575      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16576      if test "x$ISGNU" = x; then
16577        # A readlink that we do not know how to use.
16578        # Are there other non-GNU readlinks out there?
16579        READLINK_TESTED=yes
16580        READLINK=
16581      fi
16582    fi
16583
16584    if test "x$READLINK" != x; then
16585      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16586    else
16587      # Save the current directory for restoring afterwards
16588      STARTDIR=$PWD
16589      COUNTER=0
16590      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16591      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16592      cd $sym_link_dir
16593      # Use -P flag to resolve symlinks in directories.
16594      cd `$THEPWDCMD -P`
16595      sym_link_dir=`$THEPWDCMD -P`
16596      # Resolve file symlinks
16597      while test $COUNTER -lt 20; do
16598        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16599        if test "x$ISLINK" == x; then
16600          # This is not a symbolic link! We are done!
16601          break
16602        fi
16603        # Again resolve directory symlinks since the target of the just found
16604        # link could be in a different directory
16605        cd `$DIRNAME $ISLINK`
16606        sym_link_dir=`$THEPWDCMD -P`
16607        sym_link_file=`$BASENAME $ISLINK`
16608        let COUNTER=COUNTER+1
16609      done
16610      cd $STARTDIR
16611      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16612    fi
16613  fi
16614
16615
16616
16617  # Locate the directory of this script.
16618  AUTOCONF_DIR=$TOPDIR/common/autoconf
16619
16620  # Setup username (for use in adhoc version strings etc)
16621  # Outer [ ] to quote m4.
16622   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16623
16624
16625
16626# Check if it's a pure open build or if custom sources are to be used.
16627
16628  # Check whether --enable-openjdk-only was given.
16629if test "${enable_openjdk_only+set}" = set; then :
16630  enableval=$enable_openjdk_only;
16631else
16632  enable_openjdk_only="no"
16633fi
16634
16635
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16637$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16639$as_echo "$enable_openjdk_only" >&6; }
16640  if test "x$enable_openjdk_only" = "xyes"; then
16641    SUPPRESS_CUSTOM_EXTENSIONS="true"
16642  elif test "x$enable_openjdk_only" = "xno"; then
16643    SUPPRESS_CUSTOM_EXTENSIONS="false"
16644  else
16645    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16646  fi
16647
16648  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16649  # the IncludeCustomExtension macro.
16650
16651
16652# Check whether --with-custom-make-dir was given.
16653if test "${with_custom_make_dir+set}" = set; then :
16654  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
16655$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16656fi
16657
16658
16659
16660
16661# These are needed to be able to create a configuration name (and thus the output directory)
16662
16663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16664$as_echo_n "checking which variant of the JDK to build... " >&6; }
16665
16666# Check whether --with-jdk-variant was given.
16667if test "${with_jdk_variant+set}" = set; then :
16668  withval=$with_jdk_variant;
16669fi
16670
16671
16672  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16673    JDK_VARIANT="normal"
16674  else
16675    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16676  fi
16677
16678
16679
16680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16681$as_echo "$JDK_VARIANT" >&6; }
16682
16683
16684  DEBUG_LEVEL="release"
16685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16686$as_echo_n "checking which debug level to use... " >&6; }
16687  # Check whether --enable-debug was given.
16688if test "${enable_debug+set}" = set; then :
16689  enableval=$enable_debug;
16690        ENABLE_DEBUG="${enableval}"
16691        DEBUG_LEVEL="fastdebug"
16692
16693else
16694  ENABLE_DEBUG="no"
16695fi
16696
16697
16698
16699# Check whether --with-debug-level was given.
16700if test "${with_debug_level+set}" = set; then :
16701  withval=$with_debug_level;
16702        DEBUG_LEVEL="${withval}"
16703        if test "x$ENABLE_DEBUG" = xyes; then
16704          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16705        fi
16706
16707fi
16708
16709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16710$as_echo "$DEBUG_LEVEL" >&6; }
16711
16712  if test "x$DEBUG_LEVEL" != xrelease && \
16713      test "x$DEBUG_LEVEL" != xoptimized && \
16714      test "x$DEBUG_LEVEL" != xfastdebug && \
16715      test "x$DEBUG_LEVEL" != xslowdebug; then
16716    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16717  fi
16718
16719  # Translate DEBUG_LEVEL to debug level used by Hotspot
16720  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16721  if test "x$DEBUG_LEVEL" = xrelease; then
16722    HOTSPOT_DEBUG_LEVEL="product"
16723  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16724    HOTSPOT_DEBUG_LEVEL="debug"
16725  fi
16726
16727  if test "x$DEBUG_LEVEL" = xoptimized; then
16728    # The debug level 'optimized' is a little special because it is currently only
16729    # applicable to the HotSpot build where it means to build a completely
16730    # optimized version of the VM without any debugging code (like for the
16731    # 'release' debug level which is called 'product' in the HotSpot build) but
16732    # with the exception that it can contain additional code which is otherwise
16733    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16734    # test new and/or experimental features which are not intended for customer
16735    # shipment. Because these new features need to be tested and benchmarked in
16736    # real world scenarios, we want to build the containing JDK at the 'release'
16737    # debug level.
16738    DEBUG_LEVEL="release"
16739  fi
16740
16741
16742
16743
16744
16745
16746# Check whether --with-jvm-variants was given.
16747if test "${with_jvm_variants+set}" = set; then :
16748  withval=$with_jvm_variants;
16749fi
16750
16751
16752
16753
16754# Check whether --with-cpu-port was given.
16755if test "${with_cpu_port+set}" = set; then :
16756  withval=$with_cpu_port;
16757fi
16758
16759
16760  if test "x$with_cpu_port" != x; then
16761    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16762      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16763    fi
16764    if test "x$with_cpu_port" != xarm64 && \
16765        test "x$with_cpu_port" != xaarch64; then
16766      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16767    fi
16768    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16769  fi
16770
16771
16772  if test "x$with_jvm_variants" = x; then
16773    with_jvm_variants="server"
16774  fi
16775  JVM_VARIANTS_OPT="$with_jvm_variants"
16776
16777  # Has the user listed more than one variant?
16778  # Additional [] needed to keep m4 from mangling shell constructs.
16779  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16780    BUILDING_MULTIPLE_JVM_VARIANTS=true
16781  else
16782    BUILDING_MULTIPLE_JVM_VARIANTS=false
16783  fi
16784  # Replace the commas with AND for use in the build directory name.
16785  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16786
16787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16788$as_echo_n "checking which variants of the JVM to build... " >&6; }
16789  # JVM_VARIANTS is a space-separated list.
16790  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16791  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16793$as_echo "$JVM_VARIANTS" >&6; }
16794
16795  # Check that the selected variants are valid
16796
16797  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16798  # Notice that the original variant failes on SLES 10 and 11
16799  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16800  STACK=${JVM_VARIANTS// /$'\n'}
16801  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16802  if test "x$INVALID_VARIANTS" != x; then
16803    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16804$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16805    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16806  fi
16807
16808  # All "special" variants share the same output directory ("server")
16809  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16810  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16811  STACK=${JVM_VARIANTS// /$'\n'}
16812  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16813  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16814    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16815  fi
16816
16817  # The "main" variant is the one used by other libs to link against during the
16818  # build.
16819  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16820    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16821    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16822      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16823        JVM_VARIANT_MAIN="$variant"
16824        break
16825      fi
16826    done
16827  else
16828    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16829  fi
16830
16831
16832
16833
16834
16835  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16836    # zero behaves as a platform and rewrites these values. This is really weird. :(
16837    # We are guaranteed that we do not build any other variants when building zero.
16838    HOTSPOT_TARGET_CPU=zero
16839    HOTSPOT_TARGET_CPU_ARCH=zero
16840  fi
16841
16842
16843# With basic setup done, call the custom early hook.
16844
16845
16846# Check if we have devkits, extra paths or sysroot set.
16847
16848
16849# Check whether --with-devkit was given.
16850if test "${with_devkit+set}" = set; then :
16851  withval=$with_devkit;
16852
16853  # Only process if variable expands to non-empty
16854
16855  if test "x$with_devkit" != x; then
16856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16857
16858  # Input might be given as Windows format, start by converting to
16859  # unix format.
16860  path="$with_devkit"
16861  new_path=`$CYGPATH -u "$path"`
16862
16863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16866  # "foo.exe" is OK but "foo" is an error.
16867  #
16868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16869  # It is also a way to make sure we got the proper file name for the real test later on.
16870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16871  if test "x$test_shortpath" = x; then
16872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16873$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16874    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16875  fi
16876
16877  # Call helper function which possibly converts this using DOS-style short mode.
16878  # If so, the updated path is stored in $new_path.
16879
16880  input_path="$new_path"
16881  # Check if we need to convert this using DOS-style short mode. If the path
16882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16883  # take no chances and rewrite it.
16884  # Note: m4 eats our [], so we need to use [ and ] instead.
16885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16886  if test "x$has_forbidden_chars" != x; then
16887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16891      # Going to short mode and back again did indeed matter. Since short mode is
16892      # case insensitive, let's make it lowercase to improve readability.
16893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16894      # Now convert it back to Unix-style (cygpath)
16895      input_path=`$CYGPATH -u "$shortmode_path"`
16896      new_path="$input_path"
16897    fi
16898  fi
16899
16900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16901  if test "x$test_cygdrive_prefix" = x; then
16902    # As a simple fix, exclude /usr/bin since it's not a real path.
16903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16905      # a path prefixed by /cygdrive for fixpath to work.
16906      new_path="$CYGWIN_ROOT_PATH$input_path"
16907    fi
16908  fi
16909
16910
16911  if test "x$path" != "x$new_path"; then
16912    with_devkit="$new_path"
16913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16914$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16915  fi
16916
16917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918
16919  path="$with_devkit"
16920  has_colon=`$ECHO $path | $GREP ^.:`
16921  new_path="$path"
16922  if test "x$has_colon" = x; then
16923    # Not in mixed or Windows style, start by that.
16924    new_path=`cmd //c echo $path`
16925  fi
16926
16927
16928  input_path="$new_path"
16929  # Check if we need to convert this using DOS-style short mode. If the path
16930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16931  # take no chances and rewrite it.
16932  # Note: m4 eats our [], so we need to use [ and ] instead.
16933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16934  if test "x$has_forbidden_chars" != x; then
16935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16937  fi
16938
16939
16940  windows_path="$new_path"
16941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942    unix_path=`$CYGPATH -u "$windows_path"`
16943    new_path="$unix_path"
16944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16946    new_path="$unix_path"
16947  fi
16948
16949  if test "x$path" != "x$new_path"; then
16950    with_devkit="$new_path"
16951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16952$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16953  fi
16954
16955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16957
16958    else
16959      # We're on a unix platform. Hooray! :)
16960      path="$with_devkit"
16961      has_space=`$ECHO "$path" | $GREP " "`
16962      if test "x$has_space" != x; then
16963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16964$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16966      fi
16967
16968      # Use eval to expand a potential ~
16969      eval path="$path"
16970      if test ! -f "$path" && test ! -d "$path"; then
16971        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16972      fi
16973
16974      if test -d "$path"; then
16975        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16976      else
16977        dir="`$DIRNAME "$path"`"
16978        base="`$BASENAME "$path"`"
16979        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16980      fi
16981    fi
16982  fi
16983
16984        DEVKIT_ROOT="$with_devkit"
16985        # Check for a meta data info file in the root of the devkit
16986        if test -f "$DEVKIT_ROOT/devkit.info"; then
16987          . $DEVKIT_ROOT/devkit.info
16988          # This potentially sets the following:
16989          # A descriptive name of the devkit
16990
16991  if test "x$DEVKIT_NAME" = x; then
16992    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16993  fi
16994
16995          # Corresponds to --with-extra-path
16996
16997  if test "x$DEVKIT_EXTRA_PATH" = x; then
16998    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16999  fi
17000
17001          # Corresponds to --with-toolchain-path
17002
17003  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17004    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17005  fi
17006
17007          # Corresponds to --with-sysroot
17008
17009  if test "x$DEVKIT_SYSROOT" = x; then
17010    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17011  fi
17012
17013
17014          # Identifies the Visual Studio version in the devkit
17015
17016  if test "x$DEVKIT_VS_VERSION" = x; then
17017    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17018  fi
17019
17020          # The Visual Studio include environment variable
17021
17022  if test "x$DEVKIT_VS_INCLUDE" = x; then
17023    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17024  fi
17025
17026          # The Visual Studio lib environment variable
17027
17028  if test "x$DEVKIT_VS_LIB" = x; then
17029    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17030  fi
17031
17032          # Corresponds to --with-msvcr-dll
17033
17034  if test "x$DEVKIT_MSVCR_DLL" = x; then
17035    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17036  fi
17037
17038          # Corresponds to --with-msvcp-dll
17039
17040  if test "x$DEVKIT_MSVCP_DLL" = x; then
17041    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17042  fi
17043
17044        fi
17045
17046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17047$as_echo_n "checking for devkit... " >&6; }
17048        if test "x$DEVKIT_NAME" != x; then
17049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17050$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17051        else
17052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17053$as_echo "$DEVKIT_ROOT" >&6; }
17054        fi
17055
17056
17057  if test "x$DEVKIT_EXTRA_PATH" != x; then
17058    if test "x$EXTRA_PATH" = x; then
17059      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17060    else
17061      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17062    fi
17063  fi
17064
17065
17066        # Fallback default of just /bin if DEVKIT_PATH is not defined
17067        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17068          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17069        fi
17070
17071  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17072    if test "x$TOOLCHAIN_PATH" = x; then
17073      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17074    else
17075      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17076    fi
17077  fi
17078
17079
17080        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17081        # places for backwards compatiblity.
17082        if test "x$DEVKIT_SYSROOT" != x; then
17083          SYSROOT="$DEVKIT_SYSROOT"
17084        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17085          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17086        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17087          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17088        fi
17089
17090
17091fi
17092
17093
17094  # You can force the sysroot if the sysroot encoded into the compiler tools
17095  # is not correct.
17096
17097# Check whether --with-sys-root was given.
17098if test "${with_sys_root+set}" = set; then :
17099  withval=$with_sys_root; SYSROOT=$with_sys_root
17100
17101fi
17102
17103
17104
17105# Check whether --with-sysroot was given.
17106if test "${with_sysroot+set}" = set; then :
17107  withval=$with_sysroot; SYSROOT=$with_sysroot
17108
17109fi
17110
17111
17112
17113# Check whether --with-tools-dir was given.
17114if test "${with_tools_dir+set}" = set; then :
17115  withval=$with_tools_dir;
17116  if test "x$with_tools_dir" != x; then
17117    if test "x$TOOLCHAIN_PATH" = x; then
17118      TOOLCHAIN_PATH="$with_tools_dir"
17119    else
17120      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17121    fi
17122  fi
17123
17124
17125fi
17126
17127
17128
17129# Check whether --with-toolchain-path was given.
17130if test "${with_toolchain_path+set}" = set; then :
17131  withval=$with_toolchain_path;
17132  if test "x$with_toolchain_path" != x; then
17133    if test "x$TOOLCHAIN_PATH" = x; then
17134      TOOLCHAIN_PATH="$with_toolchain_path"
17135    else
17136      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17137    fi
17138  fi
17139
17140
17141fi
17142
17143
17144
17145# Check whether --with-extra-path was given.
17146if test "${with_extra_path+set}" = set; then :
17147  withval=$with_extra_path;
17148  if test "x$with_extra_path" != x; then
17149    if test "x$EXTRA_PATH" = x; then
17150      EXTRA_PATH="$with_extra_path"
17151    else
17152      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17153    fi
17154  fi
17155
17156
17157fi
17158
17159
17160  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17161    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17162    # If not, detect if Xcode is installed by running xcodebuild -version
17163    # if no Xcode installed, xcodebuild exits with 1
17164    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17165    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17166      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17167      # fall back on the stub binary in /usr/bin/xcodebuild
17168      # Extract the first word of "xcodebuild", so it can be a program name with args.
17169set dummy xcodebuild; ac_word=$2
17170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17171$as_echo_n "checking for $ac_word... " >&6; }
17172if ${ac_cv_path_XCODEBUILD+:} false; then :
17173  $as_echo_n "(cached) " >&6
17174else
17175  case $XCODEBUILD in
17176  [\\/]* | ?:[\\/]*)
17177  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17178  ;;
17179  *)
17180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17181for as_dir in $TOOLCHAIN_PATH
17182do
17183  IFS=$as_save_IFS
17184  test -z "$as_dir" && as_dir=.
17185    for ac_exec_ext in '' $ac_executable_extensions; do
17186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17187    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17189    break 2
17190  fi
17191done
17192  done
17193IFS=$as_save_IFS
17194
17195  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17196  ;;
17197esac
17198fi
17199XCODEBUILD=$ac_cv_path_XCODEBUILD
17200if test -n "$XCODEBUILD"; then
17201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17202$as_echo "$XCODEBUILD" >&6; }
17203else
17204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17205$as_echo "no" >&6; }
17206fi
17207
17208
17209    else
17210      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17211      # when only the command line tools are installed there are no SDKs, so headers
17212      # are copied into the system frameworks
17213      XCODEBUILD=
17214
17215    fi
17216
17217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17218$as_echo_n "checking for sdk name... " >&6; }
17219
17220# Check whether --with-sdk-name was given.
17221if test "${with_sdk_name+set}" = set; then :
17222  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17223
17224fi
17225
17226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17227$as_echo "$SDKNAME" >&6; }
17228
17229    # if toolchain path is specified then don't rely on system headers, they may not compile
17230    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17231    test -z "$TOOLCHAIN_PATH" && \
17232      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17233
17234    if test -z "$SYSROOT"; then
17235      if test -n "$XCODEBUILD"; then
17236        # if we don't have system headers, use default SDK name (last resort)
17237        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17238          SDKNAME=${SDKNAME:-macosx}
17239        fi
17240
17241        if test -n "$SDKNAME"; then
17242          # Call xcodebuild to determine SYSROOT
17243          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17244        fi
17245      else
17246        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17247          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
17248        fi
17249      fi
17250    else
17251      # warn user if --with-sdk-name was also set
17252      if test -n "$with_sdk_name"; then
17253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17254$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17255      fi
17256    fi
17257
17258    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17259      # If no system framework headers, then SYSROOT must be set, or we won't build
17260      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
17261    fi
17262
17263    # Perform a basic sanity test
17264    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17265      if test -z "$SYSROOT"; then
17266        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
17267      else
17268        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17269      fi
17270    fi
17271
17272    # set SDKROOT too, Xcode tools will pick it up
17273    SDKROOT=$SYSROOT
17274
17275  fi
17276
17277  # Prepend the extra path to the global path
17278
17279  if test "x$EXTRA_PATH" != x; then
17280    if test "x$PATH" = x; then
17281      PATH="$EXTRA_PATH"
17282    else
17283      PATH="$EXTRA_PATH:$PATH"
17284    fi
17285  fi
17286
17287
17288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17289$as_echo_n "checking for sysroot... " >&6; }
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17291$as_echo "$SYSROOT" >&6; }
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17293$as_echo_n "checking for toolchain path... " >&6; }
17294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17295$as_echo "$TOOLCHAIN_PATH" >&6; }
17296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17297$as_echo_n "checking for extra path... " >&6; }
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17299$as_echo "$EXTRA_PATH" >&6; }
17300
17301
17302# To properly create a configuration name, we need to have the OpenJDK target
17303# and options (variants and debug level) parsed.
17304
17305
17306
17307# Check whether --with-conf-name was given.
17308if test "${with_conf_name+set}" = set; then :
17309  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17310fi
17311
17312
17313  # Test from where we are running configure, in or outside of src root.
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17315$as_echo_n "checking where to store configuration... " >&6; }
17316  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17317      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17318      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17319    # We are running configure from the src root.
17320    # Create a default ./build/target-variant-debuglevel output root.
17321    if test "x${CONF_NAME}" = x; then
17322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17323$as_echo "in default location" >&6; }
17324      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17325    else
17326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17327$as_echo "in build directory with custom name" >&6; }
17328    fi
17329    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17330    $MKDIR -p "$OUTPUT_ROOT"
17331    if test ! -d "$OUTPUT_ROOT"; then
17332      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17333    fi
17334  else
17335    # We are running configure from outside of the src dir.
17336    # Then use the current directory as output dir!
17337    # If configuration is situated in normal build directory, just use the build
17338    # directory name as configuration name, otherwise use the complete path.
17339    if test "x${CONF_NAME}" = x; then
17340      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17341    fi
17342    OUTPUT_ROOT="$CURDIR"
17343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17344$as_echo "in current directory" >&6; }
17345
17346    # WARNING: This might be a bad thing to do. You need to be sure you want to
17347    # have a configuration in this directory. Do some sanity checks!
17348
17349    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17350      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17351      # other files
17352      files_present=`$LS $OUTPUT_ROOT`
17353      # Configure has already touched config.log and confdefs.h in the current dir when this check
17354      # is performed.
17355      filtered_files=`$ECHO "$files_present" \
17356          | $SED -e 's/config.log//g' \
17357              -e 's/configure.log//g' \
17358              -e 's/confdefs.h//g' \
17359              -e 's/ //g' \
17360          | $TR -d '\n'`
17361      if test "x$filtered_files" != x; then
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17363$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17364        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17365$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17366        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17367$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17368        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17369$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17370        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17371$as_echo "$as_me: seriously mess up just about everything." >&6;}
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17373$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17375$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17376        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17377      fi
17378    fi
17379  fi
17380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17381$as_echo_n "checking what configuration name to use... " >&6; }
17382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17383$as_echo "$CONF_NAME" >&6; }
17384
17385
17386  # Only process if variable expands to non-empty
17387
17388  if test "x$OUTPUT_ROOT" != x; then
17389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390
17391  # Input might be given as Windows format, start by converting to
17392  # unix format.
17393  path="$OUTPUT_ROOT"
17394  new_path=`$CYGPATH -u "$path"`
17395
17396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17399  # "foo.exe" is OK but "foo" is an error.
17400  #
17401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17402  # It is also a way to make sure we got the proper file name for the real test later on.
17403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17404  if test "x$test_shortpath" = x; then
17405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17406$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17407    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17408  fi
17409
17410  # Call helper function which possibly converts this using DOS-style short mode.
17411  # If so, the updated path is stored in $new_path.
17412
17413  input_path="$new_path"
17414  # Check if we need to convert this using DOS-style short mode. If the path
17415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17416  # take no chances and rewrite it.
17417  # Note: m4 eats our [], so we need to use [ and ] instead.
17418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17419  if test "x$has_forbidden_chars" != x; then
17420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17424      # Going to short mode and back again did indeed matter. Since short mode is
17425      # case insensitive, let's make it lowercase to improve readability.
17426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17427      # Now convert it back to Unix-style (cygpath)
17428      input_path=`$CYGPATH -u "$shortmode_path"`
17429      new_path="$input_path"
17430    fi
17431  fi
17432
17433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17434  if test "x$test_cygdrive_prefix" = x; then
17435    # As a simple fix, exclude /usr/bin since it's not a real path.
17436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17438      # a path prefixed by /cygdrive for fixpath to work.
17439      new_path="$CYGWIN_ROOT_PATH$input_path"
17440    fi
17441  fi
17442
17443
17444  if test "x$path" != "x$new_path"; then
17445    OUTPUT_ROOT="$new_path"
17446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17447$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17448  fi
17449
17450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17451
17452  path="$OUTPUT_ROOT"
17453  has_colon=`$ECHO $path | $GREP ^.:`
17454  new_path="$path"
17455  if test "x$has_colon" = x; then
17456    # Not in mixed or Windows style, start by that.
17457    new_path=`cmd //c echo $path`
17458  fi
17459
17460
17461  input_path="$new_path"
17462  # Check if we need to convert this using DOS-style short mode. If the path
17463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17464  # take no chances and rewrite it.
17465  # Note: m4 eats our [], so we need to use [ and ] instead.
17466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17467  if test "x$has_forbidden_chars" != x; then
17468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17470  fi
17471
17472
17473  windows_path="$new_path"
17474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17475    unix_path=`$CYGPATH -u "$windows_path"`
17476    new_path="$unix_path"
17477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17479    new_path="$unix_path"
17480  fi
17481
17482  if test "x$path" != "x$new_path"; then
17483    OUTPUT_ROOT="$new_path"
17484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17485$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17486  fi
17487
17488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17490
17491    else
17492      # We're on a unix platform. Hooray! :)
17493      path="$OUTPUT_ROOT"
17494      has_space=`$ECHO "$path" | $GREP " "`
17495      if test "x$has_space" != x; then
17496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17497$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17499      fi
17500
17501      # Use eval to expand a potential ~
17502      eval path="$path"
17503      if test ! -f "$path" && test ! -d "$path"; then
17504        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17505      fi
17506
17507      if test -d "$path"; then
17508        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17509      else
17510        dir="`$DIRNAME "$path"`"
17511        base="`$BASENAME "$path"`"
17512        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17513      fi
17514    fi
17515  fi
17516
17517
17518  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17519  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17520
17521  SPEC=$OUTPUT_ROOT/spec.gmk
17522
17523  CONF_NAME=$CONF_NAME
17524
17525  OUTPUT_ROOT=$OUTPUT_ROOT
17526
17527
17528
17529  # The spec.gmk file contains all variables for the make system.
17530  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17531
17532  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17533  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17534
17535  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17536  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17537
17538  # The compare.sh is used to compare the build output to other builds.
17539  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17540
17541  # The generated Makefile knows where the spec.gmk is and where the source is.
17542  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17543  # which will look for generated configurations
17544  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17545
17546
17547
17548# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17549
17550  for ac_prog in apt-get yum port pkgutil pkgadd
17551do
17552  # Extract the first word of "$ac_prog", so it can be a program name with args.
17553set dummy $ac_prog; ac_word=$2
17554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17555$as_echo_n "checking for $ac_word... " >&6; }
17556if ${ac_cv_prog_PKGHANDLER+:} false; then :
17557  $as_echo_n "(cached) " >&6
17558else
17559  if test -n "$PKGHANDLER"; then
17560  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17561else
17562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17563for as_dir in $PATH
17564do
17565  IFS=$as_save_IFS
17566  test -z "$as_dir" && as_dir=.
17567    for ac_exec_ext in '' $ac_executable_extensions; do
17568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17569    ac_cv_prog_PKGHANDLER="$ac_prog"
17570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17571    break 2
17572  fi
17573done
17574  done
17575IFS=$as_save_IFS
17576
17577fi
17578fi
17579PKGHANDLER=$ac_cv_prog_PKGHANDLER
17580if test -n "$PKGHANDLER"; then
17581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17582$as_echo "$PKGHANDLER" >&6; }
17583else
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17585$as_echo "no" >&6; }
17586fi
17587
17588
17589  test -n "$PKGHANDLER" && break
17590done
17591
17592
17593
17594# Setup tools that requires more complex handling, or that is not needed by the configure script.
17595
17596
17597
17598  # Publish this variable in the help.
17599
17600
17601  if [ -z "${MAKE+x}" ]; then
17602    # The variable is not set by user, try to locate tool using the code snippet
17603
17604    # Try our hardest to locate a correct version of GNU make
17605    for ac_prog in gmake
17606do
17607  # Extract the first word of "$ac_prog", so it can be a program name with args.
17608set dummy $ac_prog; ac_word=$2
17609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17610$as_echo_n "checking for $ac_word... " >&6; }
17611if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17612  $as_echo_n "(cached) " >&6
17613else
17614  case $CHECK_GMAKE in
17615  [\\/]* | ?:[\\/]*)
17616  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17617  ;;
17618  *)
17619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17620for as_dir in $PATH
17621do
17622  IFS=$as_save_IFS
17623  test -z "$as_dir" && as_dir=.
17624    for ac_exec_ext in '' $ac_executable_extensions; do
17625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17626    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17628    break 2
17629  fi
17630done
17631  done
17632IFS=$as_save_IFS
17633
17634  ;;
17635esac
17636fi
17637CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17638if test -n "$CHECK_GMAKE"; then
17639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17640$as_echo "$CHECK_GMAKE" >&6; }
17641else
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17643$as_echo "no" >&6; }
17644fi
17645
17646
17647  test -n "$CHECK_GMAKE" && break
17648done
17649
17650
17651  MAKE_CANDIDATE=""$CHECK_GMAKE""
17652  DESCRIPTION="gmake in PATH"
17653
17654  # On Cygwin, we require a newer version of make than on other platforms
17655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656    MAKE_VERSION_EXPR="-e 4\."
17657    MAKE_REQUIRED_VERSION="4.0"
17658   else
17659    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17660    MAKE_REQUIRED_VERSION="3.81"
17661  fi
17662
17663  if test "x$MAKE_CANDIDATE" != x; then
17664    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17665$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17666    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17667    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17668    if test "x$IS_GNU_MAKE" = x; then
17669      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17670$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17671    else
17672      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17673      if test "x$IS_MODERN_MAKE" = x; then
17674        { $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
17675$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;}
17676      else
17677        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17678          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17679            MAKE_EXPECTED_ENV='cygwin'
17680          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17681            MAKE_EXPECTED_ENV='msys'
17682          else
17683            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17684          fi
17685          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17686          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17687        else
17688          # Not relevant for non-Windows
17689          IS_MAKE_CORRECT_ENV=true
17690        fi
17691        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17692          { $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
17693$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;}
17694        else
17695          FOUND_MAKE=$MAKE_CANDIDATE
17696
17697  # Only process if variable expands to non-empty
17698
17699  if test "x$FOUND_MAKE" != x; then
17700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17701
17702  # First separate the path from the arguments. This will split at the first
17703  # space.
17704  complete="$FOUND_MAKE"
17705  path="${complete%% *}"
17706  tmp="$complete EOL"
17707  arguments="${tmp#* }"
17708
17709  # Input might be given as Windows format, start by converting to
17710  # unix format.
17711  new_path=`$CYGPATH -u "$path"`
17712
17713  # Now try to locate executable using which
17714  new_path=`$WHICH "$new_path" 2> /dev/null`
17715  # bat and cmd files are not always considered executable in cygwin causing which
17716  # to not find them
17717  if test "x$new_path" = x \
17718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17720    new_path=`$CYGPATH -u "$path"`
17721  fi
17722  if test "x$new_path" = x; then
17723    # Oops. Which didn't find the executable.
17724    # The splitting of arguments from the executable at a space might have been incorrect,
17725    # since paths with space are more likely in Windows. Give it another try with the whole
17726    # argument.
17727    path="$complete"
17728    arguments="EOL"
17729    new_path=`$CYGPATH -u "$path"`
17730    new_path=`$WHICH "$new_path" 2> /dev/null`
17731    # bat and cmd files are not always considered executable in cygwin causing which
17732    # to not find them
17733    if test "x$new_path" = x \
17734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17736      new_path=`$CYGPATH -u "$path"`
17737    fi
17738    if test "x$new_path" = x; then
17739      # It's still not found. Now this is an unrecoverable error.
17740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17742      has_space=`$ECHO "$complete" | $GREP " "`
17743      if test "x$has_space" != x; then
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17746      fi
17747      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17748    fi
17749  fi
17750
17751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17754  # "foo.exe" is OK but "foo" is an error.
17755  #
17756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17757  # It is also a way to make sure we got the proper file name for the real test later on.
17758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17759  if test "x$test_shortpath" = x; then
17760    # Short path failed, file does not exist as specified.
17761    # Try adding .exe or .cmd
17762    if test -f "${new_path}.exe"; then
17763      input_to_shortpath="${new_path}.exe"
17764    elif test -f "${new_path}.cmd"; then
17765      input_to_shortpath="${new_path}.cmd"
17766    else
17767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17772    fi
17773  else
17774    input_to_shortpath="$new_path"
17775  fi
17776
17777  # Call helper function which possibly converts this using DOS-style short mode.
17778  # If so, the updated path is stored in $new_path.
17779  new_path="$input_to_shortpath"
17780
17781  input_path="$input_to_shortpath"
17782  # Check if we need to convert this using DOS-style short mode. If the path
17783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17784  # take no chances and rewrite it.
17785  # Note: m4 eats our [], so we need to use [ and ] instead.
17786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17787  if test "x$has_forbidden_chars" != x; then
17788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17792      # Going to short mode and back again did indeed matter. Since short mode is
17793      # case insensitive, let's make it lowercase to improve readability.
17794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17795      # Now convert it back to Unix-style (cygpath)
17796      input_path=`$CYGPATH -u "$shortmode_path"`
17797      new_path="$input_path"
17798    fi
17799  fi
17800
17801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17802  if test "x$test_cygdrive_prefix" = x; then
17803    # As a simple fix, exclude /usr/bin since it's not a real path.
17804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17806      # a path prefixed by /cygdrive for fixpath to work.
17807      new_path="$CYGWIN_ROOT_PATH$input_path"
17808    fi
17809  fi
17810
17811  # remove trailing .exe if any
17812  new_path="${new_path/%.exe/}"
17813
17814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17815
17816  # First separate the path from the arguments. This will split at the first
17817  # space.
17818  complete="$FOUND_MAKE"
17819  path="${complete%% *}"
17820  tmp="$complete EOL"
17821  arguments="${tmp#* }"
17822
17823  # Input might be given as Windows format, start by converting to
17824  # unix format.
17825  new_path="$path"
17826
17827  windows_path="$new_path"
17828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17829    unix_path=`$CYGPATH -u "$windows_path"`
17830    new_path="$unix_path"
17831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17833    new_path="$unix_path"
17834  fi
17835
17836
17837  # Now try to locate executable using which
17838  new_path=`$WHICH "$new_path" 2> /dev/null`
17839
17840  if test "x$new_path" = x; then
17841    # Oops. Which didn't find the executable.
17842    # The splitting of arguments from the executable at a space might have been incorrect,
17843    # since paths with space are more likely in Windows. Give it another try with the whole
17844    # argument.
17845    path="$complete"
17846    arguments="EOL"
17847    new_path="$path"
17848
17849  windows_path="$new_path"
17850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17851    unix_path=`$CYGPATH -u "$windows_path"`
17852    new_path="$unix_path"
17853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17855    new_path="$unix_path"
17856  fi
17857
17858
17859    new_path=`$WHICH "$new_path" 2> /dev/null`
17860    # bat and cmd files are not always considered executable in MSYS causing which
17861    # to not find them
17862    if test "x$new_path" = x \
17863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17865      new_path="$path"
17866
17867  windows_path="$new_path"
17868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17869    unix_path=`$CYGPATH -u "$windows_path"`
17870    new_path="$unix_path"
17871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17873    new_path="$unix_path"
17874  fi
17875
17876    fi
17877
17878    if test "x$new_path" = x; then
17879      # It's still not found. Now this is an unrecoverable error.
17880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17882      has_space=`$ECHO "$complete" | $GREP " "`
17883      if test "x$has_space" != x; then
17884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17886      fi
17887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17888    fi
17889  fi
17890
17891  # Now new_path has a complete unix path to the binary
17892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17893    # Keep paths in /bin as-is, but remove trailing .exe if any
17894    new_path="${new_path/%.exe/}"
17895    # Do not save /bin paths to all_fixpath_prefixes!
17896  else
17897    # Not in mixed or Windows style, start by that.
17898    new_path=`cmd //c echo $new_path`
17899
17900  input_path="$new_path"
17901  # Check if we need to convert this using DOS-style short mode. If the path
17902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17903  # take no chances and rewrite it.
17904  # Note: m4 eats our [], so we need to use [ and ] instead.
17905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17906  if test "x$has_forbidden_chars" != x; then
17907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17909  fi
17910
17911    # Output is in $new_path
17912
17913  windows_path="$new_path"
17914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17915    unix_path=`$CYGPATH -u "$windows_path"`
17916    new_path="$unix_path"
17917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17919    new_path="$unix_path"
17920  fi
17921
17922    # remove trailing .exe if any
17923    new_path="${new_path/%.exe/}"
17924
17925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17927  fi
17928
17929    else
17930      # We're on a unix platform. Hooray! :)
17931      # First separate the path from the arguments. This will split at the first
17932      # space.
17933      complete="$FOUND_MAKE"
17934      path="${complete%% *}"
17935      tmp="$complete EOL"
17936      arguments="${tmp#* }"
17937
17938      # Cannot rely on the command "which" here since it doesn't always work.
17939      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17940      if test -z "$is_absolute_path"; then
17941        # Path to executable is not absolute. Find it.
17942        IFS_save="$IFS"
17943        IFS=:
17944        for p in $PATH; do
17945          if test -f "$p/$path" && test -x "$p/$path"; then
17946            new_path="$p/$path"
17947            break
17948          fi
17949        done
17950        IFS="$IFS_save"
17951      else
17952        # This is an absolute path, we can use it without further modifications.
17953        new_path="$path"
17954      fi
17955
17956      if test "x$new_path" = x; then
17957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17959        has_space=`$ECHO "$complete" | $GREP " "`
17960        if test "x$has_space" != x; then
17961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17963        fi
17964        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17965      fi
17966    fi
17967
17968    # Now join together the path and the arguments once again
17969    if test "x$arguments" != xEOL; then
17970      new_complete="$new_path ${arguments% *}"
17971    else
17972      new_complete="$new_path"
17973    fi
17974
17975    if test "x$complete" != "x$new_complete"; then
17976      FOUND_MAKE="$new_complete"
17977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17978$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17979    fi
17980  fi
17981
17982        fi
17983      fi
17984    fi
17985  fi
17986
17987
17988    if test "x$FOUND_MAKE" = x; then
17989      for ac_prog in make
17990do
17991  # Extract the first word of "$ac_prog", so it can be a program name with args.
17992set dummy $ac_prog; ac_word=$2
17993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17994$as_echo_n "checking for $ac_word... " >&6; }
17995if ${ac_cv_path_CHECK_MAKE+:} false; then :
17996  $as_echo_n "(cached) " >&6
17997else
17998  case $CHECK_MAKE in
17999  [\\/]* | ?:[\\/]*)
18000  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18001  ;;
18002  *)
18003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18004for as_dir in $PATH
18005do
18006  IFS=$as_save_IFS
18007  test -z "$as_dir" && as_dir=.
18008    for ac_exec_ext in '' $ac_executable_extensions; do
18009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18010    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18012    break 2
18013  fi
18014done
18015  done
18016IFS=$as_save_IFS
18017
18018  ;;
18019esac
18020fi
18021CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18022if test -n "$CHECK_MAKE"; then
18023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18024$as_echo "$CHECK_MAKE" >&6; }
18025else
18026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18027$as_echo "no" >&6; }
18028fi
18029
18030
18031  test -n "$CHECK_MAKE" && break
18032done
18033
18034
18035  MAKE_CANDIDATE=""$CHECK_MAKE""
18036  DESCRIPTION="make in PATH"
18037
18038  # On Cygwin, we require a newer version of make than on other platforms
18039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18040    MAKE_VERSION_EXPR="-e 4\."
18041    MAKE_REQUIRED_VERSION="4.0"
18042   else
18043    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18044    MAKE_REQUIRED_VERSION="3.81"
18045  fi
18046
18047  if test "x$MAKE_CANDIDATE" != x; then
18048    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18049$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18050    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18051    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18052    if test "x$IS_GNU_MAKE" = x; then
18053      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18054$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18055    else
18056      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18057      if test "x$IS_MODERN_MAKE" = x; then
18058        { $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
18059$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;}
18060      else
18061        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18062          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063            MAKE_EXPECTED_ENV='cygwin'
18064          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18065            MAKE_EXPECTED_ENV='msys'
18066          else
18067            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18068          fi
18069          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18070          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18071        else
18072          # Not relevant for non-Windows
18073          IS_MAKE_CORRECT_ENV=true
18074        fi
18075        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18076          { $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
18077$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;}
18078        else
18079          FOUND_MAKE=$MAKE_CANDIDATE
18080
18081  # Only process if variable expands to non-empty
18082
18083  if test "x$FOUND_MAKE" != x; then
18084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085
18086  # First separate the path from the arguments. This will split at the first
18087  # space.
18088  complete="$FOUND_MAKE"
18089  path="${complete%% *}"
18090  tmp="$complete EOL"
18091  arguments="${tmp#* }"
18092
18093  # Input might be given as Windows format, start by converting to
18094  # unix format.
18095  new_path=`$CYGPATH -u "$path"`
18096
18097  # Now try to locate executable using which
18098  new_path=`$WHICH "$new_path" 2> /dev/null`
18099  # bat and cmd files are not always considered executable in cygwin causing which
18100  # to not find them
18101  if test "x$new_path" = x \
18102      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18103      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18104    new_path=`$CYGPATH -u "$path"`
18105  fi
18106  if test "x$new_path" = x; then
18107    # Oops. Which didn't find the executable.
18108    # The splitting of arguments from the executable at a space might have been incorrect,
18109    # since paths with space are more likely in Windows. Give it another try with the whole
18110    # argument.
18111    path="$complete"
18112    arguments="EOL"
18113    new_path=`$CYGPATH -u "$path"`
18114    new_path=`$WHICH "$new_path" 2> /dev/null`
18115    # bat and cmd files are not always considered executable in cygwin causing which
18116    # to not find them
18117    if test "x$new_path" = x \
18118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18120      new_path=`$CYGPATH -u "$path"`
18121    fi
18122    if test "x$new_path" = x; then
18123      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18138  # "foo.exe" is OK but "foo" is an error.
18139  #
18140  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18141  # It is also a way to make sure we got the proper file name for the real test later on.
18142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18143  if test "x$test_shortpath" = x; then
18144    # Short path failed, file does not exist as specified.
18145    # Try adding .exe or .cmd
18146    if test -f "${new_path}.exe"; then
18147      input_to_shortpath="${new_path}.exe"
18148    elif test -f "${new_path}.cmd"; then
18149      input_to_shortpath="${new_path}.cmd"
18150    else
18151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18152$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18153      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18154$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18156    fi
18157  else
18158    input_to_shortpath="$new_path"
18159  fi
18160
18161  # Call helper function which possibly converts this using DOS-style short mode.
18162  # If so, the updated path is stored in $new_path.
18163  new_path="$input_to_shortpath"
18164
18165  input_path="$input_to_shortpath"
18166  # Check if we need to convert this using DOS-style short mode. If the path
18167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18168  # take no chances and rewrite it.
18169  # Note: m4 eats our [], so we need to use [ and ] instead.
18170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18171  if test "x$has_forbidden_chars" != x; then
18172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18176      # Going to short mode and back again did indeed matter. Since short mode is
18177      # case insensitive, let's make it lowercase to improve readability.
18178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18179      # Now convert it back to Unix-style (cygpath)
18180      input_path=`$CYGPATH -u "$shortmode_path"`
18181      new_path="$input_path"
18182    fi
18183  fi
18184
18185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18186  if test "x$test_cygdrive_prefix" = x; then
18187    # As a simple fix, exclude /usr/bin since it's not a real path.
18188    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18190      # a path prefixed by /cygdrive for fixpath to work.
18191      new_path="$CYGWIN_ROOT_PATH$input_path"
18192    fi
18193  fi
18194
18195  # remove trailing .exe if any
18196  new_path="${new_path/%.exe/}"
18197
18198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18199
18200  # First separate the path from the arguments. This will split at the first
18201  # space.
18202  complete="$FOUND_MAKE"
18203  path="${complete%% *}"
18204  tmp="$complete EOL"
18205  arguments="${tmp#* }"
18206
18207  # Input might be given as Windows format, start by converting to
18208  # unix format.
18209  new_path="$path"
18210
18211  windows_path="$new_path"
18212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18213    unix_path=`$CYGPATH -u "$windows_path"`
18214    new_path="$unix_path"
18215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18217    new_path="$unix_path"
18218  fi
18219
18220
18221  # Now try to locate executable using which
18222  new_path=`$WHICH "$new_path" 2> /dev/null`
18223
18224  if test "x$new_path" = x; then
18225    # Oops. Which didn't find the executable.
18226    # The splitting of arguments from the executable at a space might have been incorrect,
18227    # since paths with space are more likely in Windows. Give it another try with the whole
18228    # argument.
18229    path="$complete"
18230    arguments="EOL"
18231    new_path="$path"
18232
18233  windows_path="$new_path"
18234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235    unix_path=`$CYGPATH -u "$windows_path"`
18236    new_path="$unix_path"
18237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18239    new_path="$unix_path"
18240  fi
18241
18242
18243    new_path=`$WHICH "$new_path" 2> /dev/null`
18244    # bat and cmd files are not always considered executable in MSYS causing which
18245    # to not find them
18246    if test "x$new_path" = x \
18247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18249      new_path="$path"
18250
18251  windows_path="$new_path"
18252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18253    unix_path=`$CYGPATH -u "$windows_path"`
18254    new_path="$unix_path"
18255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18257    new_path="$unix_path"
18258  fi
18259
18260    fi
18261
18262    if test "x$new_path" = x; then
18263      # It's still not found. Now this is an unrecoverable error.
18264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18265$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18266      has_space=`$ECHO "$complete" | $GREP " "`
18267      if test "x$has_space" != x; then
18268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18270      fi
18271      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18272    fi
18273  fi
18274
18275  # Now new_path has a complete unix path to the binary
18276  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18277    # Keep paths in /bin as-is, but remove trailing .exe if any
18278    new_path="${new_path/%.exe/}"
18279    # Do not save /bin paths to all_fixpath_prefixes!
18280  else
18281    # Not in mixed or Windows style, start by that.
18282    new_path=`cmd //c echo $new_path`
18283
18284  input_path="$new_path"
18285  # Check if we need to convert this using DOS-style short mode. If the path
18286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18287  # take no chances and rewrite it.
18288  # Note: m4 eats our [], so we need to use [ and ] instead.
18289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18290  if test "x$has_forbidden_chars" != x; then
18291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18293  fi
18294
18295    # Output is in $new_path
18296
18297  windows_path="$new_path"
18298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18299    unix_path=`$CYGPATH -u "$windows_path"`
18300    new_path="$unix_path"
18301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18303    new_path="$unix_path"
18304  fi
18305
18306    # remove trailing .exe if any
18307    new_path="${new_path/%.exe/}"
18308
18309    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18310    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18311  fi
18312
18313    else
18314      # We're on a unix platform. Hooray! :)
18315      # First separate the path from the arguments. This will split at the first
18316      # space.
18317      complete="$FOUND_MAKE"
18318      path="${complete%% *}"
18319      tmp="$complete EOL"
18320      arguments="${tmp#* }"
18321
18322      # Cannot rely on the command "which" here since it doesn't always work.
18323      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18324      if test -z "$is_absolute_path"; then
18325        # Path to executable is not absolute. Find it.
18326        IFS_save="$IFS"
18327        IFS=:
18328        for p in $PATH; do
18329          if test -f "$p/$path" && test -x "$p/$path"; then
18330            new_path="$p/$path"
18331            break
18332          fi
18333        done
18334        IFS="$IFS_save"
18335      else
18336        # This is an absolute path, we can use it without further modifications.
18337        new_path="$path"
18338      fi
18339
18340      if test "x$new_path" = x; then
18341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18343        has_space=`$ECHO "$complete" | $GREP " "`
18344        if test "x$has_space" != x; then
18345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18347        fi
18348        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18349      fi
18350    fi
18351
18352    # Now join together the path and the arguments once again
18353    if test "x$arguments" != xEOL; then
18354      new_complete="$new_path ${arguments% *}"
18355    else
18356      new_complete="$new_path"
18357    fi
18358
18359    if test "x$complete" != "x$new_complete"; then
18360      FOUND_MAKE="$new_complete"
18361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18362$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18363    fi
18364  fi
18365
18366        fi
18367      fi
18368    fi
18369  fi
18370
18371    fi
18372
18373    if test "x$FOUND_MAKE" = x; then
18374      if test "x$TOOLCHAIN_PATH" != x; then
18375        # We have a toolchain path, check that as well before giving up.
18376        OLD_PATH=$PATH
18377        PATH=$TOOLCHAIN_PATH:$PATH
18378        for ac_prog in gmake
18379do
18380  # Extract the first word of "$ac_prog", so it can be a program name with args.
18381set dummy $ac_prog; ac_word=$2
18382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18383$as_echo_n "checking for $ac_word... " >&6; }
18384if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18385  $as_echo_n "(cached) " >&6
18386else
18387  case $CHECK_TOOLSDIR_GMAKE in
18388  [\\/]* | ?:[\\/]*)
18389  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18390  ;;
18391  *)
18392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18393for as_dir in $PATH
18394do
18395  IFS=$as_save_IFS
18396  test -z "$as_dir" && as_dir=.
18397    for ac_exec_ext in '' $ac_executable_extensions; do
18398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18399    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18401    break 2
18402  fi
18403done
18404  done
18405IFS=$as_save_IFS
18406
18407  ;;
18408esac
18409fi
18410CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18411if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18413$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18414else
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18416$as_echo "no" >&6; }
18417fi
18418
18419
18420  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18421done
18422
18423
18424  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18425  DESCRIPTION="gmake in tools-dir"
18426
18427  # On Cygwin, we require a newer version of make than on other platforms
18428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18429    MAKE_VERSION_EXPR="-e 4\."
18430    MAKE_REQUIRED_VERSION="4.0"
18431   else
18432    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18433    MAKE_REQUIRED_VERSION="3.81"
18434  fi
18435
18436  if test "x$MAKE_CANDIDATE" != x; then
18437    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18438$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18439    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18440    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18441    if test "x$IS_GNU_MAKE" = x; then
18442      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18443$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18444    else
18445      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18446      if test "x$IS_MODERN_MAKE" = x; then
18447        { $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
18448$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;}
18449      else
18450        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18451          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18452            MAKE_EXPECTED_ENV='cygwin'
18453          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18454            MAKE_EXPECTED_ENV='msys'
18455          else
18456            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18457          fi
18458          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18459          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18460        else
18461          # Not relevant for non-Windows
18462          IS_MAKE_CORRECT_ENV=true
18463        fi
18464        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18465          { $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
18466$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;}
18467        else
18468          FOUND_MAKE=$MAKE_CANDIDATE
18469
18470  # Only process if variable expands to non-empty
18471
18472  if test "x$FOUND_MAKE" != x; then
18473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18474
18475  # First separate the path from the arguments. This will split at the first
18476  # space.
18477  complete="$FOUND_MAKE"
18478  path="${complete%% *}"
18479  tmp="$complete EOL"
18480  arguments="${tmp#* }"
18481
18482  # Input might be given as Windows format, start by converting to
18483  # unix format.
18484  new_path=`$CYGPATH -u "$path"`
18485
18486  # Now try to locate executable using which
18487  new_path=`$WHICH "$new_path" 2> /dev/null`
18488  # bat and cmd files are not always considered executable in cygwin causing which
18489  # to not find them
18490  if test "x$new_path" = x \
18491      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18492      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18493    new_path=`$CYGPATH -u "$path"`
18494  fi
18495  if test "x$new_path" = x; then
18496    # Oops. Which didn't find the executable.
18497    # The splitting of arguments from the executable at a space might have been incorrect,
18498    # since paths with space are more likely in Windows. Give it another try with the whole
18499    # argument.
18500    path="$complete"
18501    arguments="EOL"
18502    new_path=`$CYGPATH -u "$path"`
18503    new_path=`$WHICH "$new_path" 2> /dev/null`
18504    # bat and cmd files are not always considered executable in cygwin causing which
18505    # to not find them
18506    if test "x$new_path" = x \
18507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18509      new_path=`$CYGPATH -u "$path"`
18510    fi
18511    if test "x$new_path" = x; then
18512      # It's still not found. Now this is an unrecoverable error.
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18515      has_space=`$ECHO "$complete" | $GREP " "`
18516      if test "x$has_space" != x; then
18517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18519      fi
18520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18521    fi
18522  fi
18523
18524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18527  # "foo.exe" is OK but "foo" is an error.
18528  #
18529  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18530  # It is also a way to make sure we got the proper file name for the real test later on.
18531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18532  if test "x$test_shortpath" = x; then
18533    # Short path failed, file does not exist as specified.
18534    # Try adding .exe or .cmd
18535    if test -f "${new_path}.exe"; then
18536      input_to_shortpath="${new_path}.exe"
18537    elif test -f "${new_path}.cmd"; then
18538      input_to_shortpath="${new_path}.cmd"
18539    else
18540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18544      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18545    fi
18546  else
18547    input_to_shortpath="$new_path"
18548  fi
18549
18550  # Call helper function which possibly converts this using DOS-style short mode.
18551  # If so, the updated path is stored in $new_path.
18552  new_path="$input_to_shortpath"
18553
18554  input_path="$input_to_shortpath"
18555  # Check if we need to convert this using DOS-style short mode. If the path
18556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18557  # take no chances and rewrite it.
18558  # Note: m4 eats our [], so we need to use [ and ] instead.
18559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18560  if test "x$has_forbidden_chars" != x; then
18561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18565      # Going to short mode and back again did indeed matter. Since short mode is
18566      # case insensitive, let's make it lowercase to improve readability.
18567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18568      # Now convert it back to Unix-style (cygpath)
18569      input_path=`$CYGPATH -u "$shortmode_path"`
18570      new_path="$input_path"
18571    fi
18572  fi
18573
18574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18575  if test "x$test_cygdrive_prefix" = x; then
18576    # As a simple fix, exclude /usr/bin since it's not a real path.
18577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18579      # a path prefixed by /cygdrive for fixpath to work.
18580      new_path="$CYGWIN_ROOT_PATH$input_path"
18581    fi
18582  fi
18583
18584  # remove trailing .exe if any
18585  new_path="${new_path/%.exe/}"
18586
18587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18588
18589  # First separate the path from the arguments. This will split at the first
18590  # space.
18591  complete="$FOUND_MAKE"
18592  path="${complete%% *}"
18593  tmp="$complete EOL"
18594  arguments="${tmp#* }"
18595
18596  # Input might be given as Windows format, start by converting to
18597  # unix format.
18598  new_path="$path"
18599
18600  windows_path="$new_path"
18601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18602    unix_path=`$CYGPATH -u "$windows_path"`
18603    new_path="$unix_path"
18604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18606    new_path="$unix_path"
18607  fi
18608
18609
18610  # Now try to locate executable using which
18611  new_path=`$WHICH "$new_path" 2> /dev/null`
18612
18613  if test "x$new_path" = x; then
18614    # Oops. Which didn't find the executable.
18615    # The splitting of arguments from the executable at a space might have been incorrect,
18616    # since paths with space are more likely in Windows. Give it another try with the whole
18617    # argument.
18618    path="$complete"
18619    arguments="EOL"
18620    new_path="$path"
18621
18622  windows_path="$new_path"
18623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624    unix_path=`$CYGPATH -u "$windows_path"`
18625    new_path="$unix_path"
18626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628    new_path="$unix_path"
18629  fi
18630
18631
18632    new_path=`$WHICH "$new_path" 2> /dev/null`
18633    # bat and cmd files are not always considered executable in MSYS causing which
18634    # to not find them
18635    if test "x$new_path" = x \
18636        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18637        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18638      new_path="$path"
18639
18640  windows_path="$new_path"
18641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18642    unix_path=`$CYGPATH -u "$windows_path"`
18643    new_path="$unix_path"
18644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18646    new_path="$unix_path"
18647  fi
18648
18649    fi
18650
18651    if test "x$new_path" = x; then
18652      # It's still not found. Now this is an unrecoverable error.
18653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18654$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18655      has_space=`$ECHO "$complete" | $GREP " "`
18656      if test "x$has_space" != x; then
18657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18659      fi
18660      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18661    fi
18662  fi
18663
18664  # Now new_path has a complete unix path to the binary
18665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18666    # Keep paths in /bin as-is, but remove trailing .exe if any
18667    new_path="${new_path/%.exe/}"
18668    # Do not save /bin paths to all_fixpath_prefixes!
18669  else
18670    # Not in mixed or Windows style, start by that.
18671    new_path=`cmd //c echo $new_path`
18672
18673  input_path="$new_path"
18674  # Check if we need to convert this using DOS-style short mode. If the path
18675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18676  # take no chances and rewrite it.
18677  # Note: m4 eats our [], so we need to use [ and ] instead.
18678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18679  if test "x$has_forbidden_chars" != x; then
18680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18682  fi
18683
18684    # Output is in $new_path
18685
18686  windows_path="$new_path"
18687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18688    unix_path=`$CYGPATH -u "$windows_path"`
18689    new_path="$unix_path"
18690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18692    new_path="$unix_path"
18693  fi
18694
18695    # remove trailing .exe if any
18696    new_path="${new_path/%.exe/}"
18697
18698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18700  fi
18701
18702    else
18703      # We're on a unix platform. Hooray! :)
18704      # First separate the path from the arguments. This will split at the first
18705      # space.
18706      complete="$FOUND_MAKE"
18707      path="${complete%% *}"
18708      tmp="$complete EOL"
18709      arguments="${tmp#* }"
18710
18711      # Cannot rely on the command "which" here since it doesn't always work.
18712      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18713      if test -z "$is_absolute_path"; then
18714        # Path to executable is not absolute. Find it.
18715        IFS_save="$IFS"
18716        IFS=:
18717        for p in $PATH; do
18718          if test -f "$p/$path" && test -x "$p/$path"; then
18719            new_path="$p/$path"
18720            break
18721          fi
18722        done
18723        IFS="$IFS_save"
18724      else
18725        # This is an absolute path, we can use it without further modifications.
18726        new_path="$path"
18727      fi
18728
18729      if test "x$new_path" = x; then
18730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18732        has_space=`$ECHO "$complete" | $GREP " "`
18733        if test "x$has_space" != x; then
18734          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18735$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18736        fi
18737        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18738      fi
18739    fi
18740
18741    # Now join together the path and the arguments once again
18742    if test "x$arguments" != xEOL; then
18743      new_complete="$new_path ${arguments% *}"
18744    else
18745      new_complete="$new_path"
18746    fi
18747
18748    if test "x$complete" != "x$new_complete"; then
18749      FOUND_MAKE="$new_complete"
18750      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18751$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18752    fi
18753  fi
18754
18755        fi
18756      fi
18757    fi
18758  fi
18759
18760        if test "x$FOUND_MAKE" = x; then
18761          for ac_prog in make
18762do
18763  # Extract the first word of "$ac_prog", so it can be a program name with args.
18764set dummy $ac_prog; ac_word=$2
18765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18766$as_echo_n "checking for $ac_word... " >&6; }
18767if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18768  $as_echo_n "(cached) " >&6
18769else
18770  case $CHECK_TOOLSDIR_MAKE in
18771  [\\/]* | ?:[\\/]*)
18772  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18773  ;;
18774  *)
18775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18776for as_dir in $PATH
18777do
18778  IFS=$as_save_IFS
18779  test -z "$as_dir" && as_dir=.
18780    for ac_exec_ext in '' $ac_executable_extensions; do
18781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18782    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18784    break 2
18785  fi
18786done
18787  done
18788IFS=$as_save_IFS
18789
18790  ;;
18791esac
18792fi
18793CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18794if test -n "$CHECK_TOOLSDIR_MAKE"; then
18795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18796$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18797else
18798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18799$as_echo "no" >&6; }
18800fi
18801
18802
18803  test -n "$CHECK_TOOLSDIR_MAKE" && break
18804done
18805
18806
18807  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18808  DESCRIPTION="make in tools-dir"
18809
18810  # On Cygwin, we require a newer version of make than on other platforms
18811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18812    MAKE_VERSION_EXPR="-e 4\."
18813    MAKE_REQUIRED_VERSION="4.0"
18814   else
18815    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18816    MAKE_REQUIRED_VERSION="3.81"
18817  fi
18818
18819  if test "x$MAKE_CANDIDATE" != x; then
18820    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18821$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18822    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18823    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18824    if test "x$IS_GNU_MAKE" = x; then
18825      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18826$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18827    else
18828      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18829      if test "x$IS_MODERN_MAKE" = x; then
18830        { $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
18831$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;}
18832      else
18833        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18834          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18835            MAKE_EXPECTED_ENV='cygwin'
18836          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18837            MAKE_EXPECTED_ENV='msys'
18838          else
18839            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18840          fi
18841          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18842          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18843        else
18844          # Not relevant for non-Windows
18845          IS_MAKE_CORRECT_ENV=true
18846        fi
18847        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18848          { $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
18849$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;}
18850        else
18851          FOUND_MAKE=$MAKE_CANDIDATE
18852
18853  # Only process if variable expands to non-empty
18854
18855  if test "x$FOUND_MAKE" != x; then
18856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18857
18858  # First separate the path from the arguments. This will split at the first
18859  # space.
18860  complete="$FOUND_MAKE"
18861  path="${complete%% *}"
18862  tmp="$complete EOL"
18863  arguments="${tmp#* }"
18864
18865  # Input might be given as Windows format, start by converting to
18866  # unix format.
18867  new_path=`$CYGPATH -u "$path"`
18868
18869  # Now try to locate executable using which
18870  new_path=`$WHICH "$new_path" 2> /dev/null`
18871  # bat and cmd files are not always considered executable in cygwin causing which
18872  # to not find them
18873  if test "x$new_path" = x \
18874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18876    new_path=`$CYGPATH -u "$path"`
18877  fi
18878  if test "x$new_path" = x; then
18879    # Oops. Which didn't find the executable.
18880    # The splitting of arguments from the executable at a space might have been incorrect,
18881    # since paths with space are more likely in Windows. Give it another try with the whole
18882    # argument.
18883    path="$complete"
18884    arguments="EOL"
18885    new_path=`$CYGPATH -u "$path"`
18886    new_path=`$WHICH "$new_path" 2> /dev/null`
18887    # bat and cmd files are not always considered executable in cygwin causing which
18888    # to not find them
18889    if test "x$new_path" = x \
18890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18892      new_path=`$CYGPATH -u "$path"`
18893    fi
18894    if test "x$new_path" = x; then
18895      # It's still not found. Now this is an unrecoverable error.
18896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18897$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18898      has_space=`$ECHO "$complete" | $GREP " "`
18899      if test "x$has_space" != x; then
18900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18902      fi
18903      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18904    fi
18905  fi
18906
18907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18910  # "foo.exe" is OK but "foo" is an error.
18911  #
18912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18913  # It is also a way to make sure we got the proper file name for the real test later on.
18914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18915  if test "x$test_shortpath" = x; then
18916    # Short path failed, file does not exist as specified.
18917    # Try adding .exe or .cmd
18918    if test -f "${new_path}.exe"; then
18919      input_to_shortpath="${new_path}.exe"
18920    elif test -f "${new_path}.cmd"; then
18921      input_to_shortpath="${new_path}.cmd"
18922    else
18923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18927      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18928    fi
18929  else
18930    input_to_shortpath="$new_path"
18931  fi
18932
18933  # Call helper function which possibly converts this using DOS-style short mode.
18934  # If so, the updated path is stored in $new_path.
18935  new_path="$input_to_shortpath"
18936
18937  input_path="$input_to_shortpath"
18938  # Check if we need to convert this using DOS-style short mode. If the path
18939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18940  # take no chances and rewrite it.
18941  # Note: m4 eats our [], so we need to use [ and ] instead.
18942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18943  if test "x$has_forbidden_chars" != x; then
18944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18948      # Going to short mode and back again did indeed matter. Since short mode is
18949      # case insensitive, let's make it lowercase to improve readability.
18950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18951      # Now convert it back to Unix-style (cygpath)
18952      input_path=`$CYGPATH -u "$shortmode_path"`
18953      new_path="$input_path"
18954    fi
18955  fi
18956
18957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18958  if test "x$test_cygdrive_prefix" = x; then
18959    # As a simple fix, exclude /usr/bin since it's not a real path.
18960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18962      # a path prefixed by /cygdrive for fixpath to work.
18963      new_path="$CYGWIN_ROOT_PATH$input_path"
18964    fi
18965  fi
18966
18967  # remove trailing .exe if any
18968  new_path="${new_path/%.exe/}"
18969
18970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18971
18972  # First separate the path from the arguments. This will split at the first
18973  # space.
18974  complete="$FOUND_MAKE"
18975  path="${complete%% *}"
18976  tmp="$complete EOL"
18977  arguments="${tmp#* }"
18978
18979  # Input might be given as Windows format, start by converting to
18980  # unix format.
18981  new_path="$path"
18982
18983  windows_path="$new_path"
18984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18985    unix_path=`$CYGPATH -u "$windows_path"`
18986    new_path="$unix_path"
18987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18989    new_path="$unix_path"
18990  fi
18991
18992
18993  # Now try to locate executable using which
18994  new_path=`$WHICH "$new_path" 2> /dev/null`
18995
18996  if test "x$new_path" = x; then
18997    # Oops. Which didn't find the executable.
18998    # The splitting of arguments from the executable at a space might have been incorrect,
18999    # since paths with space are more likely in Windows. Give it another try with the whole
19000    # argument.
19001    path="$complete"
19002    arguments="EOL"
19003    new_path="$path"
19004
19005  windows_path="$new_path"
19006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19007    unix_path=`$CYGPATH -u "$windows_path"`
19008    new_path="$unix_path"
19009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19011    new_path="$unix_path"
19012  fi
19013
19014
19015    new_path=`$WHICH "$new_path" 2> /dev/null`
19016    # bat and cmd files are not always considered executable in MSYS causing which
19017    # to not find them
19018    if test "x$new_path" = x \
19019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19021      new_path="$path"
19022
19023  windows_path="$new_path"
19024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19025    unix_path=`$CYGPATH -u "$windows_path"`
19026    new_path="$unix_path"
19027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19029    new_path="$unix_path"
19030  fi
19031
19032    fi
19033
19034    if test "x$new_path" = x; then
19035      # It's still not found. Now this is an unrecoverable error.
19036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19038      has_space=`$ECHO "$complete" | $GREP " "`
19039      if test "x$has_space" != x; then
19040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19042      fi
19043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19044    fi
19045  fi
19046
19047  # Now new_path has a complete unix path to the binary
19048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19049    # Keep paths in /bin as-is, but remove trailing .exe if any
19050    new_path="${new_path/%.exe/}"
19051    # Do not save /bin paths to all_fixpath_prefixes!
19052  else
19053    # Not in mixed or Windows style, start by that.
19054    new_path=`cmd //c echo $new_path`
19055
19056  input_path="$new_path"
19057  # Check if we need to convert this using DOS-style short mode. If the path
19058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19059  # take no chances and rewrite it.
19060  # Note: m4 eats our [], so we need to use [ and ] instead.
19061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19062  if test "x$has_forbidden_chars" != x; then
19063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19065  fi
19066
19067    # Output is in $new_path
19068
19069  windows_path="$new_path"
19070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19071    unix_path=`$CYGPATH -u "$windows_path"`
19072    new_path="$unix_path"
19073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19075    new_path="$unix_path"
19076  fi
19077
19078    # remove trailing .exe if any
19079    new_path="${new_path/%.exe/}"
19080
19081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19083  fi
19084
19085    else
19086      # We're on a unix platform. Hooray! :)
19087      # First separate the path from the arguments. This will split at the first
19088      # space.
19089      complete="$FOUND_MAKE"
19090      path="${complete%% *}"
19091      tmp="$complete EOL"
19092      arguments="${tmp#* }"
19093
19094      # Cannot rely on the command "which" here since it doesn't always work.
19095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19096      if test -z "$is_absolute_path"; then
19097        # Path to executable is not absolute. Find it.
19098        IFS_save="$IFS"
19099        IFS=:
19100        for p in $PATH; do
19101          if test -f "$p/$path" && test -x "$p/$path"; then
19102            new_path="$p/$path"
19103            break
19104          fi
19105        done
19106        IFS="$IFS_save"
19107      else
19108        # This is an absolute path, we can use it without further modifications.
19109        new_path="$path"
19110      fi
19111
19112      if test "x$new_path" = x; then
19113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19115        has_space=`$ECHO "$complete" | $GREP " "`
19116        if test "x$has_space" != x; then
19117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19119        fi
19120        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19121      fi
19122    fi
19123
19124    # Now join together the path and the arguments once again
19125    if test "x$arguments" != xEOL; then
19126      new_complete="$new_path ${arguments% *}"
19127    else
19128      new_complete="$new_path"
19129    fi
19130
19131    if test "x$complete" != "x$new_complete"; then
19132      FOUND_MAKE="$new_complete"
19133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19134$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19135    fi
19136  fi
19137
19138        fi
19139      fi
19140    fi
19141  fi
19142
19143        fi
19144        PATH=$OLD_PATH
19145      fi
19146    fi
19147
19148    if test "x$FOUND_MAKE" = x; then
19149      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
19150    fi
19151
19152  else
19153    # The variable is set, but is it from the command line or the environment?
19154
19155    # Try to remove the string !MAKE! from our list.
19156    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19157    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19158      # If it failed, the variable was not from the command line. Ignore it,
19159      # but warn the user (except for BASH, which is always set by the calling BASH).
19160      if test "xMAKE" != xBASH; then
19161        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19162$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19163      fi
19164      # Try to locate tool using the code snippet
19165
19166    # Try our hardest to locate a correct version of GNU make
19167    for ac_prog in gmake
19168do
19169  # Extract the first word of "$ac_prog", so it can be a program name with args.
19170set dummy $ac_prog; ac_word=$2
19171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19172$as_echo_n "checking for $ac_word... " >&6; }
19173if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19174  $as_echo_n "(cached) " >&6
19175else
19176  case $CHECK_GMAKE in
19177  [\\/]* | ?:[\\/]*)
19178  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19179  ;;
19180  *)
19181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19182for as_dir in $PATH
19183do
19184  IFS=$as_save_IFS
19185  test -z "$as_dir" && as_dir=.
19186    for ac_exec_ext in '' $ac_executable_extensions; do
19187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19188    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19190    break 2
19191  fi
19192done
19193  done
19194IFS=$as_save_IFS
19195
19196  ;;
19197esac
19198fi
19199CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19200if test -n "$CHECK_GMAKE"; then
19201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19202$as_echo "$CHECK_GMAKE" >&6; }
19203else
19204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19205$as_echo "no" >&6; }
19206fi
19207
19208
19209  test -n "$CHECK_GMAKE" && break
19210done
19211
19212
19213  MAKE_CANDIDATE=""$CHECK_GMAKE""
19214  DESCRIPTION="gmake in PATH"
19215
19216  # On Cygwin, we require a newer version of make than on other platforms
19217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19218    MAKE_VERSION_EXPR="-e 4\."
19219    MAKE_REQUIRED_VERSION="4.0"
19220   else
19221    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19222    MAKE_REQUIRED_VERSION="3.81"
19223  fi
19224
19225  if test "x$MAKE_CANDIDATE" != x; then
19226    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19227$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19228    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19229    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19230    if test "x$IS_GNU_MAKE" = x; then
19231      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19232$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19233    else
19234      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19235      if test "x$IS_MODERN_MAKE" = x; then
19236        { $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
19237$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;}
19238      else
19239        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19240          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241            MAKE_EXPECTED_ENV='cygwin'
19242          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243            MAKE_EXPECTED_ENV='msys'
19244          else
19245            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19246          fi
19247          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19248          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19249        else
19250          # Not relevant for non-Windows
19251          IS_MAKE_CORRECT_ENV=true
19252        fi
19253        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19254          { $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
19255$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;}
19256        else
19257          FOUND_MAKE=$MAKE_CANDIDATE
19258
19259  # Only process if variable expands to non-empty
19260
19261  if test "x$FOUND_MAKE" != x; then
19262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19263
19264  # First separate the path from the arguments. This will split at the first
19265  # space.
19266  complete="$FOUND_MAKE"
19267  path="${complete%% *}"
19268  tmp="$complete EOL"
19269  arguments="${tmp#* }"
19270
19271  # Input might be given as Windows format, start by converting to
19272  # unix format.
19273  new_path=`$CYGPATH -u "$path"`
19274
19275  # Now try to locate executable using which
19276  new_path=`$WHICH "$new_path" 2> /dev/null`
19277  # bat and cmd files are not always considered executable in cygwin causing which
19278  # to not find them
19279  if test "x$new_path" = x \
19280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19282    new_path=`$CYGPATH -u "$path"`
19283  fi
19284  if test "x$new_path" = x; then
19285    # Oops. Which didn't find the executable.
19286    # The splitting of arguments from the executable at a space might have been incorrect,
19287    # since paths with space are more likely in Windows. Give it another try with the whole
19288    # argument.
19289    path="$complete"
19290    arguments="EOL"
19291    new_path=`$CYGPATH -u "$path"`
19292    new_path=`$WHICH "$new_path" 2> /dev/null`
19293    # bat and cmd files are not always considered executable in cygwin causing which
19294    # to not find them
19295    if test "x$new_path" = x \
19296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19298      new_path=`$CYGPATH -u "$path"`
19299    fi
19300    if test "x$new_path" = x; then
19301      # It's still not found. Now this is an unrecoverable error.
19302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19304      has_space=`$ECHO "$complete" | $GREP " "`
19305      if test "x$has_space" != x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19308      fi
19309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19310    fi
19311  fi
19312
19313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19316  # "foo.exe" is OK but "foo" is an error.
19317  #
19318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19319  # It is also a way to make sure we got the proper file name for the real test later on.
19320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19321  if test "x$test_shortpath" = x; then
19322    # Short path failed, file does not exist as specified.
19323    # Try adding .exe or .cmd
19324    if test -f "${new_path}.exe"; then
19325      input_to_shortpath="${new_path}.exe"
19326    elif test -f "${new_path}.cmd"; then
19327      input_to_shortpath="${new_path}.cmd"
19328    else
19329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19334    fi
19335  else
19336    input_to_shortpath="$new_path"
19337  fi
19338
19339  # Call helper function which possibly converts this using DOS-style short mode.
19340  # If so, the updated path is stored in $new_path.
19341  new_path="$input_to_shortpath"
19342
19343  input_path="$input_to_shortpath"
19344  # Check if we need to convert this using DOS-style short mode. If the path
19345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19346  # take no chances and rewrite it.
19347  # Note: m4 eats our [], so we need to use [ and ] instead.
19348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19349  if test "x$has_forbidden_chars" != x; then
19350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19354      # Going to short mode and back again did indeed matter. Since short mode is
19355      # case insensitive, let's make it lowercase to improve readability.
19356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19357      # Now convert it back to Unix-style (cygpath)
19358      input_path=`$CYGPATH -u "$shortmode_path"`
19359      new_path="$input_path"
19360    fi
19361  fi
19362
19363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19364  if test "x$test_cygdrive_prefix" = x; then
19365    # As a simple fix, exclude /usr/bin since it's not a real path.
19366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19368      # a path prefixed by /cygdrive for fixpath to work.
19369      new_path="$CYGWIN_ROOT_PATH$input_path"
19370    fi
19371  fi
19372
19373  # remove trailing .exe if any
19374  new_path="${new_path/%.exe/}"
19375
19376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19377
19378  # First separate the path from the arguments. This will split at the first
19379  # space.
19380  complete="$FOUND_MAKE"
19381  path="${complete%% *}"
19382  tmp="$complete EOL"
19383  arguments="${tmp#* }"
19384
19385  # Input might be given as Windows format, start by converting to
19386  # unix format.
19387  new_path="$path"
19388
19389  windows_path="$new_path"
19390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19391    unix_path=`$CYGPATH -u "$windows_path"`
19392    new_path="$unix_path"
19393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19395    new_path="$unix_path"
19396  fi
19397
19398
19399  # Now try to locate executable using which
19400  new_path=`$WHICH "$new_path" 2> /dev/null`
19401
19402  if test "x$new_path" = x; then
19403    # Oops. Which didn't find the executable.
19404    # The splitting of arguments from the executable at a space might have been incorrect,
19405    # since paths with space are more likely in Windows. Give it another try with the whole
19406    # argument.
19407    path="$complete"
19408    arguments="EOL"
19409    new_path="$path"
19410
19411  windows_path="$new_path"
19412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19413    unix_path=`$CYGPATH -u "$windows_path"`
19414    new_path="$unix_path"
19415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19417    new_path="$unix_path"
19418  fi
19419
19420
19421    new_path=`$WHICH "$new_path" 2> /dev/null`
19422    # bat and cmd files are not always considered executable in MSYS causing which
19423    # to not find them
19424    if test "x$new_path" = x \
19425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19427      new_path="$path"
19428
19429  windows_path="$new_path"
19430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19431    unix_path=`$CYGPATH -u "$windows_path"`
19432    new_path="$unix_path"
19433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19435    new_path="$unix_path"
19436  fi
19437
19438    fi
19439
19440    if test "x$new_path" = x; then
19441      # It's still not found. Now this is an unrecoverable error.
19442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19444      has_space=`$ECHO "$complete" | $GREP " "`
19445      if test "x$has_space" != x; then
19446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19448      fi
19449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19450    fi
19451  fi
19452
19453  # Now new_path has a complete unix path to the binary
19454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19455    # Keep paths in /bin as-is, but remove trailing .exe if any
19456    new_path="${new_path/%.exe/}"
19457    # Do not save /bin paths to all_fixpath_prefixes!
19458  else
19459    # Not in mixed or Windows style, start by that.
19460    new_path=`cmd //c echo $new_path`
19461
19462  input_path="$new_path"
19463  # Check if we need to convert this using DOS-style short mode. If the path
19464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19465  # take no chances and rewrite it.
19466  # Note: m4 eats our [], so we need to use [ and ] instead.
19467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19468  if test "x$has_forbidden_chars" != x; then
19469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19471  fi
19472
19473    # Output is in $new_path
19474
19475  windows_path="$new_path"
19476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19477    unix_path=`$CYGPATH -u "$windows_path"`
19478    new_path="$unix_path"
19479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19481    new_path="$unix_path"
19482  fi
19483
19484    # remove trailing .exe if any
19485    new_path="${new_path/%.exe/}"
19486
19487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19489  fi
19490
19491    else
19492      # We're on a unix platform. Hooray! :)
19493      # First separate the path from the arguments. This will split at the first
19494      # space.
19495      complete="$FOUND_MAKE"
19496      path="${complete%% *}"
19497      tmp="$complete EOL"
19498      arguments="${tmp#* }"
19499
19500      # Cannot rely on the command "which" here since it doesn't always work.
19501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19502      if test -z "$is_absolute_path"; then
19503        # Path to executable is not absolute. Find it.
19504        IFS_save="$IFS"
19505        IFS=:
19506        for p in $PATH; do
19507          if test -f "$p/$path" && test -x "$p/$path"; then
19508            new_path="$p/$path"
19509            break
19510          fi
19511        done
19512        IFS="$IFS_save"
19513      else
19514        # This is an absolute path, we can use it without further modifications.
19515        new_path="$path"
19516      fi
19517
19518      if test "x$new_path" = x; then
19519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19521        has_space=`$ECHO "$complete" | $GREP " "`
19522        if test "x$has_space" != x; then
19523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19525        fi
19526        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19527      fi
19528    fi
19529
19530    # Now join together the path and the arguments once again
19531    if test "x$arguments" != xEOL; then
19532      new_complete="$new_path ${arguments% *}"
19533    else
19534      new_complete="$new_path"
19535    fi
19536
19537    if test "x$complete" != "x$new_complete"; then
19538      FOUND_MAKE="$new_complete"
19539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19540$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19541    fi
19542  fi
19543
19544        fi
19545      fi
19546    fi
19547  fi
19548
19549
19550    if test "x$FOUND_MAKE" = x; then
19551      for ac_prog in make
19552do
19553  # Extract the first word of "$ac_prog", so it can be a program name with args.
19554set dummy $ac_prog; ac_word=$2
19555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19556$as_echo_n "checking for $ac_word... " >&6; }
19557if ${ac_cv_path_CHECK_MAKE+:} false; then :
19558  $as_echo_n "(cached) " >&6
19559else
19560  case $CHECK_MAKE in
19561  [\\/]* | ?:[\\/]*)
19562  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19563  ;;
19564  *)
19565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19566for as_dir in $PATH
19567do
19568  IFS=$as_save_IFS
19569  test -z "$as_dir" && as_dir=.
19570    for ac_exec_ext in '' $ac_executable_extensions; do
19571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19572    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19574    break 2
19575  fi
19576done
19577  done
19578IFS=$as_save_IFS
19579
19580  ;;
19581esac
19582fi
19583CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19584if test -n "$CHECK_MAKE"; then
19585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19586$as_echo "$CHECK_MAKE" >&6; }
19587else
19588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19589$as_echo "no" >&6; }
19590fi
19591
19592
19593  test -n "$CHECK_MAKE" && break
19594done
19595
19596
19597  MAKE_CANDIDATE=""$CHECK_MAKE""
19598  DESCRIPTION="make in PATH"
19599
19600  # On Cygwin, we require a newer version of make than on other platforms
19601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19602    MAKE_VERSION_EXPR="-e 4\."
19603    MAKE_REQUIRED_VERSION="4.0"
19604   else
19605    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19606    MAKE_REQUIRED_VERSION="3.81"
19607  fi
19608
19609  if test "x$MAKE_CANDIDATE" != x; then
19610    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19611$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19612    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19613    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19614    if test "x$IS_GNU_MAKE" = x; then
19615      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19616$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19617    else
19618      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19619      if test "x$IS_MODERN_MAKE" = x; then
19620        { $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
19621$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;}
19622      else
19623        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19624          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19625            MAKE_EXPECTED_ENV='cygwin'
19626          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19627            MAKE_EXPECTED_ENV='msys'
19628          else
19629            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19630          fi
19631          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19632          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19633        else
19634          # Not relevant for non-Windows
19635          IS_MAKE_CORRECT_ENV=true
19636        fi
19637        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19638          { $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
19639$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;}
19640        else
19641          FOUND_MAKE=$MAKE_CANDIDATE
19642
19643  # Only process if variable expands to non-empty
19644
19645  if test "x$FOUND_MAKE" != x; then
19646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19647
19648  # First separate the path from the arguments. This will split at the first
19649  # space.
19650  complete="$FOUND_MAKE"
19651  path="${complete%% *}"
19652  tmp="$complete EOL"
19653  arguments="${tmp#* }"
19654
19655  # Input might be given as Windows format, start by converting to
19656  # unix format.
19657  new_path=`$CYGPATH -u "$path"`
19658
19659  # Now try to locate executable using which
19660  new_path=`$WHICH "$new_path" 2> /dev/null`
19661  # bat and cmd files are not always considered executable in cygwin causing which
19662  # to not find them
19663  if test "x$new_path" = x \
19664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19666    new_path=`$CYGPATH -u "$path"`
19667  fi
19668  if test "x$new_path" = x; then
19669    # Oops. Which didn't find the executable.
19670    # The splitting of arguments from the executable at a space might have been incorrect,
19671    # since paths with space are more likely in Windows. Give it another try with the whole
19672    # argument.
19673    path="$complete"
19674    arguments="EOL"
19675    new_path=`$CYGPATH -u "$path"`
19676    new_path=`$WHICH "$new_path" 2> /dev/null`
19677    # bat and cmd files are not always considered executable in cygwin causing which
19678    # to not find them
19679    if test "x$new_path" = x \
19680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19682      new_path=`$CYGPATH -u "$path"`
19683    fi
19684    if test "x$new_path" = x; then
19685      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19700  # "foo.exe" is OK but "foo" is an error.
19701  #
19702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19703  # It is also a way to make sure we got the proper file name for the real test later on.
19704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19705  if test "x$test_shortpath" = x; then
19706    # Short path failed, file does not exist as specified.
19707    # Try adding .exe or .cmd
19708    if test -f "${new_path}.exe"; then
19709      input_to_shortpath="${new_path}.exe"
19710    elif test -f "${new_path}.cmd"; then
19711      input_to_shortpath="${new_path}.cmd"
19712    else
19713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19714$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19717      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19718    fi
19719  else
19720    input_to_shortpath="$new_path"
19721  fi
19722
19723  # Call helper function which possibly converts this using DOS-style short mode.
19724  # If so, the updated path is stored in $new_path.
19725  new_path="$input_to_shortpath"
19726
19727  input_path="$input_to_shortpath"
19728  # Check if we need to convert this using DOS-style short mode. If the path
19729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19730  # take no chances and rewrite it.
19731  # Note: m4 eats our [], so we need to use [ and ] instead.
19732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19733  if test "x$has_forbidden_chars" != x; then
19734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19738      # Going to short mode and back again did indeed matter. Since short mode is
19739      # case insensitive, let's make it lowercase to improve readability.
19740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19741      # Now convert it back to Unix-style (cygpath)
19742      input_path=`$CYGPATH -u "$shortmode_path"`
19743      new_path="$input_path"
19744    fi
19745  fi
19746
19747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19748  if test "x$test_cygdrive_prefix" = x; then
19749    # As a simple fix, exclude /usr/bin since it's not a real path.
19750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19752      # a path prefixed by /cygdrive for fixpath to work.
19753      new_path="$CYGWIN_ROOT_PATH$input_path"
19754    fi
19755  fi
19756
19757  # remove trailing .exe if any
19758  new_path="${new_path/%.exe/}"
19759
19760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19761
19762  # First separate the path from the arguments. This will split at the first
19763  # space.
19764  complete="$FOUND_MAKE"
19765  path="${complete%% *}"
19766  tmp="$complete EOL"
19767  arguments="${tmp#* }"
19768
19769  # Input might be given as Windows format, start by converting to
19770  # unix format.
19771  new_path="$path"
19772
19773  windows_path="$new_path"
19774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19775    unix_path=`$CYGPATH -u "$windows_path"`
19776    new_path="$unix_path"
19777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19779    new_path="$unix_path"
19780  fi
19781
19782
19783  # Now try to locate executable using which
19784  new_path=`$WHICH "$new_path" 2> /dev/null`
19785
19786  if test "x$new_path" = x; then
19787    # Oops. Which didn't find the executable.
19788    # The splitting of arguments from the executable at a space might have been incorrect,
19789    # since paths with space are more likely in Windows. Give it another try with the whole
19790    # argument.
19791    path="$complete"
19792    arguments="EOL"
19793    new_path="$path"
19794
19795  windows_path="$new_path"
19796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19797    unix_path=`$CYGPATH -u "$windows_path"`
19798    new_path="$unix_path"
19799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19801    new_path="$unix_path"
19802  fi
19803
19804
19805    new_path=`$WHICH "$new_path" 2> /dev/null`
19806    # bat and cmd files are not always considered executable in MSYS causing which
19807    # to not find them
19808    if test "x$new_path" = x \
19809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19811      new_path="$path"
19812
19813  windows_path="$new_path"
19814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19815    unix_path=`$CYGPATH -u "$windows_path"`
19816    new_path="$unix_path"
19817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19819    new_path="$unix_path"
19820  fi
19821
19822    fi
19823
19824    if test "x$new_path" = x; then
19825      # It's still not found. Now this is an unrecoverable error.
19826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19828      has_space=`$ECHO "$complete" | $GREP " "`
19829      if test "x$has_space" != x; then
19830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19832      fi
19833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19834    fi
19835  fi
19836
19837  # Now new_path has a complete unix path to the binary
19838  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19839    # Keep paths in /bin as-is, but remove trailing .exe if any
19840    new_path="${new_path/%.exe/}"
19841    # Do not save /bin paths to all_fixpath_prefixes!
19842  else
19843    # Not in mixed or Windows style, start by that.
19844    new_path=`cmd //c echo $new_path`
19845
19846  input_path="$new_path"
19847  # Check if we need to convert this using DOS-style short mode. If the path
19848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19849  # take no chances and rewrite it.
19850  # Note: m4 eats our [], so we need to use [ and ] instead.
19851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19852  if test "x$has_forbidden_chars" != x; then
19853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19855  fi
19856
19857    # Output is in $new_path
19858
19859  windows_path="$new_path"
19860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19861    unix_path=`$CYGPATH -u "$windows_path"`
19862    new_path="$unix_path"
19863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19865    new_path="$unix_path"
19866  fi
19867
19868    # remove trailing .exe if any
19869    new_path="${new_path/%.exe/}"
19870
19871    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19872    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19873  fi
19874
19875    else
19876      # We're on a unix platform. Hooray! :)
19877      # First separate the path from the arguments. This will split at the first
19878      # space.
19879      complete="$FOUND_MAKE"
19880      path="${complete%% *}"
19881      tmp="$complete EOL"
19882      arguments="${tmp#* }"
19883
19884      # Cannot rely on the command "which" here since it doesn't always work.
19885      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19886      if test -z "$is_absolute_path"; then
19887        # Path to executable is not absolute. Find it.
19888        IFS_save="$IFS"
19889        IFS=:
19890        for p in $PATH; do
19891          if test -f "$p/$path" && test -x "$p/$path"; then
19892            new_path="$p/$path"
19893            break
19894          fi
19895        done
19896        IFS="$IFS_save"
19897      else
19898        # This is an absolute path, we can use it without further modifications.
19899        new_path="$path"
19900      fi
19901
19902      if test "x$new_path" = x; then
19903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19905        has_space=`$ECHO "$complete" | $GREP " "`
19906        if test "x$has_space" != x; then
19907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19909        fi
19910        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19911      fi
19912    fi
19913
19914    # Now join together the path and the arguments once again
19915    if test "x$arguments" != xEOL; then
19916      new_complete="$new_path ${arguments% *}"
19917    else
19918      new_complete="$new_path"
19919    fi
19920
19921    if test "x$complete" != "x$new_complete"; then
19922      FOUND_MAKE="$new_complete"
19923      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19924$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19925    fi
19926  fi
19927
19928        fi
19929      fi
19930    fi
19931  fi
19932
19933    fi
19934
19935    if test "x$FOUND_MAKE" = x; then
19936      if test "x$TOOLCHAIN_PATH" != x; then
19937        # We have a toolchain path, check that as well before giving up.
19938        OLD_PATH=$PATH
19939        PATH=$TOOLCHAIN_PATH:$PATH
19940        for ac_prog in gmake
19941do
19942  # Extract the first word of "$ac_prog", so it can be a program name with args.
19943set dummy $ac_prog; ac_word=$2
19944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19945$as_echo_n "checking for $ac_word... " >&6; }
19946if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19947  $as_echo_n "(cached) " >&6
19948else
19949  case $CHECK_TOOLSDIR_GMAKE in
19950  [\\/]* | ?:[\\/]*)
19951  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19952  ;;
19953  *)
19954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19955for as_dir in $PATH
19956do
19957  IFS=$as_save_IFS
19958  test -z "$as_dir" && as_dir=.
19959    for ac_exec_ext in '' $ac_executable_extensions; do
19960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19961    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19963    break 2
19964  fi
19965done
19966  done
19967IFS=$as_save_IFS
19968
19969  ;;
19970esac
19971fi
19972CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19973if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19975$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19976else
19977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19978$as_echo "no" >&6; }
19979fi
19980
19981
19982  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19983done
19984
19985
19986  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19987  DESCRIPTION="gmake in tools-dir"
19988
19989  # On Cygwin, we require a newer version of make than on other platforms
19990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19991    MAKE_VERSION_EXPR="-e 4\."
19992    MAKE_REQUIRED_VERSION="4.0"
19993   else
19994    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19995    MAKE_REQUIRED_VERSION="3.81"
19996  fi
19997
19998  if test "x$MAKE_CANDIDATE" != x; then
19999    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20000$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20001    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20002    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20003    if test "x$IS_GNU_MAKE" = x; then
20004      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20005$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20006    else
20007      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20008      if test "x$IS_MODERN_MAKE" = x; then
20009        { $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
20010$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;}
20011      else
20012        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20013          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20014            MAKE_EXPECTED_ENV='cygwin'
20015          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20016            MAKE_EXPECTED_ENV='msys'
20017          else
20018            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20019          fi
20020          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20021          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20022        else
20023          # Not relevant for non-Windows
20024          IS_MAKE_CORRECT_ENV=true
20025        fi
20026        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20027          { $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
20028$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;}
20029        else
20030          FOUND_MAKE=$MAKE_CANDIDATE
20031
20032  # Only process if variable expands to non-empty
20033
20034  if test "x$FOUND_MAKE" != x; then
20035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20036
20037  # First separate the path from the arguments. This will split at the first
20038  # space.
20039  complete="$FOUND_MAKE"
20040  path="${complete%% *}"
20041  tmp="$complete EOL"
20042  arguments="${tmp#* }"
20043
20044  # Input might be given as Windows format, start by converting to
20045  # unix format.
20046  new_path=`$CYGPATH -u "$path"`
20047
20048  # Now try to locate executable using which
20049  new_path=`$WHICH "$new_path" 2> /dev/null`
20050  # bat and cmd files are not always considered executable in cygwin causing which
20051  # to not find them
20052  if test "x$new_path" = x \
20053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20055    new_path=`$CYGPATH -u "$path"`
20056  fi
20057  if test "x$new_path" = x; then
20058    # Oops. Which didn't find the executable.
20059    # The splitting of arguments from the executable at a space might have been incorrect,
20060    # since paths with space are more likely in Windows. Give it another try with the whole
20061    # argument.
20062    path="$complete"
20063    arguments="EOL"
20064    new_path=`$CYGPATH -u "$path"`
20065    new_path=`$WHICH "$new_path" 2> /dev/null`
20066    # bat and cmd files are not always considered executable in cygwin causing which
20067    # to not find them
20068    if test "x$new_path" = x \
20069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20071      new_path=`$CYGPATH -u "$path"`
20072    fi
20073    if test "x$new_path" = x; then
20074      # It's still not found. Now this is an unrecoverable error.
20075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20077      has_space=`$ECHO "$complete" | $GREP " "`
20078      if test "x$has_space" != x; then
20079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20081      fi
20082      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20083    fi
20084  fi
20085
20086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20089  # "foo.exe" is OK but "foo" is an error.
20090  #
20091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20092  # It is also a way to make sure we got the proper file name for the real test later on.
20093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20094  if test "x$test_shortpath" = x; then
20095    # Short path failed, file does not exist as specified.
20096    # Try adding .exe or .cmd
20097    if test -f "${new_path}.exe"; then
20098      input_to_shortpath="${new_path}.exe"
20099    elif test -f "${new_path}.cmd"; then
20100      input_to_shortpath="${new_path}.cmd"
20101    else
20102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20106      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20107    fi
20108  else
20109    input_to_shortpath="$new_path"
20110  fi
20111
20112  # Call helper function which possibly converts this using DOS-style short mode.
20113  # If so, the updated path is stored in $new_path.
20114  new_path="$input_to_shortpath"
20115
20116  input_path="$input_to_shortpath"
20117  # Check if we need to convert this using DOS-style short mode. If the path
20118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20119  # take no chances and rewrite it.
20120  # Note: m4 eats our [], so we need to use [ and ] instead.
20121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20122  if test "x$has_forbidden_chars" != x; then
20123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20127      # Going to short mode and back again did indeed matter. Since short mode is
20128      # case insensitive, let's make it lowercase to improve readability.
20129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20130      # Now convert it back to Unix-style (cygpath)
20131      input_path=`$CYGPATH -u "$shortmode_path"`
20132      new_path="$input_path"
20133    fi
20134  fi
20135
20136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20137  if test "x$test_cygdrive_prefix" = x; then
20138    # As a simple fix, exclude /usr/bin since it's not a real path.
20139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20141      # a path prefixed by /cygdrive for fixpath to work.
20142      new_path="$CYGWIN_ROOT_PATH$input_path"
20143    fi
20144  fi
20145
20146  # remove trailing .exe if any
20147  new_path="${new_path/%.exe/}"
20148
20149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20150
20151  # First separate the path from the arguments. This will split at the first
20152  # space.
20153  complete="$FOUND_MAKE"
20154  path="${complete%% *}"
20155  tmp="$complete EOL"
20156  arguments="${tmp#* }"
20157
20158  # Input might be given as Windows format, start by converting to
20159  # unix format.
20160  new_path="$path"
20161
20162  windows_path="$new_path"
20163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20164    unix_path=`$CYGPATH -u "$windows_path"`
20165    new_path="$unix_path"
20166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20168    new_path="$unix_path"
20169  fi
20170
20171
20172  # Now try to locate executable using which
20173  new_path=`$WHICH "$new_path" 2> /dev/null`
20174
20175  if test "x$new_path" = x; then
20176    # Oops. Which didn't find the executable.
20177    # The splitting of arguments from the executable at a space might have been incorrect,
20178    # since paths with space are more likely in Windows. Give it another try with the whole
20179    # argument.
20180    path="$complete"
20181    arguments="EOL"
20182    new_path="$path"
20183
20184  windows_path="$new_path"
20185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20186    unix_path=`$CYGPATH -u "$windows_path"`
20187    new_path="$unix_path"
20188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20190    new_path="$unix_path"
20191  fi
20192
20193
20194    new_path=`$WHICH "$new_path" 2> /dev/null`
20195    # bat and cmd files are not always considered executable in MSYS causing which
20196    # to not find them
20197    if test "x$new_path" = x \
20198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20200      new_path="$path"
20201
20202  windows_path="$new_path"
20203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20204    unix_path=`$CYGPATH -u "$windows_path"`
20205    new_path="$unix_path"
20206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20208    new_path="$unix_path"
20209  fi
20210
20211    fi
20212
20213    if test "x$new_path" = x; then
20214      # It's still not found. Now this is an unrecoverable error.
20215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20217      has_space=`$ECHO "$complete" | $GREP " "`
20218      if test "x$has_space" != x; then
20219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20221      fi
20222      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20223    fi
20224  fi
20225
20226  # Now new_path has a complete unix path to the binary
20227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20228    # Keep paths in /bin as-is, but remove trailing .exe if any
20229    new_path="${new_path/%.exe/}"
20230    # Do not save /bin paths to all_fixpath_prefixes!
20231  else
20232    # Not in mixed or Windows style, start by that.
20233    new_path=`cmd //c echo $new_path`
20234
20235  input_path="$new_path"
20236  # Check if we need to convert this using DOS-style short mode. If the path
20237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20238  # take no chances and rewrite it.
20239  # Note: m4 eats our [], so we need to use [ and ] instead.
20240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20241  if test "x$has_forbidden_chars" != x; then
20242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20244  fi
20245
20246    # Output is in $new_path
20247
20248  windows_path="$new_path"
20249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20250    unix_path=`$CYGPATH -u "$windows_path"`
20251    new_path="$unix_path"
20252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20254    new_path="$unix_path"
20255  fi
20256
20257    # remove trailing .exe if any
20258    new_path="${new_path/%.exe/}"
20259
20260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20262  fi
20263
20264    else
20265      # We're on a unix platform. Hooray! :)
20266      # First separate the path from the arguments. This will split at the first
20267      # space.
20268      complete="$FOUND_MAKE"
20269      path="${complete%% *}"
20270      tmp="$complete EOL"
20271      arguments="${tmp#* }"
20272
20273      # Cannot rely on the command "which" here since it doesn't always work.
20274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20275      if test -z "$is_absolute_path"; then
20276        # Path to executable is not absolute. Find it.
20277        IFS_save="$IFS"
20278        IFS=:
20279        for p in $PATH; do
20280          if test -f "$p/$path" && test -x "$p/$path"; then
20281            new_path="$p/$path"
20282            break
20283          fi
20284        done
20285        IFS="$IFS_save"
20286      else
20287        # This is an absolute path, we can use it without further modifications.
20288        new_path="$path"
20289      fi
20290
20291      if test "x$new_path" = x; then
20292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20294        has_space=`$ECHO "$complete" | $GREP " "`
20295        if test "x$has_space" != x; then
20296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20298        fi
20299        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20300      fi
20301    fi
20302
20303    # Now join together the path and the arguments once again
20304    if test "x$arguments" != xEOL; then
20305      new_complete="$new_path ${arguments% *}"
20306    else
20307      new_complete="$new_path"
20308    fi
20309
20310    if test "x$complete" != "x$new_complete"; then
20311      FOUND_MAKE="$new_complete"
20312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20313$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20314    fi
20315  fi
20316
20317        fi
20318      fi
20319    fi
20320  fi
20321
20322        if test "x$FOUND_MAKE" = x; then
20323          for ac_prog in make
20324do
20325  # Extract the first word of "$ac_prog", so it can be a program name with args.
20326set dummy $ac_prog; ac_word=$2
20327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20328$as_echo_n "checking for $ac_word... " >&6; }
20329if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20330  $as_echo_n "(cached) " >&6
20331else
20332  case $CHECK_TOOLSDIR_MAKE in
20333  [\\/]* | ?:[\\/]*)
20334  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20335  ;;
20336  *)
20337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20338for as_dir in $PATH
20339do
20340  IFS=$as_save_IFS
20341  test -z "$as_dir" && as_dir=.
20342    for ac_exec_ext in '' $ac_executable_extensions; do
20343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20344    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20346    break 2
20347  fi
20348done
20349  done
20350IFS=$as_save_IFS
20351
20352  ;;
20353esac
20354fi
20355CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20356if test -n "$CHECK_TOOLSDIR_MAKE"; then
20357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20358$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20359else
20360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20361$as_echo "no" >&6; }
20362fi
20363
20364
20365  test -n "$CHECK_TOOLSDIR_MAKE" && break
20366done
20367
20368
20369  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20370  DESCRIPTION="make in tools-dir"
20371
20372  # On Cygwin, we require a newer version of make than on other platforms
20373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20374    MAKE_VERSION_EXPR="-e 4\."
20375    MAKE_REQUIRED_VERSION="4.0"
20376   else
20377    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20378    MAKE_REQUIRED_VERSION="3.81"
20379  fi
20380
20381  if test "x$MAKE_CANDIDATE" != x; then
20382    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20383$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20384    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20385    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20386    if test "x$IS_GNU_MAKE" = x; then
20387      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20388$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20389    else
20390      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20391      if test "x$IS_MODERN_MAKE" = x; then
20392        { $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
20393$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;}
20394      else
20395        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20396          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20397            MAKE_EXPECTED_ENV='cygwin'
20398          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20399            MAKE_EXPECTED_ENV='msys'
20400          else
20401            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20402          fi
20403          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20404          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20405        else
20406          # Not relevant for non-Windows
20407          IS_MAKE_CORRECT_ENV=true
20408        fi
20409        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20410          { $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
20411$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;}
20412        else
20413          FOUND_MAKE=$MAKE_CANDIDATE
20414
20415  # Only process if variable expands to non-empty
20416
20417  if test "x$FOUND_MAKE" != x; then
20418    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20419
20420  # First separate the path from the arguments. This will split at the first
20421  # space.
20422  complete="$FOUND_MAKE"
20423  path="${complete%% *}"
20424  tmp="$complete EOL"
20425  arguments="${tmp#* }"
20426
20427  # Input might be given as Windows format, start by converting to
20428  # unix format.
20429  new_path=`$CYGPATH -u "$path"`
20430
20431  # Now try to locate executable using which
20432  new_path=`$WHICH "$new_path" 2> /dev/null`
20433  # bat and cmd files are not always considered executable in cygwin causing which
20434  # to not find them
20435  if test "x$new_path" = x \
20436      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20437      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20438    new_path=`$CYGPATH -u "$path"`
20439  fi
20440  if test "x$new_path" = x; then
20441    # Oops. Which didn't find the executable.
20442    # The splitting of arguments from the executable at a space might have been incorrect,
20443    # since paths with space are more likely in Windows. Give it another try with the whole
20444    # argument.
20445    path="$complete"
20446    arguments="EOL"
20447    new_path=`$CYGPATH -u "$path"`
20448    new_path=`$WHICH "$new_path" 2> /dev/null`
20449    # bat and cmd files are not always considered executable in cygwin causing which
20450    # to not find them
20451    if test "x$new_path" = x \
20452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20454      new_path=`$CYGPATH -u "$path"`
20455    fi
20456    if test "x$new_path" = x; then
20457      # It's still not found. Now this is an unrecoverable error.
20458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20459$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20460      has_space=`$ECHO "$complete" | $GREP " "`
20461      if test "x$has_space" != x; then
20462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20464      fi
20465      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20466    fi
20467  fi
20468
20469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20472  # "foo.exe" is OK but "foo" is an error.
20473  #
20474  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20475  # It is also a way to make sure we got the proper file name for the real test later on.
20476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20477  if test "x$test_shortpath" = x; then
20478    # Short path failed, file does not exist as specified.
20479    # Try adding .exe or .cmd
20480    if test -f "${new_path}.exe"; then
20481      input_to_shortpath="${new_path}.exe"
20482    elif test -f "${new_path}.cmd"; then
20483      input_to_shortpath="${new_path}.cmd"
20484    else
20485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20486$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20487      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20488$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20489      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20490    fi
20491  else
20492    input_to_shortpath="$new_path"
20493  fi
20494
20495  # Call helper function which possibly converts this using DOS-style short mode.
20496  # If so, the updated path is stored in $new_path.
20497  new_path="$input_to_shortpath"
20498
20499  input_path="$input_to_shortpath"
20500  # Check if we need to convert this using DOS-style short mode. If the path
20501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20502  # take no chances and rewrite it.
20503  # Note: m4 eats our [], so we need to use [ and ] instead.
20504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20505  if test "x$has_forbidden_chars" != x; then
20506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20510      # Going to short mode and back again did indeed matter. Since short mode is
20511      # case insensitive, let's make it lowercase to improve readability.
20512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20513      # Now convert it back to Unix-style (cygpath)
20514      input_path=`$CYGPATH -u "$shortmode_path"`
20515      new_path="$input_path"
20516    fi
20517  fi
20518
20519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20520  if test "x$test_cygdrive_prefix" = x; then
20521    # As a simple fix, exclude /usr/bin since it's not a real path.
20522    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20524      # a path prefixed by /cygdrive for fixpath to work.
20525      new_path="$CYGWIN_ROOT_PATH$input_path"
20526    fi
20527  fi
20528
20529  # remove trailing .exe if any
20530  new_path="${new_path/%.exe/}"
20531
20532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20533
20534  # First separate the path from the arguments. This will split at the first
20535  # space.
20536  complete="$FOUND_MAKE"
20537  path="${complete%% *}"
20538  tmp="$complete EOL"
20539  arguments="${tmp#* }"
20540
20541  # Input might be given as Windows format, start by converting to
20542  # unix format.
20543  new_path="$path"
20544
20545  windows_path="$new_path"
20546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20547    unix_path=`$CYGPATH -u "$windows_path"`
20548    new_path="$unix_path"
20549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20551    new_path="$unix_path"
20552  fi
20553
20554
20555  # Now try to locate executable using which
20556  new_path=`$WHICH "$new_path" 2> /dev/null`
20557
20558  if test "x$new_path" = x; then
20559    # Oops. Which didn't find the executable.
20560    # The splitting of arguments from the executable at a space might have been incorrect,
20561    # since paths with space are more likely in Windows. Give it another try with the whole
20562    # argument.
20563    path="$complete"
20564    arguments="EOL"
20565    new_path="$path"
20566
20567  windows_path="$new_path"
20568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20569    unix_path=`$CYGPATH -u "$windows_path"`
20570    new_path="$unix_path"
20571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20573    new_path="$unix_path"
20574  fi
20575
20576
20577    new_path=`$WHICH "$new_path" 2> /dev/null`
20578    # bat and cmd files are not always considered executable in MSYS causing which
20579    # to not find them
20580    if test "x$new_path" = x \
20581        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20582        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20583      new_path="$path"
20584
20585  windows_path="$new_path"
20586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587    unix_path=`$CYGPATH -u "$windows_path"`
20588    new_path="$unix_path"
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20591    new_path="$unix_path"
20592  fi
20593
20594    fi
20595
20596    if test "x$new_path" = x; then
20597      # It's still not found. Now this is an unrecoverable error.
20598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20600      has_space=`$ECHO "$complete" | $GREP " "`
20601      if test "x$has_space" != x; then
20602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20604      fi
20605      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20606    fi
20607  fi
20608
20609  # Now new_path has a complete unix path to the binary
20610  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20611    # Keep paths in /bin as-is, but remove trailing .exe if any
20612    new_path="${new_path/%.exe/}"
20613    # Do not save /bin paths to all_fixpath_prefixes!
20614  else
20615    # Not in mixed or Windows style, start by that.
20616    new_path=`cmd //c echo $new_path`
20617
20618  input_path="$new_path"
20619  # Check if we need to convert this using DOS-style short mode. If the path
20620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20621  # take no chances and rewrite it.
20622  # Note: m4 eats our [], so we need to use [ and ] instead.
20623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20624  if test "x$has_forbidden_chars" != x; then
20625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20627  fi
20628
20629    # Output is in $new_path
20630
20631  windows_path="$new_path"
20632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20633    unix_path=`$CYGPATH -u "$windows_path"`
20634    new_path="$unix_path"
20635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20637    new_path="$unix_path"
20638  fi
20639
20640    # remove trailing .exe if any
20641    new_path="${new_path/%.exe/}"
20642
20643    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20644    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20645  fi
20646
20647    else
20648      # We're on a unix platform. Hooray! :)
20649      # First separate the path from the arguments. This will split at the first
20650      # space.
20651      complete="$FOUND_MAKE"
20652      path="${complete%% *}"
20653      tmp="$complete EOL"
20654      arguments="${tmp#* }"
20655
20656      # Cannot rely on the command "which" here since it doesn't always work.
20657      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20658      if test -z "$is_absolute_path"; then
20659        # Path to executable is not absolute. Find it.
20660        IFS_save="$IFS"
20661        IFS=:
20662        for p in $PATH; do
20663          if test -f "$p/$path" && test -x "$p/$path"; then
20664            new_path="$p/$path"
20665            break
20666          fi
20667        done
20668        IFS="$IFS_save"
20669      else
20670        # This is an absolute path, we can use it without further modifications.
20671        new_path="$path"
20672      fi
20673
20674      if test "x$new_path" = x; then
20675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20677        has_space=`$ECHO "$complete" | $GREP " "`
20678        if test "x$has_space" != x; then
20679          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20680$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20681        fi
20682        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20683      fi
20684    fi
20685
20686    # Now join together the path and the arguments once again
20687    if test "x$arguments" != xEOL; then
20688      new_complete="$new_path ${arguments% *}"
20689    else
20690      new_complete="$new_path"
20691    fi
20692
20693    if test "x$complete" != "x$new_complete"; then
20694      FOUND_MAKE="$new_complete"
20695      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20696$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20697    fi
20698  fi
20699
20700        fi
20701      fi
20702    fi
20703  fi
20704
20705        fi
20706        PATH=$OLD_PATH
20707      fi
20708    fi
20709
20710    if test "x$FOUND_MAKE" = x; then
20711      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
20712    fi
20713
20714    else
20715      # If it succeeded, then it was overridden by the user. We will use it
20716      # for the tool.
20717
20718      # First remove it from the list of overridden variables, so we can test
20719      # for unknown variables in the end.
20720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20721
20722      # Check if we try to supply an empty value
20723      if test "x$MAKE" = x; then
20724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20725$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20727$as_echo_n "checking for MAKE... " >&6; }
20728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20729$as_echo "disabled" >&6; }
20730      else
20731        # Check if the provided tool contains a complete path.
20732        tool_specified="$MAKE"
20733        tool_basename="${tool_specified##*/}"
20734        if test "x$tool_basename" = "x$tool_specified"; then
20735          # A command without a complete path is provided, search $PATH.
20736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20737$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20738          # Extract the first word of "$tool_basename", so it can be a program name with args.
20739set dummy $tool_basename; ac_word=$2
20740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20741$as_echo_n "checking for $ac_word... " >&6; }
20742if ${ac_cv_path_MAKE+:} false; then :
20743  $as_echo_n "(cached) " >&6
20744else
20745  case $MAKE in
20746  [\\/]* | ?:[\\/]*)
20747  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20748  ;;
20749  *)
20750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20751for as_dir in $PATH
20752do
20753  IFS=$as_save_IFS
20754  test -z "$as_dir" && as_dir=.
20755    for ac_exec_ext in '' $ac_executable_extensions; do
20756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20757    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20759    break 2
20760  fi
20761done
20762  done
20763IFS=$as_save_IFS
20764
20765  ;;
20766esac
20767fi
20768MAKE=$ac_cv_path_MAKE
20769if test -n "$MAKE"; then
20770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20771$as_echo "$MAKE" >&6; }
20772else
20773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20774$as_echo "no" >&6; }
20775fi
20776
20777
20778          if test "x$MAKE" = x; then
20779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20780          fi
20781        else
20782          # Otherwise we believe it is a complete path. Use it as it is.
20783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20784$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20786$as_echo_n "checking for MAKE... " >&6; }
20787          if test ! -x "$tool_specified"; then
20788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20789$as_echo "not found" >&6; }
20790            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20791          fi
20792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20793$as_echo "$tool_specified" >&6; }
20794        fi
20795      fi
20796    fi
20797
20798    # If MAKE was set by user, verify the version
20799
20800  MAKE_CANDIDATE=""$MAKE""
20801  DESCRIPTION="user supplied MAKE=$MAKE"
20802
20803  # On Cygwin, we require a newer version of make than on other platforms
20804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20805    MAKE_VERSION_EXPR="-e 4\."
20806    MAKE_REQUIRED_VERSION="4.0"
20807   else
20808    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20809    MAKE_REQUIRED_VERSION="3.81"
20810  fi
20811
20812  if test "x$MAKE_CANDIDATE" != x; then
20813    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20814$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20815    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20816    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20817    if test "x$IS_GNU_MAKE" = x; then
20818      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20819$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20820    else
20821      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20822      if test "x$IS_MODERN_MAKE" = x; then
20823        { $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
20824$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;}
20825      else
20826        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20827          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20828            MAKE_EXPECTED_ENV='cygwin'
20829          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20830            MAKE_EXPECTED_ENV='msys'
20831          else
20832            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20833          fi
20834          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20835          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20836        else
20837          # Not relevant for non-Windows
20838          IS_MAKE_CORRECT_ENV=true
20839        fi
20840        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20841          { $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
20842$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;}
20843        else
20844          FOUND_MAKE=$MAKE_CANDIDATE
20845
20846  # Only process if variable expands to non-empty
20847
20848  if test "x$FOUND_MAKE" != x; then
20849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20850
20851  # First separate the path from the arguments. This will split at the first
20852  # space.
20853  complete="$FOUND_MAKE"
20854  path="${complete%% *}"
20855  tmp="$complete EOL"
20856  arguments="${tmp#* }"
20857
20858  # Input might be given as Windows format, start by converting to
20859  # unix format.
20860  new_path=`$CYGPATH -u "$path"`
20861
20862  # Now try to locate executable using which
20863  new_path=`$WHICH "$new_path" 2> /dev/null`
20864  # bat and cmd files are not always considered executable in cygwin causing which
20865  # to not find them
20866  if test "x$new_path" = x \
20867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20869    new_path=`$CYGPATH -u "$path"`
20870  fi
20871  if test "x$new_path" = x; then
20872    # Oops. Which didn't find the executable.
20873    # The splitting of arguments from the executable at a space might have been incorrect,
20874    # since paths with space are more likely in Windows. Give it another try with the whole
20875    # argument.
20876    path="$complete"
20877    arguments="EOL"
20878    new_path=`$CYGPATH -u "$path"`
20879    new_path=`$WHICH "$new_path" 2> /dev/null`
20880    # bat and cmd files are not always considered executable in cygwin causing which
20881    # to not find them
20882    if test "x$new_path" = x \
20883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20885      new_path=`$CYGPATH -u "$path"`
20886    fi
20887    if test "x$new_path" = x; then
20888      # It's still not found. Now this is an unrecoverable error.
20889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20891      has_space=`$ECHO "$complete" | $GREP " "`
20892      if test "x$has_space" != x; then
20893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20895      fi
20896      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20897    fi
20898  fi
20899
20900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20903  # "foo.exe" is OK but "foo" is an error.
20904  #
20905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20906  # It is also a way to make sure we got the proper file name for the real test later on.
20907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20908  if test "x$test_shortpath" = x; then
20909    # Short path failed, file does not exist as specified.
20910    # Try adding .exe or .cmd
20911    if test -f "${new_path}.exe"; then
20912      input_to_shortpath="${new_path}.exe"
20913    elif test -f "${new_path}.cmd"; then
20914      input_to_shortpath="${new_path}.cmd"
20915    else
20916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20917$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20921    fi
20922  else
20923    input_to_shortpath="$new_path"
20924  fi
20925
20926  # Call helper function which possibly converts this using DOS-style short mode.
20927  # If so, the updated path is stored in $new_path.
20928  new_path="$input_to_shortpath"
20929
20930  input_path="$input_to_shortpath"
20931  # Check if we need to convert this using DOS-style short mode. If the path
20932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20933  # take no chances and rewrite it.
20934  # Note: m4 eats our [], so we need to use [ and ] instead.
20935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20936  if test "x$has_forbidden_chars" != x; then
20937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20941      # Going to short mode and back again did indeed matter. Since short mode is
20942      # case insensitive, let's make it lowercase to improve readability.
20943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20944      # Now convert it back to Unix-style (cygpath)
20945      input_path=`$CYGPATH -u "$shortmode_path"`
20946      new_path="$input_path"
20947    fi
20948  fi
20949
20950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20951  if test "x$test_cygdrive_prefix" = x; then
20952    # As a simple fix, exclude /usr/bin since it's not a real path.
20953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20955      # a path prefixed by /cygdrive for fixpath to work.
20956      new_path="$CYGWIN_ROOT_PATH$input_path"
20957    fi
20958  fi
20959
20960  # remove trailing .exe if any
20961  new_path="${new_path/%.exe/}"
20962
20963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20964
20965  # First separate the path from the arguments. This will split at the first
20966  # space.
20967  complete="$FOUND_MAKE"
20968  path="${complete%% *}"
20969  tmp="$complete EOL"
20970  arguments="${tmp#* }"
20971
20972  # Input might be given as Windows format, start by converting to
20973  # unix format.
20974  new_path="$path"
20975
20976  windows_path="$new_path"
20977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20978    unix_path=`$CYGPATH -u "$windows_path"`
20979    new_path="$unix_path"
20980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20982    new_path="$unix_path"
20983  fi
20984
20985
20986  # Now try to locate executable using which
20987  new_path=`$WHICH "$new_path" 2> /dev/null`
20988
20989  if test "x$new_path" = x; then
20990    # Oops. Which didn't find the executable.
20991    # The splitting of arguments from the executable at a space might have been incorrect,
20992    # since paths with space are more likely in Windows. Give it another try with the whole
20993    # argument.
20994    path="$complete"
20995    arguments="EOL"
20996    new_path="$path"
20997
20998  windows_path="$new_path"
20999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21000    unix_path=`$CYGPATH -u "$windows_path"`
21001    new_path="$unix_path"
21002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21004    new_path="$unix_path"
21005  fi
21006
21007
21008    new_path=`$WHICH "$new_path" 2> /dev/null`
21009    # bat and cmd files are not always considered executable in MSYS causing which
21010    # to not find them
21011    if test "x$new_path" = x \
21012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21014      new_path="$path"
21015
21016  windows_path="$new_path"
21017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21018    unix_path=`$CYGPATH -u "$windows_path"`
21019    new_path="$unix_path"
21020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21022    new_path="$unix_path"
21023  fi
21024
21025    fi
21026
21027    if test "x$new_path" = x; then
21028      # It's still not found. Now this is an unrecoverable error.
21029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21031      has_space=`$ECHO "$complete" | $GREP " "`
21032      if test "x$has_space" != x; then
21033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21035      fi
21036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21037    fi
21038  fi
21039
21040  # Now new_path has a complete unix path to the binary
21041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21042    # Keep paths in /bin as-is, but remove trailing .exe if any
21043    new_path="${new_path/%.exe/}"
21044    # Do not save /bin paths to all_fixpath_prefixes!
21045  else
21046    # Not in mixed or Windows style, start by that.
21047    new_path=`cmd //c echo $new_path`
21048
21049  input_path="$new_path"
21050  # Check if we need to convert this using DOS-style short mode. If the path
21051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21052  # take no chances and rewrite it.
21053  # Note: m4 eats our [], so we need to use [ and ] instead.
21054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21055  if test "x$has_forbidden_chars" != x; then
21056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21058  fi
21059
21060    # Output is in $new_path
21061
21062  windows_path="$new_path"
21063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21064    unix_path=`$CYGPATH -u "$windows_path"`
21065    new_path="$unix_path"
21066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21068    new_path="$unix_path"
21069  fi
21070
21071    # remove trailing .exe if any
21072    new_path="${new_path/%.exe/}"
21073
21074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21076  fi
21077
21078    else
21079      # We're on a unix platform. Hooray! :)
21080      # First separate the path from the arguments. This will split at the first
21081      # space.
21082      complete="$FOUND_MAKE"
21083      path="${complete%% *}"
21084      tmp="$complete EOL"
21085      arguments="${tmp#* }"
21086
21087      # Cannot rely on the command "which" here since it doesn't always work.
21088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21089      if test -z "$is_absolute_path"; then
21090        # Path to executable is not absolute. Find it.
21091        IFS_save="$IFS"
21092        IFS=:
21093        for p in $PATH; do
21094          if test -f "$p/$path" && test -x "$p/$path"; then
21095            new_path="$p/$path"
21096            break
21097          fi
21098        done
21099        IFS="$IFS_save"
21100      else
21101        # This is an absolute path, we can use it without further modifications.
21102        new_path="$path"
21103      fi
21104
21105      if test "x$new_path" = x; then
21106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21108        has_space=`$ECHO "$complete" | $GREP " "`
21109        if test "x$has_space" != x; then
21110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21112        fi
21113        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21114      fi
21115    fi
21116
21117    # Now join together the path and the arguments once again
21118    if test "x$arguments" != xEOL; then
21119      new_complete="$new_path ${arguments% *}"
21120    else
21121      new_complete="$new_path"
21122    fi
21123
21124    if test "x$complete" != "x$new_complete"; then
21125      FOUND_MAKE="$new_complete"
21126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21127$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21128    fi
21129  fi
21130
21131        fi
21132      fi
21133    fi
21134  fi
21135
21136    if test "x$FOUND_MAKE" = x; then
21137      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21138    fi
21139
21140  fi
21141
21142
21143  MAKE=$FOUND_MAKE
21144
21145  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21146$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21147
21148
21149  # Check if make supports the output sync option and if so, setup using it.
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21151$as_echo_n "checking if make --output-sync is supported... " >&6; }
21152  if $MAKE --version -O > /dev/null 2>&1; then
21153    OUTPUT_SYNC_SUPPORTED=true
21154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21155$as_echo "yes" >&6; }
21156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21157$as_echo_n "checking for output-sync value... " >&6; }
21158
21159# Check whether --with-output-sync was given.
21160if test "${with_output_sync+set}" = set; then :
21161  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21162fi
21163
21164    if test "x$OUTPUT_SYNC" = "x"; then
21165      OUTPUT_SYNC=none
21166    fi
21167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21168$as_echo "$OUTPUT_SYNC" >&6; }
21169    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21170      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21171    fi
21172  else
21173    OUTPUT_SYNC_SUPPORTED=false
21174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21175$as_echo "no" >&6; }
21176  fi
21177
21178
21179
21180
21181
21182
21183  # Test if find supports -delete
21184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21185$as_echo_n "checking if find supports -delete... " >&6; }
21186  FIND_DELETE="-delete"
21187
21188  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21189
21190  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21191
21192  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21193  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21194    # No, it does not.
21195    $RM $DELETEDIR/TestIfFindSupportsDelete
21196    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21197      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21198      FIND_DELETE="-print | $XARGS $RM"
21199    else
21200      FIND_DELETE="-exec $RM \{\} \+"
21201    fi
21202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21203$as_echo "no" >&6; }
21204  else
21205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21206$as_echo "yes" >&6; }
21207  fi
21208  $RMDIR $DELETEDIR
21209
21210
21211
21212  # Test which kind of tar was found
21213  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21214    TAR_TYPE="gnu"
21215  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21216    TAR_TYPE="bsd"
21217  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21218    TAR_TYPE="solaris"
21219  fi
21220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21221$as_echo_n "checking what type of tar was found... " >&6; }
21222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21223$as_echo "$TAR_TYPE" >&6; }
21224
21225  TAR_CREATE_FILE_PARAM=""
21226
21227  if test "x$TAR_TYPE" = "xgnu"; then
21228    TAR_INCLUDE_PARAM="T"
21229    TAR_SUPPORTS_TRANSFORM="true"
21230    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21231      # When using gnu tar for Solaris targets, need to use compatibility mode
21232      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21233    fi
21234  else
21235    TAR_INCLUDE_PARAM="I"
21236    TAR_SUPPORTS_TRANSFORM="false"
21237  fi
21238
21239
21240
21241
21242
21243
21244  # These tools might not be installed by default,
21245  # need hint on how to install them.
21246
21247
21248
21249  # Publish this variable in the help.
21250
21251
21252  if [ -z "${UNZIP+x}" ]; then
21253    # The variable is not set by user, try to locate tool using the code snippet
21254    for ac_prog in unzip
21255do
21256  # Extract the first word of "$ac_prog", so it can be a program name with args.
21257set dummy $ac_prog; ac_word=$2
21258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21259$as_echo_n "checking for $ac_word... " >&6; }
21260if ${ac_cv_path_UNZIP+:} false; then :
21261  $as_echo_n "(cached) " >&6
21262else
21263  case $UNZIP in
21264  [\\/]* | ?:[\\/]*)
21265  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21266  ;;
21267  *)
21268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21269for as_dir in $PATH
21270do
21271  IFS=$as_save_IFS
21272  test -z "$as_dir" && as_dir=.
21273    for ac_exec_ext in '' $ac_executable_extensions; do
21274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21275    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21277    break 2
21278  fi
21279done
21280  done
21281IFS=$as_save_IFS
21282
21283  ;;
21284esac
21285fi
21286UNZIP=$ac_cv_path_UNZIP
21287if test -n "$UNZIP"; then
21288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21289$as_echo "$UNZIP" >&6; }
21290else
21291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21292$as_echo "no" >&6; }
21293fi
21294
21295
21296  test -n "$UNZIP" && break
21297done
21298
21299  else
21300    # The variable is set, but is it from the command line or the environment?
21301
21302    # Try to remove the string !UNZIP! from our list.
21303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21305      # If it failed, the variable was not from the command line. Ignore it,
21306      # but warn the user (except for BASH, which is always set by the calling BASH).
21307      if test "xUNZIP" != xBASH; then
21308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21309$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21310      fi
21311      # Try to locate tool using the code snippet
21312      for ac_prog in unzip
21313do
21314  # Extract the first word of "$ac_prog", so it can be a program name with args.
21315set dummy $ac_prog; ac_word=$2
21316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21317$as_echo_n "checking for $ac_word... " >&6; }
21318if ${ac_cv_path_UNZIP+:} false; then :
21319  $as_echo_n "(cached) " >&6
21320else
21321  case $UNZIP in
21322  [\\/]* | ?:[\\/]*)
21323  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21324  ;;
21325  *)
21326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21327for as_dir in $PATH
21328do
21329  IFS=$as_save_IFS
21330  test -z "$as_dir" && as_dir=.
21331    for ac_exec_ext in '' $ac_executable_extensions; do
21332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21333    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21335    break 2
21336  fi
21337done
21338  done
21339IFS=$as_save_IFS
21340
21341  ;;
21342esac
21343fi
21344UNZIP=$ac_cv_path_UNZIP
21345if test -n "$UNZIP"; then
21346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21347$as_echo "$UNZIP" >&6; }
21348else
21349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21350$as_echo "no" >&6; }
21351fi
21352
21353
21354  test -n "$UNZIP" && break
21355done
21356
21357    else
21358      # If it succeeded, then it was overridden by the user. We will use it
21359      # for the tool.
21360
21361      # First remove it from the list of overridden variables, so we can test
21362      # for unknown variables in the end.
21363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21364
21365      # Check if we try to supply an empty value
21366      if test "x$UNZIP" = x; then
21367        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21368$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21370$as_echo_n "checking for UNZIP... " >&6; }
21371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21372$as_echo "disabled" >&6; }
21373      else
21374        # Check if the provided tool contains a complete path.
21375        tool_specified="$UNZIP"
21376        tool_basename="${tool_specified##*/}"
21377        if test "x$tool_basename" = "x$tool_specified"; then
21378          # A command without a complete path is provided, search $PATH.
21379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21380$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21381          # Extract the first word of "$tool_basename", so it can be a program name with args.
21382set dummy $tool_basename; ac_word=$2
21383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21384$as_echo_n "checking for $ac_word... " >&6; }
21385if ${ac_cv_path_UNZIP+:} false; then :
21386  $as_echo_n "(cached) " >&6
21387else
21388  case $UNZIP in
21389  [\\/]* | ?:[\\/]*)
21390  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21391  ;;
21392  *)
21393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21394for as_dir in $PATH
21395do
21396  IFS=$as_save_IFS
21397  test -z "$as_dir" && as_dir=.
21398    for ac_exec_ext in '' $ac_executable_extensions; do
21399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21400    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21402    break 2
21403  fi
21404done
21405  done
21406IFS=$as_save_IFS
21407
21408  ;;
21409esac
21410fi
21411UNZIP=$ac_cv_path_UNZIP
21412if test -n "$UNZIP"; then
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21414$as_echo "$UNZIP" >&6; }
21415else
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21417$as_echo "no" >&6; }
21418fi
21419
21420
21421          if test "x$UNZIP" = x; then
21422            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21423          fi
21424        else
21425          # Otherwise we believe it is a complete path. Use it as it is.
21426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21427$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21429$as_echo_n "checking for UNZIP... " >&6; }
21430          if test ! -x "$tool_specified"; then
21431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21432$as_echo "not found" >&6; }
21433            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21434          fi
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21436$as_echo "$tool_specified" >&6; }
21437        fi
21438      fi
21439    fi
21440
21441  fi
21442
21443
21444
21445  if test "x$UNZIP" = x; then
21446    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21447  fi
21448
21449
21450  # Since zip uses "ZIP" as a environment variable for passing options, we need
21451  # to name our variable differently, hence ZIPEXE.
21452
21453
21454
21455  # Publish this variable in the help.
21456
21457
21458  if [ -z "${ZIPEXE+x}" ]; then
21459    # The variable is not set by user, try to locate tool using the code snippet
21460    for ac_prog in zip
21461do
21462  # Extract the first word of "$ac_prog", so it can be a program name with args.
21463set dummy $ac_prog; ac_word=$2
21464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21465$as_echo_n "checking for $ac_word... " >&6; }
21466if ${ac_cv_path_ZIPEXE+:} false; then :
21467  $as_echo_n "(cached) " >&6
21468else
21469  case $ZIPEXE in
21470  [\\/]* | ?:[\\/]*)
21471  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21472  ;;
21473  *)
21474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21475for as_dir in $PATH
21476do
21477  IFS=$as_save_IFS
21478  test -z "$as_dir" && as_dir=.
21479    for ac_exec_ext in '' $ac_executable_extensions; do
21480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21481    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21483    break 2
21484  fi
21485done
21486  done
21487IFS=$as_save_IFS
21488
21489  ;;
21490esac
21491fi
21492ZIPEXE=$ac_cv_path_ZIPEXE
21493if test -n "$ZIPEXE"; then
21494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21495$as_echo "$ZIPEXE" >&6; }
21496else
21497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21498$as_echo "no" >&6; }
21499fi
21500
21501
21502  test -n "$ZIPEXE" && break
21503done
21504
21505  else
21506    # The variable is set, but is it from the command line or the environment?
21507
21508    # Try to remove the string !ZIPEXE! from our list.
21509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21511      # If it failed, the variable was not from the command line. Ignore it,
21512      # but warn the user (except for BASH, which is always set by the calling BASH).
21513      if test "xZIPEXE" != xBASH; then
21514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21515$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21516      fi
21517      # Try to locate tool using the code snippet
21518      for ac_prog in zip
21519do
21520  # Extract the first word of "$ac_prog", so it can be a program name with args.
21521set dummy $ac_prog; ac_word=$2
21522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21523$as_echo_n "checking for $ac_word... " >&6; }
21524if ${ac_cv_path_ZIPEXE+:} false; then :
21525  $as_echo_n "(cached) " >&6
21526else
21527  case $ZIPEXE in
21528  [\\/]* | ?:[\\/]*)
21529  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21530  ;;
21531  *)
21532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21533for as_dir in $PATH
21534do
21535  IFS=$as_save_IFS
21536  test -z "$as_dir" && as_dir=.
21537    for ac_exec_ext in '' $ac_executable_extensions; do
21538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21539    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21541    break 2
21542  fi
21543done
21544  done
21545IFS=$as_save_IFS
21546
21547  ;;
21548esac
21549fi
21550ZIPEXE=$ac_cv_path_ZIPEXE
21551if test -n "$ZIPEXE"; then
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21553$as_echo "$ZIPEXE" >&6; }
21554else
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556$as_echo "no" >&6; }
21557fi
21558
21559
21560  test -n "$ZIPEXE" && break
21561done
21562
21563    else
21564      # If it succeeded, then it was overridden by the user. We will use it
21565      # for the tool.
21566
21567      # First remove it from the list of overridden variables, so we can test
21568      # for unknown variables in the end.
21569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21570
21571      # Check if we try to supply an empty value
21572      if test "x$ZIPEXE" = x; then
21573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21574$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21576$as_echo_n "checking for ZIPEXE... " >&6; }
21577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21578$as_echo "disabled" >&6; }
21579      else
21580        # Check if the provided tool contains a complete path.
21581        tool_specified="$ZIPEXE"
21582        tool_basename="${tool_specified##*/}"
21583        if test "x$tool_basename" = "x$tool_specified"; then
21584          # A command without a complete path is provided, search $PATH.
21585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21586$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21587          # Extract the first word of "$tool_basename", so it can be a program name with args.
21588set dummy $tool_basename; ac_word=$2
21589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21590$as_echo_n "checking for $ac_word... " >&6; }
21591if ${ac_cv_path_ZIPEXE+:} false; then :
21592  $as_echo_n "(cached) " >&6
21593else
21594  case $ZIPEXE in
21595  [\\/]* | ?:[\\/]*)
21596  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21597  ;;
21598  *)
21599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21600for as_dir in $PATH
21601do
21602  IFS=$as_save_IFS
21603  test -z "$as_dir" && as_dir=.
21604    for ac_exec_ext in '' $ac_executable_extensions; do
21605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21606    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21608    break 2
21609  fi
21610done
21611  done
21612IFS=$as_save_IFS
21613
21614  ;;
21615esac
21616fi
21617ZIPEXE=$ac_cv_path_ZIPEXE
21618if test -n "$ZIPEXE"; then
21619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21620$as_echo "$ZIPEXE" >&6; }
21621else
21622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21623$as_echo "no" >&6; }
21624fi
21625
21626
21627          if test "x$ZIPEXE" = x; then
21628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21629          fi
21630        else
21631          # Otherwise we believe it is a complete path. Use it as it is.
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21633$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21635$as_echo_n "checking for ZIPEXE... " >&6; }
21636          if test ! -x "$tool_specified"; then
21637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21638$as_echo "not found" >&6; }
21639            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21640          fi
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21642$as_echo "$tool_specified" >&6; }
21643        fi
21644      fi
21645    fi
21646
21647  fi
21648
21649
21650
21651  if test "x$ZIPEXE" = x; then
21652    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21653  fi
21654
21655
21656
21657  # Non-required basic tools
21658
21659
21660
21661  # Publish this variable in the help.
21662
21663
21664  if [ -z "${LDD+x}" ]; then
21665    # The variable is not set by user, try to locate tool using the code snippet
21666    for ac_prog in ldd
21667do
21668  # Extract the first word of "$ac_prog", so it can be a program name with args.
21669set dummy $ac_prog; ac_word=$2
21670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21671$as_echo_n "checking for $ac_word... " >&6; }
21672if ${ac_cv_path_LDD+:} false; then :
21673  $as_echo_n "(cached) " >&6
21674else
21675  case $LDD in
21676  [\\/]* | ?:[\\/]*)
21677  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21678  ;;
21679  *)
21680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21681for as_dir in $PATH
21682do
21683  IFS=$as_save_IFS
21684  test -z "$as_dir" && as_dir=.
21685    for ac_exec_ext in '' $ac_executable_extensions; do
21686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21687    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21689    break 2
21690  fi
21691done
21692  done
21693IFS=$as_save_IFS
21694
21695  ;;
21696esac
21697fi
21698LDD=$ac_cv_path_LDD
21699if test -n "$LDD"; then
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21701$as_echo "$LDD" >&6; }
21702else
21703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21704$as_echo "no" >&6; }
21705fi
21706
21707
21708  test -n "$LDD" && break
21709done
21710
21711  else
21712    # The variable is set, but is it from the command line or the environment?
21713
21714    # Try to remove the string !LDD! from our list.
21715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21717      # If it failed, the variable was not from the command line. Ignore it,
21718      # but warn the user (except for BASH, which is always set by the calling BASH).
21719      if test "xLDD" != xBASH; then
21720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21721$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21722      fi
21723      # Try to locate tool using the code snippet
21724      for ac_prog in ldd
21725do
21726  # Extract the first word of "$ac_prog", so it can be a program name with args.
21727set dummy $ac_prog; ac_word=$2
21728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21729$as_echo_n "checking for $ac_word... " >&6; }
21730if ${ac_cv_path_LDD+:} false; then :
21731  $as_echo_n "(cached) " >&6
21732else
21733  case $LDD in
21734  [\\/]* | ?:[\\/]*)
21735  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21736  ;;
21737  *)
21738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21739for as_dir in $PATH
21740do
21741  IFS=$as_save_IFS
21742  test -z "$as_dir" && as_dir=.
21743    for ac_exec_ext in '' $ac_executable_extensions; do
21744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21745    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21747    break 2
21748  fi
21749done
21750  done
21751IFS=$as_save_IFS
21752
21753  ;;
21754esac
21755fi
21756LDD=$ac_cv_path_LDD
21757if test -n "$LDD"; then
21758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21759$as_echo "$LDD" >&6; }
21760else
21761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21762$as_echo "no" >&6; }
21763fi
21764
21765
21766  test -n "$LDD" && break
21767done
21768
21769    else
21770      # If it succeeded, then it was overridden by the user. We will use it
21771      # for the tool.
21772
21773      # First remove it from the list of overridden variables, so we can test
21774      # for unknown variables in the end.
21775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21776
21777      # Check if we try to supply an empty value
21778      if test "x$LDD" = x; then
21779        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21780$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21782$as_echo_n "checking for LDD... " >&6; }
21783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21784$as_echo "disabled" >&6; }
21785      else
21786        # Check if the provided tool contains a complete path.
21787        tool_specified="$LDD"
21788        tool_basename="${tool_specified##*/}"
21789        if test "x$tool_basename" = "x$tool_specified"; then
21790          # A command without a complete path is provided, search $PATH.
21791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21792$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21793          # Extract the first word of "$tool_basename", so it can be a program name with args.
21794set dummy $tool_basename; ac_word=$2
21795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21796$as_echo_n "checking for $ac_word... " >&6; }
21797if ${ac_cv_path_LDD+:} false; then :
21798  $as_echo_n "(cached) " >&6
21799else
21800  case $LDD in
21801  [\\/]* | ?:[\\/]*)
21802  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21803  ;;
21804  *)
21805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21806for as_dir in $PATH
21807do
21808  IFS=$as_save_IFS
21809  test -z "$as_dir" && as_dir=.
21810    for ac_exec_ext in '' $ac_executable_extensions; do
21811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21812    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21814    break 2
21815  fi
21816done
21817  done
21818IFS=$as_save_IFS
21819
21820  ;;
21821esac
21822fi
21823LDD=$ac_cv_path_LDD
21824if test -n "$LDD"; then
21825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21826$as_echo "$LDD" >&6; }
21827else
21828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21829$as_echo "no" >&6; }
21830fi
21831
21832
21833          if test "x$LDD" = x; then
21834            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21835          fi
21836        else
21837          # Otherwise we believe it is a complete path. Use it as it is.
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21839$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21841$as_echo_n "checking for LDD... " >&6; }
21842          if test ! -x "$tool_specified"; then
21843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21844$as_echo "not found" >&6; }
21845            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21846          fi
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21848$as_echo "$tool_specified" >&6; }
21849        fi
21850      fi
21851    fi
21852
21853  fi
21854
21855
21856  if test "x$LDD" = "x"; then
21857    # List shared lib dependencies is used for
21858    # debug output and checking for forbidden dependencies.
21859    # We can build without it.
21860    LDD="true"
21861  fi
21862
21863
21864  # Publish this variable in the help.
21865
21866
21867  if [ -z "${OTOOL+x}" ]; then
21868    # The variable is not set by user, try to locate tool using the code snippet
21869    for ac_prog in otool
21870do
21871  # Extract the first word of "$ac_prog", so it can be a program name with args.
21872set dummy $ac_prog; ac_word=$2
21873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21874$as_echo_n "checking for $ac_word... " >&6; }
21875if ${ac_cv_path_OTOOL+:} false; then :
21876  $as_echo_n "(cached) " >&6
21877else
21878  case $OTOOL in
21879  [\\/]* | ?:[\\/]*)
21880  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21881  ;;
21882  *)
21883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21884for as_dir in $PATH
21885do
21886  IFS=$as_save_IFS
21887  test -z "$as_dir" && as_dir=.
21888    for ac_exec_ext in '' $ac_executable_extensions; do
21889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21890    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21892    break 2
21893  fi
21894done
21895  done
21896IFS=$as_save_IFS
21897
21898  ;;
21899esac
21900fi
21901OTOOL=$ac_cv_path_OTOOL
21902if test -n "$OTOOL"; then
21903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21904$as_echo "$OTOOL" >&6; }
21905else
21906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21907$as_echo "no" >&6; }
21908fi
21909
21910
21911  test -n "$OTOOL" && break
21912done
21913
21914  else
21915    # The variable is set, but is it from the command line or the environment?
21916
21917    # Try to remove the string !OTOOL! from our list.
21918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21920      # If it failed, the variable was not from the command line. Ignore it,
21921      # but warn the user (except for BASH, which is always set by the calling BASH).
21922      if test "xOTOOL" != xBASH; then
21923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21924$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21925      fi
21926      # Try to locate tool using the code snippet
21927      for ac_prog in otool
21928do
21929  # Extract the first word of "$ac_prog", so it can be a program name with args.
21930set dummy $ac_prog; ac_word=$2
21931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21932$as_echo_n "checking for $ac_word... " >&6; }
21933if ${ac_cv_path_OTOOL+:} false; then :
21934  $as_echo_n "(cached) " >&6
21935else
21936  case $OTOOL in
21937  [\\/]* | ?:[\\/]*)
21938  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21939  ;;
21940  *)
21941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21942for as_dir in $PATH
21943do
21944  IFS=$as_save_IFS
21945  test -z "$as_dir" && as_dir=.
21946    for ac_exec_ext in '' $ac_executable_extensions; do
21947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21948    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21950    break 2
21951  fi
21952done
21953  done
21954IFS=$as_save_IFS
21955
21956  ;;
21957esac
21958fi
21959OTOOL=$ac_cv_path_OTOOL
21960if test -n "$OTOOL"; then
21961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21962$as_echo "$OTOOL" >&6; }
21963else
21964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21965$as_echo "no" >&6; }
21966fi
21967
21968
21969  test -n "$OTOOL" && break
21970done
21971
21972    else
21973      # If it succeeded, then it was overridden by the user. We will use it
21974      # for the tool.
21975
21976      # First remove it from the list of overridden variables, so we can test
21977      # for unknown variables in the end.
21978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21979
21980      # Check if we try to supply an empty value
21981      if test "x$OTOOL" = x; then
21982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21983$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21985$as_echo_n "checking for OTOOL... " >&6; }
21986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21987$as_echo "disabled" >&6; }
21988      else
21989        # Check if the provided tool contains a complete path.
21990        tool_specified="$OTOOL"
21991        tool_basename="${tool_specified##*/}"
21992        if test "x$tool_basename" = "x$tool_specified"; then
21993          # A command without a complete path is provided, search $PATH.
21994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21995$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21996          # Extract the first word of "$tool_basename", so it can be a program name with args.
21997set dummy $tool_basename; ac_word=$2
21998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21999$as_echo_n "checking for $ac_word... " >&6; }
22000if ${ac_cv_path_OTOOL+:} false; then :
22001  $as_echo_n "(cached) " >&6
22002else
22003  case $OTOOL in
22004  [\\/]* | ?:[\\/]*)
22005  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22006  ;;
22007  *)
22008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22009for as_dir in $PATH
22010do
22011  IFS=$as_save_IFS
22012  test -z "$as_dir" && as_dir=.
22013    for ac_exec_ext in '' $ac_executable_extensions; do
22014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22015    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22017    break 2
22018  fi
22019done
22020  done
22021IFS=$as_save_IFS
22022
22023  ;;
22024esac
22025fi
22026OTOOL=$ac_cv_path_OTOOL
22027if test -n "$OTOOL"; then
22028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22029$as_echo "$OTOOL" >&6; }
22030else
22031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22032$as_echo "no" >&6; }
22033fi
22034
22035
22036          if test "x$OTOOL" = x; then
22037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22038          fi
22039        else
22040          # Otherwise we believe it is a complete path. Use it as it is.
22041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22042$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22044$as_echo_n "checking for OTOOL... " >&6; }
22045          if test ! -x "$tool_specified"; then
22046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22047$as_echo "not found" >&6; }
22048            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22049          fi
22050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22051$as_echo "$tool_specified" >&6; }
22052        fi
22053      fi
22054    fi
22055
22056  fi
22057
22058
22059  if test "x$OTOOL" = "x"; then
22060    OTOOL="true"
22061  fi
22062
22063
22064  # Publish this variable in the help.
22065
22066
22067  if [ -z "${READELF+x}" ]; then
22068    # The variable is not set by user, try to locate tool using the code snippet
22069    for ac_prog in greadelf readelf
22070do
22071  # Extract the first word of "$ac_prog", so it can be a program name with args.
22072set dummy $ac_prog; ac_word=$2
22073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22074$as_echo_n "checking for $ac_word... " >&6; }
22075if ${ac_cv_path_READELF+:} false; then :
22076  $as_echo_n "(cached) " >&6
22077else
22078  case $READELF in
22079  [\\/]* | ?:[\\/]*)
22080  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22081  ;;
22082  *)
22083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22084for as_dir in $PATH
22085do
22086  IFS=$as_save_IFS
22087  test -z "$as_dir" && as_dir=.
22088    for ac_exec_ext in '' $ac_executable_extensions; do
22089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22090    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22092    break 2
22093  fi
22094done
22095  done
22096IFS=$as_save_IFS
22097
22098  ;;
22099esac
22100fi
22101READELF=$ac_cv_path_READELF
22102if test -n "$READELF"; then
22103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22104$as_echo "$READELF" >&6; }
22105else
22106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22107$as_echo "no" >&6; }
22108fi
22109
22110
22111  test -n "$READELF" && break
22112done
22113
22114  else
22115    # The variable is set, but is it from the command line or the environment?
22116
22117    # Try to remove the string !READELF! from our list.
22118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22120      # If it failed, the variable was not from the command line. Ignore it,
22121      # but warn the user (except for BASH, which is always set by the calling BASH).
22122      if test "xREADELF" != xBASH; then
22123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22124$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22125      fi
22126      # Try to locate tool using the code snippet
22127      for ac_prog in greadelf readelf
22128do
22129  # Extract the first word of "$ac_prog", so it can be a program name with args.
22130set dummy $ac_prog; ac_word=$2
22131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22132$as_echo_n "checking for $ac_word... " >&6; }
22133if ${ac_cv_path_READELF+:} false; then :
22134  $as_echo_n "(cached) " >&6
22135else
22136  case $READELF in
22137  [\\/]* | ?:[\\/]*)
22138  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22139  ;;
22140  *)
22141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22142for as_dir in $PATH
22143do
22144  IFS=$as_save_IFS
22145  test -z "$as_dir" && as_dir=.
22146    for ac_exec_ext in '' $ac_executable_extensions; do
22147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22148    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22150    break 2
22151  fi
22152done
22153  done
22154IFS=$as_save_IFS
22155
22156  ;;
22157esac
22158fi
22159READELF=$ac_cv_path_READELF
22160if test -n "$READELF"; then
22161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22162$as_echo "$READELF" >&6; }
22163else
22164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22165$as_echo "no" >&6; }
22166fi
22167
22168
22169  test -n "$READELF" && break
22170done
22171
22172    else
22173      # If it succeeded, then it was overridden by the user. We will use it
22174      # for the tool.
22175
22176      # First remove it from the list of overridden variables, so we can test
22177      # for unknown variables in the end.
22178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22179
22180      # Check if we try to supply an empty value
22181      if test "x$READELF" = x; then
22182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22183$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22185$as_echo_n "checking for READELF... " >&6; }
22186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22187$as_echo "disabled" >&6; }
22188      else
22189        # Check if the provided tool contains a complete path.
22190        tool_specified="$READELF"
22191        tool_basename="${tool_specified##*/}"
22192        if test "x$tool_basename" = "x$tool_specified"; then
22193          # A command without a complete path is provided, search $PATH.
22194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22195$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22196          # Extract the first word of "$tool_basename", so it can be a program name with args.
22197set dummy $tool_basename; ac_word=$2
22198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22199$as_echo_n "checking for $ac_word... " >&6; }
22200if ${ac_cv_path_READELF+:} false; then :
22201  $as_echo_n "(cached) " >&6
22202else
22203  case $READELF in
22204  [\\/]* | ?:[\\/]*)
22205  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22206  ;;
22207  *)
22208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22209for as_dir in $PATH
22210do
22211  IFS=$as_save_IFS
22212  test -z "$as_dir" && as_dir=.
22213    for ac_exec_ext in '' $ac_executable_extensions; do
22214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22215    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22217    break 2
22218  fi
22219done
22220  done
22221IFS=$as_save_IFS
22222
22223  ;;
22224esac
22225fi
22226READELF=$ac_cv_path_READELF
22227if test -n "$READELF"; then
22228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22229$as_echo "$READELF" >&6; }
22230else
22231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22232$as_echo "no" >&6; }
22233fi
22234
22235
22236          if test "x$READELF" = x; then
22237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22238          fi
22239        else
22240          # Otherwise we believe it is a complete path. Use it as it is.
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22242$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22244$as_echo_n "checking for READELF... " >&6; }
22245          if test ! -x "$tool_specified"; then
22246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22247$as_echo "not found" >&6; }
22248            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22249          fi
22250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22251$as_echo "$tool_specified" >&6; }
22252        fi
22253      fi
22254    fi
22255
22256  fi
22257
22258
22259
22260
22261  # Publish this variable in the help.
22262
22263
22264  if [ -z "${HG+x}" ]; then
22265    # The variable is not set by user, try to locate tool using the code snippet
22266    for ac_prog in hg
22267do
22268  # Extract the first word of "$ac_prog", so it can be a program name with args.
22269set dummy $ac_prog; ac_word=$2
22270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22271$as_echo_n "checking for $ac_word... " >&6; }
22272if ${ac_cv_path_HG+:} false; then :
22273  $as_echo_n "(cached) " >&6
22274else
22275  case $HG in
22276  [\\/]* | ?:[\\/]*)
22277  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22278  ;;
22279  *)
22280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22281for as_dir in $PATH
22282do
22283  IFS=$as_save_IFS
22284  test -z "$as_dir" && as_dir=.
22285    for ac_exec_ext in '' $ac_executable_extensions; do
22286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22287    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22289    break 2
22290  fi
22291done
22292  done
22293IFS=$as_save_IFS
22294
22295  ;;
22296esac
22297fi
22298HG=$ac_cv_path_HG
22299if test -n "$HG"; then
22300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22301$as_echo "$HG" >&6; }
22302else
22303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22304$as_echo "no" >&6; }
22305fi
22306
22307
22308  test -n "$HG" && break
22309done
22310
22311  else
22312    # The variable is set, but is it from the command line or the environment?
22313
22314    # Try to remove the string !HG! from our list.
22315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22317      # If it failed, the variable was not from the command line. Ignore it,
22318      # but warn the user (except for BASH, which is always set by the calling BASH).
22319      if test "xHG" != xBASH; then
22320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22321$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22322      fi
22323      # Try to locate tool using the code snippet
22324      for ac_prog in hg
22325do
22326  # Extract the first word of "$ac_prog", so it can be a program name with args.
22327set dummy $ac_prog; ac_word=$2
22328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22329$as_echo_n "checking for $ac_word... " >&6; }
22330if ${ac_cv_path_HG+:} false; then :
22331  $as_echo_n "(cached) " >&6
22332else
22333  case $HG in
22334  [\\/]* | ?:[\\/]*)
22335  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22336  ;;
22337  *)
22338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22339for as_dir in $PATH
22340do
22341  IFS=$as_save_IFS
22342  test -z "$as_dir" && as_dir=.
22343    for ac_exec_ext in '' $ac_executable_extensions; do
22344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22345    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22347    break 2
22348  fi
22349done
22350  done
22351IFS=$as_save_IFS
22352
22353  ;;
22354esac
22355fi
22356HG=$ac_cv_path_HG
22357if test -n "$HG"; then
22358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22359$as_echo "$HG" >&6; }
22360else
22361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22362$as_echo "no" >&6; }
22363fi
22364
22365
22366  test -n "$HG" && break
22367done
22368
22369    else
22370      # If it succeeded, then it was overridden by the user. We will use it
22371      # for the tool.
22372
22373      # First remove it from the list of overridden variables, so we can test
22374      # for unknown variables in the end.
22375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22376
22377      # Check if we try to supply an empty value
22378      if test "x$HG" = x; then
22379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22380$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22382$as_echo_n "checking for HG... " >&6; }
22383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22384$as_echo "disabled" >&6; }
22385      else
22386        # Check if the provided tool contains a complete path.
22387        tool_specified="$HG"
22388        tool_basename="${tool_specified##*/}"
22389        if test "x$tool_basename" = "x$tool_specified"; then
22390          # A command without a complete path is provided, search $PATH.
22391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22392$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22393          # Extract the first word of "$tool_basename", so it can be a program name with args.
22394set dummy $tool_basename; ac_word=$2
22395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22396$as_echo_n "checking for $ac_word... " >&6; }
22397if ${ac_cv_path_HG+:} false; then :
22398  $as_echo_n "(cached) " >&6
22399else
22400  case $HG in
22401  [\\/]* | ?:[\\/]*)
22402  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22403  ;;
22404  *)
22405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22406for as_dir in $PATH
22407do
22408  IFS=$as_save_IFS
22409  test -z "$as_dir" && as_dir=.
22410    for ac_exec_ext in '' $ac_executable_extensions; do
22411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22412    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22414    break 2
22415  fi
22416done
22417  done
22418IFS=$as_save_IFS
22419
22420  ;;
22421esac
22422fi
22423HG=$ac_cv_path_HG
22424if test -n "$HG"; then
22425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22426$as_echo "$HG" >&6; }
22427else
22428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22429$as_echo "no" >&6; }
22430fi
22431
22432
22433          if test "x$HG" = x; then
22434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22435          fi
22436        else
22437          # Otherwise we believe it is a complete path. Use it as it is.
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22439$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22441$as_echo_n "checking for HG... " >&6; }
22442          if test ! -x "$tool_specified"; then
22443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22444$as_echo "not found" >&6; }
22445            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22446          fi
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22448$as_echo "$tool_specified" >&6; }
22449        fi
22450      fi
22451    fi
22452
22453  fi
22454
22455
22456
22457
22458  # Publish this variable in the help.
22459
22460
22461  if [ -z "${STAT+x}" ]; then
22462    # The variable is not set by user, try to locate tool using the code snippet
22463    for ac_prog in stat
22464do
22465  # Extract the first word of "$ac_prog", so it can be a program name with args.
22466set dummy $ac_prog; ac_word=$2
22467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22468$as_echo_n "checking for $ac_word... " >&6; }
22469if ${ac_cv_path_STAT+:} false; then :
22470  $as_echo_n "(cached) " >&6
22471else
22472  case $STAT in
22473  [\\/]* | ?:[\\/]*)
22474  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22475  ;;
22476  *)
22477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22478for as_dir in $PATH
22479do
22480  IFS=$as_save_IFS
22481  test -z "$as_dir" && as_dir=.
22482    for ac_exec_ext in '' $ac_executable_extensions; do
22483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22484    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22486    break 2
22487  fi
22488done
22489  done
22490IFS=$as_save_IFS
22491
22492  ;;
22493esac
22494fi
22495STAT=$ac_cv_path_STAT
22496if test -n "$STAT"; then
22497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22498$as_echo "$STAT" >&6; }
22499else
22500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22501$as_echo "no" >&6; }
22502fi
22503
22504
22505  test -n "$STAT" && break
22506done
22507
22508  else
22509    # The variable is set, but is it from the command line or the environment?
22510
22511    # Try to remove the string !STAT! from our list.
22512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22514      # If it failed, the variable was not from the command line. Ignore it,
22515      # but warn the user (except for BASH, which is always set by the calling BASH).
22516      if test "xSTAT" != xBASH; then
22517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22518$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22519      fi
22520      # Try to locate tool using the code snippet
22521      for ac_prog in stat
22522do
22523  # Extract the first word of "$ac_prog", so it can be a program name with args.
22524set dummy $ac_prog; ac_word=$2
22525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22526$as_echo_n "checking for $ac_word... " >&6; }
22527if ${ac_cv_path_STAT+:} false; then :
22528  $as_echo_n "(cached) " >&6
22529else
22530  case $STAT in
22531  [\\/]* | ?:[\\/]*)
22532  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22533  ;;
22534  *)
22535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22536for as_dir in $PATH
22537do
22538  IFS=$as_save_IFS
22539  test -z "$as_dir" && as_dir=.
22540    for ac_exec_ext in '' $ac_executable_extensions; do
22541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22542    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22544    break 2
22545  fi
22546done
22547  done
22548IFS=$as_save_IFS
22549
22550  ;;
22551esac
22552fi
22553STAT=$ac_cv_path_STAT
22554if test -n "$STAT"; then
22555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22556$as_echo "$STAT" >&6; }
22557else
22558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22559$as_echo "no" >&6; }
22560fi
22561
22562
22563  test -n "$STAT" && break
22564done
22565
22566    else
22567      # If it succeeded, then it was overridden by the user. We will use it
22568      # for the tool.
22569
22570      # First remove it from the list of overridden variables, so we can test
22571      # for unknown variables in the end.
22572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22573
22574      # Check if we try to supply an empty value
22575      if test "x$STAT" = x; then
22576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22577$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22579$as_echo_n "checking for STAT... " >&6; }
22580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22581$as_echo "disabled" >&6; }
22582      else
22583        # Check if the provided tool contains a complete path.
22584        tool_specified="$STAT"
22585        tool_basename="${tool_specified##*/}"
22586        if test "x$tool_basename" = "x$tool_specified"; then
22587          # A command without a complete path is provided, search $PATH.
22588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22589$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22590          # Extract the first word of "$tool_basename", so it can be a program name with args.
22591set dummy $tool_basename; ac_word=$2
22592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22593$as_echo_n "checking for $ac_word... " >&6; }
22594if ${ac_cv_path_STAT+:} false; then :
22595  $as_echo_n "(cached) " >&6
22596else
22597  case $STAT in
22598  [\\/]* | ?:[\\/]*)
22599  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22600  ;;
22601  *)
22602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22603for as_dir in $PATH
22604do
22605  IFS=$as_save_IFS
22606  test -z "$as_dir" && as_dir=.
22607    for ac_exec_ext in '' $ac_executable_extensions; do
22608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22609    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22611    break 2
22612  fi
22613done
22614  done
22615IFS=$as_save_IFS
22616
22617  ;;
22618esac
22619fi
22620STAT=$ac_cv_path_STAT
22621if test -n "$STAT"; then
22622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22623$as_echo "$STAT" >&6; }
22624else
22625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22626$as_echo "no" >&6; }
22627fi
22628
22629
22630          if test "x$STAT" = x; then
22631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22632          fi
22633        else
22634          # Otherwise we believe it is a complete path. Use it as it is.
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22636$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22638$as_echo_n "checking for STAT... " >&6; }
22639          if test ! -x "$tool_specified"; then
22640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22641$as_echo "not found" >&6; }
22642            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22643          fi
22644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22645$as_echo "$tool_specified" >&6; }
22646        fi
22647      fi
22648    fi
22649
22650  fi
22651
22652
22653
22654
22655  # Publish this variable in the help.
22656
22657
22658  if [ -z "${TIME+x}" ]; then
22659    # The variable is not set by user, try to locate tool using the code snippet
22660    for ac_prog in time
22661do
22662  # Extract the first word of "$ac_prog", so it can be a program name with args.
22663set dummy $ac_prog; ac_word=$2
22664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22665$as_echo_n "checking for $ac_word... " >&6; }
22666if ${ac_cv_path_TIME+:} false; then :
22667  $as_echo_n "(cached) " >&6
22668else
22669  case $TIME in
22670  [\\/]* | ?:[\\/]*)
22671  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22672  ;;
22673  *)
22674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22675for as_dir in $PATH
22676do
22677  IFS=$as_save_IFS
22678  test -z "$as_dir" && as_dir=.
22679    for ac_exec_ext in '' $ac_executable_extensions; do
22680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22681    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22683    break 2
22684  fi
22685done
22686  done
22687IFS=$as_save_IFS
22688
22689  ;;
22690esac
22691fi
22692TIME=$ac_cv_path_TIME
22693if test -n "$TIME"; then
22694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22695$as_echo "$TIME" >&6; }
22696else
22697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22698$as_echo "no" >&6; }
22699fi
22700
22701
22702  test -n "$TIME" && break
22703done
22704
22705  else
22706    # The variable is set, but is it from the command line or the environment?
22707
22708    # Try to remove the string !TIME! from our list.
22709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22711      # If it failed, the variable was not from the command line. Ignore it,
22712      # but warn the user (except for BASH, which is always set by the calling BASH).
22713      if test "xTIME" != xBASH; then
22714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22715$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22716      fi
22717      # Try to locate tool using the code snippet
22718      for ac_prog in time
22719do
22720  # Extract the first word of "$ac_prog", so it can be a program name with args.
22721set dummy $ac_prog; ac_word=$2
22722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22723$as_echo_n "checking for $ac_word... " >&6; }
22724if ${ac_cv_path_TIME+:} false; then :
22725  $as_echo_n "(cached) " >&6
22726else
22727  case $TIME in
22728  [\\/]* | ?:[\\/]*)
22729  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22730  ;;
22731  *)
22732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22733for as_dir in $PATH
22734do
22735  IFS=$as_save_IFS
22736  test -z "$as_dir" && as_dir=.
22737    for ac_exec_ext in '' $ac_executable_extensions; do
22738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22739    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22741    break 2
22742  fi
22743done
22744  done
22745IFS=$as_save_IFS
22746
22747  ;;
22748esac
22749fi
22750TIME=$ac_cv_path_TIME
22751if test -n "$TIME"; then
22752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22753$as_echo "$TIME" >&6; }
22754else
22755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22756$as_echo "no" >&6; }
22757fi
22758
22759
22760  test -n "$TIME" && break
22761done
22762
22763    else
22764      # If it succeeded, then it was overridden by the user. We will use it
22765      # for the tool.
22766
22767      # First remove it from the list of overridden variables, so we can test
22768      # for unknown variables in the end.
22769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22770
22771      # Check if we try to supply an empty value
22772      if test "x$TIME" = x; then
22773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22774$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22776$as_echo_n "checking for TIME... " >&6; }
22777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22778$as_echo "disabled" >&6; }
22779      else
22780        # Check if the provided tool contains a complete path.
22781        tool_specified="$TIME"
22782        tool_basename="${tool_specified##*/}"
22783        if test "x$tool_basename" = "x$tool_specified"; then
22784          # A command without a complete path is provided, search $PATH.
22785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22786$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22787          # Extract the first word of "$tool_basename", so it can be a program name with args.
22788set dummy $tool_basename; ac_word=$2
22789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22790$as_echo_n "checking for $ac_word... " >&6; }
22791if ${ac_cv_path_TIME+:} false; then :
22792  $as_echo_n "(cached) " >&6
22793else
22794  case $TIME in
22795  [\\/]* | ?:[\\/]*)
22796  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22797  ;;
22798  *)
22799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22800for as_dir in $PATH
22801do
22802  IFS=$as_save_IFS
22803  test -z "$as_dir" && as_dir=.
22804    for ac_exec_ext in '' $ac_executable_extensions; do
22805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22806    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22808    break 2
22809  fi
22810done
22811  done
22812IFS=$as_save_IFS
22813
22814  ;;
22815esac
22816fi
22817TIME=$ac_cv_path_TIME
22818if test -n "$TIME"; then
22819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22820$as_echo "$TIME" >&6; }
22821else
22822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22823$as_echo "no" >&6; }
22824fi
22825
22826
22827          if test "x$TIME" = x; then
22828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22829          fi
22830        else
22831          # Otherwise we believe it is a complete path. Use it as it is.
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22833$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22835$as_echo_n "checking for TIME... " >&6; }
22836          if test ! -x "$tool_specified"; then
22837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22838$as_echo "not found" >&6; }
22839            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22840          fi
22841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22842$as_echo "$tool_specified" >&6; }
22843        fi
22844      fi
22845    fi
22846
22847  fi
22848
22849
22850  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22851  # be in the user path.
22852
22853
22854  # Publish this variable in the help.
22855
22856
22857  if [ -z "${DTRACE+x}" ]; then
22858    # The variable is not set by user, try to locate tool using the code snippet
22859    for ac_prog in dtrace
22860do
22861  # Extract the first word of "$ac_prog", so it can be a program name with args.
22862set dummy $ac_prog; ac_word=$2
22863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22864$as_echo_n "checking for $ac_word... " >&6; }
22865if ${ac_cv_path_DTRACE+:} false; then :
22866  $as_echo_n "(cached) " >&6
22867else
22868  case $DTRACE in
22869  [\\/]* | ?:[\\/]*)
22870  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22871  ;;
22872  *)
22873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22874as_dummy="$PATH:/usr/sbin"
22875for as_dir in $as_dummy
22876do
22877  IFS=$as_save_IFS
22878  test -z "$as_dir" && as_dir=.
22879    for ac_exec_ext in '' $ac_executable_extensions; do
22880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22881    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22883    break 2
22884  fi
22885done
22886  done
22887IFS=$as_save_IFS
22888
22889  ;;
22890esac
22891fi
22892DTRACE=$ac_cv_path_DTRACE
22893if test -n "$DTRACE"; then
22894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22895$as_echo "$DTRACE" >&6; }
22896else
22897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22898$as_echo "no" >&6; }
22899fi
22900
22901
22902  test -n "$DTRACE" && break
22903done
22904
22905  else
22906    # The variable is set, but is it from the command line or the environment?
22907
22908    # Try to remove the string !DTRACE! from our list.
22909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22911      # If it failed, the variable was not from the command line. Ignore it,
22912      # but warn the user (except for BASH, which is always set by the calling BASH).
22913      if test "xDTRACE" != xBASH; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22915$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22916      fi
22917      # Try to locate tool using the code snippet
22918      for ac_prog in dtrace
22919do
22920  # Extract the first word of "$ac_prog", so it can be a program name with args.
22921set dummy $ac_prog; ac_word=$2
22922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22923$as_echo_n "checking for $ac_word... " >&6; }
22924if ${ac_cv_path_DTRACE+:} false; then :
22925  $as_echo_n "(cached) " >&6
22926else
22927  case $DTRACE in
22928  [\\/]* | ?:[\\/]*)
22929  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22930  ;;
22931  *)
22932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22933as_dummy="$PATH:/usr/sbin"
22934for as_dir in $as_dummy
22935do
22936  IFS=$as_save_IFS
22937  test -z "$as_dir" && as_dir=.
22938    for ac_exec_ext in '' $ac_executable_extensions; do
22939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22940    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22942    break 2
22943  fi
22944done
22945  done
22946IFS=$as_save_IFS
22947
22948  ;;
22949esac
22950fi
22951DTRACE=$ac_cv_path_DTRACE
22952if test -n "$DTRACE"; then
22953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22954$as_echo "$DTRACE" >&6; }
22955else
22956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22957$as_echo "no" >&6; }
22958fi
22959
22960
22961  test -n "$DTRACE" && break
22962done
22963
22964    else
22965      # If it succeeded, then it was overridden by the user. We will use it
22966      # for the tool.
22967
22968      # First remove it from the list of overridden variables, so we can test
22969      # for unknown variables in the end.
22970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22971
22972      # Check if we try to supply an empty value
22973      if test "x$DTRACE" = x; then
22974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22975$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22977$as_echo_n "checking for DTRACE... " >&6; }
22978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22979$as_echo "disabled" >&6; }
22980      else
22981        # Check if the provided tool contains a complete path.
22982        tool_specified="$DTRACE"
22983        tool_basename="${tool_specified##*/}"
22984        if test "x$tool_basename" = "x$tool_specified"; then
22985          # A command without a complete path is provided, search $PATH.
22986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22987$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22988          # Extract the first word of "$tool_basename", so it can be a program name with args.
22989set dummy $tool_basename; ac_word=$2
22990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22991$as_echo_n "checking for $ac_word... " >&6; }
22992if ${ac_cv_path_DTRACE+:} false; then :
22993  $as_echo_n "(cached) " >&6
22994else
22995  case $DTRACE in
22996  [\\/]* | ?:[\\/]*)
22997  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22998  ;;
22999  *)
23000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23001for as_dir in $PATH
23002do
23003  IFS=$as_save_IFS
23004  test -z "$as_dir" && as_dir=.
23005    for ac_exec_ext in '' $ac_executable_extensions; do
23006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23007    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23009    break 2
23010  fi
23011done
23012  done
23013IFS=$as_save_IFS
23014
23015  ;;
23016esac
23017fi
23018DTRACE=$ac_cv_path_DTRACE
23019if test -n "$DTRACE"; then
23020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23021$as_echo "$DTRACE" >&6; }
23022else
23023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23024$as_echo "no" >&6; }
23025fi
23026
23027
23028          if test "x$DTRACE" = x; then
23029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23030          fi
23031        else
23032          # Otherwise we believe it is a complete path. Use it as it is.
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23034$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23036$as_echo_n "checking for DTRACE... " >&6; }
23037          if test ! -x "$tool_specified"; then
23038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23039$as_echo "not found" >&6; }
23040            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23041          fi
23042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23043$as_echo "$tool_specified" >&6; }
23044        fi
23045      fi
23046    fi
23047
23048  fi
23049
23050
23051
23052
23053  # Publish this variable in the help.
23054
23055
23056  if [ -z "${PATCH+x}" ]; then
23057    # The variable is not set by user, try to locate tool using the code snippet
23058    for ac_prog in gpatch patch
23059do
23060  # Extract the first word of "$ac_prog", so it can be a program name with args.
23061set dummy $ac_prog; ac_word=$2
23062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23063$as_echo_n "checking for $ac_word... " >&6; }
23064if ${ac_cv_path_PATCH+:} false; then :
23065  $as_echo_n "(cached) " >&6
23066else
23067  case $PATCH in
23068  [\\/]* | ?:[\\/]*)
23069  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23070  ;;
23071  *)
23072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23073for as_dir in $PATH
23074do
23075  IFS=$as_save_IFS
23076  test -z "$as_dir" && as_dir=.
23077    for ac_exec_ext in '' $ac_executable_extensions; do
23078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23079    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23081    break 2
23082  fi
23083done
23084  done
23085IFS=$as_save_IFS
23086
23087  ;;
23088esac
23089fi
23090PATCH=$ac_cv_path_PATCH
23091if test -n "$PATCH"; then
23092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23093$as_echo "$PATCH" >&6; }
23094else
23095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23096$as_echo "no" >&6; }
23097fi
23098
23099
23100  test -n "$PATCH" && break
23101done
23102
23103  else
23104    # The variable is set, but is it from the command line or the environment?
23105
23106    # Try to remove the string !PATCH! from our list.
23107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23109      # If it failed, the variable was not from the command line. Ignore it,
23110      # but warn the user (except for BASH, which is always set by the calling BASH).
23111      if test "xPATCH" != xBASH; then
23112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23113$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23114      fi
23115      # Try to locate tool using the code snippet
23116      for ac_prog in gpatch patch
23117do
23118  # Extract the first word of "$ac_prog", so it can be a program name with args.
23119set dummy $ac_prog; ac_word=$2
23120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23121$as_echo_n "checking for $ac_word... " >&6; }
23122if ${ac_cv_path_PATCH+:} false; then :
23123  $as_echo_n "(cached) " >&6
23124else
23125  case $PATCH in
23126  [\\/]* | ?:[\\/]*)
23127  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23128  ;;
23129  *)
23130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23131for as_dir in $PATH
23132do
23133  IFS=$as_save_IFS
23134  test -z "$as_dir" && as_dir=.
23135    for ac_exec_ext in '' $ac_executable_extensions; do
23136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23137    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23139    break 2
23140  fi
23141done
23142  done
23143IFS=$as_save_IFS
23144
23145  ;;
23146esac
23147fi
23148PATCH=$ac_cv_path_PATCH
23149if test -n "$PATCH"; then
23150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23151$as_echo "$PATCH" >&6; }
23152else
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23154$as_echo "no" >&6; }
23155fi
23156
23157
23158  test -n "$PATCH" && break
23159done
23160
23161    else
23162      # If it succeeded, then it was overridden by the user. We will use it
23163      # for the tool.
23164
23165      # First remove it from the list of overridden variables, so we can test
23166      # for unknown variables in the end.
23167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23168
23169      # Check if we try to supply an empty value
23170      if test "x$PATCH" = x; then
23171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23172$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23174$as_echo_n "checking for PATCH... " >&6; }
23175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23176$as_echo "disabled" >&6; }
23177      else
23178        # Check if the provided tool contains a complete path.
23179        tool_specified="$PATCH"
23180        tool_basename="${tool_specified##*/}"
23181        if test "x$tool_basename" = "x$tool_specified"; then
23182          # A command without a complete path is provided, search $PATH.
23183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23184$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23185          # Extract the first word of "$tool_basename", so it can be a program name with args.
23186set dummy $tool_basename; ac_word=$2
23187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23188$as_echo_n "checking for $ac_word... " >&6; }
23189if ${ac_cv_path_PATCH+:} false; then :
23190  $as_echo_n "(cached) " >&6
23191else
23192  case $PATCH in
23193  [\\/]* | ?:[\\/]*)
23194  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23195  ;;
23196  *)
23197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23198for as_dir in $PATH
23199do
23200  IFS=$as_save_IFS
23201  test -z "$as_dir" && as_dir=.
23202    for ac_exec_ext in '' $ac_executable_extensions; do
23203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23204    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23206    break 2
23207  fi
23208done
23209  done
23210IFS=$as_save_IFS
23211
23212  ;;
23213esac
23214fi
23215PATCH=$ac_cv_path_PATCH
23216if test -n "$PATCH"; then
23217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23218$as_echo "$PATCH" >&6; }
23219else
23220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23221$as_echo "no" >&6; }
23222fi
23223
23224
23225          if test "x$PATCH" = x; then
23226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23227          fi
23228        else
23229          # Otherwise we believe it is a complete path. Use it as it is.
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23231$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23233$as_echo_n "checking for PATCH... " >&6; }
23234          if test ! -x "$tool_specified"; then
23235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23236$as_echo "not found" >&6; }
23237            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23238          fi
23239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23240$as_echo "$tool_specified" >&6; }
23241        fi
23242      fi
23243    fi
23244
23245  fi
23246
23247
23248  # Check if it's GNU time
23249  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23250  if test "x$IS_GNU_TIME" != x; then
23251    IS_GNU_TIME=yes
23252  else
23253    IS_GNU_TIME=no
23254  fi
23255
23256
23257  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23258
23259
23260
23261  # Publish this variable in the help.
23262
23263
23264  if [ -z "${DSYMUTIL+x}" ]; then
23265    # The variable is not set by user, try to locate tool using the code snippet
23266    for ac_prog in dsymutil
23267do
23268  # Extract the first word of "$ac_prog", so it can be a program name with args.
23269set dummy $ac_prog; ac_word=$2
23270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23271$as_echo_n "checking for $ac_word... " >&6; }
23272if ${ac_cv_path_DSYMUTIL+:} false; then :
23273  $as_echo_n "(cached) " >&6
23274else
23275  case $DSYMUTIL in
23276  [\\/]* | ?:[\\/]*)
23277  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23278  ;;
23279  *)
23280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23281for as_dir in $PATH
23282do
23283  IFS=$as_save_IFS
23284  test -z "$as_dir" && as_dir=.
23285    for ac_exec_ext in '' $ac_executable_extensions; do
23286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23287    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23289    break 2
23290  fi
23291done
23292  done
23293IFS=$as_save_IFS
23294
23295  ;;
23296esac
23297fi
23298DSYMUTIL=$ac_cv_path_DSYMUTIL
23299if test -n "$DSYMUTIL"; then
23300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23301$as_echo "$DSYMUTIL" >&6; }
23302else
23303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23304$as_echo "no" >&6; }
23305fi
23306
23307
23308  test -n "$DSYMUTIL" && break
23309done
23310
23311  else
23312    # The variable is set, but is it from the command line or the environment?
23313
23314    # Try to remove the string !DSYMUTIL! from our list.
23315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23317      # If it failed, the variable was not from the command line. Ignore it,
23318      # but warn the user (except for BASH, which is always set by the calling BASH).
23319      if test "xDSYMUTIL" != xBASH; then
23320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23321$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23322      fi
23323      # Try to locate tool using the code snippet
23324      for ac_prog in dsymutil
23325do
23326  # Extract the first word of "$ac_prog", so it can be a program name with args.
23327set dummy $ac_prog; ac_word=$2
23328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23329$as_echo_n "checking for $ac_word... " >&6; }
23330if ${ac_cv_path_DSYMUTIL+:} false; then :
23331  $as_echo_n "(cached) " >&6
23332else
23333  case $DSYMUTIL in
23334  [\\/]* | ?:[\\/]*)
23335  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23336  ;;
23337  *)
23338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23339for as_dir in $PATH
23340do
23341  IFS=$as_save_IFS
23342  test -z "$as_dir" && as_dir=.
23343    for ac_exec_ext in '' $ac_executable_extensions; do
23344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23345    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23347    break 2
23348  fi
23349done
23350  done
23351IFS=$as_save_IFS
23352
23353  ;;
23354esac
23355fi
23356DSYMUTIL=$ac_cv_path_DSYMUTIL
23357if test -n "$DSYMUTIL"; then
23358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23359$as_echo "$DSYMUTIL" >&6; }
23360else
23361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23362$as_echo "no" >&6; }
23363fi
23364
23365
23366  test -n "$DSYMUTIL" && break
23367done
23368
23369    else
23370      # If it succeeded, then it was overridden by the user. We will use it
23371      # for the tool.
23372
23373      # First remove it from the list of overridden variables, so we can test
23374      # for unknown variables in the end.
23375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23376
23377      # Check if we try to supply an empty value
23378      if test "x$DSYMUTIL" = x; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23380$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23382$as_echo_n "checking for DSYMUTIL... " >&6; }
23383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23384$as_echo "disabled" >&6; }
23385      else
23386        # Check if the provided tool contains a complete path.
23387        tool_specified="$DSYMUTIL"
23388        tool_basename="${tool_specified##*/}"
23389        if test "x$tool_basename" = "x$tool_specified"; then
23390          # A command without a complete path is provided, search $PATH.
23391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23392$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23393          # Extract the first word of "$tool_basename", so it can be a program name with args.
23394set dummy $tool_basename; ac_word=$2
23395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23396$as_echo_n "checking for $ac_word... " >&6; }
23397if ${ac_cv_path_DSYMUTIL+:} false; then :
23398  $as_echo_n "(cached) " >&6
23399else
23400  case $DSYMUTIL in
23401  [\\/]* | ?:[\\/]*)
23402  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23403  ;;
23404  *)
23405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23406for as_dir in $PATH
23407do
23408  IFS=$as_save_IFS
23409  test -z "$as_dir" && as_dir=.
23410    for ac_exec_ext in '' $ac_executable_extensions; do
23411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23412    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23414    break 2
23415  fi
23416done
23417  done
23418IFS=$as_save_IFS
23419
23420  ;;
23421esac
23422fi
23423DSYMUTIL=$ac_cv_path_DSYMUTIL
23424if test -n "$DSYMUTIL"; then
23425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23426$as_echo "$DSYMUTIL" >&6; }
23427else
23428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23429$as_echo "no" >&6; }
23430fi
23431
23432
23433          if test "x$DSYMUTIL" = x; then
23434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23435          fi
23436        else
23437          # Otherwise we believe it is a complete path. Use it as it is.
23438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23439$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23441$as_echo_n "checking for DSYMUTIL... " >&6; }
23442          if test ! -x "$tool_specified"; then
23443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23444$as_echo "not found" >&6; }
23445            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23446          fi
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23448$as_echo "$tool_specified" >&6; }
23449        fi
23450      fi
23451    fi
23452
23453  fi
23454
23455
23456
23457  if test "x$DSYMUTIL" = x; then
23458    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23459  fi
23460
23461
23462
23463
23464
23465  # Publish this variable in the help.
23466
23467
23468  if [ -z "${XATTR+x}" ]; then
23469    # The variable is not set by user, try to locate tool using the code snippet
23470    for ac_prog in xattr
23471do
23472  # Extract the first word of "$ac_prog", so it can be a program name with args.
23473set dummy $ac_prog; ac_word=$2
23474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23475$as_echo_n "checking for $ac_word... " >&6; }
23476if ${ac_cv_path_XATTR+:} false; then :
23477  $as_echo_n "(cached) " >&6
23478else
23479  case $XATTR in
23480  [\\/]* | ?:[\\/]*)
23481  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23482  ;;
23483  *)
23484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23485for as_dir in $PATH
23486do
23487  IFS=$as_save_IFS
23488  test -z "$as_dir" && as_dir=.
23489    for ac_exec_ext in '' $ac_executable_extensions; do
23490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23491    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23493    break 2
23494  fi
23495done
23496  done
23497IFS=$as_save_IFS
23498
23499  ;;
23500esac
23501fi
23502XATTR=$ac_cv_path_XATTR
23503if test -n "$XATTR"; then
23504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23505$as_echo "$XATTR" >&6; }
23506else
23507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23508$as_echo "no" >&6; }
23509fi
23510
23511
23512  test -n "$XATTR" && break
23513done
23514
23515  else
23516    # The variable is set, but is it from the command line or the environment?
23517
23518    # Try to remove the string !XATTR! from our list.
23519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23521      # If it failed, the variable was not from the command line. Ignore it,
23522      # but warn the user (except for BASH, which is always set by the calling BASH).
23523      if test "xXATTR" != xBASH; then
23524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23525$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23526      fi
23527      # Try to locate tool using the code snippet
23528      for ac_prog in xattr
23529do
23530  # Extract the first word of "$ac_prog", so it can be a program name with args.
23531set dummy $ac_prog; ac_word=$2
23532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23533$as_echo_n "checking for $ac_word... " >&6; }
23534if ${ac_cv_path_XATTR+:} false; then :
23535  $as_echo_n "(cached) " >&6
23536else
23537  case $XATTR in
23538  [\\/]* | ?:[\\/]*)
23539  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23540  ;;
23541  *)
23542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23543for as_dir in $PATH
23544do
23545  IFS=$as_save_IFS
23546  test -z "$as_dir" && as_dir=.
23547    for ac_exec_ext in '' $ac_executable_extensions; do
23548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23549    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23551    break 2
23552  fi
23553done
23554  done
23555IFS=$as_save_IFS
23556
23557  ;;
23558esac
23559fi
23560XATTR=$ac_cv_path_XATTR
23561if test -n "$XATTR"; then
23562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23563$as_echo "$XATTR" >&6; }
23564else
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23566$as_echo "no" >&6; }
23567fi
23568
23569
23570  test -n "$XATTR" && break
23571done
23572
23573    else
23574      # If it succeeded, then it was overridden by the user. We will use it
23575      # for the tool.
23576
23577      # First remove it from the list of overridden variables, so we can test
23578      # for unknown variables in the end.
23579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23580
23581      # Check if we try to supply an empty value
23582      if test "x$XATTR" = x; then
23583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23584$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23586$as_echo_n "checking for XATTR... " >&6; }
23587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23588$as_echo "disabled" >&6; }
23589      else
23590        # Check if the provided tool contains a complete path.
23591        tool_specified="$XATTR"
23592        tool_basename="${tool_specified##*/}"
23593        if test "x$tool_basename" = "x$tool_specified"; then
23594          # A command without a complete path is provided, search $PATH.
23595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23596$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23597          # Extract the first word of "$tool_basename", so it can be a program name with args.
23598set dummy $tool_basename; ac_word=$2
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600$as_echo_n "checking for $ac_word... " >&6; }
23601if ${ac_cv_path_XATTR+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  case $XATTR in
23605  [\\/]* | ?:[\\/]*)
23606  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23607  ;;
23608  *)
23609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610for as_dir in $PATH
23611do
23612  IFS=$as_save_IFS
23613  test -z "$as_dir" && as_dir=.
23614    for ac_exec_ext in '' $ac_executable_extensions; do
23615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618    break 2
23619  fi
23620done
23621  done
23622IFS=$as_save_IFS
23623
23624  ;;
23625esac
23626fi
23627XATTR=$ac_cv_path_XATTR
23628if test -n "$XATTR"; then
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23630$as_echo "$XATTR" >&6; }
23631else
23632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633$as_echo "no" >&6; }
23634fi
23635
23636
23637          if test "x$XATTR" = x; then
23638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23639          fi
23640        else
23641          # Otherwise we believe it is a complete path. Use it as it is.
23642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23643$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23645$as_echo_n "checking for XATTR... " >&6; }
23646          if test ! -x "$tool_specified"; then
23647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23648$as_echo "not found" >&6; }
23649            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23650          fi
23651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23652$as_echo "$tool_specified" >&6; }
23653        fi
23654      fi
23655    fi
23656
23657  fi
23658
23659
23660
23661  if test "x$XATTR" = x; then
23662    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23663  fi
23664
23665
23666
23667
23668  # Publish this variable in the help.
23669
23670
23671  if [ -z "${CODESIGN+x}" ]; then
23672    # The variable is not set by user, try to locate tool using the code snippet
23673    for ac_prog in codesign
23674do
23675  # Extract the first word of "$ac_prog", so it can be a program name with args.
23676set dummy $ac_prog; ac_word=$2
23677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23678$as_echo_n "checking for $ac_word... " >&6; }
23679if ${ac_cv_path_CODESIGN+:} false; then :
23680  $as_echo_n "(cached) " >&6
23681else
23682  case $CODESIGN in
23683  [\\/]* | ?:[\\/]*)
23684  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23685  ;;
23686  *)
23687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23688for as_dir in $PATH
23689do
23690  IFS=$as_save_IFS
23691  test -z "$as_dir" && as_dir=.
23692    for ac_exec_ext in '' $ac_executable_extensions; do
23693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23694    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23696    break 2
23697  fi
23698done
23699  done
23700IFS=$as_save_IFS
23701
23702  ;;
23703esac
23704fi
23705CODESIGN=$ac_cv_path_CODESIGN
23706if test -n "$CODESIGN"; then
23707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23708$as_echo "$CODESIGN" >&6; }
23709else
23710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23711$as_echo "no" >&6; }
23712fi
23713
23714
23715  test -n "$CODESIGN" && break
23716done
23717
23718  else
23719    # The variable is set, but is it from the command line or the environment?
23720
23721    # Try to remove the string !CODESIGN! from our list.
23722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23724      # If it failed, the variable was not from the command line. Ignore it,
23725      # but warn the user (except for BASH, which is always set by the calling BASH).
23726      if test "xCODESIGN" != xBASH; then
23727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23728$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23729      fi
23730      # Try to locate tool using the code snippet
23731      for ac_prog in codesign
23732do
23733  # Extract the first word of "$ac_prog", so it can be a program name with args.
23734set dummy $ac_prog; ac_word=$2
23735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23736$as_echo_n "checking for $ac_word... " >&6; }
23737if ${ac_cv_path_CODESIGN+:} false; then :
23738  $as_echo_n "(cached) " >&6
23739else
23740  case $CODESIGN in
23741  [\\/]* | ?:[\\/]*)
23742  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23743  ;;
23744  *)
23745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23746for as_dir in $PATH
23747do
23748  IFS=$as_save_IFS
23749  test -z "$as_dir" && as_dir=.
23750    for ac_exec_ext in '' $ac_executable_extensions; do
23751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23752    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23754    break 2
23755  fi
23756done
23757  done
23758IFS=$as_save_IFS
23759
23760  ;;
23761esac
23762fi
23763CODESIGN=$ac_cv_path_CODESIGN
23764if test -n "$CODESIGN"; then
23765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23766$as_echo "$CODESIGN" >&6; }
23767else
23768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23769$as_echo "no" >&6; }
23770fi
23771
23772
23773  test -n "$CODESIGN" && break
23774done
23775
23776    else
23777      # If it succeeded, then it was overridden by the user. We will use it
23778      # for the tool.
23779
23780      # First remove it from the list of overridden variables, so we can test
23781      # for unknown variables in the end.
23782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23783
23784      # Check if we try to supply an empty value
23785      if test "x$CODESIGN" = x; then
23786        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23787$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23789$as_echo_n "checking for CODESIGN... " >&6; }
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23791$as_echo "disabled" >&6; }
23792      else
23793        # Check if the provided tool contains a complete path.
23794        tool_specified="$CODESIGN"
23795        tool_basename="${tool_specified##*/}"
23796        if test "x$tool_basename" = "x$tool_specified"; then
23797          # A command without a complete path is provided, search $PATH.
23798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23799$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23800          # Extract the first word of "$tool_basename", so it can be a program name with args.
23801set dummy $tool_basename; ac_word=$2
23802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23803$as_echo_n "checking for $ac_word... " >&6; }
23804if ${ac_cv_path_CODESIGN+:} false; then :
23805  $as_echo_n "(cached) " >&6
23806else
23807  case $CODESIGN in
23808  [\\/]* | ?:[\\/]*)
23809  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23810  ;;
23811  *)
23812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23813for as_dir in $PATH
23814do
23815  IFS=$as_save_IFS
23816  test -z "$as_dir" && as_dir=.
23817    for ac_exec_ext in '' $ac_executable_extensions; do
23818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23819    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23821    break 2
23822  fi
23823done
23824  done
23825IFS=$as_save_IFS
23826
23827  ;;
23828esac
23829fi
23830CODESIGN=$ac_cv_path_CODESIGN
23831if test -n "$CODESIGN"; then
23832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23833$as_echo "$CODESIGN" >&6; }
23834else
23835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23836$as_echo "no" >&6; }
23837fi
23838
23839
23840          if test "x$CODESIGN" = x; then
23841            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23842          fi
23843        else
23844          # Otherwise we believe it is a complete path. Use it as it is.
23845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23846$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23847          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23848$as_echo_n "checking for CODESIGN... " >&6; }
23849          if test ! -x "$tool_specified"; then
23850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23851$as_echo "not found" >&6; }
23852            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23853          fi
23854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23855$as_echo "$tool_specified" >&6; }
23856        fi
23857      fi
23858    fi
23859
23860  fi
23861
23862
23863    if test "x$CODESIGN" != "x"; then
23864      # Verify that the openjdk_codesign certificate is present
23865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23866$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23867      $RM codesign-testfile
23868      $TOUCH codesign-testfile
23869      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23870      $RM codesign-testfile
23871      if test "x$CODESIGN" = x; then
23872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23873$as_echo "no" >&6; }
23874      else
23875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23876$as_echo "yes" >&6; }
23877      fi
23878    fi
23879
23880
23881
23882  # Publish this variable in the help.
23883
23884
23885  if [ -z "${SETFILE+x}" ]; then
23886    # The variable is not set by user, try to locate tool using the code snippet
23887    for ac_prog in SetFile
23888do
23889  # Extract the first word of "$ac_prog", so it can be a program name with args.
23890set dummy $ac_prog; ac_word=$2
23891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23892$as_echo_n "checking for $ac_word... " >&6; }
23893if ${ac_cv_path_SETFILE+:} false; then :
23894  $as_echo_n "(cached) " >&6
23895else
23896  case $SETFILE in
23897  [\\/]* | ?:[\\/]*)
23898  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23899  ;;
23900  *)
23901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23902for as_dir in $PATH
23903do
23904  IFS=$as_save_IFS
23905  test -z "$as_dir" && as_dir=.
23906    for ac_exec_ext in '' $ac_executable_extensions; do
23907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23908    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23910    break 2
23911  fi
23912done
23913  done
23914IFS=$as_save_IFS
23915
23916  ;;
23917esac
23918fi
23919SETFILE=$ac_cv_path_SETFILE
23920if test -n "$SETFILE"; then
23921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23922$as_echo "$SETFILE" >&6; }
23923else
23924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23925$as_echo "no" >&6; }
23926fi
23927
23928
23929  test -n "$SETFILE" && break
23930done
23931
23932  else
23933    # The variable is set, but is it from the command line or the environment?
23934
23935    # Try to remove the string !SETFILE! from our list.
23936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23938      # If it failed, the variable was not from the command line. Ignore it,
23939      # but warn the user (except for BASH, which is always set by the calling BASH).
23940      if test "xSETFILE" != xBASH; then
23941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23942$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23943      fi
23944      # Try to locate tool using the code snippet
23945      for ac_prog in SetFile
23946do
23947  # Extract the first word of "$ac_prog", so it can be a program name with args.
23948set dummy $ac_prog; ac_word=$2
23949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23950$as_echo_n "checking for $ac_word... " >&6; }
23951if ${ac_cv_path_SETFILE+:} false; then :
23952  $as_echo_n "(cached) " >&6
23953else
23954  case $SETFILE in
23955  [\\/]* | ?:[\\/]*)
23956  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23957  ;;
23958  *)
23959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23960for as_dir in $PATH
23961do
23962  IFS=$as_save_IFS
23963  test -z "$as_dir" && as_dir=.
23964    for ac_exec_ext in '' $ac_executable_extensions; do
23965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23966    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23968    break 2
23969  fi
23970done
23971  done
23972IFS=$as_save_IFS
23973
23974  ;;
23975esac
23976fi
23977SETFILE=$ac_cv_path_SETFILE
23978if test -n "$SETFILE"; then
23979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23980$as_echo "$SETFILE" >&6; }
23981else
23982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23983$as_echo "no" >&6; }
23984fi
23985
23986
23987  test -n "$SETFILE" && break
23988done
23989
23990    else
23991      # If it succeeded, then it was overridden by the user. We will use it
23992      # for the tool.
23993
23994      # First remove it from the list of overridden variables, so we can test
23995      # for unknown variables in the end.
23996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23997
23998      # Check if we try to supply an empty value
23999      if test "x$SETFILE" = x; then
24000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24001$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24003$as_echo_n "checking for SETFILE... " >&6; }
24004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24005$as_echo "disabled" >&6; }
24006      else
24007        # Check if the provided tool contains a complete path.
24008        tool_specified="$SETFILE"
24009        tool_basename="${tool_specified##*/}"
24010        if test "x$tool_basename" = "x$tool_specified"; then
24011          # A command without a complete path is provided, search $PATH.
24012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24013$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24014          # Extract the first word of "$tool_basename", so it can be a program name with args.
24015set dummy $tool_basename; ac_word=$2
24016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24017$as_echo_n "checking for $ac_word... " >&6; }
24018if ${ac_cv_path_SETFILE+:} false; then :
24019  $as_echo_n "(cached) " >&6
24020else
24021  case $SETFILE in
24022  [\\/]* | ?:[\\/]*)
24023  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24024  ;;
24025  *)
24026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24027for as_dir in $PATH
24028do
24029  IFS=$as_save_IFS
24030  test -z "$as_dir" && as_dir=.
24031    for ac_exec_ext in '' $ac_executable_extensions; do
24032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24033    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24035    break 2
24036  fi
24037done
24038  done
24039IFS=$as_save_IFS
24040
24041  ;;
24042esac
24043fi
24044SETFILE=$ac_cv_path_SETFILE
24045if test -n "$SETFILE"; then
24046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24047$as_echo "$SETFILE" >&6; }
24048else
24049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24050$as_echo "no" >&6; }
24051fi
24052
24053
24054          if test "x$SETFILE" = x; then
24055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24056          fi
24057        else
24058          # Otherwise we believe it is a complete path. Use it as it is.
24059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24060$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24062$as_echo_n "checking for SETFILE... " >&6; }
24063          if test ! -x "$tool_specified"; then
24064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24065$as_echo "not found" >&6; }
24066            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24067          fi
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24069$as_echo "$tool_specified" >&6; }
24070        fi
24071      fi
24072    fi
24073
24074  fi
24075
24076
24077
24078  if test "x$SETFILE" = x; then
24079    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24080  fi
24081
24082
24083  fi
24084
24085
24086  # Test if bash supports pipefail.
24087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24088$as_echo_n "checking if bash supports pipefail... " >&6; }
24089  if ${BASH} -c 'set -o pipefail'; then
24090    BASH_ARGS="$BASH_ARGS -o pipefail"
24091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24092$as_echo "yes" >&6; }
24093  else
24094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24095$as_echo "no" >&6; }
24096  fi
24097
24098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24099$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24100  if ${BASH} -e -c 'true'; then
24101    BASH_ARGS="$BASH_ARGS -e"
24102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24103$as_echo "yes" >&6; }
24104  else
24105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24106$as_echo "no" >&6; }
24107  fi
24108
24109
24110
24111
24112# Check if pkg-config is available.
24113
24114
24115if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24116	if test -n "$ac_tool_prefix"; then
24117  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24118set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24120$as_echo_n "checking for $ac_word... " >&6; }
24121if ${ac_cv_path_PKG_CONFIG+:} false; then :
24122  $as_echo_n "(cached) " >&6
24123else
24124  case $PKG_CONFIG in
24125  [\\/]* | ?:[\\/]*)
24126  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24127  ;;
24128  *)
24129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24130for as_dir in $PATH
24131do
24132  IFS=$as_save_IFS
24133  test -z "$as_dir" && as_dir=.
24134    for ac_exec_ext in '' $ac_executable_extensions; do
24135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24136    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24138    break 2
24139  fi
24140done
24141  done
24142IFS=$as_save_IFS
24143
24144  ;;
24145esac
24146fi
24147PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24148if test -n "$PKG_CONFIG"; then
24149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24150$as_echo "$PKG_CONFIG" >&6; }
24151else
24152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24153$as_echo "no" >&6; }
24154fi
24155
24156
24157fi
24158if test -z "$ac_cv_path_PKG_CONFIG"; then
24159  ac_pt_PKG_CONFIG=$PKG_CONFIG
24160  # Extract the first word of "pkg-config", so it can be a program name with args.
24161set dummy pkg-config; ac_word=$2
24162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24163$as_echo_n "checking for $ac_word... " >&6; }
24164if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24165  $as_echo_n "(cached) " >&6
24166else
24167  case $ac_pt_PKG_CONFIG in
24168  [\\/]* | ?:[\\/]*)
24169  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24170  ;;
24171  *)
24172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24173for as_dir in $PATH
24174do
24175  IFS=$as_save_IFS
24176  test -z "$as_dir" && as_dir=.
24177    for ac_exec_ext in '' $ac_executable_extensions; do
24178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24179    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24181    break 2
24182  fi
24183done
24184  done
24185IFS=$as_save_IFS
24186
24187  ;;
24188esac
24189fi
24190ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24191if test -n "$ac_pt_PKG_CONFIG"; then
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24193$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24194else
24195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24196$as_echo "no" >&6; }
24197fi
24198
24199  if test "x$ac_pt_PKG_CONFIG" = x; then
24200    PKG_CONFIG=""
24201  else
24202    case $cross_compiling:$ac_tool_warned in
24203yes:)
24204{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24205$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24206ac_tool_warned=yes ;;
24207esac
24208    PKG_CONFIG=$ac_pt_PKG_CONFIG
24209  fi
24210else
24211  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24212fi
24213
24214fi
24215if test -n "$PKG_CONFIG"; then
24216	_pkg_min_version=0.9.0
24217	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24218$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24219	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24220		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24221$as_echo "yes" >&6; }
24222	else
24223		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24224$as_echo "no" >&6; }
24225		PKG_CONFIG=""
24226	fi
24227
24228fi
24229
24230# After basic tools have been setup, we can check build os specific details.
24231
24232  ###############################################################################
24233
24234  # Note that this is the build platform OS version!
24235
24236  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24237  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24238  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24239  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24240
24241
24242
24243
24244
24245# Misc basic settings
24246
24247
24248# Check whether --with-default-make-target was given.
24249if test "${with_default_make_target+set}" = set; then :
24250  withval=$with_default_make_target;
24251fi
24252
24253  if test "x$with_default_make_target" = "x" \
24254      || test "x$with_default_make_target" = "xyes"; then
24255    DEFAULT_MAKE_TARGET="exploded-image"
24256  elif test "x$with_default_make_target" = "xno"; then
24257    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24258  else
24259    DEFAULT_MAKE_TARGET="$with_default_make_target"
24260  fi
24261
24262
24263
24264
24265###############################################################################
24266#
24267# Determine OpenJDK variants, options and version numbers.
24268#
24269###############################################################################
24270
24271# We need build & target for this.
24272
24273  # Should we build a JDK without a graphical UI?
24274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24275$as_echo_n "checking headless only... " >&6; }
24276  # Check whether --enable-headless-only was given.
24277if test "${enable_headless_only+set}" = set; then :
24278  enableval=$enable_headless_only;
24279fi
24280
24281
24282  if test "x$enable_headless_only" = "xyes"; then
24283    ENABLE_HEADLESS_ONLY="true"
24284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24285$as_echo "yes" >&6; }
24286  elif test "x$enable_headless_only" = "xno"; then
24287    ENABLE_HEADLESS_ONLY="false"
24288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24289$as_echo "no" >&6; }
24290  elif test "x$enable_headless_only" = "x"; then
24291    ENABLE_HEADLESS_ONLY="false"
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24293$as_echo "no" >&6; }
24294  else
24295    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24296  fi
24297
24298
24299
24300  # Choose cacerts source file
24301
24302# Check whether --with-cacerts-file was given.
24303if test "${with_cacerts_file+set}" = set; then :
24304  withval=$with_cacerts_file;
24305fi
24306
24307  if test "x$with_cacerts_file" != x; then
24308    CACERTS_FILE=$with_cacerts_file
24309  fi
24310
24311
24312  # Enable or disable unlimited crypto
24313  # Check whether --enable-unlimited-crypto was given.
24314if test "${enable_unlimited_crypto+set}" = set; then :
24315  enableval=$enable_unlimited_crypto;
24316else
24317  enable_unlimited_crypto=yes
24318fi
24319
24320  if test "x$enable_unlimited_crypto" = "xyes"; then
24321    UNLIMITED_CRYPTO=true
24322  else
24323    UNLIMITED_CRYPTO=false
24324  fi
24325
24326
24327  # Should we build the serviceability agent (SA)?
24328  INCLUDE_SA=true
24329  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24330    INCLUDE_SA=false
24331  fi
24332  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24333    INCLUDE_SA=false
24334  fi
24335
24336
24337  # Compress jars
24338  COMPRESS_JARS=false
24339
24340
24341
24342  # Setup default copyright year. Mostly overridden when building close to a new year.
24343
24344# Check whether --with-copyright-year was given.
24345if test "${with_copyright_year+set}" = set; then :
24346  withval=$with_copyright_year;
24347fi
24348
24349  if test "x$with_copyright_year" = xyes; then
24350    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24351  elif test "x$with_copyright_year" != x; then
24352    COPYRIGHT_YEAR="$with_copyright_year"
24353  else
24354    COPYRIGHT_YEAR=`$DATE +'%Y'`
24355  fi
24356
24357
24358
24359  # Check whether --enable-keep-packaged-modules was given.
24360if test "${enable_keep_packaged_modules+set}" = set; then :
24361  enableval=$enable_keep_packaged_modules;
24362fi
24363
24364
24365  if test "x$enable_keep_packaged_modules" = "xyes"; then
24366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24367$as_echo_n "checking if packaged modules are kept... " >&6; }
24368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24369$as_echo "yes" >&6; }
24370    JLINK_KEEP_PACKAGED_MODULES=true
24371  elif test "x$enable_keep_packaged_modules" = "xno"; then
24372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24373$as_echo_n "checking if packaged modules are kept... " >&6; }
24374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24375$as_echo "no" >&6; }
24376    JLINK_KEEP_PACKAGED_MODULES=false
24377  elif test "x$enable_keep_packaged_modules" = "x"; then
24378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24379$as_echo "yes (default)" >&6; }
24380    JLINK_KEEP_PACKAGED_MODULES=true
24381  else
24382    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24383  fi
24384
24385
24386
24387
24388  # Warn user that old version arguments are deprecated.
24389
24390
24391# Check whether --with-milestone was given.
24392if test "${with_milestone+set}" = set; then :
24393  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24394$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24395fi
24396
24397
24398
24399
24400# Check whether --with-update-version was given.
24401if test "${with_update_version+set}" = set; then :
24402  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24403$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24404fi
24405
24406
24407
24408
24409# Check whether --with-user-release-suffix was given.
24410if test "${with_user_release_suffix+set}" = set; then :
24411  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
24412$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24413fi
24414
24415
24416
24417
24418# Check whether --with-build-number was given.
24419if test "${with_build_number+set}" = set; then :
24420  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24421$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24422fi
24423
24424
24425
24426  # Source the version numbers file
24427  . $AUTOCONF_DIR/version-numbers
24428
24429  # Some non-version number information is set in that file
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439  # Override version from arguments
24440
24441  # If --with-version-string is set, process it first. It is possible to
24442  # override parts with more specific flags, since these are processed later.
24443
24444# Check whether --with-version-string was given.
24445if test "${with_version_string+set}" = set; then :
24446  withval=$with_version_string;
24447fi
24448
24449  if test "x$with_version_string" = xyes; then
24450    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24451  elif test "x$with_version_string" != x; then
24452    # Additional [] needed to keep m4 from mangling shell constructs.
24453    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24454      VERSION_MAJOR=${BASH_REMATCH[1]}
24455      VERSION_MINOR=${BASH_REMATCH[3]}
24456      VERSION_SECURITY=${BASH_REMATCH[5]}
24457      VERSION_PATCH=${BASH_REMATCH[7]}
24458      VERSION_PRE=${BASH_REMATCH[9]}
24459      version_plus_separator=${BASH_REMATCH[11]}
24460      VERSION_BUILD=${BASH_REMATCH[12]}
24461      VERSION_OPT=${BASH_REMATCH[14]}
24462      # Unspecified numerical fields are interpreted as 0.
24463      if test "x$VERSION_MINOR" = x; then
24464        VERSION_MINOR=0
24465      fi
24466      if test "x$VERSION_SECURITY" = x; then
24467        VERSION_SECURITY=0
24468      fi
24469      if test "x$VERSION_PATCH" = x; then
24470        VERSION_PATCH=0
24471      fi
24472      if test "x$version_plus_separator" != x \
24473          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24474        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24475      fi
24476      # Stop the version part process from setting default values.
24477      # We still allow them to explicitly override though.
24478      NO_DEFAULT_VERSION_PARTS=true
24479    else
24480      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24481    fi
24482  fi
24483
24484
24485# Check whether --with-version-pre was given.
24486if test "${with_version_pre+set}" = set; then :
24487  withval=$with_version_pre; with_version_pre_present=true
24488else
24489  with_version_pre_present=false
24490fi
24491
24492
24493  if test "x$with_version_pre_present" = xtrue; then
24494    if test "x$with_version_pre" = xyes; then
24495      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24496    elif test "x$with_version_pre" = xno; then
24497      # Interpret --without-* as empty string instead of the literal "no"
24498      VERSION_PRE=
24499    else
24500      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24501       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24502      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24504$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24505      fi
24506    fi
24507  else
24508    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24509      # Default is to use "internal" as pre
24510      VERSION_PRE="internal"
24511    fi
24512  fi
24513
24514
24515# Check whether --with-version-opt was given.
24516if test "${with_version_opt+set}" = set; then :
24517  withval=$with_version_opt; with_version_opt_present=true
24518else
24519  with_version_opt_present=false
24520fi
24521
24522
24523  if test "x$with_version_opt_present" = xtrue; then
24524    if test "x$with_version_opt" = xyes; then
24525      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24526    elif test "x$with_version_opt" = xno; then
24527      # Interpret --without-* as empty string instead of the literal "no"
24528      VERSION_OPT=
24529    else
24530      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24531       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24532      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24534$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24535      fi
24536    fi
24537  else
24538    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24539      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24540      # Outer [ ] to quote m4.
24541       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24542      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24543    fi
24544  fi
24545
24546
24547# Check whether --with-version-build was given.
24548if test "${with_version_build+set}" = set; then :
24549  withval=$with_version_build; with_version_build_present=true
24550else
24551  with_version_build_present=false
24552fi
24553
24554
24555  if test "x$with_version_build_present" = xtrue; then
24556    if test "x$with_version_build" = xyes; then
24557      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24558    elif test "x$with_version_build" = xno; then
24559      # Interpret --without-* as empty string instead of the literal "no"
24560      VERSION_BUILD=
24561    elif test "x$with_version_build" = x; then
24562      VERSION_BUILD=
24563    else
24564
24565  # Additional [] needed to keep m4 from mangling shell constructs.
24566  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24567    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24568  fi
24569  # Extract the version number without leading zeros.
24570  cleaned_value=${BASH_REMATCH[1]}
24571  if test "x$cleaned_value" = x; then
24572    # Special case for zero
24573    cleaned_value=${BASH_REMATCH[2]}
24574  fi
24575
24576  if test $cleaned_value -gt 255; then
24577    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24578  fi
24579  if test "x$cleaned_value" != "x$with_version_build"; then
24580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24581$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24582  fi
24583  VERSION_BUILD=$cleaned_value
24584
24585    fi
24586  else
24587    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24588      # Default is to not have a build number.
24589      VERSION_BUILD=""
24590      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24591      VERSION_BUILD=0
24592    fi
24593  fi
24594
24595
24596# Check whether --with-version-major was given.
24597if test "${with_version_major+set}" = set; then :
24598  withval=$with_version_major; with_version_major_present=true
24599else
24600  with_version_major_present=false
24601fi
24602
24603
24604  if test "x$with_version_major_present" = xtrue; then
24605    if test "x$with_version_major" = xyes; then
24606      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24607    else
24608
24609  # Additional [] needed to keep m4 from mangling shell constructs.
24610  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24611    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24612  fi
24613  # Extract the version number without leading zeros.
24614  cleaned_value=${BASH_REMATCH[1]}
24615  if test "x$cleaned_value" = x; then
24616    # Special case for zero
24617    cleaned_value=${BASH_REMATCH[2]}
24618  fi
24619
24620  if test $cleaned_value -gt 255; then
24621    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24622  fi
24623  if test "x$cleaned_value" != "x$with_version_major"; then
24624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24625$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24626  fi
24627  VERSION_MAJOR=$cleaned_value
24628
24629    fi
24630  else
24631    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24632      # Default is to get value from version-numbers
24633      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24634    fi
24635  fi
24636
24637
24638# Check whether --with-version-minor was given.
24639if test "${with_version_minor+set}" = set; then :
24640  withval=$with_version_minor; with_version_minor_present=true
24641else
24642  with_version_minor_present=false
24643fi
24644
24645
24646  if test "x$with_version_minor_present" = xtrue; then
24647    if test "x$with_version_minor" = xyes; then
24648      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24649    elif test "x$with_version_minor" = xno; then
24650      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24651      VERSION_MINOR=0
24652    elif test "x$with_version_minor" = x; then
24653      VERSION_MINOR=0
24654    else
24655
24656  # Additional [] needed to keep m4 from mangling shell constructs.
24657  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24658    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24659  fi
24660  # Extract the version number without leading zeros.
24661  cleaned_value=${BASH_REMATCH[1]}
24662  if test "x$cleaned_value" = x; then
24663    # Special case for zero
24664    cleaned_value=${BASH_REMATCH[2]}
24665  fi
24666
24667  if test $cleaned_value -gt 255; then
24668    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24669  fi
24670  if test "x$cleaned_value" != "x$with_version_minor"; then
24671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24672$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24673  fi
24674  VERSION_MINOR=$cleaned_value
24675
24676    fi
24677  else
24678    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24679      # Default is 0, if unspecified
24680      VERSION_MINOR=0
24681    fi
24682  fi
24683
24684
24685# Check whether --with-version-security was given.
24686if test "${with_version_security+set}" = set; then :
24687  withval=$with_version_security; with_version_security_present=true
24688else
24689  with_version_security_present=false
24690fi
24691
24692
24693  if test "x$with_version_security_present" = xtrue; then
24694    if test "x$with_version_security" = xyes; then
24695      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24696    elif test "x$with_version_security" = xno; then
24697      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24698      VERSION_SECURITY=0
24699    elif test "x$with_version_security" = x; then
24700      VERSION_SECURITY=0
24701    else
24702
24703  # Additional [] needed to keep m4 from mangling shell constructs.
24704  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24705    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24706  fi
24707  # Extract the version number without leading zeros.
24708  cleaned_value=${BASH_REMATCH[1]}
24709  if test "x$cleaned_value" = x; then
24710    # Special case for zero
24711    cleaned_value=${BASH_REMATCH[2]}
24712  fi
24713
24714  if test $cleaned_value -gt 255; then
24715    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24716  fi
24717  if test "x$cleaned_value" != "x$with_version_security"; then
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24719$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24720  fi
24721  VERSION_SECURITY=$cleaned_value
24722
24723    fi
24724  else
24725    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24726      # Default is 0, if unspecified
24727      VERSION_SECURITY=0
24728    fi
24729  fi
24730
24731
24732# Check whether --with-version-patch was given.
24733if test "${with_version_patch+set}" = set; then :
24734  withval=$with_version_patch; with_version_patch_present=true
24735else
24736  with_version_patch_present=false
24737fi
24738
24739
24740  if test "x$with_version_patch_present" = xtrue; then
24741    if test "x$with_version_patch" = xyes; then
24742      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24743    elif test "x$with_version_patch" = xno; then
24744      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24745      VERSION_PATCH=0
24746    elif test "x$with_version_patch" = x; then
24747      VERSION_PATCH=0
24748    else
24749
24750  # Additional [] needed to keep m4 from mangling shell constructs.
24751  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24752    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24753  fi
24754  # Extract the version number without leading zeros.
24755  cleaned_value=${BASH_REMATCH[1]}
24756  if test "x$cleaned_value" = x; then
24757    # Special case for zero
24758    cleaned_value=${BASH_REMATCH[2]}
24759  fi
24760
24761  if test $cleaned_value -gt 255; then
24762    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24763  fi
24764  if test "x$cleaned_value" != "x$with_version_patch"; then
24765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24766$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24767  fi
24768  VERSION_PATCH=$cleaned_value
24769
24770    fi
24771  else
24772    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24773      # Default is 0, if unspecified
24774      VERSION_PATCH=0
24775    fi
24776  fi
24777
24778  # Calculate derived version properties
24779
24780  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24781  if test "x$VERSION_PRE" = x; then
24782    VERSION_IS_GA=true
24783  else
24784    VERSION_IS_GA=false
24785  fi
24786
24787  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24788  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24789
24790  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24791  # Strip trailing zeroes from stripped_version_number
24792  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24793  VERSION_NUMBER=$stripped_version_number
24794
24795  # The complete version string, with additional build information
24796  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24797    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24798  else
24799    # If either build or opt is set, we need a + separator
24800    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24801  fi
24802
24803  # The short version string, just VERSION_NUMBER and PRE, if present.
24804  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24805
24806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24807$as_echo_n "checking for version string... " >&6; }
24808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24809$as_echo "$VERSION_STRING" >&6; }
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825###############################################################################
24826#
24827# Setup BootJDK, used to bootstrap the build.
24828#
24829###############################################################################
24830
24831
24832  BOOT_JDK_FOUND=no
24833
24834# Check whether --with-boot-jdk was given.
24835if test "${with_boot_jdk+set}" = set; then :
24836  withval=$with_boot_jdk;
24837fi
24838
24839
24840  # We look for the Boot JDK through various means, going from more certain to
24841  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24842  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24843  # must check if this is indeed valid; otherwise we'll continue looking.
24844
24845  # Test: Is bootjdk explicitly set by command line arguments?
24846
24847  if test "x$BOOT_JDK_FOUND" = xno; then
24848    # Now execute the test
24849
24850  if test "x$with_boot_jdk" != x; then
24851    BOOT_JDK=$with_boot_jdk
24852    BOOT_JDK_FOUND=maybe
24853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24854$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24855  fi
24856
24857
24858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24860      # Do we have a bin/java?
24861      if test ! -x "$BOOT_JDK/bin/java"; then
24862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24864        BOOT_JDK_FOUND=no
24865      else
24866        # Do we have a bin/javac?
24867        if test ! -x "$BOOT_JDK/bin/javac"; then
24868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24872          BOOT_JDK_FOUND=no
24873        else
24874          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24875          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24876
24877          # Extra M4 quote needed to protect [] in grep expression.
24878          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24879          if test "x$FOUND_CORRECT_VERSION" = x; then
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24882            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24884            BOOT_JDK_FOUND=no
24885          else
24886            # We're done! :-)
24887            BOOT_JDK_FOUND=yes
24888
24889  # Only process if variable expands to non-empty
24890
24891  if test "x$BOOT_JDK" != x; then
24892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893
24894  # Input might be given as Windows format, start by converting to
24895  # unix format.
24896  path="$BOOT_JDK"
24897  new_path=`$CYGPATH -u "$path"`
24898
24899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24902  # "foo.exe" is OK but "foo" is an error.
24903  #
24904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24905  # It is also a way to make sure we got the proper file name for the real test later on.
24906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24907  if test "x$test_shortpath" = x; then
24908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24911  fi
24912
24913  # Call helper function which possibly converts this using DOS-style short mode.
24914  # If so, the updated path is stored in $new_path.
24915
24916  input_path="$new_path"
24917  # Check if we need to convert this using DOS-style short mode. If the path
24918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24919  # take no chances and rewrite it.
24920  # Note: m4 eats our [], so we need to use [ and ] instead.
24921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24922  if test "x$has_forbidden_chars" != x; then
24923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24927      # Going to short mode and back again did indeed matter. Since short mode is
24928      # case insensitive, let's make it lowercase to improve readability.
24929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24930      # Now convert it back to Unix-style (cygpath)
24931      input_path=`$CYGPATH -u "$shortmode_path"`
24932      new_path="$input_path"
24933    fi
24934  fi
24935
24936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24937  if test "x$test_cygdrive_prefix" = x; then
24938    # As a simple fix, exclude /usr/bin since it's not a real path.
24939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24941      # a path prefixed by /cygdrive for fixpath to work.
24942      new_path="$CYGWIN_ROOT_PATH$input_path"
24943    fi
24944  fi
24945
24946
24947  if test "x$path" != "x$new_path"; then
24948    BOOT_JDK="$new_path"
24949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24951  fi
24952
24953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24954
24955  path="$BOOT_JDK"
24956  has_colon=`$ECHO $path | $GREP ^.:`
24957  new_path="$path"
24958  if test "x$has_colon" = x; then
24959    # Not in mixed or Windows style, start by that.
24960    new_path=`cmd //c echo $path`
24961  fi
24962
24963
24964  input_path="$new_path"
24965  # Check if we need to convert this using DOS-style short mode. If the path
24966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24967  # take no chances and rewrite it.
24968  # Note: m4 eats our [], so we need to use [ and ] instead.
24969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24970  if test "x$has_forbidden_chars" != x; then
24971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24973  fi
24974
24975
24976  windows_path="$new_path"
24977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24978    unix_path=`$CYGPATH -u "$windows_path"`
24979    new_path="$unix_path"
24980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24982    new_path="$unix_path"
24983  fi
24984
24985  if test "x$path" != "x$new_path"; then
24986    BOOT_JDK="$new_path"
24987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24989  fi
24990
24991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24993
24994    else
24995      # We're on a unix platform. Hooray! :)
24996      path="$BOOT_JDK"
24997      has_space=`$ECHO "$path" | $GREP " "`
24998      if test "x$has_space" != x; then
24999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25002      fi
25003
25004      # Use eval to expand a potential ~
25005      eval path="$path"
25006      if test ! -f "$path" && test ! -d "$path"; then
25007        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25008      fi
25009
25010      if test -d "$path"; then
25011        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25012      else
25013        dir="`$DIRNAME "$path"`"
25014        base="`$BASENAME "$path"`"
25015        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25016      fi
25017    fi
25018  fi
25019
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25021$as_echo_n "checking for Boot JDK... " >&6; }
25022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25023$as_echo "$BOOT_JDK" >&6; }
25024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25025$as_echo_n "checking Boot JDK version... " >&6; }
25026            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25028$as_echo "$BOOT_JDK_VERSION" >&6; }
25029          fi # end check jdk version
25030        fi # end check javac
25031      fi # end check java
25032    fi # end check boot jdk found
25033  fi
25034
25035  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25036    # Having specified an argument which is incorrect will produce an instant failure;
25037    # we should not go on looking
25038    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25039  fi
25040
25041  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25042
25043  if test "x$BOOT_JDK_FOUND" = xno; then
25044    # Now execute the test
25045
25046  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25047    # First check at user selected default
25048
25049  if test "x$BOOT_JDK_FOUND" = xno; then
25050    # Now execute the test
25051
25052  if test -x /usr/libexec/java_home; then
25053    BOOT_JDK=`/usr/libexec/java_home `
25054    BOOT_JDK_FOUND=maybe
25055    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25056$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25057  fi
25058
25059
25060    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25061    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25062      # Do we have a bin/java?
25063      if test ! -x "$BOOT_JDK/bin/java"; then
25064        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25066        BOOT_JDK_FOUND=no
25067      else
25068        # Do we have a bin/javac?
25069        if test ! -x "$BOOT_JDK/bin/javac"; then
25070          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25072          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25073$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25074          BOOT_JDK_FOUND=no
25075        else
25076          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25077          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25078
25079          # Extra M4 quote needed to protect [] in grep expression.
25080          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25081          if test "x$FOUND_CORRECT_VERSION" = x; then
25082            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25084            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25085$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25086            BOOT_JDK_FOUND=no
25087          else
25088            # We're done! :-)
25089            BOOT_JDK_FOUND=yes
25090
25091  # Only process if variable expands to non-empty
25092
25093  if test "x$BOOT_JDK" != x; then
25094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095
25096  # Input might be given as Windows format, start by converting to
25097  # unix format.
25098  path="$BOOT_JDK"
25099  new_path=`$CYGPATH -u "$path"`
25100
25101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25104  # "foo.exe" is OK but "foo" is an error.
25105  #
25106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25107  # It is also a way to make sure we got the proper file name for the real test later on.
25108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25109  if test "x$test_shortpath" = x; then
25110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25112    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25113  fi
25114
25115  # Call helper function which possibly converts this using DOS-style short mode.
25116  # If so, the updated path is stored in $new_path.
25117
25118  input_path="$new_path"
25119  # Check if we need to convert this using DOS-style short mode. If the path
25120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25121  # take no chances and rewrite it.
25122  # Note: m4 eats our [], so we need to use [ and ] instead.
25123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25124  if test "x$has_forbidden_chars" != x; then
25125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25129      # Going to short mode and back again did indeed matter. Since short mode is
25130      # case insensitive, let's make it lowercase to improve readability.
25131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25132      # Now convert it back to Unix-style (cygpath)
25133      input_path=`$CYGPATH -u "$shortmode_path"`
25134      new_path="$input_path"
25135    fi
25136  fi
25137
25138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25139  if test "x$test_cygdrive_prefix" = x; then
25140    # As a simple fix, exclude /usr/bin since it's not a real path.
25141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25143      # a path prefixed by /cygdrive for fixpath to work.
25144      new_path="$CYGWIN_ROOT_PATH$input_path"
25145    fi
25146  fi
25147
25148
25149  if test "x$path" != "x$new_path"; then
25150    BOOT_JDK="$new_path"
25151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25153  fi
25154
25155    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25156
25157  path="$BOOT_JDK"
25158  has_colon=`$ECHO $path | $GREP ^.:`
25159  new_path="$path"
25160  if test "x$has_colon" = x; then
25161    # Not in mixed or Windows style, start by that.
25162    new_path=`cmd //c echo $path`
25163  fi
25164
25165
25166  input_path="$new_path"
25167  # Check if we need to convert this using DOS-style short mode. If the path
25168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25169  # take no chances and rewrite it.
25170  # Note: m4 eats our [], so we need to use [ and ] instead.
25171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25172  if test "x$has_forbidden_chars" != x; then
25173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25175  fi
25176
25177
25178  windows_path="$new_path"
25179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25180    unix_path=`$CYGPATH -u "$windows_path"`
25181    new_path="$unix_path"
25182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25184    new_path="$unix_path"
25185  fi
25186
25187  if test "x$path" != "x$new_path"; then
25188    BOOT_JDK="$new_path"
25189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25191  fi
25192
25193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25195
25196    else
25197      # We're on a unix platform. Hooray! :)
25198      path="$BOOT_JDK"
25199      has_space=`$ECHO "$path" | $GREP " "`
25200      if test "x$has_space" != x; then
25201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25203        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25204      fi
25205
25206      # Use eval to expand a potential ~
25207      eval path="$path"
25208      if test ! -f "$path" && test ! -d "$path"; then
25209        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25210      fi
25211
25212      if test -d "$path"; then
25213        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25214      else
25215        dir="`$DIRNAME "$path"`"
25216        base="`$BASENAME "$path"`"
25217        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25218      fi
25219    fi
25220  fi
25221
25222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25223$as_echo_n "checking for Boot JDK... " >&6; }
25224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25225$as_echo "$BOOT_JDK" >&6; }
25226            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25227$as_echo_n "checking Boot JDK version... " >&6; }
25228            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25230$as_echo "$BOOT_JDK_VERSION" >&6; }
25231          fi # end check jdk version
25232        fi # end check javac
25233      fi # end check java
25234    fi # end check boot jdk found
25235  fi
25236
25237    # If that did not work out (e.g. too old), try explicit versions instead
25238
25239  if test "x$BOOT_JDK_FOUND" = xno; then
25240    # Now execute the test
25241
25242  if test -x /usr/libexec/java_home; then
25243    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25244    BOOT_JDK_FOUND=maybe
25245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25246$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25247  fi
25248
25249
25250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25252      # Do we have a bin/java?
25253      if test ! -x "$BOOT_JDK/bin/java"; then
25254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25256        BOOT_JDK_FOUND=no
25257      else
25258        # Do we have a bin/javac?
25259        if test ! -x "$BOOT_JDK/bin/javac"; then
25260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25264          BOOT_JDK_FOUND=no
25265        else
25266          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25267          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25268
25269          # Extra M4 quote needed to protect [] in grep expression.
25270          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25271          if test "x$FOUND_CORRECT_VERSION" = x; then
25272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25274            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25275$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25276            BOOT_JDK_FOUND=no
25277          else
25278            # We're done! :-)
25279            BOOT_JDK_FOUND=yes
25280
25281  # Only process if variable expands to non-empty
25282
25283  if test "x$BOOT_JDK" != x; then
25284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285
25286  # Input might be given as Windows format, start by converting to
25287  # unix format.
25288  path="$BOOT_JDK"
25289  new_path=`$CYGPATH -u "$path"`
25290
25291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25294  # "foo.exe" is OK but "foo" is an error.
25295  #
25296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25297  # It is also a way to make sure we got the proper file name for the real test later on.
25298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25299  if test "x$test_shortpath" = x; then
25300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25303  fi
25304
25305  # Call helper function which possibly converts this using DOS-style short mode.
25306  # If so, the updated path is stored in $new_path.
25307
25308  input_path="$new_path"
25309  # Check if we need to convert this using DOS-style short mode. If the path
25310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25311  # take no chances and rewrite it.
25312  # Note: m4 eats our [], so we need to use [ and ] instead.
25313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25314  if test "x$has_forbidden_chars" != x; then
25315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25319      # Going to short mode and back again did indeed matter. Since short mode is
25320      # case insensitive, let's make it lowercase to improve readability.
25321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322      # Now convert it back to Unix-style (cygpath)
25323      input_path=`$CYGPATH -u "$shortmode_path"`
25324      new_path="$input_path"
25325    fi
25326  fi
25327
25328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25329  if test "x$test_cygdrive_prefix" = x; then
25330    # As a simple fix, exclude /usr/bin since it's not a real path.
25331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25333      # a path prefixed by /cygdrive for fixpath to work.
25334      new_path="$CYGWIN_ROOT_PATH$input_path"
25335    fi
25336  fi
25337
25338
25339  if test "x$path" != "x$new_path"; then
25340    BOOT_JDK="$new_path"
25341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25343  fi
25344
25345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346
25347  path="$BOOT_JDK"
25348  has_colon=`$ECHO $path | $GREP ^.:`
25349  new_path="$path"
25350  if test "x$has_colon" = x; then
25351    # Not in mixed or Windows style, start by that.
25352    new_path=`cmd //c echo $path`
25353  fi
25354
25355
25356  input_path="$new_path"
25357  # Check if we need to convert this using DOS-style short mode. If the path
25358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25359  # take no chances and rewrite it.
25360  # Note: m4 eats our [], so we need to use [ and ] instead.
25361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25362  if test "x$has_forbidden_chars" != x; then
25363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25365  fi
25366
25367
25368  windows_path="$new_path"
25369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25370    unix_path=`$CYGPATH -u "$windows_path"`
25371    new_path="$unix_path"
25372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25374    new_path="$unix_path"
25375  fi
25376
25377  if test "x$path" != "x$new_path"; then
25378    BOOT_JDK="$new_path"
25379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25381  fi
25382
25383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25385
25386    else
25387      # We're on a unix platform. Hooray! :)
25388      path="$BOOT_JDK"
25389      has_space=`$ECHO "$path" | $GREP " "`
25390      if test "x$has_space" != x; then
25391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25394      fi
25395
25396      # Use eval to expand a potential ~
25397      eval path="$path"
25398      if test ! -f "$path" && test ! -d "$path"; then
25399        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25400      fi
25401
25402      if test -d "$path"; then
25403        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25404      else
25405        dir="`$DIRNAME "$path"`"
25406        base="`$BASENAME "$path"`"
25407        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25408      fi
25409    fi
25410  fi
25411
25412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25413$as_echo_n "checking for Boot JDK... " >&6; }
25414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25415$as_echo "$BOOT_JDK" >&6; }
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25417$as_echo_n "checking Boot JDK version... " >&6; }
25418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25420$as_echo "$BOOT_JDK_VERSION" >&6; }
25421          fi # end check jdk version
25422        fi # end check javac
25423      fi # end check java
25424    fi # end check boot jdk found
25425  fi
25426
25427
25428  if test "x$BOOT_JDK_FOUND" = xno; then
25429    # Now execute the test
25430
25431  if test -x /usr/libexec/java_home; then
25432    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25433    BOOT_JDK_FOUND=maybe
25434    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25435$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25436  fi
25437
25438
25439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25441      # Do we have a bin/java?
25442      if test ! -x "$BOOT_JDK/bin/java"; then
25443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25445        BOOT_JDK_FOUND=no
25446      else
25447        # Do we have a bin/javac?
25448        if test ! -x "$BOOT_JDK/bin/javac"; then
25449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25453          BOOT_JDK_FOUND=no
25454        else
25455          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25456          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25457
25458          # Extra M4 quote needed to protect [] in grep expression.
25459          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25460          if test "x$FOUND_CORRECT_VERSION" = x; then
25461            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25463            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25464$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25465            BOOT_JDK_FOUND=no
25466          else
25467            # We're done! :-)
25468            BOOT_JDK_FOUND=yes
25469
25470  # Only process if variable expands to non-empty
25471
25472  if test "x$BOOT_JDK" != x; then
25473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25474
25475  # Input might be given as Windows format, start by converting to
25476  # unix format.
25477  path="$BOOT_JDK"
25478  new_path=`$CYGPATH -u "$path"`
25479
25480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25483  # "foo.exe" is OK but "foo" is an error.
25484  #
25485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25486  # It is also a way to make sure we got the proper file name for the real test later on.
25487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25488  if test "x$test_shortpath" = x; then
25489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25492  fi
25493
25494  # Call helper function which possibly converts this using DOS-style short mode.
25495  # If so, the updated path is stored in $new_path.
25496
25497  input_path="$new_path"
25498  # Check if we need to convert this using DOS-style short mode. If the path
25499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25500  # take no chances and rewrite it.
25501  # Note: m4 eats our [], so we need to use [ and ] instead.
25502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25503  if test "x$has_forbidden_chars" != x; then
25504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25508      # Going to short mode and back again did indeed matter. Since short mode is
25509      # case insensitive, let's make it lowercase to improve readability.
25510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25511      # Now convert it back to Unix-style (cygpath)
25512      input_path=`$CYGPATH -u "$shortmode_path"`
25513      new_path="$input_path"
25514    fi
25515  fi
25516
25517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25518  if test "x$test_cygdrive_prefix" = x; then
25519    # As a simple fix, exclude /usr/bin since it's not a real path.
25520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25522      # a path prefixed by /cygdrive for fixpath to work.
25523      new_path="$CYGWIN_ROOT_PATH$input_path"
25524    fi
25525  fi
25526
25527
25528  if test "x$path" != "x$new_path"; then
25529    BOOT_JDK="$new_path"
25530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25532  fi
25533
25534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25535
25536  path="$BOOT_JDK"
25537  has_colon=`$ECHO $path | $GREP ^.:`
25538  new_path="$path"
25539  if test "x$has_colon" = x; then
25540    # Not in mixed or Windows style, start by that.
25541    new_path=`cmd //c echo $path`
25542  fi
25543
25544
25545  input_path="$new_path"
25546  # Check if we need to convert this using DOS-style short mode. If the path
25547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25548  # take no chances and rewrite it.
25549  # Note: m4 eats our [], so we need to use [ and ] instead.
25550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25551  if test "x$has_forbidden_chars" != x; then
25552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25554  fi
25555
25556
25557  windows_path="$new_path"
25558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25559    unix_path=`$CYGPATH -u "$windows_path"`
25560    new_path="$unix_path"
25561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25563    new_path="$unix_path"
25564  fi
25565
25566  if test "x$path" != "x$new_path"; then
25567    BOOT_JDK="$new_path"
25568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25570  fi
25571
25572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25574
25575    else
25576      # We're on a unix platform. Hooray! :)
25577      path="$BOOT_JDK"
25578      has_space=`$ECHO "$path" | $GREP " "`
25579      if test "x$has_space" != x; then
25580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25583      fi
25584
25585      # Use eval to expand a potential ~
25586      eval path="$path"
25587      if test ! -f "$path" && test ! -d "$path"; then
25588        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25589      fi
25590
25591      if test -d "$path"; then
25592        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25593      else
25594        dir="`$DIRNAME "$path"`"
25595        base="`$BASENAME "$path"`"
25596        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25597      fi
25598    fi
25599  fi
25600
25601            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25602$as_echo_n "checking for Boot JDK... " >&6; }
25603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25604$as_echo "$BOOT_JDK" >&6; }
25605            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25606$as_echo_n "checking Boot JDK version... " >&6; }
25607            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25609$as_echo "$BOOT_JDK_VERSION" >&6; }
25610          fi # end check jdk version
25611        fi # end check javac
25612      fi # end check java
25613    fi # end check boot jdk found
25614  fi
25615
25616
25617  if test "x$BOOT_JDK_FOUND" = xno; then
25618    # Now execute the test
25619
25620  if test -x /usr/libexec/java_home; then
25621    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25622    BOOT_JDK_FOUND=maybe
25623    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25624$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25625  fi
25626
25627
25628    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25629    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25630      # Do we have a bin/java?
25631      if test ! -x "$BOOT_JDK/bin/java"; then
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25634        BOOT_JDK_FOUND=no
25635      else
25636        # Do we have a bin/javac?
25637        if test ! -x "$BOOT_JDK/bin/javac"; then
25638          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25640          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25641$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25642          BOOT_JDK_FOUND=no
25643        else
25644          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25645          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25646
25647          # Extra M4 quote needed to protect [] in grep expression.
25648          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25649          if test "x$FOUND_CORRECT_VERSION" = x; then
25650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25652            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25653$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25654            BOOT_JDK_FOUND=no
25655          else
25656            # We're done! :-)
25657            BOOT_JDK_FOUND=yes
25658
25659  # Only process if variable expands to non-empty
25660
25661  if test "x$BOOT_JDK" != x; then
25662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25663
25664  # Input might be given as Windows format, start by converting to
25665  # unix format.
25666  path="$BOOT_JDK"
25667  new_path=`$CYGPATH -u "$path"`
25668
25669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25672  # "foo.exe" is OK but "foo" is an error.
25673  #
25674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25675  # It is also a way to make sure we got the proper file name for the real test later on.
25676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25677  if test "x$test_shortpath" = x; then
25678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25680    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25681  fi
25682
25683  # Call helper function which possibly converts this using DOS-style short mode.
25684  # If so, the updated path is stored in $new_path.
25685
25686  input_path="$new_path"
25687  # Check if we need to convert this using DOS-style short mode. If the path
25688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25689  # take no chances and rewrite it.
25690  # Note: m4 eats our [], so we need to use [ and ] instead.
25691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25692  if test "x$has_forbidden_chars" != x; then
25693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25697      # Going to short mode and back again did indeed matter. Since short mode is
25698      # case insensitive, let's make it lowercase to improve readability.
25699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25700      # Now convert it back to Unix-style (cygpath)
25701      input_path=`$CYGPATH -u "$shortmode_path"`
25702      new_path="$input_path"
25703    fi
25704  fi
25705
25706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25707  if test "x$test_cygdrive_prefix" = x; then
25708    # As a simple fix, exclude /usr/bin since it's not a real path.
25709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25711      # a path prefixed by /cygdrive for fixpath to work.
25712      new_path="$CYGWIN_ROOT_PATH$input_path"
25713    fi
25714  fi
25715
25716
25717  if test "x$path" != "x$new_path"; then
25718    BOOT_JDK="$new_path"
25719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25721  fi
25722
25723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25724
25725  path="$BOOT_JDK"
25726  has_colon=`$ECHO $path | $GREP ^.:`
25727  new_path="$path"
25728  if test "x$has_colon" = x; then
25729    # Not in mixed or Windows style, start by that.
25730    new_path=`cmd //c echo $path`
25731  fi
25732
25733
25734  input_path="$new_path"
25735  # Check if we need to convert this using DOS-style short mode. If the path
25736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25737  # take no chances and rewrite it.
25738  # Note: m4 eats our [], so we need to use [ and ] instead.
25739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25740  if test "x$has_forbidden_chars" != x; then
25741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25743  fi
25744
25745
25746  windows_path="$new_path"
25747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25748    unix_path=`$CYGPATH -u "$windows_path"`
25749    new_path="$unix_path"
25750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25752    new_path="$unix_path"
25753  fi
25754
25755  if test "x$path" != "x$new_path"; then
25756    BOOT_JDK="$new_path"
25757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25759  fi
25760
25761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25763
25764    else
25765      # We're on a unix platform. Hooray! :)
25766      path="$BOOT_JDK"
25767      has_space=`$ECHO "$path" | $GREP " "`
25768      if test "x$has_space" != x; then
25769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25772      fi
25773
25774      # Use eval to expand a potential ~
25775      eval path="$path"
25776      if test ! -f "$path" && test ! -d "$path"; then
25777        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25778      fi
25779
25780      if test -d "$path"; then
25781        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25782      else
25783        dir="`$DIRNAME "$path"`"
25784        base="`$BASENAME "$path"`"
25785        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25786      fi
25787    fi
25788  fi
25789
25790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25791$as_echo_n "checking for Boot JDK... " >&6; }
25792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25793$as_echo "$BOOT_JDK" >&6; }
25794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25795$as_echo_n "checking Boot JDK version... " >&6; }
25796            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25798$as_echo "$BOOT_JDK_VERSION" >&6; }
25799          fi # end check jdk version
25800        fi # end check javac
25801      fi # end check java
25802    fi # end check boot jdk found
25803  fi
25804
25805  fi
25806
25807
25808    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25809    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25810      # Do we have a bin/java?
25811      if test ! -x "$BOOT_JDK/bin/java"; then
25812        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25814        BOOT_JDK_FOUND=no
25815      else
25816        # Do we have a bin/javac?
25817        if test ! -x "$BOOT_JDK/bin/javac"; then
25818          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25820          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25821$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25822          BOOT_JDK_FOUND=no
25823        else
25824          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25825          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25826
25827          # Extra M4 quote needed to protect [] in grep expression.
25828          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25829          if test "x$FOUND_CORRECT_VERSION" = x; then
25830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25832            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25833$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25834            BOOT_JDK_FOUND=no
25835          else
25836            # We're done! :-)
25837            BOOT_JDK_FOUND=yes
25838
25839  # Only process if variable expands to non-empty
25840
25841  if test "x$BOOT_JDK" != x; then
25842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25843
25844  # Input might be given as Windows format, start by converting to
25845  # unix format.
25846  path="$BOOT_JDK"
25847  new_path=`$CYGPATH -u "$path"`
25848
25849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25852  # "foo.exe" is OK but "foo" is an error.
25853  #
25854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25855  # It is also a way to make sure we got the proper file name for the real test later on.
25856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25857  if test "x$test_shortpath" = x; then
25858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25861  fi
25862
25863  # Call helper function which possibly converts this using DOS-style short mode.
25864  # If so, the updated path is stored in $new_path.
25865
25866  input_path="$new_path"
25867  # Check if we need to convert this using DOS-style short mode. If the path
25868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25869  # take no chances and rewrite it.
25870  # Note: m4 eats our [], so we need to use [ and ] instead.
25871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25872  if test "x$has_forbidden_chars" != x; then
25873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25877      # Going to short mode and back again did indeed matter. Since short mode is
25878      # case insensitive, let's make it lowercase to improve readability.
25879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25880      # Now convert it back to Unix-style (cygpath)
25881      input_path=`$CYGPATH -u "$shortmode_path"`
25882      new_path="$input_path"
25883    fi
25884  fi
25885
25886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25887  if test "x$test_cygdrive_prefix" = x; then
25888    # As a simple fix, exclude /usr/bin since it's not a real path.
25889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25891      # a path prefixed by /cygdrive for fixpath to work.
25892      new_path="$CYGWIN_ROOT_PATH$input_path"
25893    fi
25894  fi
25895
25896
25897  if test "x$path" != "x$new_path"; then
25898    BOOT_JDK="$new_path"
25899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25901  fi
25902
25903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25904
25905  path="$BOOT_JDK"
25906  has_colon=`$ECHO $path | $GREP ^.:`
25907  new_path="$path"
25908  if test "x$has_colon" = x; then
25909    # Not in mixed or Windows style, start by that.
25910    new_path=`cmd //c echo $path`
25911  fi
25912
25913
25914  input_path="$new_path"
25915  # Check if we need to convert this using DOS-style short mode. If the path
25916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25917  # take no chances and rewrite it.
25918  # Note: m4 eats our [], so we need to use [ and ] instead.
25919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25920  if test "x$has_forbidden_chars" != x; then
25921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25923  fi
25924
25925
25926  windows_path="$new_path"
25927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25928    unix_path=`$CYGPATH -u "$windows_path"`
25929    new_path="$unix_path"
25930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25932    new_path="$unix_path"
25933  fi
25934
25935  if test "x$path" != "x$new_path"; then
25936    BOOT_JDK="$new_path"
25937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25939  fi
25940
25941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25943
25944    else
25945      # We're on a unix platform. Hooray! :)
25946      path="$BOOT_JDK"
25947      has_space=`$ECHO "$path" | $GREP " "`
25948      if test "x$has_space" != x; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25952      fi
25953
25954      # Use eval to expand a potential ~
25955      eval path="$path"
25956      if test ! -f "$path" && test ! -d "$path"; then
25957        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25958      fi
25959
25960      if test -d "$path"; then
25961        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25962      else
25963        dir="`$DIRNAME "$path"`"
25964        base="`$BASENAME "$path"`"
25965        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25966      fi
25967    fi
25968  fi
25969
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25971$as_echo_n "checking for Boot JDK... " >&6; }
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25973$as_echo "$BOOT_JDK" >&6; }
25974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25975$as_echo_n "checking Boot JDK version... " >&6; }
25976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25978$as_echo "$BOOT_JDK_VERSION" >&6; }
25979          fi # end check jdk version
25980        fi # end check javac
25981      fi # end check java
25982    fi # end check boot jdk found
25983  fi
25984
25985
25986  # Test: Is $JAVA_HOME set?
25987
25988  if test "x$BOOT_JDK_FOUND" = xno; then
25989    # Now execute the test
25990
25991  if test "x$JAVA_HOME" != x; then
25992    JAVA_HOME_PROCESSED="$JAVA_HOME"
25993
25994  # Only process if variable expands to non-empty
25995
25996  if test "x$JAVA_HOME_PROCESSED" != x; then
25997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25998
25999  # Input might be given as Windows format, start by converting to
26000  # unix format.
26001  path="$JAVA_HOME_PROCESSED"
26002  new_path=`$CYGPATH -u "$path"`
26003
26004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26007  # "foo.exe" is OK but "foo" is an error.
26008  #
26009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26010  # It is also a way to make sure we got the proper file name for the real test later on.
26011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26012  if test "x$test_shortpath" = x; then
26013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26014$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26015    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26016  fi
26017
26018  # Call helper function which possibly converts this using DOS-style short mode.
26019  # If so, the updated path is stored in $new_path.
26020
26021  input_path="$new_path"
26022  # Check if we need to convert this using DOS-style short mode. If the path
26023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26024  # take no chances and rewrite it.
26025  # Note: m4 eats our [], so we need to use [ and ] instead.
26026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26027  if test "x$has_forbidden_chars" != x; then
26028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26032      # Going to short mode and back again did indeed matter. Since short mode is
26033      # case insensitive, let's make it lowercase to improve readability.
26034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26035      # Now convert it back to Unix-style (cygpath)
26036      input_path=`$CYGPATH -u "$shortmode_path"`
26037      new_path="$input_path"
26038    fi
26039  fi
26040
26041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26042  if test "x$test_cygdrive_prefix" = x; then
26043    # As a simple fix, exclude /usr/bin since it's not a real path.
26044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26046      # a path prefixed by /cygdrive for fixpath to work.
26047      new_path="$CYGWIN_ROOT_PATH$input_path"
26048    fi
26049  fi
26050
26051
26052  if test "x$path" != "x$new_path"; then
26053    JAVA_HOME_PROCESSED="$new_path"
26054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26055$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26056  fi
26057
26058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26059
26060  path="$JAVA_HOME_PROCESSED"
26061  has_colon=`$ECHO $path | $GREP ^.:`
26062  new_path="$path"
26063  if test "x$has_colon" = x; then
26064    # Not in mixed or Windows style, start by that.
26065    new_path=`cmd //c echo $path`
26066  fi
26067
26068
26069  input_path="$new_path"
26070  # Check if we need to convert this using DOS-style short mode. If the path
26071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26072  # take no chances and rewrite it.
26073  # Note: m4 eats our [], so we need to use [ and ] instead.
26074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26075  if test "x$has_forbidden_chars" != x; then
26076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26078  fi
26079
26080
26081  windows_path="$new_path"
26082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26083    unix_path=`$CYGPATH -u "$windows_path"`
26084    new_path="$unix_path"
26085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26087    new_path="$unix_path"
26088  fi
26089
26090  if test "x$path" != "x$new_path"; then
26091    JAVA_HOME_PROCESSED="$new_path"
26092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26093$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26094  fi
26095
26096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26098
26099    else
26100      # We're on a unix platform. Hooray! :)
26101      path="$JAVA_HOME_PROCESSED"
26102      has_space=`$ECHO "$path" | $GREP " "`
26103      if test "x$has_space" != x; then
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26105$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26107      fi
26108
26109      # Use eval to expand a potential ~
26110      eval path="$path"
26111      if test ! -f "$path" && test ! -d "$path"; then
26112        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26113      fi
26114
26115      if test -d "$path"; then
26116        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26117      else
26118        dir="`$DIRNAME "$path"`"
26119        base="`$BASENAME "$path"`"
26120        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26121      fi
26122    fi
26123  fi
26124
26125    if test ! -d "$JAVA_HOME_PROCESSED"; then
26126      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26127$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26128    else
26129      # Aha, the user has set a JAVA_HOME
26130      # let us use that as the Boot JDK.
26131      BOOT_JDK="$JAVA_HOME_PROCESSED"
26132      BOOT_JDK_FOUND=maybe
26133      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26134$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26135    fi
26136  fi
26137
26138
26139    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26140    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26141      # Do we have a bin/java?
26142      if test ! -x "$BOOT_JDK/bin/java"; then
26143        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26145        BOOT_JDK_FOUND=no
26146      else
26147        # Do we have a bin/javac?
26148        if test ! -x "$BOOT_JDK/bin/javac"; then
26149          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26151          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26152$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26153          BOOT_JDK_FOUND=no
26154        else
26155          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26156          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26157
26158          # Extra M4 quote needed to protect [] in grep expression.
26159          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26160          if test "x$FOUND_CORRECT_VERSION" = x; then
26161            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26163            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26164$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26165            BOOT_JDK_FOUND=no
26166          else
26167            # We're done! :-)
26168            BOOT_JDK_FOUND=yes
26169
26170  # Only process if variable expands to non-empty
26171
26172  if test "x$BOOT_JDK" != x; then
26173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26174
26175  # Input might be given as Windows format, start by converting to
26176  # unix format.
26177  path="$BOOT_JDK"
26178  new_path=`$CYGPATH -u "$path"`
26179
26180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26183  # "foo.exe" is OK but "foo" is an error.
26184  #
26185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26186  # It is also a way to make sure we got the proper file name for the real test later on.
26187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26188  if test "x$test_shortpath" = x; then
26189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26192  fi
26193
26194  # Call helper function which possibly converts this using DOS-style short mode.
26195  # If so, the updated path is stored in $new_path.
26196
26197  input_path="$new_path"
26198  # Check if we need to convert this using DOS-style short mode. If the path
26199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26200  # take no chances and rewrite it.
26201  # Note: m4 eats our [], so we need to use [ and ] instead.
26202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26203  if test "x$has_forbidden_chars" != x; then
26204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26208      # Going to short mode and back again did indeed matter. Since short mode is
26209      # case insensitive, let's make it lowercase to improve readability.
26210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26211      # Now convert it back to Unix-style (cygpath)
26212      input_path=`$CYGPATH -u "$shortmode_path"`
26213      new_path="$input_path"
26214    fi
26215  fi
26216
26217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26218  if test "x$test_cygdrive_prefix" = x; then
26219    # As a simple fix, exclude /usr/bin since it's not a real path.
26220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26222      # a path prefixed by /cygdrive for fixpath to work.
26223      new_path="$CYGWIN_ROOT_PATH$input_path"
26224    fi
26225  fi
26226
26227
26228  if test "x$path" != "x$new_path"; then
26229    BOOT_JDK="$new_path"
26230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26232  fi
26233
26234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26235
26236  path="$BOOT_JDK"
26237  has_colon=`$ECHO $path | $GREP ^.:`
26238  new_path="$path"
26239  if test "x$has_colon" = x; then
26240    # Not in mixed or Windows style, start by that.
26241    new_path=`cmd //c echo $path`
26242  fi
26243
26244
26245  input_path="$new_path"
26246  # Check if we need to convert this using DOS-style short mode. If the path
26247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26248  # take no chances and rewrite it.
26249  # Note: m4 eats our [], so we need to use [ and ] instead.
26250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26251  if test "x$has_forbidden_chars" != x; then
26252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26254  fi
26255
26256
26257  windows_path="$new_path"
26258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26259    unix_path=`$CYGPATH -u "$windows_path"`
26260    new_path="$unix_path"
26261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26263    new_path="$unix_path"
26264  fi
26265
26266  if test "x$path" != "x$new_path"; then
26267    BOOT_JDK="$new_path"
26268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26270  fi
26271
26272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26274
26275    else
26276      # We're on a unix platform. Hooray! :)
26277      path="$BOOT_JDK"
26278      has_space=`$ECHO "$path" | $GREP " "`
26279      if test "x$has_space" != x; then
26280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26283      fi
26284
26285      # Use eval to expand a potential ~
26286      eval path="$path"
26287      if test ! -f "$path" && test ! -d "$path"; then
26288        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26289      fi
26290
26291      if test -d "$path"; then
26292        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26293      else
26294        dir="`$DIRNAME "$path"`"
26295        base="`$BASENAME "$path"`"
26296        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26297      fi
26298    fi
26299  fi
26300
26301            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26302$as_echo_n "checking for Boot JDK... " >&6; }
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26304$as_echo "$BOOT_JDK" >&6; }
26305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26306$as_echo_n "checking Boot JDK version... " >&6; }
26307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26309$as_echo "$BOOT_JDK_VERSION" >&6; }
26310          fi # end check jdk version
26311        fi # end check javac
26312      fi # end check java
26313    fi # end check boot jdk found
26314  fi
26315
26316
26317  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26318
26319  if test "x$BOOT_JDK_FOUND" = xno; then
26320    # Now execute the test
26321
26322  # Extract the first word of "javac", so it can be a program name with args.
26323set dummy javac; ac_word=$2
26324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26325$as_echo_n "checking for $ac_word... " >&6; }
26326if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26327  $as_echo_n "(cached) " >&6
26328else
26329  case $JAVAC_CHECK in
26330  [\\/]* | ?:[\\/]*)
26331  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26332  ;;
26333  *)
26334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26335for as_dir in $PATH
26336do
26337  IFS=$as_save_IFS
26338  test -z "$as_dir" && as_dir=.
26339    for ac_exec_ext in '' $ac_executable_extensions; do
26340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26341    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26343    break 2
26344  fi
26345done
26346  done
26347IFS=$as_save_IFS
26348
26349  ;;
26350esac
26351fi
26352JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26353if test -n "$JAVAC_CHECK"; then
26354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26355$as_echo "$JAVAC_CHECK" >&6; }
26356else
26357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26358$as_echo "no" >&6; }
26359fi
26360
26361
26362  # Extract the first word of "java", so it can be a program name with args.
26363set dummy java; ac_word=$2
26364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26365$as_echo_n "checking for $ac_word... " >&6; }
26366if ${ac_cv_path_JAVA_CHECK+:} false; then :
26367  $as_echo_n "(cached) " >&6
26368else
26369  case $JAVA_CHECK in
26370  [\\/]* | ?:[\\/]*)
26371  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26372  ;;
26373  *)
26374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26375for as_dir in $PATH
26376do
26377  IFS=$as_save_IFS
26378  test -z "$as_dir" && as_dir=.
26379    for ac_exec_ext in '' $ac_executable_extensions; do
26380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26381    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26383    break 2
26384  fi
26385done
26386  done
26387IFS=$as_save_IFS
26388
26389  ;;
26390esac
26391fi
26392JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26393if test -n "$JAVA_CHECK"; then
26394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26395$as_echo "$JAVA_CHECK" >&6; }
26396else
26397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26398$as_echo "no" >&6; }
26399fi
26400
26401
26402  BINARY="$JAVAC_CHECK"
26403  if test "x$JAVAC_CHECK" = x; then
26404    BINARY="$JAVA_CHECK"
26405  fi
26406  if test "x$BINARY" != x; then
26407    # So there is a java(c) binary, it might be part of a JDK.
26408    # Lets find the JDK/JRE directory by following symbolic links.
26409    # Linux/GNU systems often have links from /usr/bin/java to
26410    # /etc/alternatives/java to the real JDK binary.
26411
26412  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26413    # Follow a chain of symbolic links. Use readlink
26414    # where it exists, else fall back to horribly
26415    # complicated shell code.
26416    if test "x$READLINK_TESTED" != yes; then
26417      # On MacOSX there is a readlink tool with a different
26418      # purpose than the GNU readlink tool. Check the found readlink.
26419      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26420      if test "x$ISGNU" = x; then
26421        # A readlink that we do not know how to use.
26422        # Are there other non-GNU readlinks out there?
26423        READLINK_TESTED=yes
26424        READLINK=
26425      fi
26426    fi
26427
26428    if test "x$READLINK" != x; then
26429      BINARY=`$READLINK -f $BINARY`
26430    else
26431      # Save the current directory for restoring afterwards
26432      STARTDIR=$PWD
26433      COUNTER=0
26434      sym_link_dir=`$DIRNAME $BINARY`
26435      sym_link_file=`$BASENAME $BINARY`
26436      cd $sym_link_dir
26437      # Use -P flag to resolve symlinks in directories.
26438      cd `$THEPWDCMD -P`
26439      sym_link_dir=`$THEPWDCMD -P`
26440      # Resolve file symlinks
26441      while test $COUNTER -lt 20; do
26442        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26443        if test "x$ISLINK" == x; then
26444          # This is not a symbolic link! We are done!
26445          break
26446        fi
26447        # Again resolve directory symlinks since the target of the just found
26448        # link could be in a different directory
26449        cd `$DIRNAME $ISLINK`
26450        sym_link_dir=`$THEPWDCMD -P`
26451        sym_link_file=`$BASENAME $ISLINK`
26452        let COUNTER=COUNTER+1
26453      done
26454      cd $STARTDIR
26455      BINARY=$sym_link_dir/$sym_link_file
26456    fi
26457  fi
26458
26459    BOOT_JDK=`dirname "$BINARY"`
26460    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26461    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26462      # Looks like we found ourselves an JDK
26463      BOOT_JDK_FOUND=maybe
26464      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26465$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26466    fi
26467  fi
26468
26469
26470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26472      # Do we have a bin/java?
26473      if test ! -x "$BOOT_JDK/bin/java"; then
26474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26476        BOOT_JDK_FOUND=no
26477      else
26478        # Do we have a bin/javac?
26479        if test ! -x "$BOOT_JDK/bin/javac"; then
26480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26484          BOOT_JDK_FOUND=no
26485        else
26486          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26487          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26488
26489          # Extra M4 quote needed to protect [] in grep expression.
26490          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26491          if test "x$FOUND_CORRECT_VERSION" = x; then
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26494            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26495$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26496            BOOT_JDK_FOUND=no
26497          else
26498            # We're done! :-)
26499            BOOT_JDK_FOUND=yes
26500
26501  # Only process if variable expands to non-empty
26502
26503  if test "x$BOOT_JDK" != x; then
26504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26505
26506  # Input might be given as Windows format, start by converting to
26507  # unix format.
26508  path="$BOOT_JDK"
26509  new_path=`$CYGPATH -u "$path"`
26510
26511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26514  # "foo.exe" is OK but "foo" is an error.
26515  #
26516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26517  # It is also a way to make sure we got the proper file name for the real test later on.
26518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26519  if test "x$test_shortpath" = x; then
26520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26523  fi
26524
26525  # Call helper function which possibly converts this using DOS-style short mode.
26526  # If so, the updated path is stored in $new_path.
26527
26528  input_path="$new_path"
26529  # Check if we need to convert this using DOS-style short mode. If the path
26530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26531  # take no chances and rewrite it.
26532  # Note: m4 eats our [], so we need to use [ and ] instead.
26533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26534  if test "x$has_forbidden_chars" != x; then
26535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26539      # Going to short mode and back again did indeed matter. Since short mode is
26540      # case insensitive, let's make it lowercase to improve readability.
26541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26542      # Now convert it back to Unix-style (cygpath)
26543      input_path=`$CYGPATH -u "$shortmode_path"`
26544      new_path="$input_path"
26545    fi
26546  fi
26547
26548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26549  if test "x$test_cygdrive_prefix" = x; then
26550    # As a simple fix, exclude /usr/bin since it's not a real path.
26551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26553      # a path prefixed by /cygdrive for fixpath to work.
26554      new_path="$CYGWIN_ROOT_PATH$input_path"
26555    fi
26556  fi
26557
26558
26559  if test "x$path" != "x$new_path"; then
26560    BOOT_JDK="$new_path"
26561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26563  fi
26564
26565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26566
26567  path="$BOOT_JDK"
26568  has_colon=`$ECHO $path | $GREP ^.:`
26569  new_path="$path"
26570  if test "x$has_colon" = x; then
26571    # Not in mixed or Windows style, start by that.
26572    new_path=`cmd //c echo $path`
26573  fi
26574
26575
26576  input_path="$new_path"
26577  # Check if we need to convert this using DOS-style short mode. If the path
26578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26579  # take no chances and rewrite it.
26580  # Note: m4 eats our [], so we need to use [ and ] instead.
26581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26582  if test "x$has_forbidden_chars" != x; then
26583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26585  fi
26586
26587
26588  windows_path="$new_path"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    new_path="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    new_path="$unix_path"
26595  fi
26596
26597  if test "x$path" != "x$new_path"; then
26598    BOOT_JDK="$new_path"
26599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26601  fi
26602
26603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26605
26606    else
26607      # We're on a unix platform. Hooray! :)
26608      path="$BOOT_JDK"
26609      has_space=`$ECHO "$path" | $GREP " "`
26610      if test "x$has_space" != x; then
26611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26614      fi
26615
26616      # Use eval to expand a potential ~
26617      eval path="$path"
26618      if test ! -f "$path" && test ! -d "$path"; then
26619        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26620      fi
26621
26622      if test -d "$path"; then
26623        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26624      else
26625        dir="`$DIRNAME "$path"`"
26626        base="`$BASENAME "$path"`"
26627        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26628      fi
26629    fi
26630  fi
26631
26632            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26633$as_echo_n "checking for Boot JDK... " >&6; }
26634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26635$as_echo "$BOOT_JDK" >&6; }
26636            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26637$as_echo_n "checking Boot JDK version... " >&6; }
26638            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26640$as_echo "$BOOT_JDK_VERSION" >&6; }
26641          fi # end check jdk version
26642        fi # end check javac
26643      fi # end check java
26644    fi # end check boot jdk found
26645  fi
26646
26647
26648  # Test: Is there a JDK installed in default, well-known locations?
26649
26650  if test "x$BOOT_JDK_FOUND" = xno; then
26651    # Now execute the test
26652
26653  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26654
26655  if test "x$BOOT_JDK_FOUND" = xno; then
26656    # Now execute the test
26657
26658  if test "x$ProgramW6432" != x; then
26659    VIRTUAL_DIR="$ProgramW6432/Java"
26660
26661  windows_path="$VIRTUAL_DIR"
26662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26663    unix_path=`$CYGPATH -u "$windows_path"`
26664    VIRTUAL_DIR="$unix_path"
26665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26667    VIRTUAL_DIR="$unix_path"
26668  fi
26669
26670
26671  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26672  BOOT_JDK_SUFFIX=""
26673  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26674  if test "x$ALL_JDKS_FOUND" != x; then
26675    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26676
26677  if test "x$BOOT_JDK_FOUND" = xno; then
26678    # Now execute the test
26679
26680        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26681        if test -d "$BOOT_JDK"; then
26682          BOOT_JDK_FOUND=maybe
26683          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26684$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26685        fi
26686
26687
26688    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26689    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26690      # Do we have a bin/java?
26691      if test ! -x "$BOOT_JDK/bin/java"; then
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26694        BOOT_JDK_FOUND=no
26695      else
26696        # Do we have a bin/javac?
26697        if test ! -x "$BOOT_JDK/bin/javac"; then
26698          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26700          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26701$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26702          BOOT_JDK_FOUND=no
26703        else
26704          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26705          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26706
26707          # Extra M4 quote needed to protect [] in grep expression.
26708          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26709          if test "x$FOUND_CORRECT_VERSION" = x; then
26710            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26712            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26713$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26714            BOOT_JDK_FOUND=no
26715          else
26716            # We're done! :-)
26717            BOOT_JDK_FOUND=yes
26718
26719  # Only process if variable expands to non-empty
26720
26721  if test "x$BOOT_JDK" != x; then
26722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26723
26724  # Input might be given as Windows format, start by converting to
26725  # unix format.
26726  path="$BOOT_JDK"
26727  new_path=`$CYGPATH -u "$path"`
26728
26729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26732  # "foo.exe" is OK but "foo" is an error.
26733  #
26734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26735  # It is also a way to make sure we got the proper file name for the real test later on.
26736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26737  if test "x$test_shortpath" = x; then
26738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26740    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26741  fi
26742
26743  # Call helper function which possibly converts this using DOS-style short mode.
26744  # If so, the updated path is stored in $new_path.
26745
26746  input_path="$new_path"
26747  # Check if we need to convert this using DOS-style short mode. If the path
26748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26749  # take no chances and rewrite it.
26750  # Note: m4 eats our [], so we need to use [ and ] instead.
26751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26752  if test "x$has_forbidden_chars" != x; then
26753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26757      # Going to short mode and back again did indeed matter. Since short mode is
26758      # case insensitive, let's make it lowercase to improve readability.
26759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26760      # Now convert it back to Unix-style (cygpath)
26761      input_path=`$CYGPATH -u "$shortmode_path"`
26762      new_path="$input_path"
26763    fi
26764  fi
26765
26766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26767  if test "x$test_cygdrive_prefix" = x; then
26768    # As a simple fix, exclude /usr/bin since it's not a real path.
26769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26771      # a path prefixed by /cygdrive for fixpath to work.
26772      new_path="$CYGWIN_ROOT_PATH$input_path"
26773    fi
26774  fi
26775
26776
26777  if test "x$path" != "x$new_path"; then
26778    BOOT_JDK="$new_path"
26779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26781  fi
26782
26783    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784
26785  path="$BOOT_JDK"
26786  has_colon=`$ECHO $path | $GREP ^.:`
26787  new_path="$path"
26788  if test "x$has_colon" = x; then
26789    # Not in mixed or Windows style, start by that.
26790    new_path=`cmd //c echo $path`
26791  fi
26792
26793
26794  input_path="$new_path"
26795  # Check if we need to convert this using DOS-style short mode. If the path
26796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26797  # take no chances and rewrite it.
26798  # Note: m4 eats our [], so we need to use [ and ] instead.
26799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26800  if test "x$has_forbidden_chars" != x; then
26801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26803  fi
26804
26805
26806  windows_path="$new_path"
26807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26808    unix_path=`$CYGPATH -u "$windows_path"`
26809    new_path="$unix_path"
26810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26812    new_path="$unix_path"
26813  fi
26814
26815  if test "x$path" != "x$new_path"; then
26816    BOOT_JDK="$new_path"
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26819  fi
26820
26821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26823
26824    else
26825      # We're on a unix platform. Hooray! :)
26826      path="$BOOT_JDK"
26827      has_space=`$ECHO "$path" | $GREP " "`
26828      if test "x$has_space" != x; then
26829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26831        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26832      fi
26833
26834      # Use eval to expand a potential ~
26835      eval path="$path"
26836      if test ! -f "$path" && test ! -d "$path"; then
26837        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26838      fi
26839
26840      if test -d "$path"; then
26841        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26842      else
26843        dir="`$DIRNAME "$path"`"
26844        base="`$BASENAME "$path"`"
26845        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26846      fi
26847    fi
26848  fi
26849
26850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26851$as_echo_n "checking for Boot JDK... " >&6; }
26852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26853$as_echo "$BOOT_JDK" >&6; }
26854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26855$as_echo_n "checking Boot JDK version... " >&6; }
26856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26858$as_echo "$BOOT_JDK_VERSION" >&6; }
26859          fi # end check jdk version
26860        fi # end check javac
26861      fi # end check java
26862    fi # end check boot jdk found
26863  fi
26864
26865    done
26866  fi
26867
26868  fi
26869
26870
26871    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26872    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26873      # Do we have a bin/java?
26874      if test ! -x "$BOOT_JDK/bin/java"; then
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26877        BOOT_JDK_FOUND=no
26878      else
26879        # Do we have a bin/javac?
26880        if test ! -x "$BOOT_JDK/bin/javac"; then
26881          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26883          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26884$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26885          BOOT_JDK_FOUND=no
26886        else
26887          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26888          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26889
26890          # Extra M4 quote needed to protect [] in grep expression.
26891          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26892          if test "x$FOUND_CORRECT_VERSION" = x; then
26893            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26895            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26896$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26897            BOOT_JDK_FOUND=no
26898          else
26899            # We're done! :-)
26900            BOOT_JDK_FOUND=yes
26901
26902  # Only process if variable expands to non-empty
26903
26904  if test "x$BOOT_JDK" != x; then
26905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906
26907  # Input might be given as Windows format, start by converting to
26908  # unix format.
26909  path="$BOOT_JDK"
26910  new_path=`$CYGPATH -u "$path"`
26911
26912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26915  # "foo.exe" is OK but "foo" is an error.
26916  #
26917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26918  # It is also a way to make sure we got the proper file name for the real test later on.
26919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26920  if test "x$test_shortpath" = x; then
26921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26923    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26924  fi
26925
26926  # Call helper function which possibly converts this using DOS-style short mode.
26927  # If so, the updated path is stored in $new_path.
26928
26929  input_path="$new_path"
26930  # Check if we need to convert this using DOS-style short mode. If the path
26931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26932  # take no chances and rewrite it.
26933  # Note: m4 eats our [], so we need to use [ and ] instead.
26934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26935  if test "x$has_forbidden_chars" != x; then
26936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26940      # Going to short mode and back again did indeed matter. Since short mode is
26941      # case insensitive, let's make it lowercase to improve readability.
26942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26943      # Now convert it back to Unix-style (cygpath)
26944      input_path=`$CYGPATH -u "$shortmode_path"`
26945      new_path="$input_path"
26946    fi
26947  fi
26948
26949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26950  if test "x$test_cygdrive_prefix" = x; then
26951    # As a simple fix, exclude /usr/bin since it's not a real path.
26952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26954      # a path prefixed by /cygdrive for fixpath to work.
26955      new_path="$CYGWIN_ROOT_PATH$input_path"
26956    fi
26957  fi
26958
26959
26960  if test "x$path" != "x$new_path"; then
26961    BOOT_JDK="$new_path"
26962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26964  fi
26965
26966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967
26968  path="$BOOT_JDK"
26969  has_colon=`$ECHO $path | $GREP ^.:`
26970  new_path="$path"
26971  if test "x$has_colon" = x; then
26972    # Not in mixed or Windows style, start by that.
26973    new_path=`cmd //c echo $path`
26974  fi
26975
26976
26977  input_path="$new_path"
26978  # Check if we need to convert this using DOS-style short mode. If the path
26979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26980  # take no chances and rewrite it.
26981  # Note: m4 eats our [], so we need to use [ and ] instead.
26982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26983  if test "x$has_forbidden_chars" != x; then
26984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26986  fi
26987
26988
26989  windows_path="$new_path"
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991    unix_path=`$CYGPATH -u "$windows_path"`
26992    new_path="$unix_path"
26993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995    new_path="$unix_path"
26996  fi
26997
26998  if test "x$path" != "x$new_path"; then
26999    BOOT_JDK="$new_path"
27000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27002  fi
27003
27004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27006
27007    else
27008      # We're on a unix platform. Hooray! :)
27009      path="$BOOT_JDK"
27010      has_space=`$ECHO "$path" | $GREP " "`
27011      if test "x$has_space" != x; then
27012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27015      fi
27016
27017      # Use eval to expand a potential ~
27018      eval path="$path"
27019      if test ! -f "$path" && test ! -d "$path"; then
27020        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27021      fi
27022
27023      if test -d "$path"; then
27024        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27025      else
27026        dir="`$DIRNAME "$path"`"
27027        base="`$BASENAME "$path"`"
27028        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27029      fi
27030    fi
27031  fi
27032
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27034$as_echo_n "checking for Boot JDK... " >&6; }
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27036$as_echo "$BOOT_JDK" >&6; }
27037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27038$as_echo_n "checking Boot JDK version... " >&6; }
27039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27041$as_echo "$BOOT_JDK_VERSION" >&6; }
27042          fi # end check jdk version
27043        fi # end check javac
27044      fi # end check java
27045    fi # end check boot jdk found
27046  fi
27047
27048
27049  if test "x$BOOT_JDK_FOUND" = xno; then
27050    # Now execute the test
27051
27052  if test "x$PROGRAMW6432" != x; then
27053    VIRTUAL_DIR="$PROGRAMW6432/Java"
27054
27055  windows_path="$VIRTUAL_DIR"
27056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27057    unix_path=`$CYGPATH -u "$windows_path"`
27058    VIRTUAL_DIR="$unix_path"
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27061    VIRTUAL_DIR="$unix_path"
27062  fi
27063
27064
27065  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27066  BOOT_JDK_SUFFIX=""
27067  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27068  if test "x$ALL_JDKS_FOUND" != x; then
27069    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27070
27071  if test "x$BOOT_JDK_FOUND" = xno; then
27072    # Now execute the test
27073
27074        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27075        if test -d "$BOOT_JDK"; then
27076          BOOT_JDK_FOUND=maybe
27077          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27078$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27079        fi
27080
27081
27082    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27083    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27084      # Do we have a bin/java?
27085      if test ! -x "$BOOT_JDK/bin/java"; then
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27088        BOOT_JDK_FOUND=no
27089      else
27090        # Do we have a bin/javac?
27091        if test ! -x "$BOOT_JDK/bin/javac"; then
27092          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27094          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27095$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27096          BOOT_JDK_FOUND=no
27097        else
27098          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27099          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27100
27101          # Extra M4 quote needed to protect [] in grep expression.
27102          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27103          if test "x$FOUND_CORRECT_VERSION" = x; then
27104            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27106            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27107$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27108            BOOT_JDK_FOUND=no
27109          else
27110            # We're done! :-)
27111            BOOT_JDK_FOUND=yes
27112
27113  # Only process if variable expands to non-empty
27114
27115  if test "x$BOOT_JDK" != x; then
27116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27117
27118  # Input might be given as Windows format, start by converting to
27119  # unix format.
27120  path="$BOOT_JDK"
27121  new_path=`$CYGPATH -u "$path"`
27122
27123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27126  # "foo.exe" is OK but "foo" is an error.
27127  #
27128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27129  # It is also a way to make sure we got the proper file name for the real test later on.
27130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27131  if test "x$test_shortpath" = x; then
27132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27134    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27135  fi
27136
27137  # Call helper function which possibly converts this using DOS-style short mode.
27138  # If so, the updated path is stored in $new_path.
27139
27140  input_path="$new_path"
27141  # Check if we need to convert this using DOS-style short mode. If the path
27142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27143  # take no chances and rewrite it.
27144  # Note: m4 eats our [], so we need to use [ and ] instead.
27145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27146  if test "x$has_forbidden_chars" != x; then
27147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27151      # Going to short mode and back again did indeed matter. Since short mode is
27152      # case insensitive, let's make it lowercase to improve readability.
27153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27154      # Now convert it back to Unix-style (cygpath)
27155      input_path=`$CYGPATH -u "$shortmode_path"`
27156      new_path="$input_path"
27157    fi
27158  fi
27159
27160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27161  if test "x$test_cygdrive_prefix" = x; then
27162    # As a simple fix, exclude /usr/bin since it's not a real path.
27163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27165      # a path prefixed by /cygdrive for fixpath to work.
27166      new_path="$CYGWIN_ROOT_PATH$input_path"
27167    fi
27168  fi
27169
27170
27171  if test "x$path" != "x$new_path"; then
27172    BOOT_JDK="$new_path"
27173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27175  fi
27176
27177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27178
27179  path="$BOOT_JDK"
27180  has_colon=`$ECHO $path | $GREP ^.:`
27181  new_path="$path"
27182  if test "x$has_colon" = x; then
27183    # Not in mixed or Windows style, start by that.
27184    new_path=`cmd //c echo $path`
27185  fi
27186
27187
27188  input_path="$new_path"
27189  # Check if we need to convert this using DOS-style short mode. If the path
27190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27191  # take no chances and rewrite it.
27192  # Note: m4 eats our [], so we need to use [ and ] instead.
27193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27194  if test "x$has_forbidden_chars" != x; then
27195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27197  fi
27198
27199
27200  windows_path="$new_path"
27201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27202    unix_path=`$CYGPATH -u "$windows_path"`
27203    new_path="$unix_path"
27204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27206    new_path="$unix_path"
27207  fi
27208
27209  if test "x$path" != "x$new_path"; then
27210    BOOT_JDK="$new_path"
27211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27213  fi
27214
27215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27217
27218    else
27219      # We're on a unix platform. Hooray! :)
27220      path="$BOOT_JDK"
27221      has_space=`$ECHO "$path" | $GREP " "`
27222      if test "x$has_space" != x; then
27223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27226      fi
27227
27228      # Use eval to expand a potential ~
27229      eval path="$path"
27230      if test ! -f "$path" && test ! -d "$path"; then
27231        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27232      fi
27233
27234      if test -d "$path"; then
27235        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27236      else
27237        dir="`$DIRNAME "$path"`"
27238        base="`$BASENAME "$path"`"
27239        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27240      fi
27241    fi
27242  fi
27243
27244            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27245$as_echo_n "checking for Boot JDK... " >&6; }
27246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27247$as_echo "$BOOT_JDK" >&6; }
27248            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27249$as_echo_n "checking Boot JDK version... " >&6; }
27250            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27252$as_echo "$BOOT_JDK_VERSION" >&6; }
27253          fi # end check jdk version
27254        fi # end check javac
27255      fi # end check java
27256    fi # end check boot jdk found
27257  fi
27258
27259    done
27260  fi
27261
27262  fi
27263
27264
27265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27267      # Do we have a bin/java?
27268      if test ! -x "$BOOT_JDK/bin/java"; then
27269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27271        BOOT_JDK_FOUND=no
27272      else
27273        # Do we have a bin/javac?
27274        if test ! -x "$BOOT_JDK/bin/javac"; then
27275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27279          BOOT_JDK_FOUND=no
27280        else
27281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27283
27284          # Extra M4 quote needed to protect [] in grep expression.
27285          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27286          if test "x$FOUND_CORRECT_VERSION" = x; then
27287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27291            BOOT_JDK_FOUND=no
27292          else
27293            # We're done! :-)
27294            BOOT_JDK_FOUND=yes
27295
27296  # Only process if variable expands to non-empty
27297
27298  if test "x$BOOT_JDK" != x; then
27299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27300
27301  # Input might be given as Windows format, start by converting to
27302  # unix format.
27303  path="$BOOT_JDK"
27304  new_path=`$CYGPATH -u "$path"`
27305
27306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27309  # "foo.exe" is OK but "foo" is an error.
27310  #
27311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27312  # It is also a way to make sure we got the proper file name for the real test later on.
27313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27314  if test "x$test_shortpath" = x; then
27315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27317    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27318  fi
27319
27320  # Call helper function which possibly converts this using DOS-style short mode.
27321  # If so, the updated path is stored in $new_path.
27322
27323  input_path="$new_path"
27324  # Check if we need to convert this using DOS-style short mode. If the path
27325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27326  # take no chances and rewrite it.
27327  # Note: m4 eats our [], so we need to use [ and ] instead.
27328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27329  if test "x$has_forbidden_chars" != x; then
27330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27334      # Going to short mode and back again did indeed matter. Since short mode is
27335      # case insensitive, let's make it lowercase to improve readability.
27336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27337      # Now convert it back to Unix-style (cygpath)
27338      input_path=`$CYGPATH -u "$shortmode_path"`
27339      new_path="$input_path"
27340    fi
27341  fi
27342
27343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27344  if test "x$test_cygdrive_prefix" = x; then
27345    # As a simple fix, exclude /usr/bin since it's not a real path.
27346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27348      # a path prefixed by /cygdrive for fixpath to work.
27349      new_path="$CYGWIN_ROOT_PATH$input_path"
27350    fi
27351  fi
27352
27353
27354  if test "x$path" != "x$new_path"; then
27355    BOOT_JDK="$new_path"
27356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27358  fi
27359
27360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27361
27362  path="$BOOT_JDK"
27363  has_colon=`$ECHO $path | $GREP ^.:`
27364  new_path="$path"
27365  if test "x$has_colon" = x; then
27366    # Not in mixed or Windows style, start by that.
27367    new_path=`cmd //c echo $path`
27368  fi
27369
27370
27371  input_path="$new_path"
27372  # Check if we need to convert this using DOS-style short mode. If the path
27373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27374  # take no chances and rewrite it.
27375  # Note: m4 eats our [], so we need to use [ and ] instead.
27376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27377  if test "x$has_forbidden_chars" != x; then
27378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27380  fi
27381
27382
27383  windows_path="$new_path"
27384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385    unix_path=`$CYGPATH -u "$windows_path"`
27386    new_path="$unix_path"
27387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389    new_path="$unix_path"
27390  fi
27391
27392  if test "x$path" != "x$new_path"; then
27393    BOOT_JDK="$new_path"
27394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27396  fi
27397
27398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27400
27401    else
27402      # We're on a unix platform. Hooray! :)
27403      path="$BOOT_JDK"
27404      has_space=`$ECHO "$path" | $GREP " "`
27405      if test "x$has_space" != x; then
27406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27409      fi
27410
27411      # Use eval to expand a potential ~
27412      eval path="$path"
27413      if test ! -f "$path" && test ! -d "$path"; then
27414        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27415      fi
27416
27417      if test -d "$path"; then
27418        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27419      else
27420        dir="`$DIRNAME "$path"`"
27421        base="`$BASENAME "$path"`"
27422        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27423      fi
27424    fi
27425  fi
27426
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27428$as_echo_n "checking for Boot JDK... " >&6; }
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27430$as_echo "$BOOT_JDK" >&6; }
27431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27432$as_echo_n "checking Boot JDK version... " >&6; }
27433            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27435$as_echo "$BOOT_JDK_VERSION" >&6; }
27436          fi # end check jdk version
27437        fi # end check javac
27438      fi # end check java
27439    fi # end check boot jdk found
27440  fi
27441
27442
27443  if test "x$BOOT_JDK_FOUND" = xno; then
27444    # Now execute the test
27445
27446  if test "x$PROGRAMFILES" != x; then
27447    VIRTUAL_DIR="$PROGRAMFILES/Java"
27448
27449  windows_path="$VIRTUAL_DIR"
27450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27451    unix_path=`$CYGPATH -u "$windows_path"`
27452    VIRTUAL_DIR="$unix_path"
27453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27455    VIRTUAL_DIR="$unix_path"
27456  fi
27457
27458
27459  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27460  BOOT_JDK_SUFFIX=""
27461  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27462  if test "x$ALL_JDKS_FOUND" != x; then
27463    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27464
27465  if test "x$BOOT_JDK_FOUND" = xno; then
27466    # Now execute the test
27467
27468        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27469        if test -d "$BOOT_JDK"; then
27470          BOOT_JDK_FOUND=maybe
27471          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27472$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27473        fi
27474
27475
27476    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27477    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27478      # Do we have a bin/java?
27479      if test ! -x "$BOOT_JDK/bin/java"; then
27480        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27482        BOOT_JDK_FOUND=no
27483      else
27484        # Do we have a bin/javac?
27485        if test ! -x "$BOOT_JDK/bin/javac"; then
27486          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27488          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27489$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27490          BOOT_JDK_FOUND=no
27491        else
27492          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27493          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27494
27495          # Extra M4 quote needed to protect [] in grep expression.
27496          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27497          if test "x$FOUND_CORRECT_VERSION" = x; then
27498            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27500            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27501$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27502            BOOT_JDK_FOUND=no
27503          else
27504            # We're done! :-)
27505            BOOT_JDK_FOUND=yes
27506
27507  # Only process if variable expands to non-empty
27508
27509  if test "x$BOOT_JDK" != x; then
27510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27511
27512  # Input might be given as Windows format, start by converting to
27513  # unix format.
27514  path="$BOOT_JDK"
27515  new_path=`$CYGPATH -u "$path"`
27516
27517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27520  # "foo.exe" is OK but "foo" is an error.
27521  #
27522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27523  # It is also a way to make sure we got the proper file name for the real test later on.
27524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27525  if test "x$test_shortpath" = x; then
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27528    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27529  fi
27530
27531  # Call helper function which possibly converts this using DOS-style short mode.
27532  # If so, the updated path is stored in $new_path.
27533
27534  input_path="$new_path"
27535  # Check if we need to convert this using DOS-style short mode. If the path
27536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27537  # take no chances and rewrite it.
27538  # Note: m4 eats our [], so we need to use [ and ] instead.
27539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27540  if test "x$has_forbidden_chars" != x; then
27541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27545      # Going to short mode and back again did indeed matter. Since short mode is
27546      # case insensitive, let's make it lowercase to improve readability.
27547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27548      # Now convert it back to Unix-style (cygpath)
27549      input_path=`$CYGPATH -u "$shortmode_path"`
27550      new_path="$input_path"
27551    fi
27552  fi
27553
27554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27555  if test "x$test_cygdrive_prefix" = x; then
27556    # As a simple fix, exclude /usr/bin since it's not a real path.
27557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27559      # a path prefixed by /cygdrive for fixpath to work.
27560      new_path="$CYGWIN_ROOT_PATH$input_path"
27561    fi
27562  fi
27563
27564
27565  if test "x$path" != "x$new_path"; then
27566    BOOT_JDK="$new_path"
27567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27569  fi
27570
27571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27572
27573  path="$BOOT_JDK"
27574  has_colon=`$ECHO $path | $GREP ^.:`
27575  new_path="$path"
27576  if test "x$has_colon" = x; then
27577    # Not in mixed or Windows style, start by that.
27578    new_path=`cmd //c echo $path`
27579  fi
27580
27581
27582  input_path="$new_path"
27583  # Check if we need to convert this using DOS-style short mode. If the path
27584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27585  # take no chances and rewrite it.
27586  # Note: m4 eats our [], so we need to use [ and ] instead.
27587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27588  if test "x$has_forbidden_chars" != x; then
27589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27591  fi
27592
27593
27594  windows_path="$new_path"
27595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27596    unix_path=`$CYGPATH -u "$windows_path"`
27597    new_path="$unix_path"
27598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27600    new_path="$unix_path"
27601  fi
27602
27603  if test "x$path" != "x$new_path"; then
27604    BOOT_JDK="$new_path"
27605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27607  fi
27608
27609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27611
27612    else
27613      # We're on a unix platform. Hooray! :)
27614      path="$BOOT_JDK"
27615      has_space=`$ECHO "$path" | $GREP " "`
27616      if test "x$has_space" != x; then
27617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27620      fi
27621
27622      # Use eval to expand a potential ~
27623      eval path="$path"
27624      if test ! -f "$path" && test ! -d "$path"; then
27625        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27626      fi
27627
27628      if test -d "$path"; then
27629        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27630      else
27631        dir="`$DIRNAME "$path"`"
27632        base="`$BASENAME "$path"`"
27633        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27634      fi
27635    fi
27636  fi
27637
27638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27639$as_echo_n "checking for Boot JDK... " >&6; }
27640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27641$as_echo "$BOOT_JDK" >&6; }
27642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27643$as_echo_n "checking Boot JDK version... " >&6; }
27644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27646$as_echo "$BOOT_JDK_VERSION" >&6; }
27647          fi # end check jdk version
27648        fi # end check javac
27649      fi # end check java
27650    fi # end check boot jdk found
27651  fi
27652
27653    done
27654  fi
27655
27656  fi
27657
27658
27659    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27660    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27661      # Do we have a bin/java?
27662      if test ! -x "$BOOT_JDK/bin/java"; then
27663        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27665        BOOT_JDK_FOUND=no
27666      else
27667        # Do we have a bin/javac?
27668        if test ! -x "$BOOT_JDK/bin/javac"; then
27669          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27671          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27672$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27673          BOOT_JDK_FOUND=no
27674        else
27675          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27676          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27677
27678          # Extra M4 quote needed to protect [] in grep expression.
27679          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27680          if test "x$FOUND_CORRECT_VERSION" = x; then
27681            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27683            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27684$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27685            BOOT_JDK_FOUND=no
27686          else
27687            # We're done! :-)
27688            BOOT_JDK_FOUND=yes
27689
27690  # Only process if variable expands to non-empty
27691
27692  if test "x$BOOT_JDK" != x; then
27693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27694
27695  # Input might be given as Windows format, start by converting to
27696  # unix format.
27697  path="$BOOT_JDK"
27698  new_path=`$CYGPATH -u "$path"`
27699
27700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27703  # "foo.exe" is OK but "foo" is an error.
27704  #
27705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27706  # It is also a way to make sure we got the proper file name for the real test later on.
27707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27708  if test "x$test_shortpath" = x; then
27709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27711    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27712  fi
27713
27714  # Call helper function which possibly converts this using DOS-style short mode.
27715  # If so, the updated path is stored in $new_path.
27716
27717  input_path="$new_path"
27718  # Check if we need to convert this using DOS-style short mode. If the path
27719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27720  # take no chances and rewrite it.
27721  # Note: m4 eats our [], so we need to use [ and ] instead.
27722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27723  if test "x$has_forbidden_chars" != x; then
27724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27728      # Going to short mode and back again did indeed matter. Since short mode is
27729      # case insensitive, let's make it lowercase to improve readability.
27730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27731      # Now convert it back to Unix-style (cygpath)
27732      input_path=`$CYGPATH -u "$shortmode_path"`
27733      new_path="$input_path"
27734    fi
27735  fi
27736
27737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27738  if test "x$test_cygdrive_prefix" = x; then
27739    # As a simple fix, exclude /usr/bin since it's not a real path.
27740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27742      # a path prefixed by /cygdrive for fixpath to work.
27743      new_path="$CYGWIN_ROOT_PATH$input_path"
27744    fi
27745  fi
27746
27747
27748  if test "x$path" != "x$new_path"; then
27749    BOOT_JDK="$new_path"
27750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27752  fi
27753
27754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27755
27756  path="$BOOT_JDK"
27757  has_colon=`$ECHO $path | $GREP ^.:`
27758  new_path="$path"
27759  if test "x$has_colon" = x; then
27760    # Not in mixed or Windows style, start by that.
27761    new_path=`cmd //c echo $path`
27762  fi
27763
27764
27765  input_path="$new_path"
27766  # Check if we need to convert this using DOS-style short mode. If the path
27767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27768  # take no chances and rewrite it.
27769  # Note: m4 eats our [], so we need to use [ and ] instead.
27770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27771  if test "x$has_forbidden_chars" != x; then
27772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27774  fi
27775
27776
27777  windows_path="$new_path"
27778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27779    unix_path=`$CYGPATH -u "$windows_path"`
27780    new_path="$unix_path"
27781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27783    new_path="$unix_path"
27784  fi
27785
27786  if test "x$path" != "x$new_path"; then
27787    BOOT_JDK="$new_path"
27788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27790  fi
27791
27792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27794
27795    else
27796      # We're on a unix platform. Hooray! :)
27797      path="$BOOT_JDK"
27798      has_space=`$ECHO "$path" | $GREP " "`
27799      if test "x$has_space" != x; then
27800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27803      fi
27804
27805      # Use eval to expand a potential ~
27806      eval path="$path"
27807      if test ! -f "$path" && test ! -d "$path"; then
27808        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27809      fi
27810
27811      if test -d "$path"; then
27812        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27813      else
27814        dir="`$DIRNAME "$path"`"
27815        base="`$BASENAME "$path"`"
27816        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27817      fi
27818    fi
27819  fi
27820
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27822$as_echo_n "checking for Boot JDK... " >&6; }
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27824$as_echo "$BOOT_JDK" >&6; }
27825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27826$as_echo_n "checking Boot JDK version... " >&6; }
27827            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27829$as_echo "$BOOT_JDK_VERSION" >&6; }
27830          fi # end check jdk version
27831        fi # end check javac
27832      fi # end check java
27833    fi # end check boot jdk found
27834  fi
27835
27836
27837  if test "x$BOOT_JDK_FOUND" = xno; then
27838    # Now execute the test
27839
27840  if test "x$ProgramFiles" != x; then
27841    VIRTUAL_DIR="$ProgramFiles/Java"
27842
27843  windows_path="$VIRTUAL_DIR"
27844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27845    unix_path=`$CYGPATH -u "$windows_path"`
27846    VIRTUAL_DIR="$unix_path"
27847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27849    VIRTUAL_DIR="$unix_path"
27850  fi
27851
27852
27853  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27854  BOOT_JDK_SUFFIX=""
27855  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27856  if test "x$ALL_JDKS_FOUND" != x; then
27857    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27858
27859  if test "x$BOOT_JDK_FOUND" = xno; then
27860    # Now execute the test
27861
27862        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27863        if test -d "$BOOT_JDK"; then
27864          BOOT_JDK_FOUND=maybe
27865          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27866$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27867        fi
27868
27869
27870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27872      # Do we have a bin/java?
27873      if test ! -x "$BOOT_JDK/bin/java"; then
27874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27876        BOOT_JDK_FOUND=no
27877      else
27878        # Do we have a bin/javac?
27879        if test ! -x "$BOOT_JDK/bin/javac"; then
27880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27884          BOOT_JDK_FOUND=no
27885        else
27886          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27887          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27888
27889          # Extra M4 quote needed to protect [] in grep expression.
27890          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27891          if test "x$FOUND_CORRECT_VERSION" = x; then
27892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27894            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27895$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27896            BOOT_JDK_FOUND=no
27897          else
27898            # We're done! :-)
27899            BOOT_JDK_FOUND=yes
27900
27901  # Only process if variable expands to non-empty
27902
27903  if test "x$BOOT_JDK" != x; then
27904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27905
27906  # Input might be given as Windows format, start by converting to
27907  # unix format.
27908  path="$BOOT_JDK"
27909  new_path=`$CYGPATH -u "$path"`
27910
27911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27914  # "foo.exe" is OK but "foo" is an error.
27915  #
27916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27917  # It is also a way to make sure we got the proper file name for the real test later on.
27918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27919  if test "x$test_shortpath" = x; then
27920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27922    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27923  fi
27924
27925  # Call helper function which possibly converts this using DOS-style short mode.
27926  # If so, the updated path is stored in $new_path.
27927
27928  input_path="$new_path"
27929  # Check if we need to convert this using DOS-style short mode. If the path
27930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27931  # take no chances and rewrite it.
27932  # Note: m4 eats our [], so we need to use [ and ] instead.
27933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27934  if test "x$has_forbidden_chars" != x; then
27935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27939      # Going to short mode and back again did indeed matter. Since short mode is
27940      # case insensitive, let's make it lowercase to improve readability.
27941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27942      # Now convert it back to Unix-style (cygpath)
27943      input_path=`$CYGPATH -u "$shortmode_path"`
27944      new_path="$input_path"
27945    fi
27946  fi
27947
27948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27949  if test "x$test_cygdrive_prefix" = x; then
27950    # As a simple fix, exclude /usr/bin since it's not a real path.
27951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27953      # a path prefixed by /cygdrive for fixpath to work.
27954      new_path="$CYGWIN_ROOT_PATH$input_path"
27955    fi
27956  fi
27957
27958
27959  if test "x$path" != "x$new_path"; then
27960    BOOT_JDK="$new_path"
27961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27963  fi
27964
27965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27966
27967  path="$BOOT_JDK"
27968  has_colon=`$ECHO $path | $GREP ^.:`
27969  new_path="$path"
27970  if test "x$has_colon" = x; then
27971    # Not in mixed or Windows style, start by that.
27972    new_path=`cmd //c echo $path`
27973  fi
27974
27975
27976  input_path="$new_path"
27977  # Check if we need to convert this using DOS-style short mode. If the path
27978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27979  # take no chances and rewrite it.
27980  # Note: m4 eats our [], so we need to use [ and ] instead.
27981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27982  if test "x$has_forbidden_chars" != x; then
27983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27985  fi
27986
27987
27988  windows_path="$new_path"
27989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27990    unix_path=`$CYGPATH -u "$windows_path"`
27991    new_path="$unix_path"
27992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27994    new_path="$unix_path"
27995  fi
27996
27997  if test "x$path" != "x$new_path"; then
27998    BOOT_JDK="$new_path"
27999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28001  fi
28002
28003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28005
28006    else
28007      # We're on a unix platform. Hooray! :)
28008      path="$BOOT_JDK"
28009      has_space=`$ECHO "$path" | $GREP " "`
28010      if test "x$has_space" != x; then
28011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28014      fi
28015
28016      # Use eval to expand a potential ~
28017      eval path="$path"
28018      if test ! -f "$path" && test ! -d "$path"; then
28019        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28020      fi
28021
28022      if test -d "$path"; then
28023        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28024      else
28025        dir="`$DIRNAME "$path"`"
28026        base="`$BASENAME "$path"`"
28027        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28028      fi
28029    fi
28030  fi
28031
28032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28033$as_echo_n "checking for Boot JDK... " >&6; }
28034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28035$as_echo "$BOOT_JDK" >&6; }
28036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28037$as_echo_n "checking Boot JDK version... " >&6; }
28038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28040$as_echo "$BOOT_JDK_VERSION" >&6; }
28041          fi # end check jdk version
28042        fi # end check javac
28043      fi # end check java
28044    fi # end check boot jdk found
28045  fi
28046
28047    done
28048  fi
28049
28050  fi
28051
28052
28053    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28054    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28055      # Do we have a bin/java?
28056      if test ! -x "$BOOT_JDK/bin/java"; then
28057        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28059        BOOT_JDK_FOUND=no
28060      else
28061        # Do we have a bin/javac?
28062        if test ! -x "$BOOT_JDK/bin/javac"; then
28063          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28065          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28066$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28067          BOOT_JDK_FOUND=no
28068        else
28069          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28070          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28071
28072          # Extra M4 quote needed to protect [] in grep expression.
28073          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28074          if test "x$FOUND_CORRECT_VERSION" = x; then
28075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28077            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28078$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28079            BOOT_JDK_FOUND=no
28080          else
28081            # We're done! :-)
28082            BOOT_JDK_FOUND=yes
28083
28084  # Only process if variable expands to non-empty
28085
28086  if test "x$BOOT_JDK" != x; then
28087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28088
28089  # Input might be given as Windows format, start by converting to
28090  # unix format.
28091  path="$BOOT_JDK"
28092  new_path=`$CYGPATH -u "$path"`
28093
28094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28097  # "foo.exe" is OK but "foo" is an error.
28098  #
28099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28100  # It is also a way to make sure we got the proper file name for the real test later on.
28101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28102  if test "x$test_shortpath" = x; then
28103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28105    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28106  fi
28107
28108  # Call helper function which possibly converts this using DOS-style short mode.
28109  # If so, the updated path is stored in $new_path.
28110
28111  input_path="$new_path"
28112  # Check if we need to convert this using DOS-style short mode. If the path
28113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28114  # take no chances and rewrite it.
28115  # Note: m4 eats our [], so we need to use [ and ] instead.
28116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28117  if test "x$has_forbidden_chars" != x; then
28118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28122      # Going to short mode and back again did indeed matter. Since short mode is
28123      # case insensitive, let's make it lowercase to improve readability.
28124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28125      # Now convert it back to Unix-style (cygpath)
28126      input_path=`$CYGPATH -u "$shortmode_path"`
28127      new_path="$input_path"
28128    fi
28129  fi
28130
28131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28132  if test "x$test_cygdrive_prefix" = x; then
28133    # As a simple fix, exclude /usr/bin since it's not a real path.
28134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28136      # a path prefixed by /cygdrive for fixpath to work.
28137      new_path="$CYGWIN_ROOT_PATH$input_path"
28138    fi
28139  fi
28140
28141
28142  if test "x$path" != "x$new_path"; then
28143    BOOT_JDK="$new_path"
28144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28146  fi
28147
28148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28149
28150  path="$BOOT_JDK"
28151  has_colon=`$ECHO $path | $GREP ^.:`
28152  new_path="$path"
28153  if test "x$has_colon" = x; then
28154    # Not in mixed or Windows style, start by that.
28155    new_path=`cmd //c echo $path`
28156  fi
28157
28158
28159  input_path="$new_path"
28160  # Check if we need to convert this using DOS-style short mode. If the path
28161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28162  # take no chances and rewrite it.
28163  # Note: m4 eats our [], so we need to use [ and ] instead.
28164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28165  if test "x$has_forbidden_chars" != x; then
28166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28168  fi
28169
28170
28171  windows_path="$new_path"
28172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28173    unix_path=`$CYGPATH -u "$windows_path"`
28174    new_path="$unix_path"
28175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28177    new_path="$unix_path"
28178  fi
28179
28180  if test "x$path" != "x$new_path"; then
28181    BOOT_JDK="$new_path"
28182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28184  fi
28185
28186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28188
28189    else
28190      # We're on a unix platform. Hooray! :)
28191      path="$BOOT_JDK"
28192      has_space=`$ECHO "$path" | $GREP " "`
28193      if test "x$has_space" != x; then
28194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28197      fi
28198
28199      # Use eval to expand a potential ~
28200      eval path="$path"
28201      if test ! -f "$path" && test ! -d "$path"; then
28202        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28203      fi
28204
28205      if test -d "$path"; then
28206        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28207      else
28208        dir="`$DIRNAME "$path"`"
28209        base="`$BASENAME "$path"`"
28210        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28211      fi
28212    fi
28213  fi
28214
28215            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28216$as_echo_n "checking for Boot JDK... " >&6; }
28217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28218$as_echo "$BOOT_JDK" >&6; }
28219            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28220$as_echo_n "checking Boot JDK version... " >&6; }
28221            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28223$as_echo "$BOOT_JDK_VERSION" >&6; }
28224          fi # end check jdk version
28225        fi # end check javac
28226      fi # end check java
28227    fi # end check boot jdk found
28228  fi
28229
28230
28231  if test "x$BOOT_JDK_FOUND" = xno; then
28232    # Now execute the test
28233
28234  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28235  BOOT_JDK_SUFFIX=""
28236  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28237  if test "x$ALL_JDKS_FOUND" != x; then
28238    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28239
28240  if test "x$BOOT_JDK_FOUND" = xno; then
28241    # Now execute the test
28242
28243        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28244        if test -d "$BOOT_JDK"; then
28245          BOOT_JDK_FOUND=maybe
28246          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28247$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28248        fi
28249
28250
28251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28253      # Do we have a bin/java?
28254      if test ! -x "$BOOT_JDK/bin/java"; then
28255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28257        BOOT_JDK_FOUND=no
28258      else
28259        # Do we have a bin/javac?
28260        if test ! -x "$BOOT_JDK/bin/javac"; then
28261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28265          BOOT_JDK_FOUND=no
28266        else
28267          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28268          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28269
28270          # Extra M4 quote needed to protect [] in grep expression.
28271          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28272          if test "x$FOUND_CORRECT_VERSION" = x; then
28273            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28275            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28276$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28277            BOOT_JDK_FOUND=no
28278          else
28279            # We're done! :-)
28280            BOOT_JDK_FOUND=yes
28281
28282  # Only process if variable expands to non-empty
28283
28284  if test "x$BOOT_JDK" != x; then
28285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28286
28287  # Input might be given as Windows format, start by converting to
28288  # unix format.
28289  path="$BOOT_JDK"
28290  new_path=`$CYGPATH -u "$path"`
28291
28292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28295  # "foo.exe" is OK but "foo" is an error.
28296  #
28297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28298  # It is also a way to make sure we got the proper file name for the real test later on.
28299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28300  if test "x$test_shortpath" = x; then
28301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28303    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28304  fi
28305
28306  # Call helper function which possibly converts this using DOS-style short mode.
28307  # If so, the updated path is stored in $new_path.
28308
28309  input_path="$new_path"
28310  # Check if we need to convert this using DOS-style short mode. If the path
28311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28312  # take no chances and rewrite it.
28313  # Note: m4 eats our [], so we need to use [ and ] instead.
28314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28315  if test "x$has_forbidden_chars" != x; then
28316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28320      # Going to short mode and back again did indeed matter. Since short mode is
28321      # case insensitive, let's make it lowercase to improve readability.
28322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28323      # Now convert it back to Unix-style (cygpath)
28324      input_path=`$CYGPATH -u "$shortmode_path"`
28325      new_path="$input_path"
28326    fi
28327  fi
28328
28329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28330  if test "x$test_cygdrive_prefix" = x; then
28331    # As a simple fix, exclude /usr/bin since it's not a real path.
28332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28334      # a path prefixed by /cygdrive for fixpath to work.
28335      new_path="$CYGWIN_ROOT_PATH$input_path"
28336    fi
28337  fi
28338
28339
28340  if test "x$path" != "x$new_path"; then
28341    BOOT_JDK="$new_path"
28342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28344  fi
28345
28346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28347
28348  path="$BOOT_JDK"
28349  has_colon=`$ECHO $path | $GREP ^.:`
28350  new_path="$path"
28351  if test "x$has_colon" = x; then
28352    # Not in mixed or Windows style, start by that.
28353    new_path=`cmd //c echo $path`
28354  fi
28355
28356
28357  input_path="$new_path"
28358  # Check if we need to convert this using DOS-style short mode. If the path
28359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28360  # take no chances and rewrite it.
28361  # Note: m4 eats our [], so we need to use [ and ] instead.
28362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28363  if test "x$has_forbidden_chars" != x; then
28364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28366  fi
28367
28368
28369  windows_path="$new_path"
28370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28371    unix_path=`$CYGPATH -u "$windows_path"`
28372    new_path="$unix_path"
28373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28375    new_path="$unix_path"
28376  fi
28377
28378  if test "x$path" != "x$new_path"; then
28379    BOOT_JDK="$new_path"
28380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28381$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28382  fi
28383
28384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28386
28387    else
28388      # We're on a unix platform. Hooray! :)
28389      path="$BOOT_JDK"
28390      has_space=`$ECHO "$path" | $GREP " "`
28391      if test "x$has_space" != x; then
28392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28395      fi
28396
28397      # Use eval to expand a potential ~
28398      eval path="$path"
28399      if test ! -f "$path" && test ! -d "$path"; then
28400        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28401      fi
28402
28403      if test -d "$path"; then
28404        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28405      else
28406        dir="`$DIRNAME "$path"`"
28407        base="`$BASENAME "$path"`"
28408        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28409      fi
28410    fi
28411  fi
28412
28413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28414$as_echo_n "checking for Boot JDK... " >&6; }
28415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28416$as_echo "$BOOT_JDK" >&6; }
28417            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28418$as_echo_n "checking Boot JDK version... " >&6; }
28419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28421$as_echo "$BOOT_JDK_VERSION" >&6; }
28422          fi # end check jdk version
28423        fi # end check javac
28424      fi # end check java
28425    fi # end check boot jdk found
28426  fi
28427
28428    done
28429  fi
28430
28431
28432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28434      # Do we have a bin/java?
28435      if test ! -x "$BOOT_JDK/bin/java"; then
28436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28438        BOOT_JDK_FOUND=no
28439      else
28440        # Do we have a bin/javac?
28441        if test ! -x "$BOOT_JDK/bin/javac"; then
28442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28446          BOOT_JDK_FOUND=no
28447        else
28448          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28449          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28450
28451          # Extra M4 quote needed to protect [] in grep expression.
28452          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28453          if test "x$FOUND_CORRECT_VERSION" = x; then
28454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28456            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28457$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28458            BOOT_JDK_FOUND=no
28459          else
28460            # We're done! :-)
28461            BOOT_JDK_FOUND=yes
28462
28463  # Only process if variable expands to non-empty
28464
28465  if test "x$BOOT_JDK" != x; then
28466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28467
28468  # Input might be given as Windows format, start by converting to
28469  # unix format.
28470  path="$BOOT_JDK"
28471  new_path=`$CYGPATH -u "$path"`
28472
28473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28476  # "foo.exe" is OK but "foo" is an error.
28477  #
28478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28479  # It is also a way to make sure we got the proper file name for the real test later on.
28480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28481  if test "x$test_shortpath" = x; then
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28485  fi
28486
28487  # Call helper function which possibly converts this using DOS-style short mode.
28488  # If so, the updated path is stored in $new_path.
28489
28490  input_path="$new_path"
28491  # Check if we need to convert this using DOS-style short mode. If the path
28492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28493  # take no chances and rewrite it.
28494  # Note: m4 eats our [], so we need to use [ and ] instead.
28495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28496  if test "x$has_forbidden_chars" != x; then
28497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28501      # Going to short mode and back again did indeed matter. Since short mode is
28502      # case insensitive, let's make it lowercase to improve readability.
28503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28504      # Now convert it back to Unix-style (cygpath)
28505      input_path=`$CYGPATH -u "$shortmode_path"`
28506      new_path="$input_path"
28507    fi
28508  fi
28509
28510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28511  if test "x$test_cygdrive_prefix" = x; then
28512    # As a simple fix, exclude /usr/bin since it's not a real path.
28513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28515      # a path prefixed by /cygdrive for fixpath to work.
28516      new_path="$CYGWIN_ROOT_PATH$input_path"
28517    fi
28518  fi
28519
28520
28521  if test "x$path" != "x$new_path"; then
28522    BOOT_JDK="$new_path"
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28525  fi
28526
28527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28528
28529  path="$BOOT_JDK"
28530  has_colon=`$ECHO $path | $GREP ^.:`
28531  new_path="$path"
28532  if test "x$has_colon" = x; then
28533    # Not in mixed or Windows style, start by that.
28534    new_path=`cmd //c echo $path`
28535  fi
28536
28537
28538  input_path="$new_path"
28539  # Check if we need to convert this using DOS-style short mode. If the path
28540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28541  # take no chances and rewrite it.
28542  # Note: m4 eats our [], so we need to use [ and ] instead.
28543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28544  if test "x$has_forbidden_chars" != x; then
28545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28547  fi
28548
28549
28550  windows_path="$new_path"
28551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28552    unix_path=`$CYGPATH -u "$windows_path"`
28553    new_path="$unix_path"
28554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28556    new_path="$unix_path"
28557  fi
28558
28559  if test "x$path" != "x$new_path"; then
28560    BOOT_JDK="$new_path"
28561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28563  fi
28564
28565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28567
28568    else
28569      # We're on a unix platform. Hooray! :)
28570      path="$BOOT_JDK"
28571      has_space=`$ECHO "$path" | $GREP " "`
28572      if test "x$has_space" != x; then
28573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28576      fi
28577
28578      # Use eval to expand a potential ~
28579      eval path="$path"
28580      if test ! -f "$path" && test ! -d "$path"; then
28581        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28582      fi
28583
28584      if test -d "$path"; then
28585        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28586      else
28587        dir="`$DIRNAME "$path"`"
28588        base="`$BASENAME "$path"`"
28589        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28590      fi
28591    fi
28592  fi
28593
28594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28595$as_echo_n "checking for Boot JDK... " >&6; }
28596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28597$as_echo "$BOOT_JDK" >&6; }
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28599$as_echo_n "checking Boot JDK version... " >&6; }
28600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28602$as_echo "$BOOT_JDK_VERSION" >&6; }
28603          fi # end check jdk version
28604        fi # end check javac
28605      fi # end check java
28606    fi # end check boot jdk found
28607  fi
28608
28609  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28610
28611  if test "x$BOOT_JDK_FOUND" = xno; then
28612    # Now execute the test
28613
28614  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28615  BOOT_JDK_SUFFIX="/Contents/Home"
28616  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28617  if test "x$ALL_JDKS_FOUND" != x; then
28618    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28619
28620  if test "x$BOOT_JDK_FOUND" = xno; then
28621    # Now execute the test
28622
28623        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28624        if test -d "$BOOT_JDK"; then
28625          BOOT_JDK_FOUND=maybe
28626          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28627$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28628        fi
28629
28630
28631    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28632    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28633      # Do we have a bin/java?
28634      if test ! -x "$BOOT_JDK/bin/java"; then
28635        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28637        BOOT_JDK_FOUND=no
28638      else
28639        # Do we have a bin/javac?
28640        if test ! -x "$BOOT_JDK/bin/javac"; then
28641          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28643          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28644$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28645          BOOT_JDK_FOUND=no
28646        else
28647          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28648          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28649
28650          # Extra M4 quote needed to protect [] in grep expression.
28651          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28652          if test "x$FOUND_CORRECT_VERSION" = x; then
28653            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28655            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28656$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28657            BOOT_JDK_FOUND=no
28658          else
28659            # We're done! :-)
28660            BOOT_JDK_FOUND=yes
28661
28662  # Only process if variable expands to non-empty
28663
28664  if test "x$BOOT_JDK" != x; then
28665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28666
28667  # Input might be given as Windows format, start by converting to
28668  # unix format.
28669  path="$BOOT_JDK"
28670  new_path=`$CYGPATH -u "$path"`
28671
28672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28675  # "foo.exe" is OK but "foo" is an error.
28676  #
28677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28678  # It is also a way to make sure we got the proper file name for the real test later on.
28679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28680  if test "x$test_shortpath" = x; then
28681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28683    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28684  fi
28685
28686  # Call helper function which possibly converts this using DOS-style short mode.
28687  # If so, the updated path is stored in $new_path.
28688
28689  input_path="$new_path"
28690  # Check if we need to convert this using DOS-style short mode. If the path
28691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28692  # take no chances and rewrite it.
28693  # Note: m4 eats our [], so we need to use [ and ] instead.
28694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28695  if test "x$has_forbidden_chars" != x; then
28696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28700      # Going to short mode and back again did indeed matter. Since short mode is
28701      # case insensitive, let's make it lowercase to improve readability.
28702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28703      # Now convert it back to Unix-style (cygpath)
28704      input_path=`$CYGPATH -u "$shortmode_path"`
28705      new_path="$input_path"
28706    fi
28707  fi
28708
28709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28710  if test "x$test_cygdrive_prefix" = x; then
28711    # As a simple fix, exclude /usr/bin since it's not a real path.
28712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28714      # a path prefixed by /cygdrive for fixpath to work.
28715      new_path="$CYGWIN_ROOT_PATH$input_path"
28716    fi
28717  fi
28718
28719
28720  if test "x$path" != "x$new_path"; then
28721    BOOT_JDK="$new_path"
28722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28724  fi
28725
28726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28727
28728  path="$BOOT_JDK"
28729  has_colon=`$ECHO $path | $GREP ^.:`
28730  new_path="$path"
28731  if test "x$has_colon" = x; then
28732    # Not in mixed or Windows style, start by that.
28733    new_path=`cmd //c echo $path`
28734  fi
28735
28736
28737  input_path="$new_path"
28738  # Check if we need to convert this using DOS-style short mode. If the path
28739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28740  # take no chances and rewrite it.
28741  # Note: m4 eats our [], so we need to use [ and ] instead.
28742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28743  if test "x$has_forbidden_chars" != x; then
28744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28746  fi
28747
28748
28749  windows_path="$new_path"
28750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28751    unix_path=`$CYGPATH -u "$windows_path"`
28752    new_path="$unix_path"
28753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28755    new_path="$unix_path"
28756  fi
28757
28758  if test "x$path" != "x$new_path"; then
28759    BOOT_JDK="$new_path"
28760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28762  fi
28763
28764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28766
28767    else
28768      # We're on a unix platform. Hooray! :)
28769      path="$BOOT_JDK"
28770      has_space=`$ECHO "$path" | $GREP " "`
28771      if test "x$has_space" != x; then
28772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28775      fi
28776
28777      # Use eval to expand a potential ~
28778      eval path="$path"
28779      if test ! -f "$path" && test ! -d "$path"; then
28780        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28781      fi
28782
28783      if test -d "$path"; then
28784        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28785      else
28786        dir="`$DIRNAME "$path"`"
28787        base="`$BASENAME "$path"`"
28788        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28789      fi
28790    fi
28791  fi
28792
28793            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28794$as_echo_n "checking for Boot JDK... " >&6; }
28795            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28796$as_echo "$BOOT_JDK" >&6; }
28797            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28798$as_echo_n "checking Boot JDK version... " >&6; }
28799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28801$as_echo "$BOOT_JDK_VERSION" >&6; }
28802          fi # end check jdk version
28803        fi # end check javac
28804      fi # end check java
28805    fi # end check boot jdk found
28806  fi
28807
28808    done
28809  fi
28810
28811
28812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28814      # Do we have a bin/java?
28815      if test ! -x "$BOOT_JDK/bin/java"; then
28816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28818        BOOT_JDK_FOUND=no
28819      else
28820        # Do we have a bin/javac?
28821        if test ! -x "$BOOT_JDK/bin/javac"; then
28822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28826          BOOT_JDK_FOUND=no
28827        else
28828          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28829          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28830
28831          # Extra M4 quote needed to protect [] in grep expression.
28832          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28833          if test "x$FOUND_CORRECT_VERSION" = x; then
28834            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28836            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28837$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28838            BOOT_JDK_FOUND=no
28839          else
28840            # We're done! :-)
28841            BOOT_JDK_FOUND=yes
28842
28843  # Only process if variable expands to non-empty
28844
28845  if test "x$BOOT_JDK" != x; then
28846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28847
28848  # Input might be given as Windows format, start by converting to
28849  # unix format.
28850  path="$BOOT_JDK"
28851  new_path=`$CYGPATH -u "$path"`
28852
28853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28856  # "foo.exe" is OK but "foo" is an error.
28857  #
28858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28859  # It is also a way to make sure we got the proper file name for the real test later on.
28860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28861  if test "x$test_shortpath" = x; then
28862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28865  fi
28866
28867  # Call helper function which possibly converts this using DOS-style short mode.
28868  # If so, the updated path is stored in $new_path.
28869
28870  input_path="$new_path"
28871  # Check if we need to convert this using DOS-style short mode. If the path
28872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28873  # take no chances and rewrite it.
28874  # Note: m4 eats our [], so we need to use [ and ] instead.
28875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28876  if test "x$has_forbidden_chars" != x; then
28877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28881      # Going to short mode and back again did indeed matter. Since short mode is
28882      # case insensitive, let's make it lowercase to improve readability.
28883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28884      # Now convert it back to Unix-style (cygpath)
28885      input_path=`$CYGPATH -u "$shortmode_path"`
28886      new_path="$input_path"
28887    fi
28888  fi
28889
28890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28891  if test "x$test_cygdrive_prefix" = x; then
28892    # As a simple fix, exclude /usr/bin since it's not a real path.
28893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28895      # a path prefixed by /cygdrive for fixpath to work.
28896      new_path="$CYGWIN_ROOT_PATH$input_path"
28897    fi
28898  fi
28899
28900
28901  if test "x$path" != "x$new_path"; then
28902    BOOT_JDK="$new_path"
28903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28905  fi
28906
28907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28908
28909  path="$BOOT_JDK"
28910  has_colon=`$ECHO $path | $GREP ^.:`
28911  new_path="$path"
28912  if test "x$has_colon" = x; then
28913    # Not in mixed or Windows style, start by that.
28914    new_path=`cmd //c echo $path`
28915  fi
28916
28917
28918  input_path="$new_path"
28919  # Check if we need to convert this using DOS-style short mode. If the path
28920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28921  # take no chances and rewrite it.
28922  # Note: m4 eats our [], so we need to use [ and ] instead.
28923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28924  if test "x$has_forbidden_chars" != x; then
28925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28927  fi
28928
28929
28930  windows_path="$new_path"
28931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28932    unix_path=`$CYGPATH -u "$windows_path"`
28933    new_path="$unix_path"
28934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28936    new_path="$unix_path"
28937  fi
28938
28939  if test "x$path" != "x$new_path"; then
28940    BOOT_JDK="$new_path"
28941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28943  fi
28944
28945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28947
28948    else
28949      # We're on a unix platform. Hooray! :)
28950      path="$BOOT_JDK"
28951      has_space=`$ECHO "$path" | $GREP " "`
28952      if test "x$has_space" != x; then
28953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28956      fi
28957
28958      # Use eval to expand a potential ~
28959      eval path="$path"
28960      if test ! -f "$path" && test ! -d "$path"; then
28961        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28962      fi
28963
28964      if test -d "$path"; then
28965        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28966      else
28967        dir="`$DIRNAME "$path"`"
28968        base="`$BASENAME "$path"`"
28969        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28970      fi
28971    fi
28972  fi
28973
28974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28975$as_echo_n "checking for Boot JDK... " >&6; }
28976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28977$as_echo "$BOOT_JDK" >&6; }
28978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28979$as_echo_n "checking Boot JDK version... " >&6; }
28980            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28982$as_echo "$BOOT_JDK_VERSION" >&6; }
28983          fi # end check jdk version
28984        fi # end check javac
28985      fi # end check java
28986    fi # end check boot jdk found
28987  fi
28988
28989
28990  if test "x$BOOT_JDK_FOUND" = xno; then
28991    # Now execute the test
28992
28993  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28994  BOOT_JDK_SUFFIX="/Contents/Home"
28995  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28996  if test "x$ALL_JDKS_FOUND" != x; then
28997    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28998
28999  if test "x$BOOT_JDK_FOUND" = xno; then
29000    # Now execute the test
29001
29002        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29003        if test -d "$BOOT_JDK"; then
29004          BOOT_JDK_FOUND=maybe
29005          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29006$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29007        fi
29008
29009
29010    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29011    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29012      # Do we have a bin/java?
29013      if test ! -x "$BOOT_JDK/bin/java"; then
29014        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29016        BOOT_JDK_FOUND=no
29017      else
29018        # Do we have a bin/javac?
29019        if test ! -x "$BOOT_JDK/bin/javac"; then
29020          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29022          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29023$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29024          BOOT_JDK_FOUND=no
29025        else
29026          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29027          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29028
29029          # Extra M4 quote needed to protect [] in grep expression.
29030          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29031          if test "x$FOUND_CORRECT_VERSION" = x; then
29032            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29034            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29035$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29036            BOOT_JDK_FOUND=no
29037          else
29038            # We're done! :-)
29039            BOOT_JDK_FOUND=yes
29040
29041  # Only process if variable expands to non-empty
29042
29043  if test "x$BOOT_JDK" != x; then
29044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29045
29046  # Input might be given as Windows format, start by converting to
29047  # unix format.
29048  path="$BOOT_JDK"
29049  new_path=`$CYGPATH -u "$path"`
29050
29051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29054  # "foo.exe" is OK but "foo" is an error.
29055  #
29056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29057  # It is also a way to make sure we got the proper file name for the real test later on.
29058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29059  if test "x$test_shortpath" = x; then
29060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29063  fi
29064
29065  # Call helper function which possibly converts this using DOS-style short mode.
29066  # If so, the updated path is stored in $new_path.
29067
29068  input_path="$new_path"
29069  # Check if we need to convert this using DOS-style short mode. If the path
29070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29071  # take no chances and rewrite it.
29072  # Note: m4 eats our [], so we need to use [ and ] instead.
29073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29074  if test "x$has_forbidden_chars" != x; then
29075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29079      # Going to short mode and back again did indeed matter. Since short mode is
29080      # case insensitive, let's make it lowercase to improve readability.
29081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29082      # Now convert it back to Unix-style (cygpath)
29083      input_path=`$CYGPATH -u "$shortmode_path"`
29084      new_path="$input_path"
29085    fi
29086  fi
29087
29088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29089  if test "x$test_cygdrive_prefix" = x; then
29090    # As a simple fix, exclude /usr/bin since it's not a real path.
29091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29093      # a path prefixed by /cygdrive for fixpath to work.
29094      new_path="$CYGWIN_ROOT_PATH$input_path"
29095    fi
29096  fi
29097
29098
29099  if test "x$path" != "x$new_path"; then
29100    BOOT_JDK="$new_path"
29101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29103  fi
29104
29105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29106
29107  path="$BOOT_JDK"
29108  has_colon=`$ECHO $path | $GREP ^.:`
29109  new_path="$path"
29110  if test "x$has_colon" = x; then
29111    # Not in mixed or Windows style, start by that.
29112    new_path=`cmd //c echo $path`
29113  fi
29114
29115
29116  input_path="$new_path"
29117  # Check if we need to convert this using DOS-style short mode. If the path
29118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29119  # take no chances and rewrite it.
29120  # Note: m4 eats our [], so we need to use [ and ] instead.
29121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29122  if test "x$has_forbidden_chars" != x; then
29123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29125  fi
29126
29127
29128  windows_path="$new_path"
29129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29130    unix_path=`$CYGPATH -u "$windows_path"`
29131    new_path="$unix_path"
29132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29134    new_path="$unix_path"
29135  fi
29136
29137  if test "x$path" != "x$new_path"; then
29138    BOOT_JDK="$new_path"
29139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29141  fi
29142
29143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29145
29146    else
29147      # We're on a unix platform. Hooray! :)
29148      path="$BOOT_JDK"
29149      has_space=`$ECHO "$path" | $GREP " "`
29150      if test "x$has_space" != x; then
29151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29154      fi
29155
29156      # Use eval to expand a potential ~
29157      eval path="$path"
29158      if test ! -f "$path" && test ! -d "$path"; then
29159        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29160      fi
29161
29162      if test -d "$path"; then
29163        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29164      else
29165        dir="`$DIRNAME "$path"`"
29166        base="`$BASENAME "$path"`"
29167        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29168      fi
29169    fi
29170  fi
29171
29172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29173$as_echo_n "checking for Boot JDK... " >&6; }
29174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29175$as_echo "$BOOT_JDK" >&6; }
29176            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29177$as_echo_n "checking Boot JDK version... " >&6; }
29178            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29180$as_echo "$BOOT_JDK_VERSION" >&6; }
29181          fi # end check jdk version
29182        fi # end check javac
29183      fi # end check java
29184    fi # end check boot jdk found
29185  fi
29186
29187    done
29188  fi
29189
29190
29191    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29192    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29193      # Do we have a bin/java?
29194      if test ! -x "$BOOT_JDK/bin/java"; then
29195        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29197        BOOT_JDK_FOUND=no
29198      else
29199        # Do we have a bin/javac?
29200        if test ! -x "$BOOT_JDK/bin/javac"; then
29201          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29203          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29204$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29205          BOOT_JDK_FOUND=no
29206        else
29207          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29208          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29209
29210          # Extra M4 quote needed to protect [] in grep expression.
29211          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29212          if test "x$FOUND_CORRECT_VERSION" = x; then
29213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29215            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29216$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29217            BOOT_JDK_FOUND=no
29218          else
29219            # We're done! :-)
29220            BOOT_JDK_FOUND=yes
29221
29222  # Only process if variable expands to non-empty
29223
29224  if test "x$BOOT_JDK" != x; then
29225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29226
29227  # Input might be given as Windows format, start by converting to
29228  # unix format.
29229  path="$BOOT_JDK"
29230  new_path=`$CYGPATH -u "$path"`
29231
29232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29235  # "foo.exe" is OK but "foo" is an error.
29236  #
29237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29238  # It is also a way to make sure we got the proper file name for the real test later on.
29239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29240  if test "x$test_shortpath" = x; then
29241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29244  fi
29245
29246  # Call helper function which possibly converts this using DOS-style short mode.
29247  # If so, the updated path is stored in $new_path.
29248
29249  input_path="$new_path"
29250  # Check if we need to convert this using DOS-style short mode. If the path
29251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29252  # take no chances and rewrite it.
29253  # Note: m4 eats our [], so we need to use [ and ] instead.
29254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29255  if test "x$has_forbidden_chars" != x; then
29256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29260      # Going to short mode and back again did indeed matter. Since short mode is
29261      # case insensitive, let's make it lowercase to improve readability.
29262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29263      # Now convert it back to Unix-style (cygpath)
29264      input_path=`$CYGPATH -u "$shortmode_path"`
29265      new_path="$input_path"
29266    fi
29267  fi
29268
29269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29270  if test "x$test_cygdrive_prefix" = x; then
29271    # As a simple fix, exclude /usr/bin since it's not a real path.
29272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29274      # a path prefixed by /cygdrive for fixpath to work.
29275      new_path="$CYGWIN_ROOT_PATH$input_path"
29276    fi
29277  fi
29278
29279
29280  if test "x$path" != "x$new_path"; then
29281    BOOT_JDK="$new_path"
29282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29284  fi
29285
29286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29287
29288  path="$BOOT_JDK"
29289  has_colon=`$ECHO $path | $GREP ^.:`
29290  new_path="$path"
29291  if test "x$has_colon" = x; then
29292    # Not in mixed or Windows style, start by that.
29293    new_path=`cmd //c echo $path`
29294  fi
29295
29296
29297  input_path="$new_path"
29298  # Check if we need to convert this using DOS-style short mode. If the path
29299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29300  # take no chances and rewrite it.
29301  # Note: m4 eats our [], so we need to use [ and ] instead.
29302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29303  if test "x$has_forbidden_chars" != x; then
29304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29306  fi
29307
29308
29309  windows_path="$new_path"
29310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29311    unix_path=`$CYGPATH -u "$windows_path"`
29312    new_path="$unix_path"
29313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29315    new_path="$unix_path"
29316  fi
29317
29318  if test "x$path" != "x$new_path"; then
29319    BOOT_JDK="$new_path"
29320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29322  fi
29323
29324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29326
29327    else
29328      # We're on a unix platform. Hooray! :)
29329      path="$BOOT_JDK"
29330      has_space=`$ECHO "$path" | $GREP " "`
29331      if test "x$has_space" != x; then
29332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29335      fi
29336
29337      # Use eval to expand a potential ~
29338      eval path="$path"
29339      if test ! -f "$path" && test ! -d "$path"; then
29340        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29341      fi
29342
29343      if test -d "$path"; then
29344        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29345      else
29346        dir="`$DIRNAME "$path"`"
29347        base="`$BASENAME "$path"`"
29348        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29349      fi
29350    fi
29351  fi
29352
29353            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29354$as_echo_n "checking for Boot JDK... " >&6; }
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29356$as_echo "$BOOT_JDK" >&6; }
29357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29358$as_echo_n "checking Boot JDK version... " >&6; }
29359            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29361$as_echo "$BOOT_JDK_VERSION" >&6; }
29362          fi # end check jdk version
29363        fi # end check javac
29364      fi # end check java
29365    fi # end check boot jdk found
29366  fi
29367
29368  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29369
29370  if test "x$BOOT_JDK_FOUND" = xno; then
29371    # Now execute the test
29372
29373  BOOT_JDK_PREFIX="/usr/lib/jvm"
29374  BOOT_JDK_SUFFIX=""
29375  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29376  if test "x$ALL_JDKS_FOUND" != x; then
29377    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29378
29379  if test "x$BOOT_JDK_FOUND" = xno; then
29380    # Now execute the test
29381
29382        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29383        if test -d "$BOOT_JDK"; then
29384          BOOT_JDK_FOUND=maybe
29385          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29386$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29387        fi
29388
29389
29390    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29391    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29392      # Do we have a bin/java?
29393      if test ! -x "$BOOT_JDK/bin/java"; then
29394        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29396        BOOT_JDK_FOUND=no
29397      else
29398        # Do we have a bin/javac?
29399        if test ! -x "$BOOT_JDK/bin/javac"; then
29400          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29402          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29403$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29404          BOOT_JDK_FOUND=no
29405        else
29406          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29407          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29408
29409          # Extra M4 quote needed to protect [] in grep expression.
29410          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29411          if test "x$FOUND_CORRECT_VERSION" = x; then
29412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29414            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29415$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29416            BOOT_JDK_FOUND=no
29417          else
29418            # We're done! :-)
29419            BOOT_JDK_FOUND=yes
29420
29421  # Only process if variable expands to non-empty
29422
29423  if test "x$BOOT_JDK" != x; then
29424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29425
29426  # Input might be given as Windows format, start by converting to
29427  # unix format.
29428  path="$BOOT_JDK"
29429  new_path=`$CYGPATH -u "$path"`
29430
29431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29434  # "foo.exe" is OK but "foo" is an error.
29435  #
29436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29437  # It is also a way to make sure we got the proper file name for the real test later on.
29438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29439  if test "x$test_shortpath" = x; then
29440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29442    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29443  fi
29444
29445  # Call helper function which possibly converts this using DOS-style short mode.
29446  # If so, the updated path is stored in $new_path.
29447
29448  input_path="$new_path"
29449  # Check if we need to convert this using DOS-style short mode. If the path
29450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29451  # take no chances and rewrite it.
29452  # Note: m4 eats our [], so we need to use [ and ] instead.
29453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29454  if test "x$has_forbidden_chars" != x; then
29455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29459      # Going to short mode and back again did indeed matter. Since short mode is
29460      # case insensitive, let's make it lowercase to improve readability.
29461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29462      # Now convert it back to Unix-style (cygpath)
29463      input_path=`$CYGPATH -u "$shortmode_path"`
29464      new_path="$input_path"
29465    fi
29466  fi
29467
29468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29469  if test "x$test_cygdrive_prefix" = x; then
29470    # As a simple fix, exclude /usr/bin since it's not a real path.
29471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29473      # a path prefixed by /cygdrive for fixpath to work.
29474      new_path="$CYGWIN_ROOT_PATH$input_path"
29475    fi
29476  fi
29477
29478
29479  if test "x$path" != "x$new_path"; then
29480    BOOT_JDK="$new_path"
29481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29483  fi
29484
29485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29486
29487  path="$BOOT_JDK"
29488  has_colon=`$ECHO $path | $GREP ^.:`
29489  new_path="$path"
29490  if test "x$has_colon" = x; then
29491    # Not in mixed or Windows style, start by that.
29492    new_path=`cmd //c echo $path`
29493  fi
29494
29495
29496  input_path="$new_path"
29497  # Check if we need to convert this using DOS-style short mode. If the path
29498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29499  # take no chances and rewrite it.
29500  # Note: m4 eats our [], so we need to use [ and ] instead.
29501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29502  if test "x$has_forbidden_chars" != x; then
29503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29505  fi
29506
29507
29508  windows_path="$new_path"
29509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29510    unix_path=`$CYGPATH -u "$windows_path"`
29511    new_path="$unix_path"
29512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29514    new_path="$unix_path"
29515  fi
29516
29517  if test "x$path" != "x$new_path"; then
29518    BOOT_JDK="$new_path"
29519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29521  fi
29522
29523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29525
29526    else
29527      # We're on a unix platform. Hooray! :)
29528      path="$BOOT_JDK"
29529      has_space=`$ECHO "$path" | $GREP " "`
29530      if test "x$has_space" != x; then
29531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29533        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29534      fi
29535
29536      # Use eval to expand a potential ~
29537      eval path="$path"
29538      if test ! -f "$path" && test ! -d "$path"; then
29539        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29540      fi
29541
29542      if test -d "$path"; then
29543        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29544      else
29545        dir="`$DIRNAME "$path"`"
29546        base="`$BASENAME "$path"`"
29547        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29548      fi
29549    fi
29550  fi
29551
29552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29553$as_echo_n "checking for Boot JDK... " >&6; }
29554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29555$as_echo "$BOOT_JDK" >&6; }
29556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29557$as_echo_n "checking Boot JDK version... " >&6; }
29558            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29560$as_echo "$BOOT_JDK_VERSION" >&6; }
29561          fi # end check jdk version
29562        fi # end check javac
29563      fi # end check java
29564    fi # end check boot jdk found
29565  fi
29566
29567    done
29568  fi
29569
29570
29571    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29572    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29573      # Do we have a bin/java?
29574      if test ! -x "$BOOT_JDK/bin/java"; then
29575        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29577        BOOT_JDK_FOUND=no
29578      else
29579        # Do we have a bin/javac?
29580        if test ! -x "$BOOT_JDK/bin/javac"; then
29581          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29583          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29584$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29585          BOOT_JDK_FOUND=no
29586        else
29587          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29588          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29589
29590          # Extra M4 quote needed to protect [] in grep expression.
29591          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29592          if test "x$FOUND_CORRECT_VERSION" = x; then
29593            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29595            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29596$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29597            BOOT_JDK_FOUND=no
29598          else
29599            # We're done! :-)
29600            BOOT_JDK_FOUND=yes
29601
29602  # Only process if variable expands to non-empty
29603
29604  if test "x$BOOT_JDK" != x; then
29605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29606
29607  # Input might be given as Windows format, start by converting to
29608  # unix format.
29609  path="$BOOT_JDK"
29610  new_path=`$CYGPATH -u "$path"`
29611
29612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29615  # "foo.exe" is OK but "foo" is an error.
29616  #
29617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29618  # It is also a way to make sure we got the proper file name for the real test later on.
29619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29620  if test "x$test_shortpath" = x; then
29621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29623    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29624  fi
29625
29626  # Call helper function which possibly converts this using DOS-style short mode.
29627  # If so, the updated path is stored in $new_path.
29628
29629  input_path="$new_path"
29630  # Check if we need to convert this using DOS-style short mode. If the path
29631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29632  # take no chances and rewrite it.
29633  # Note: m4 eats our [], so we need to use [ and ] instead.
29634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29635  if test "x$has_forbidden_chars" != x; then
29636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29640      # Going to short mode and back again did indeed matter. Since short mode is
29641      # case insensitive, let's make it lowercase to improve readability.
29642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29643      # Now convert it back to Unix-style (cygpath)
29644      input_path=`$CYGPATH -u "$shortmode_path"`
29645      new_path="$input_path"
29646    fi
29647  fi
29648
29649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29650  if test "x$test_cygdrive_prefix" = x; then
29651    # As a simple fix, exclude /usr/bin since it's not a real path.
29652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29654      # a path prefixed by /cygdrive for fixpath to work.
29655      new_path="$CYGWIN_ROOT_PATH$input_path"
29656    fi
29657  fi
29658
29659
29660  if test "x$path" != "x$new_path"; then
29661    BOOT_JDK="$new_path"
29662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29664  fi
29665
29666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29667
29668  path="$BOOT_JDK"
29669  has_colon=`$ECHO $path | $GREP ^.:`
29670  new_path="$path"
29671  if test "x$has_colon" = x; then
29672    # Not in mixed or Windows style, start by that.
29673    new_path=`cmd //c echo $path`
29674  fi
29675
29676
29677  input_path="$new_path"
29678  # Check if we need to convert this using DOS-style short mode. If the path
29679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29680  # take no chances and rewrite it.
29681  # Note: m4 eats our [], so we need to use [ and ] instead.
29682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29683  if test "x$has_forbidden_chars" != x; then
29684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29686  fi
29687
29688
29689  windows_path="$new_path"
29690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29691    unix_path=`$CYGPATH -u "$windows_path"`
29692    new_path="$unix_path"
29693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29695    new_path="$unix_path"
29696  fi
29697
29698  if test "x$path" != "x$new_path"; then
29699    BOOT_JDK="$new_path"
29700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29702  fi
29703
29704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29706
29707    else
29708      # We're on a unix platform. Hooray! :)
29709      path="$BOOT_JDK"
29710      has_space=`$ECHO "$path" | $GREP " "`
29711      if test "x$has_space" != x; then
29712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29715      fi
29716
29717      # Use eval to expand a potential ~
29718      eval path="$path"
29719      if test ! -f "$path" && test ! -d "$path"; then
29720        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29721      fi
29722
29723      if test -d "$path"; then
29724        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29725      else
29726        dir="`$DIRNAME "$path"`"
29727        base="`$BASENAME "$path"`"
29728        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29729      fi
29730    fi
29731  fi
29732
29733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29734$as_echo_n "checking for Boot JDK... " >&6; }
29735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29736$as_echo "$BOOT_JDK" >&6; }
29737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29738$as_echo_n "checking Boot JDK version... " >&6; }
29739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29741$as_echo "$BOOT_JDK_VERSION" >&6; }
29742          fi # end check jdk version
29743        fi # end check javac
29744      fi # end check java
29745    fi # end check boot jdk found
29746  fi
29747
29748  fi
29749
29750
29751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29753      # Do we have a bin/java?
29754      if test ! -x "$BOOT_JDK/bin/java"; then
29755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29757        BOOT_JDK_FOUND=no
29758      else
29759        # Do we have a bin/javac?
29760        if test ! -x "$BOOT_JDK/bin/javac"; then
29761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29765          BOOT_JDK_FOUND=no
29766        else
29767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29769
29770          # Extra M4 quote needed to protect [] in grep expression.
29771          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29772          if test "x$FOUND_CORRECT_VERSION" = x; then
29773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29777            BOOT_JDK_FOUND=no
29778          else
29779            # We're done! :-)
29780            BOOT_JDK_FOUND=yes
29781
29782  # Only process if variable expands to non-empty
29783
29784  if test "x$BOOT_JDK" != x; then
29785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29786
29787  # Input might be given as Windows format, start by converting to
29788  # unix format.
29789  path="$BOOT_JDK"
29790  new_path=`$CYGPATH -u "$path"`
29791
29792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29795  # "foo.exe" is OK but "foo" is an error.
29796  #
29797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29798  # It is also a way to make sure we got the proper file name for the real test later on.
29799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29800  if test "x$test_shortpath" = x; then
29801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29804  fi
29805
29806  # Call helper function which possibly converts this using DOS-style short mode.
29807  # If so, the updated path is stored in $new_path.
29808
29809  input_path="$new_path"
29810  # Check if we need to convert this using DOS-style short mode. If the path
29811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29812  # take no chances and rewrite it.
29813  # Note: m4 eats our [], so we need to use [ and ] instead.
29814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29815  if test "x$has_forbidden_chars" != x; then
29816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29820      # Going to short mode and back again did indeed matter. Since short mode is
29821      # case insensitive, let's make it lowercase to improve readability.
29822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29823      # Now convert it back to Unix-style (cygpath)
29824      input_path=`$CYGPATH -u "$shortmode_path"`
29825      new_path="$input_path"
29826    fi
29827  fi
29828
29829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29830  if test "x$test_cygdrive_prefix" = x; then
29831    # As a simple fix, exclude /usr/bin since it's not a real path.
29832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29834      # a path prefixed by /cygdrive for fixpath to work.
29835      new_path="$CYGWIN_ROOT_PATH$input_path"
29836    fi
29837  fi
29838
29839
29840  if test "x$path" != "x$new_path"; then
29841    BOOT_JDK="$new_path"
29842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29844  fi
29845
29846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29847
29848  path="$BOOT_JDK"
29849  has_colon=`$ECHO $path | $GREP ^.:`
29850  new_path="$path"
29851  if test "x$has_colon" = x; then
29852    # Not in mixed or Windows style, start by that.
29853    new_path=`cmd //c echo $path`
29854  fi
29855
29856
29857  input_path="$new_path"
29858  # Check if we need to convert this using DOS-style short mode. If the path
29859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29860  # take no chances and rewrite it.
29861  # Note: m4 eats our [], so we need to use [ and ] instead.
29862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29863  if test "x$has_forbidden_chars" != x; then
29864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29866  fi
29867
29868
29869  windows_path="$new_path"
29870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29871    unix_path=`$CYGPATH -u "$windows_path"`
29872    new_path="$unix_path"
29873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29875    new_path="$unix_path"
29876  fi
29877
29878  if test "x$path" != "x$new_path"; then
29879    BOOT_JDK="$new_path"
29880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29882  fi
29883
29884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29886
29887    else
29888      # We're on a unix platform. Hooray! :)
29889      path="$BOOT_JDK"
29890      has_space=`$ECHO "$path" | $GREP " "`
29891      if test "x$has_space" != x; then
29892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29895      fi
29896
29897      # Use eval to expand a potential ~
29898      eval path="$path"
29899      if test ! -f "$path" && test ! -d "$path"; then
29900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29901      fi
29902
29903      if test -d "$path"; then
29904        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29905      else
29906        dir="`$DIRNAME "$path"`"
29907        base="`$BASENAME "$path"`"
29908        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29909      fi
29910    fi
29911  fi
29912
29913            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29914$as_echo_n "checking for Boot JDK... " >&6; }
29915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29916$as_echo "$BOOT_JDK" >&6; }
29917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29918$as_echo_n "checking Boot JDK version... " >&6; }
29919            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29921$as_echo "$BOOT_JDK_VERSION" >&6; }
29922          fi # end check jdk version
29923        fi # end check javac
29924      fi # end check java
29925    fi # end check boot jdk found
29926  fi
29927
29928
29929  # If we haven't found anything yet, we've truly lost. Give up.
29930  if test "x$BOOT_JDK_FOUND" = xno; then
29931
29932  # Print a helpful message on how to acquire the necessary build dependency.
29933  # openjdk is the help tag: freetype, cups, alsa etc
29934  MISSING_DEPENDENCY=openjdk
29935
29936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29937    cygwin_help $MISSING_DEPENDENCY
29938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29939    msys_help $MISSING_DEPENDENCY
29940  else
29941    PKGHANDLER_COMMAND=
29942
29943    case $PKGHANDLER in
29944      apt-get)
29945        apt_help     $MISSING_DEPENDENCY ;;
29946      yum)
29947        yum_help     $MISSING_DEPENDENCY ;;
29948      port)
29949        port_help    $MISSING_DEPENDENCY ;;
29950      pkgutil)
29951        pkgutil_help $MISSING_DEPENDENCY ;;
29952      pkgadd)
29953        pkgadd_help  $MISSING_DEPENDENCY ;;
29954    esac
29955
29956    if test "x$PKGHANDLER_COMMAND" != x; then
29957      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29958    fi
29959  fi
29960
29961    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29962$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29964$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29965    as_fn_error $? "Cannot continue" "$LINENO" 5
29966  fi
29967
29968
29969
29970  # Setup tools from the Boot JDK.
29971
29972  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29973
29974  # Publish this variable in the help.
29975
29976
29977  if [ -z "${JAVA+x}" ]; then
29978    # The variable is not set by user, try to locate tool using the code snippet
29979
29980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29981$as_echo_n "checking for java in Boot JDK... " >&6; }
29982      JAVA=$BOOT_JDK/bin/java
29983      if test ! -x $JAVA; then
29984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29985$as_echo "not found" >&6; }
29986        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29987$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29988        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29989      fi
29990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29991$as_echo "ok" >&6; }
29992
29993
29994  else
29995    # The variable is set, but is it from the command line or the environment?
29996
29997    # Try to remove the string !JAVA! from our list.
29998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30000      # If it failed, the variable was not from the command line. Ignore it,
30001      # but warn the user (except for BASH, which is always set by the calling BASH).
30002      if test "xJAVA" != xBASH; then
30003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30004$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30005      fi
30006      # Try to locate tool using the code snippet
30007
30008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30009$as_echo_n "checking for java in Boot JDK... " >&6; }
30010      JAVA=$BOOT_JDK/bin/java
30011      if test ! -x $JAVA; then
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30013$as_echo "not found" >&6; }
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30015$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30016        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30017      fi
30018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30019$as_echo "ok" >&6; }
30020
30021
30022    else
30023      # If it succeeded, then it was overridden by the user. We will use it
30024      # for the tool.
30025
30026      # First remove it from the list of overridden variables, so we can test
30027      # for unknown variables in the end.
30028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30029
30030      # Check if we try to supply an empty value
30031      if test "x$JAVA" = x; then
30032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30033$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30035$as_echo_n "checking for JAVA... " >&6; }
30036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30037$as_echo "disabled" >&6; }
30038      else
30039        # Check if the provided tool contains a complete path.
30040        tool_specified="$JAVA"
30041        tool_basename="${tool_specified##*/}"
30042        if test "x$tool_basename" = "x$tool_specified"; then
30043          # A command without a complete path is provided, search $PATH.
30044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30045$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30046          # Extract the first word of "$tool_basename", so it can be a program name with args.
30047set dummy $tool_basename; ac_word=$2
30048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30049$as_echo_n "checking for $ac_word... " >&6; }
30050if ${ac_cv_path_JAVA+:} false; then :
30051  $as_echo_n "(cached) " >&6
30052else
30053  case $JAVA in
30054  [\\/]* | ?:[\\/]*)
30055  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30056  ;;
30057  *)
30058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30059for as_dir in $PATH
30060do
30061  IFS=$as_save_IFS
30062  test -z "$as_dir" && as_dir=.
30063    for ac_exec_ext in '' $ac_executable_extensions; do
30064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30065    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30067    break 2
30068  fi
30069done
30070  done
30071IFS=$as_save_IFS
30072
30073  ;;
30074esac
30075fi
30076JAVA=$ac_cv_path_JAVA
30077if test -n "$JAVA"; then
30078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30079$as_echo "$JAVA" >&6; }
30080else
30081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30082$as_echo "no" >&6; }
30083fi
30084
30085
30086          if test "x$JAVA" = x; then
30087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30088          fi
30089        else
30090          # Otherwise we believe it is a complete path. Use it as it is.
30091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30092$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30094$as_echo_n "checking for JAVA... " >&6; }
30095          if test ! -x "$tool_specified"; then
30096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30097$as_echo "not found" >&6; }
30098            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30099          fi
30100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30101$as_echo "$tool_specified" >&6; }
30102        fi
30103      fi
30104    fi
30105
30106  fi
30107
30108
30109
30110  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30111
30112  # Publish this variable in the help.
30113
30114
30115  if [ -z "${JAVAC+x}" ]; then
30116    # The variable is not set by user, try to locate tool using the code snippet
30117
30118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30119$as_echo_n "checking for javac in Boot JDK... " >&6; }
30120      JAVAC=$BOOT_JDK/bin/javac
30121      if test ! -x $JAVAC; then
30122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30123$as_echo "not found" >&6; }
30124        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30125$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30126        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30127      fi
30128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30129$as_echo "ok" >&6; }
30130
30131
30132  else
30133    # The variable is set, but is it from the command line or the environment?
30134
30135    # Try to remove the string !JAVAC! from our list.
30136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30138      # If it failed, the variable was not from the command line. Ignore it,
30139      # but warn the user (except for BASH, which is always set by the calling BASH).
30140      if test "xJAVAC" != xBASH; then
30141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30142$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30143      fi
30144      # Try to locate tool using the code snippet
30145
30146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30147$as_echo_n "checking for javac in Boot JDK... " >&6; }
30148      JAVAC=$BOOT_JDK/bin/javac
30149      if test ! -x $JAVAC; then
30150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30151$as_echo "not found" >&6; }
30152        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30153$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30154        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30155      fi
30156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30157$as_echo "ok" >&6; }
30158
30159
30160    else
30161      # If it succeeded, then it was overridden by the user. We will use it
30162      # for the tool.
30163
30164      # First remove it from the list of overridden variables, so we can test
30165      # for unknown variables in the end.
30166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30167
30168      # Check if we try to supply an empty value
30169      if test "x$JAVAC" = x; then
30170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30171$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30173$as_echo_n "checking for JAVAC... " >&6; }
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30175$as_echo "disabled" >&6; }
30176      else
30177        # Check if the provided tool contains a complete path.
30178        tool_specified="$JAVAC"
30179        tool_basename="${tool_specified##*/}"
30180        if test "x$tool_basename" = "x$tool_specified"; then
30181          # A command without a complete path is provided, search $PATH.
30182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30183$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30184          # Extract the first word of "$tool_basename", so it can be a program name with args.
30185set dummy $tool_basename; ac_word=$2
30186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30187$as_echo_n "checking for $ac_word... " >&6; }
30188if ${ac_cv_path_JAVAC+:} false; then :
30189  $as_echo_n "(cached) " >&6
30190else
30191  case $JAVAC in
30192  [\\/]* | ?:[\\/]*)
30193  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30194  ;;
30195  *)
30196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30197for as_dir in $PATH
30198do
30199  IFS=$as_save_IFS
30200  test -z "$as_dir" && as_dir=.
30201    for ac_exec_ext in '' $ac_executable_extensions; do
30202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30203    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30205    break 2
30206  fi
30207done
30208  done
30209IFS=$as_save_IFS
30210
30211  ;;
30212esac
30213fi
30214JAVAC=$ac_cv_path_JAVAC
30215if test -n "$JAVAC"; then
30216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30217$as_echo "$JAVAC" >&6; }
30218else
30219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30220$as_echo "no" >&6; }
30221fi
30222
30223
30224          if test "x$JAVAC" = x; then
30225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30226          fi
30227        else
30228          # Otherwise we believe it is a complete path. Use it as it is.
30229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30230$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30232$as_echo_n "checking for JAVAC... " >&6; }
30233          if test ! -x "$tool_specified"; then
30234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30235$as_echo "not found" >&6; }
30236            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30237          fi
30238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30239$as_echo "$tool_specified" >&6; }
30240        fi
30241      fi
30242    fi
30243
30244  fi
30245
30246
30247
30248  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30249
30250  # Publish this variable in the help.
30251
30252
30253  if [ -z "${JAVAH+x}" ]; then
30254    # The variable is not set by user, try to locate tool using the code snippet
30255
30256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30257$as_echo_n "checking for javah in Boot JDK... " >&6; }
30258      JAVAH=$BOOT_JDK/bin/javah
30259      if test ! -x $JAVAH; then
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30261$as_echo "not found" >&6; }
30262        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30263$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30264        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30265      fi
30266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30267$as_echo "ok" >&6; }
30268
30269
30270  else
30271    # The variable is set, but is it from the command line or the environment?
30272
30273    # Try to remove the string !JAVAH! from our list.
30274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30276      # If it failed, the variable was not from the command line. Ignore it,
30277      # but warn the user (except for BASH, which is always set by the calling BASH).
30278      if test "xJAVAH" != xBASH; then
30279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30280$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30281      fi
30282      # Try to locate tool using the code snippet
30283
30284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30285$as_echo_n "checking for javah in Boot JDK... " >&6; }
30286      JAVAH=$BOOT_JDK/bin/javah
30287      if test ! -x $JAVAH; then
30288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30289$as_echo "not found" >&6; }
30290        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30291$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30292        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30293      fi
30294      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30295$as_echo "ok" >&6; }
30296
30297
30298    else
30299      # If it succeeded, then it was overridden by the user. We will use it
30300      # for the tool.
30301
30302      # First remove it from the list of overridden variables, so we can test
30303      # for unknown variables in the end.
30304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30305
30306      # Check if we try to supply an empty value
30307      if test "x$JAVAH" = x; then
30308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30309$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30311$as_echo_n "checking for JAVAH... " >&6; }
30312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30313$as_echo "disabled" >&6; }
30314      else
30315        # Check if the provided tool contains a complete path.
30316        tool_specified="$JAVAH"
30317        tool_basename="${tool_specified##*/}"
30318        if test "x$tool_basename" = "x$tool_specified"; then
30319          # A command without a complete path is provided, search $PATH.
30320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30321$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30322          # Extract the first word of "$tool_basename", so it can be a program name with args.
30323set dummy $tool_basename; ac_word=$2
30324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30325$as_echo_n "checking for $ac_word... " >&6; }
30326if ${ac_cv_path_JAVAH+:} false; then :
30327  $as_echo_n "(cached) " >&6
30328else
30329  case $JAVAH in
30330  [\\/]* | ?:[\\/]*)
30331  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30332  ;;
30333  *)
30334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30335for as_dir in $PATH
30336do
30337  IFS=$as_save_IFS
30338  test -z "$as_dir" && as_dir=.
30339    for ac_exec_ext in '' $ac_executable_extensions; do
30340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30341    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30343    break 2
30344  fi
30345done
30346  done
30347IFS=$as_save_IFS
30348
30349  ;;
30350esac
30351fi
30352JAVAH=$ac_cv_path_JAVAH
30353if test -n "$JAVAH"; then
30354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30355$as_echo "$JAVAH" >&6; }
30356else
30357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30358$as_echo "no" >&6; }
30359fi
30360
30361
30362          if test "x$JAVAH" = x; then
30363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30364          fi
30365        else
30366          # Otherwise we believe it is a complete path. Use it as it is.
30367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30368$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30370$as_echo_n "checking for JAVAH... " >&6; }
30371          if test ! -x "$tool_specified"; then
30372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30373$as_echo "not found" >&6; }
30374            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30375          fi
30376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30377$as_echo "$tool_specified" >&6; }
30378        fi
30379      fi
30380    fi
30381
30382  fi
30383
30384
30385
30386  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30387
30388  # Publish this variable in the help.
30389
30390
30391  if [ -z "${JAR+x}" ]; then
30392    # The variable is not set by user, try to locate tool using the code snippet
30393
30394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30395$as_echo_n "checking for jar in Boot JDK... " >&6; }
30396      JAR=$BOOT_JDK/bin/jar
30397      if test ! -x $JAR; then
30398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30399$as_echo "not found" >&6; }
30400        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30401$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30402        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30403      fi
30404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30405$as_echo "ok" >&6; }
30406
30407
30408  else
30409    # The variable is set, but is it from the command line or the environment?
30410
30411    # Try to remove the string !JAR! from our list.
30412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30414      # If it failed, the variable was not from the command line. Ignore it,
30415      # but warn the user (except for BASH, which is always set by the calling BASH).
30416      if test "xJAR" != xBASH; then
30417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30418$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30419      fi
30420      # Try to locate tool using the code snippet
30421
30422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30423$as_echo_n "checking for jar in Boot JDK... " >&6; }
30424      JAR=$BOOT_JDK/bin/jar
30425      if test ! -x $JAR; then
30426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30427$as_echo "not found" >&6; }
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30429$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30430        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30431      fi
30432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30433$as_echo "ok" >&6; }
30434
30435
30436    else
30437      # If it succeeded, then it was overridden by the user. We will use it
30438      # for the tool.
30439
30440      # First remove it from the list of overridden variables, so we can test
30441      # for unknown variables in the end.
30442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30443
30444      # Check if we try to supply an empty value
30445      if test "x$JAR" = x; then
30446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30447$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30449$as_echo_n "checking for JAR... " >&6; }
30450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30451$as_echo "disabled" >&6; }
30452      else
30453        # Check if the provided tool contains a complete path.
30454        tool_specified="$JAR"
30455        tool_basename="${tool_specified##*/}"
30456        if test "x$tool_basename" = "x$tool_specified"; then
30457          # A command without a complete path is provided, search $PATH.
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30459$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30460          # Extract the first word of "$tool_basename", so it can be a program name with args.
30461set dummy $tool_basename; ac_word=$2
30462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30463$as_echo_n "checking for $ac_word... " >&6; }
30464if ${ac_cv_path_JAR+:} false; then :
30465  $as_echo_n "(cached) " >&6
30466else
30467  case $JAR in
30468  [\\/]* | ?:[\\/]*)
30469  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30470  ;;
30471  *)
30472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30473for as_dir in $PATH
30474do
30475  IFS=$as_save_IFS
30476  test -z "$as_dir" && as_dir=.
30477    for ac_exec_ext in '' $ac_executable_extensions; do
30478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30479    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30481    break 2
30482  fi
30483done
30484  done
30485IFS=$as_save_IFS
30486
30487  ;;
30488esac
30489fi
30490JAR=$ac_cv_path_JAR
30491if test -n "$JAR"; then
30492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30493$as_echo "$JAR" >&6; }
30494else
30495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30496$as_echo "no" >&6; }
30497fi
30498
30499
30500          if test "x$JAR" = x; then
30501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30502          fi
30503        else
30504          # Otherwise we believe it is a complete path. Use it as it is.
30505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30506$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30508$as_echo_n "checking for JAR... " >&6; }
30509          if test ! -x "$tool_specified"; then
30510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30511$as_echo "not found" >&6; }
30512            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30513          fi
30514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30515$as_echo "$tool_specified" >&6; }
30516        fi
30517      fi
30518    fi
30519
30520  fi
30521
30522
30523
30524  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30525
30526  # Publish this variable in the help.
30527
30528
30529  if [ -z "${JARSIGNER+x}" ]; then
30530    # The variable is not set by user, try to locate tool using the code snippet
30531
30532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30533$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30534      JARSIGNER=$BOOT_JDK/bin/jarsigner
30535      if test ! -x $JARSIGNER; then
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30537$as_echo "not found" >&6; }
30538        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30539$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30540        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30541      fi
30542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30543$as_echo "ok" >&6; }
30544
30545
30546  else
30547    # The variable is set, but is it from the command line or the environment?
30548
30549    # Try to remove the string !JARSIGNER! from our list.
30550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30552      # If it failed, the variable was not from the command line. Ignore it,
30553      # but warn the user (except for BASH, which is always set by the calling BASH).
30554      if test "xJARSIGNER" != xBASH; then
30555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30556$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30557      fi
30558      # Try to locate tool using the code snippet
30559
30560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30561$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30562      JARSIGNER=$BOOT_JDK/bin/jarsigner
30563      if test ! -x $JARSIGNER; then
30564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30565$as_echo "not found" >&6; }
30566        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30567$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30568        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30569      fi
30570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30571$as_echo "ok" >&6; }
30572
30573
30574    else
30575      # If it succeeded, then it was overridden by the user. We will use it
30576      # for the tool.
30577
30578      # First remove it from the list of overridden variables, so we can test
30579      # for unknown variables in the end.
30580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30581
30582      # Check if we try to supply an empty value
30583      if test "x$JARSIGNER" = x; then
30584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30585$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30587$as_echo_n "checking for JARSIGNER... " >&6; }
30588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30589$as_echo "disabled" >&6; }
30590      else
30591        # Check if the provided tool contains a complete path.
30592        tool_specified="$JARSIGNER"
30593        tool_basename="${tool_specified##*/}"
30594        if test "x$tool_basename" = "x$tool_specified"; then
30595          # A command without a complete path is provided, search $PATH.
30596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30597$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30598          # Extract the first word of "$tool_basename", so it can be a program name with args.
30599set dummy $tool_basename; ac_word=$2
30600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30601$as_echo_n "checking for $ac_word... " >&6; }
30602if ${ac_cv_path_JARSIGNER+:} false; then :
30603  $as_echo_n "(cached) " >&6
30604else
30605  case $JARSIGNER in
30606  [\\/]* | ?:[\\/]*)
30607  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30608  ;;
30609  *)
30610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30611for as_dir in $PATH
30612do
30613  IFS=$as_save_IFS
30614  test -z "$as_dir" && as_dir=.
30615    for ac_exec_ext in '' $ac_executable_extensions; do
30616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30617    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30619    break 2
30620  fi
30621done
30622  done
30623IFS=$as_save_IFS
30624
30625  ;;
30626esac
30627fi
30628JARSIGNER=$ac_cv_path_JARSIGNER
30629if test -n "$JARSIGNER"; then
30630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30631$as_echo "$JARSIGNER" >&6; }
30632else
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30634$as_echo "no" >&6; }
30635fi
30636
30637
30638          if test "x$JARSIGNER" = x; then
30639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30640          fi
30641        else
30642          # Otherwise we believe it is a complete path. Use it as it is.
30643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30644$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30646$as_echo_n "checking for JARSIGNER... " >&6; }
30647          if test ! -x "$tool_specified"; then
30648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30649$as_echo "not found" >&6; }
30650            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30651          fi
30652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30653$as_echo "$tool_specified" >&6; }
30654        fi
30655      fi
30656    fi
30657
30658  fi
30659
30660
30661
30662  # Finally, set some other options...
30663
30664  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30665  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30666
30667
30668
30669  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30670  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30671  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30672  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30673  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30674  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30675    dummy="$dummy --patch-module foo=bar"
30676    JVM_ARG_OK=true
30677  else
30678    $ECHO "Arg failed:" >&5
30679    $ECHO "$OUTPUT" >&5
30680    JVM_ARG_OK=false
30681  fi
30682
30683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30684$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30685  if test "x$JVM_ARG_OK" = "xtrue"; then
30686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30687$as_echo "yes" >&6; }
30688    BOOT_JDK_MODULAR="true"
30689  else
30690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30691$as_echo "no" >&6; }
30692    BOOT_JDK_MODULAR="false"
30693  fi
30694
30695
30696
30697
30698  # Check if the boot jdk is 32 or 64 bit
30699  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30700    BOOT_JDK_BITS="64"
30701  else
30702    BOOT_JDK_BITS="32"
30703  fi
30704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30705$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30707$as_echo "$BOOT_JDK_BITS" >&6; }
30708
30709
30710
30711
30712# Check whether --with-build-jdk was given.
30713if test "${with_build_jdk+set}" = set; then :
30714  withval=$with_build_jdk;
30715fi
30716
30717
30718  CREATE_BUILDJDK=false
30719  EXTERNAL_BUILDJDK=false
30720  BUILD_JDK_FOUND="no"
30721  if test "x$with_build_jdk" != "x"; then
30722
30723  if test "x$BUILD_JDK_FOUND" = xno; then
30724    # Execute the test
30725
30726       if test "x$with_build_jdk" != x; then
30727         BUILD_JDK=$with_build_jdk
30728         BUILD_JDK_FOUND=maybe
30729         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30730$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30731       fi
30732
30733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30734    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30735      # Do we have a bin/java?
30736      if test ! -x "$BUILD_JDK/bin/java"; then
30737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30738$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30739        BUILD_JDK_FOUND=no
30740      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30742$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30743        BUILD_JDK_FOUND=no
30744      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30746$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30747        BUILD_JDK_FOUND=no
30748      elif test ! -x "$BUILD_JDK/bin/javac"; then
30749        # Do we have a bin/javac?
30750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30751$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30752        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30753$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30754        BUILD_JDK_FOUND=no
30755      else
30756        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30757        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30758
30759        # Extra M4 quote needed to protect [] in grep expression.
30760        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30761        if test "x$FOUND_CORRECT_VERSION" = x; then
30762          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30763$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30764          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30765$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30766          BUILD_JDK_FOUND=no
30767        else
30768          # We're done!
30769          BUILD_JDK_FOUND=yes
30770
30771  # Only process if variable expands to non-empty
30772
30773  if test "x$BUILD_JDK" != x; then
30774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30775
30776  # Input might be given as Windows format, start by converting to
30777  # unix format.
30778  path="$BUILD_JDK"
30779  new_path=`$CYGPATH -u "$path"`
30780
30781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30784  # "foo.exe" is OK but "foo" is an error.
30785  #
30786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30787  # It is also a way to make sure we got the proper file name for the real test later on.
30788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30789  if test "x$test_shortpath" = x; then
30790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30791$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30792    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30793  fi
30794
30795  # Call helper function which possibly converts this using DOS-style short mode.
30796  # If so, the updated path is stored in $new_path.
30797
30798  input_path="$new_path"
30799  # Check if we need to convert this using DOS-style short mode. If the path
30800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30801  # take no chances and rewrite it.
30802  # Note: m4 eats our [], so we need to use [ and ] instead.
30803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30804  if test "x$has_forbidden_chars" != x; then
30805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30809      # Going to short mode and back again did indeed matter. Since short mode is
30810      # case insensitive, let's make it lowercase to improve readability.
30811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30812      # Now convert it back to Unix-style (cygpath)
30813      input_path=`$CYGPATH -u "$shortmode_path"`
30814      new_path="$input_path"
30815    fi
30816  fi
30817
30818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30819  if test "x$test_cygdrive_prefix" = x; then
30820    # As a simple fix, exclude /usr/bin since it's not a real path.
30821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30823      # a path prefixed by /cygdrive for fixpath to work.
30824      new_path="$CYGWIN_ROOT_PATH$input_path"
30825    fi
30826  fi
30827
30828
30829  if test "x$path" != "x$new_path"; then
30830    BUILD_JDK="$new_path"
30831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30832$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30833  fi
30834
30835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30836
30837  path="$BUILD_JDK"
30838  has_colon=`$ECHO $path | $GREP ^.:`
30839  new_path="$path"
30840  if test "x$has_colon" = x; then
30841    # Not in mixed or Windows style, start by that.
30842    new_path=`cmd //c echo $path`
30843  fi
30844
30845
30846  input_path="$new_path"
30847  # Check if we need to convert this using DOS-style short mode. If the path
30848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30849  # take no chances and rewrite it.
30850  # Note: m4 eats our [], so we need to use [ and ] instead.
30851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30852  if test "x$has_forbidden_chars" != x; then
30853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30855  fi
30856
30857
30858  windows_path="$new_path"
30859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30860    unix_path=`$CYGPATH -u "$windows_path"`
30861    new_path="$unix_path"
30862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30864    new_path="$unix_path"
30865  fi
30866
30867  if test "x$path" != "x$new_path"; then
30868    BUILD_JDK="$new_path"
30869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30870$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30871  fi
30872
30873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30875
30876    else
30877      # We're on a unix platform. Hooray! :)
30878      path="$BUILD_JDK"
30879      has_space=`$ECHO "$path" | $GREP " "`
30880      if test "x$has_space" != x; then
30881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30882$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30884      fi
30885
30886      # Use eval to expand a potential ~
30887      eval path="$path"
30888      if test ! -f "$path" && test ! -d "$path"; then
30889        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30890      fi
30891
30892      if test -d "$path"; then
30893        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30894      else
30895        dir="`$DIRNAME "$path"`"
30896        base="`$BASENAME "$path"`"
30897        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30898      fi
30899    fi
30900  fi
30901
30902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30903$as_echo_n "checking for Build JDK... " >&6; }
30904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30905$as_echo "$BUILD_JDK" >&6; }
30906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30907$as_echo_n "checking Build JDK version... " >&6; }
30908          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30910$as_echo "$BUILD_JDK_VERSION" >&6; }
30911        fi # end check jdk version
30912      fi # end check java
30913    fi # end check build jdk found
30914  fi
30915
30916    EXTERNAL_BUILDJDK=true
30917  else
30918    if test "x$COMPILE_TYPE" = "xcross"; then
30919      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30920      BUILD_JDK_FOUND=yes
30921      CREATE_BUILDJDK=true
30922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30923$as_echo_n "checking for Build JDK... " >&6; }
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30925$as_echo "yes, will build it for the host platform" >&6; }
30926    else
30927      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30928      BUILD_JDK_FOUND=yes
30929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30930$as_echo_n "checking for Build JDK... " >&6; }
30931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30932$as_echo "yes, will use output dir" >&6; }
30933    fi
30934  fi
30935
30936  JMOD="$BUILD_JDK/bin/jmod"
30937  JLINK="$BUILD_JDK/bin/jlink"
30938
30939
30940
30941  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30943$as_echo_n "checking for Build JDK... " >&6; }
30944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30945$as_echo "no" >&6; }
30946    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30947  fi
30948
30949
30950
30951
30952
30953
30954###############################################################################
30955#
30956# Configure the sources to use. We can add or override individual directories.
30957#
30958###############################################################################
30959
30960
30961  # Where are the sources.
30962  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30963  CORBA_TOPDIR="$SRC_ROOT/corba"
30964  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30965  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30966  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30967  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30968  JDK_TOPDIR="$SRC_ROOT/jdk"
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978  # This feature is no longer supported.
30979
30980
30981
30982# Check whether --with-add-source-root was given.
30983if test "${with_add_source_root+set}" = set; then :
30984  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
30985$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30986fi
30987
30988
30989
30990
30991# Check whether --with-override-source-root was given.
30992if test "${with_override_source_root+set}" = set; then :
30993  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
30994$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30995fi
30996
30997
30998
30999
31000# Check whether --with-adds-and-overrides was given.
31001if test "${with_adds_and_overrides+set}" = set; then :
31002  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
31003$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31004fi
31005
31006
31007
31008
31009# Check whether --with-override-langtools was given.
31010if test "${with_override_langtools+set}" = set; then :
31011  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31012$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31013fi
31014
31015
31016
31017
31018# Check whether --with-override-corba was given.
31019if test "${with_override_corba+set}" = set; then :
31020  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31021$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31022fi
31023
31024
31025
31026
31027# Check whether --with-override-jaxp was given.
31028if test "${with_override_jaxp+set}" = set; then :
31029  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31030$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31031fi
31032
31033
31034
31035
31036# Check whether --with-override-jaxws was given.
31037if test "${with_override_jaxws+set}" = set; then :
31038  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31039$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31040fi
31041
31042
31043
31044
31045# Check whether --with-override-hotspot was given.
31046if test "${with_override_hotspot+set}" = set; then :
31047  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31048$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31049fi
31050
31051
31052
31053
31054# Check whether --with-override-nashorn was given.
31055if test "${with_override_nashorn+set}" = set; then :
31056  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31057$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31058fi
31059
31060
31061
31062
31063# Check whether --with-override-jdk was given.
31064if test "${with_override_jdk+set}" = set; then :
31065  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31066$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31067fi
31068
31069
31070
31071
31072  BUILD_OUTPUT="$OUTPUT_ROOT"
31073
31074  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31075
31076
31077
31078# Check whether --with-import_hotspot was given.
31079if test "${with_import_hotspot+set}" = set; then :
31080  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31081$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31082fi
31083
31084
31085
31086
31087
31088
31089# Check whether --with-import-modules was given.
31090if test "${with_import_modules+set}" = set; then :
31091  withval=$with_import_modules;
31092fi
31093
31094
31095  if test "x$with_import_modules" != x \
31096      && test "x$with_import_modules" != "xno"; then
31097    if test -d "$with_import_modules"; then
31098      IMPORT_MODULES_TOPDIR="$with_import_modules"
31099
31100  # Only process if variable expands to non-empty
31101
31102  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31104
31105  # Input might be given as Windows format, start by converting to
31106  # unix format.
31107  path="$IMPORT_MODULES_TOPDIR"
31108  new_path=`$CYGPATH -u "$path"`
31109
31110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31113  # "foo.exe" is OK but "foo" is an error.
31114  #
31115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31116  # It is also a way to make sure we got the proper file name for the real test later on.
31117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31118  if test "x$test_shortpath" = x; then
31119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31120$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31121    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31122  fi
31123
31124  # Call helper function which possibly converts this using DOS-style short mode.
31125  # If so, the updated path is stored in $new_path.
31126
31127  input_path="$new_path"
31128  # Check if we need to convert this using DOS-style short mode. If the path
31129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31130  # take no chances and rewrite it.
31131  # Note: m4 eats our [], so we need to use [ and ] instead.
31132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31133  if test "x$has_forbidden_chars" != x; then
31134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31138      # Going to short mode and back again did indeed matter. Since short mode is
31139      # case insensitive, let's make it lowercase to improve readability.
31140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31141      # Now convert it back to Unix-style (cygpath)
31142      input_path=`$CYGPATH -u "$shortmode_path"`
31143      new_path="$input_path"
31144    fi
31145  fi
31146
31147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31148  if test "x$test_cygdrive_prefix" = x; then
31149    # As a simple fix, exclude /usr/bin since it's not a real path.
31150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31152      # a path prefixed by /cygdrive for fixpath to work.
31153      new_path="$CYGWIN_ROOT_PATH$input_path"
31154    fi
31155  fi
31156
31157
31158  if test "x$path" != "x$new_path"; then
31159    IMPORT_MODULES_TOPDIR="$new_path"
31160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31161$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31162  fi
31163
31164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31165
31166  path="$IMPORT_MODULES_TOPDIR"
31167  has_colon=`$ECHO $path | $GREP ^.:`
31168  new_path="$path"
31169  if test "x$has_colon" = x; then
31170    # Not in mixed or Windows style, start by that.
31171    new_path=`cmd //c echo $path`
31172  fi
31173
31174
31175  input_path="$new_path"
31176  # Check if we need to convert this using DOS-style short mode. If the path
31177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31178  # take no chances and rewrite it.
31179  # Note: m4 eats our [], so we need to use [ and ] instead.
31180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31181  if test "x$has_forbidden_chars" != x; then
31182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31184  fi
31185
31186
31187  windows_path="$new_path"
31188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31189    unix_path=`$CYGPATH -u "$windows_path"`
31190    new_path="$unix_path"
31191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31193    new_path="$unix_path"
31194  fi
31195
31196  if test "x$path" != "x$new_path"; then
31197    IMPORT_MODULES_TOPDIR="$new_path"
31198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31199$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31200  fi
31201
31202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31204
31205    else
31206      # We're on a unix platform. Hooray! :)
31207      path="$IMPORT_MODULES_TOPDIR"
31208      has_space=`$ECHO "$path" | $GREP " "`
31209      if test "x$has_space" != x; then
31210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31211$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31213      fi
31214
31215      # Use eval to expand a potential ~
31216      eval path="$path"
31217      if test ! -f "$path" && test ! -d "$path"; then
31218        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31219      fi
31220
31221      if test -d "$path"; then
31222        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31223      else
31224        dir="`$DIRNAME "$path"`"
31225        base="`$BASENAME "$path"`"
31226        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31227      fi
31228    fi
31229  fi
31230
31231    elif test -e "$with_import_modules"; then
31232      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31233      $RM -rf "$IMPORT_MODULES_TOPDIR"
31234      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31235      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31236        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31237      fi
31238    else
31239      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31240    fi
31241  fi
31242
31243  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31244    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31245  fi
31246  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31247    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31248  fi
31249  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31250    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31251  fi
31252  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31253    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31254  fi
31255  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31256    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31257  fi
31258  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31259    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31260  fi
31261  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31262    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31263  fi
31264  # Workaround for using different imported module-info.java in Jake due to a
31265  # change in format. Remove once new format is standard in JDK 9 and javafx
31266  # delivers just that.
31267  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31268    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31269  fi
31270  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31271    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31272  fi
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284###############################################################################
31285#
31286# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31287# native code.
31288#
31289###############################################################################
31290
31291# See if we are doing a complete static build or not
31292
31293  # Check whether --enable-static-build was given.
31294if test "${enable_static_build+set}" = set; then :
31295  enableval=$enable_static_build;
31296fi
31297
31298  STATIC_BUILD=false
31299  if test "x$enable_static_build" = "xyes"; then
31300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31301$as_echo_n "checking if static build is enabled... " >&6; }
31302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31303$as_echo "yes" >&6; }
31304    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31305      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31306    fi
31307    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31308    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31309    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31310    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31311    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31312    STATIC_BUILD=true
31313  elif test "x$enable_static_build" = "xno"; then
31314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31315$as_echo_n "checking if static build is enabled... " >&6; }
31316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31317$as_echo "no" >&6; }
31318  elif test "x$enable_static_build" != "x"; then
31319    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31320  fi
31321
31322
31323
31324
31325# First determine the toolchain type (compiler family)
31326
31327
31328# Check whether --with-toolchain-type was given.
31329if test "${with_toolchain_type+set}" = set; then :
31330  withval=$with_toolchain_type;
31331fi
31332
31333
31334  # Use indirect variable referencing
31335  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31336  VALID_TOOLCHAINS=${!toolchain_var_name}
31337
31338  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31339    if test -n "$XCODEBUILD"; then
31340      # On Mac OS X, default toolchain to clang after Xcode 5
31341      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31342      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31343      if test $? -ne 0; then
31344        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31345      fi
31346      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31347          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31348          $CUT -f 1 -d .`
31349      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31350$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31351      if test $XCODE_MAJOR_VERSION -ge 5; then
31352          DEFAULT_TOOLCHAIN="clang"
31353      else
31354          DEFAULT_TOOLCHAIN="gcc"
31355      fi
31356    else
31357      # If Xcode is not installed, but the command line tools are
31358      # then we can't run xcodebuild. On these systems we should
31359      # default to clang
31360      DEFAULT_TOOLCHAIN="clang"
31361    fi
31362  else
31363    # First toolchain type in the list is the default
31364    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31365  fi
31366
31367  if test "x$with_toolchain_type" = xlist; then
31368    # List all toolchains
31369    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31370$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31371    for toolchain in $VALID_TOOLCHAINS; do
31372      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31373      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31374      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31375    done
31376
31377    exit 0
31378  elif test "x$with_toolchain_type" != x; then
31379    # User override; check that it is valid
31380    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31381      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31382$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31383      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31384$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31385      as_fn_error $? "Cannot continue." "$LINENO" 5
31386    fi
31387    TOOLCHAIN_TYPE=$with_toolchain_type
31388  else
31389    # No flag given, use default
31390    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31391  fi
31392
31393
31394  TOOLCHAIN_CC_BINARY_clang="clang"
31395  TOOLCHAIN_CC_BINARY_gcc="gcc"
31396  TOOLCHAIN_CC_BINARY_microsoft="cl"
31397  TOOLCHAIN_CC_BINARY_solstudio="cc"
31398  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31399
31400  TOOLCHAIN_CXX_BINARY_clang="clang++"
31401  TOOLCHAIN_CXX_BINARY_gcc="g++"
31402  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31403  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31404  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31405
31406  # Use indirect variable referencing
31407  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31408  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31409  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31410  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31411  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31412  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31413  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31414  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31415
31416
31417  # Define filename patterns
31418  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31419    LIBRARY_PREFIX=
31420    SHARED_LIBRARY_SUFFIX='.dll'
31421    STATIC_LIBRARY_SUFFIX='.lib'
31422    SHARED_LIBRARY='$1.dll'
31423    STATIC_LIBRARY='$1.lib'
31424    OBJ_SUFFIX='.obj'
31425    EXE_SUFFIX='.exe'
31426  else
31427    LIBRARY_PREFIX=lib
31428    SHARED_LIBRARY_SUFFIX='.so'
31429    STATIC_LIBRARY_SUFFIX='.a'
31430    SHARED_LIBRARY='lib$1.so'
31431    STATIC_LIBRARY='lib$1.a'
31432    OBJ_SUFFIX='.o'
31433    EXE_SUFFIX=''
31434    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31435      # For full static builds, we're overloading the SHARED_LIBRARY
31436      # variables in order to limit the amount of changes required.
31437      # It would be better to remove SHARED and just use LIBRARY and
31438      # LIBRARY_SUFFIX for libraries that can be built either
31439      # shared or static and use STATIC_* for libraries that are
31440      # always built statically.
31441      if test "x$STATIC_BUILD" = xtrue; then
31442        SHARED_LIBRARY='lib$1.a'
31443        SHARED_LIBRARY_SUFFIX='.a'
31444      else
31445        SHARED_LIBRARY='lib$1.dylib'
31446        SHARED_LIBRARY_SUFFIX='.dylib'
31447      fi
31448    fi
31449  fi
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31461    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31462$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31463  else
31464    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31465$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31466  fi
31467
31468
31469# User supplied flags should be used when configure detects compilers
31470
31471  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31473$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31474  fi
31475
31476  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31478$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31479  fi
31480
31481  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31483$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31484  fi
31485
31486
31487# Check whether --with-extra-cflags was given.
31488if test "${with_extra_cflags+set}" = set; then :
31489  withval=$with_extra_cflags;
31490fi
31491
31492
31493
31494# Check whether --with-extra-cxxflags was given.
31495if test "${with_extra_cxxflags+set}" = set; then :
31496  withval=$with_extra_cxxflags;
31497fi
31498
31499
31500
31501# Check whether --with-extra-ldflags was given.
31502if test "${with_extra_ldflags+set}" = set; then :
31503  withval=$with_extra_ldflags;
31504fi
31505
31506
31507  EXTRA_CFLAGS="$with_extra_cflags"
31508  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31509  EXTRA_LDFLAGS="$with_extra_ldflags"
31510
31511  # Hotspot needs these set in their legacy form
31512  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31513  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31514  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524  # The global CFLAGS and LDLAGS variables are used by configure tests and
31525  # should include the extra parameters
31526  CFLAGS="$EXTRA_CFLAGS"
31527  CXXFLAGS="$EXTRA_CXXFLAGS"
31528  LDFLAGS="$EXTRA_LDFLAGS"
31529  CPPFLAGS=""
31530
31531# The sysroot cflags are needed for configure to be able to run the compilers
31532
31533  if test "x$SYSROOT" != "x"; then
31534    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31535      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31536        # Solaris Studio does not have a concept of sysroot. Instead we must
31537        # make sure the default include and lib dirs are appended to each
31538        # compile and link command line. Must also add -I-xbuiltin to enable
31539        # inlining of system functions and intrinsics.
31540        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31541        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31542            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31543      fi
31544    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31545      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31546      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31547    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31548      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31549      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31550    fi
31551    # Propagate the sysroot args to hotspot
31552    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31553    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31554    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31555    # The global CFLAGS and LDFLAGS variables need these for configure to function
31556    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31557    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31558    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31559    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31560  fi
31561
31562  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31563    # We also need -iframework<path>/System/Library/Frameworks
31564    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31565    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31566    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31567    # set this here so it doesn't have to be peppered throughout the forest
31568    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31569    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31570  fi
31571
31572
31573
31574
31575
31576# Then detect the actual binaries needed
31577
31578  # FIXME: Is this needed?
31579  ac_ext=cpp
31580ac_cpp='$CXXCPP $CPPFLAGS'
31581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31584
31585
31586  # Store the CFLAGS etc passed to the configure script.
31587  ORG_CFLAGS="$CFLAGS"
31588  ORG_CXXFLAGS="$CXXFLAGS"
31589
31590  # autoconf magic only relies on PATH, so update it if tools dir is specified
31591  OLD_PATH="$PATH"
31592
31593  # On Windows, we need to detect the visual studio installation first.
31594  # This will change the PATH, but we need to keep that new PATH even
31595  # after toolchain detection is done, since the compiler (on x86) uses
31596  # it for DLL resolution in runtime.
31597  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31598      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31599
31600  # Store path to cygwin link.exe to help excluding it when searching for
31601  # VS linker. This must be done before changing the PATH when looking for VS.
31602  # Extract the first word of "link", so it can be a program name with args.
31603set dummy link; ac_word=$2
31604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31605$as_echo_n "checking for $ac_word... " >&6; }
31606if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31607  $as_echo_n "(cached) " >&6
31608else
31609  case $CYGWIN_LINK in
31610  [\\/]* | ?:[\\/]*)
31611  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31612  ;;
31613  *)
31614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31615for as_dir in $PATH
31616do
31617  IFS=$as_save_IFS
31618  test -z "$as_dir" && as_dir=.
31619    for ac_exec_ext in '' $ac_executable_extensions; do
31620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31621    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31623    break 2
31624  fi
31625done
31626  done
31627IFS=$as_save_IFS
31628
31629  ;;
31630esac
31631fi
31632CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31633if test -n "$CYGWIN_LINK"; then
31634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31635$as_echo "$CYGWIN_LINK" >&6; }
31636else
31637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31638$as_echo "no" >&6; }
31639fi
31640
31641
31642  if test "x$CYGWIN_LINK" != x; then
31643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31644$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31645    "$CYGWIN_LINK" --version > /dev/null
31646    if test $? -eq 0 ; then
31647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31648$as_echo "yes" >&6; }
31649    else
31650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31651$as_echo "no" >&6; }
31652      # This might be the VS linker. Don't exclude it later on.
31653      CYGWIN_LINK=""
31654    fi
31655  fi
31656
31657  # First-hand choice is to locate and run the vsvars bat file.
31658
31659
31660# Check whether --with-toolchain-version was given.
31661if test "${with_toolchain_version+set}" = set; then :
31662  withval=$with_toolchain_version;
31663fi
31664
31665
31666  if test "x$with_toolchain_version" = xlist; then
31667    # List all toolchains
31668    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31669$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31670    for version in $VALID_VS_VERSIONS; do
31671      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31672      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31673    done
31674
31675    exit 0
31676  elif test "x$DEVKIT_VS_VERSION" != x; then
31677    VS_VERSION=$DEVKIT_VS_VERSION
31678    TOOLCHAIN_VERSION=$VS_VERSION
31679    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31680    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31681    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31682    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31683    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31684    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31685
31686    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31687    # can still be exported as INCLUDE for compiler invocations without
31688    # SYSROOT_CFLAGS
31689    OLDIFS="$IFS"
31690    IFS=";"
31691    for i in $DEVKIT_VS_INCLUDE; do
31692      ipath=$i
31693
31694  unix_path="$ipath"
31695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31696    windows_path=`$CYGPATH -m "$unix_path"`
31697    ipath="$windows_path"
31698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699    windows_path=`cmd //c echo $unix_path`
31700    ipath="$windows_path"
31701  fi
31702
31703      VS_INCLUDE="$VS_INCLUDE;$ipath"
31704    done
31705    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31706    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31707    for i in $DEVKIT_VS_LIB; do
31708      libpath=$i
31709
31710  unix_path="$libpath"
31711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31712    windows_path=`$CYGPATH -m "$unix_path"`
31713    libpath="$windows_path"
31714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31715    windows_path=`cmd //c echo $unix_path`
31716    libpath="$windows_path"
31717  fi
31718
31719      VS_LIB="$VS_LIB;$libpath"
31720    done
31721    IFS="$OLDIFS"
31722
31723    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31724$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31725
31726  elif test "x$with_toolchain_version" != x; then
31727    # User override; check that it is valid
31728    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31729      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31730$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31731      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31732$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31733      as_fn_error $? "Cannot continue." "$LINENO" 5
31734    fi
31735    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31736  else
31737    # No flag given, use default
31738    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31739  fi
31740
31741  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31742
31743  VS_VERSION="$VS_VERSION"
31744  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31745  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31746  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31747  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31748
31749  # When using --with-tools-dir, assume it points to the correct and default
31750  # version of Visual Studio or that --with-toolchain-version was also set.
31751  if test "x$with_tools_dir" != x; then
31752
31753  if test "x$VS_ENV_CMD" = x; then
31754    VS_VERSION="${VS_VERSION}"
31755    VS_BASE="$with_tools_dir/../.."
31756    METHOD="--with-tools-dir"
31757
31758    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31759      VCVARSFILE="vc/bin/vcvars32.bat"
31760    else
31761      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31762    fi
31763
31764
31765  windows_path="$VS_BASE"
31766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31767    unix_path=`$CYGPATH -u "$windows_path"`
31768    VS_BASE="$unix_path"
31769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31771    VS_BASE="$unix_path"
31772  fi
31773
31774    if test -d "$VS_BASE"; then
31775      if test -f "$VS_BASE/$VCVARSFILE"; then
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31777$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31778        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31779        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31780        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31781        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31782      else
31783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31785        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31786$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31787      fi
31788    fi
31789  fi
31790
31791
31792  if test "x$VS_ENV_CMD" = x; then
31793    VS_VERSION="${VS_VERSION}"
31794    VS_BASE="$with_tools_dir/../../.."
31795    METHOD="--with-tools-dir"
31796
31797    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31798      VCVARSFILE="vc/bin/vcvars32.bat"
31799    else
31800      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31801    fi
31802
31803
31804  windows_path="$VS_BASE"
31805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31806    unix_path=`$CYGPATH -u "$windows_path"`
31807    VS_BASE="$unix_path"
31808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31810    VS_BASE="$unix_path"
31811  fi
31812
31813    if test -d "$VS_BASE"; then
31814      if test -f "$VS_BASE/$VCVARSFILE"; then
31815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31816$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31817        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31818        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31819        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31820        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31821      else
31822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31823$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31824        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31825$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31826      fi
31827    fi
31828  fi
31829
31830    if test "x$VS_ENV_CMD" = x; then
31831      # Having specified an argument which is incorrect will produce an instant failure;
31832      # we should not go on looking
31833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31834$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31835      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31836$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31837      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31838$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31839      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31840    fi
31841  fi
31842
31843  VS_ENV_CMD=""
31844  VS_ENV_ARGS=""
31845
31846  if test "x$VS_COMNTOOLS" != x; then
31847
31848  if test "x$VS_ENV_CMD" = x; then
31849    VS_VERSION="${VS_VERSION}"
31850    VS_BASE="$VS_COMNTOOLS/../.."
31851    METHOD="$VS_COMNTOOLS_VAR variable"
31852
31853    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31854      VCVARSFILE="vc/bin/vcvars32.bat"
31855    else
31856      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31857    fi
31858
31859
31860  windows_path="$VS_BASE"
31861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31862    unix_path=`$CYGPATH -u "$windows_path"`
31863    VS_BASE="$unix_path"
31864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31866    VS_BASE="$unix_path"
31867  fi
31868
31869    if test -d "$VS_BASE"; then
31870      if test -f "$VS_BASE/$VCVARSFILE"; then
31871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31872$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31873        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31874        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31875        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31876        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31877      else
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31879$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31880        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31881$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31882      fi
31883    fi
31884  fi
31885
31886  fi
31887  if test "x$PROGRAMFILES" != x; then
31888
31889  if test "x$VS_ENV_CMD" = x; then
31890    VS_VERSION="${VS_VERSION}"
31891    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31892    METHOD="well-known name"
31893
31894    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31895      VCVARSFILE="vc/bin/vcvars32.bat"
31896    else
31897      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31898    fi
31899
31900
31901  windows_path="$VS_BASE"
31902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31903    unix_path=`$CYGPATH -u "$windows_path"`
31904    VS_BASE="$unix_path"
31905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31907    VS_BASE="$unix_path"
31908  fi
31909
31910    if test -d "$VS_BASE"; then
31911      if test -f "$VS_BASE/$VCVARSFILE"; then
31912        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31913$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31914        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31915        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31916        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31917        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31918      else
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31920$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31922$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31923      fi
31924    fi
31925  fi
31926
31927  fi
31928  # Work around the insanely named ProgramFiles(x86) env variable
31929  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31930  if test "x$PROGRAMFILES_X86" != x; then
31931
31932  if test "x$VS_ENV_CMD" = x; then
31933    VS_VERSION="${VS_VERSION}"
31934    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31935    METHOD="well-known name"
31936
31937    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31938      VCVARSFILE="vc/bin/vcvars32.bat"
31939    else
31940      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31941    fi
31942
31943
31944  windows_path="$VS_BASE"
31945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31946    unix_path=`$CYGPATH -u "$windows_path"`
31947    VS_BASE="$unix_path"
31948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31950    VS_BASE="$unix_path"
31951  fi
31952
31953    if test -d "$VS_BASE"; then
31954      if test -f "$VS_BASE/$VCVARSFILE"; then
31955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31956$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31957        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31958        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31959        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31960        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31961      else
31962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31963$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31964        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31965$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31966      fi
31967    fi
31968  fi
31969
31970  fi
31971
31972  if test "x$VS_ENV_CMD" = x; then
31973    VS_VERSION="${VS_VERSION}"
31974    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31975    METHOD="well-known name"
31976
31977    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31978      VCVARSFILE="vc/bin/vcvars32.bat"
31979    else
31980      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31981    fi
31982
31983
31984  windows_path="$VS_BASE"
31985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31986    unix_path=`$CYGPATH -u "$windows_path"`
31987    VS_BASE="$unix_path"
31988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31990    VS_BASE="$unix_path"
31991  fi
31992
31993    if test -d "$VS_BASE"; then
31994      if test -f "$VS_BASE/$VCVARSFILE"; then
31995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31996$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31997        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31998        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31999        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32000        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32001      else
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32005$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32006      fi
32007    fi
32008  fi
32009
32010
32011  if test "x$VS_ENV_CMD" = x; then
32012    VS_VERSION="${VS_VERSION}"
32013    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32014    METHOD="well-known name"
32015
32016    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32017      VCVARSFILE="vc/bin/vcvars32.bat"
32018    else
32019      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32020    fi
32021
32022
32023  windows_path="$VS_BASE"
32024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32025    unix_path=`$CYGPATH -u "$windows_path"`
32026    VS_BASE="$unix_path"
32027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32029    VS_BASE="$unix_path"
32030  fi
32031
32032    if test -d "$VS_BASE"; then
32033      if test -f "$VS_BASE/$VCVARSFILE"; then
32034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32035$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32036        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32037        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32038        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32039        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32040      else
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32042$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32044$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32045      fi
32046    fi
32047  fi
32048
32049
32050  if test "x$SDK_INSTALL_DIR" != x; then
32051    if test "x$ProgramW6432" != x; then
32052
32053  if test "x$VS_ENV_CMD" = x; then
32054    VS_VERSION="${VS_VERSION}"
32055    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32056    METHOD="well-known name"
32057
32058  windows_path="$WIN_SDK_BASE"
32059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32060    unix_path=`$CYGPATH -u "$windows_path"`
32061    WIN_SDK_BASE="$unix_path"
32062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32064    WIN_SDK_BASE="$unix_path"
32065  fi
32066
32067    if test -d "$WIN_SDK_BASE"; then
32068      # There have been cases of partial or broken SDK installations. A missing
32069      # lib dir is not going to work.
32070      if test ! -d "$WIN_SDK_BASE/lib"; then
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32073        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32074$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32075      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32077$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32078        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32079        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32080          VS_ENV_ARGS="/x86"
32081        else
32082          VS_ENV_ARGS="/x64"
32083        fi
32084        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32085        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32086        # TODO: improve detection for other versions of SDK
32087        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32088      else
32089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32090$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32092$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32093      fi
32094    fi
32095  fi
32096
32097    fi
32098    if test "x$PROGRAMW6432" != x; then
32099
32100  if test "x$VS_ENV_CMD" = x; then
32101    VS_VERSION="${VS_VERSION}"
32102    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32103    METHOD="well-known name"
32104
32105  windows_path="$WIN_SDK_BASE"
32106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32107    unix_path=`$CYGPATH -u "$windows_path"`
32108    WIN_SDK_BASE="$unix_path"
32109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32111    WIN_SDK_BASE="$unix_path"
32112  fi
32113
32114    if test -d "$WIN_SDK_BASE"; then
32115      # There have been cases of partial or broken SDK installations. A missing
32116      # lib dir is not going to work.
32117      if test ! -d "$WIN_SDK_BASE/lib"; then
32118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32121$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32122      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32124$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32125        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32126        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32127          VS_ENV_ARGS="/x86"
32128        else
32129          VS_ENV_ARGS="/x64"
32130        fi
32131        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32132        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32133        # TODO: improve detection for other versions of SDK
32134        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32135      else
32136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32137$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32138        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32139$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32140      fi
32141    fi
32142  fi
32143
32144    fi
32145    if test "x$PROGRAMFILES" != x; then
32146
32147  if test "x$VS_ENV_CMD" = x; then
32148    VS_VERSION="${VS_VERSION}"
32149    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32150    METHOD="well-known name"
32151
32152  windows_path="$WIN_SDK_BASE"
32153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32154    unix_path=`$CYGPATH -u "$windows_path"`
32155    WIN_SDK_BASE="$unix_path"
32156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32158    WIN_SDK_BASE="$unix_path"
32159  fi
32160
32161    if test -d "$WIN_SDK_BASE"; then
32162      # There have been cases of partial or broken SDK installations. A missing
32163      # lib dir is not going to work.
32164      if test ! -d "$WIN_SDK_BASE/lib"; then
32165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32168$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32169      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32170        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32171$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32172        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32173        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32174          VS_ENV_ARGS="/x86"
32175        else
32176          VS_ENV_ARGS="/x64"
32177        fi
32178        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32179        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32180        # TODO: improve detection for other versions of SDK
32181        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32182      else
32183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32186$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32187      fi
32188    fi
32189  fi
32190
32191    fi
32192
32193  if test "x$VS_ENV_CMD" = x; then
32194    VS_VERSION="${VS_VERSION}"
32195    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32196    METHOD="well-known name"
32197
32198  windows_path="$WIN_SDK_BASE"
32199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32200    unix_path=`$CYGPATH -u "$windows_path"`
32201    WIN_SDK_BASE="$unix_path"
32202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32204    WIN_SDK_BASE="$unix_path"
32205  fi
32206
32207    if test -d "$WIN_SDK_BASE"; then
32208      # There have been cases of partial or broken SDK installations. A missing
32209      # lib dir is not going to work.
32210      if test ! -d "$WIN_SDK_BASE/lib"; then
32211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32213        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32214$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32215      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32216        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32217$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32218        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32219        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32220          VS_ENV_ARGS="/x86"
32221        else
32222          VS_ENV_ARGS="/x64"
32223        fi
32224        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32225        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32226        # TODO: improve detection for other versions of SDK
32227        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32228      else
32229        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32230$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32231        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32232$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32233      fi
32234    fi
32235  fi
32236
32237
32238  if test "x$VS_ENV_CMD" = x; then
32239    VS_VERSION="${VS_VERSION}"
32240    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32241    METHOD="well-known name"
32242
32243  windows_path="$WIN_SDK_BASE"
32244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32245    unix_path=`$CYGPATH -u "$windows_path"`
32246    WIN_SDK_BASE="$unix_path"
32247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32249    WIN_SDK_BASE="$unix_path"
32250  fi
32251
32252    if test -d "$WIN_SDK_BASE"; then
32253      # There have been cases of partial or broken SDK installations. A missing
32254      # lib dir is not going to work.
32255      if test ! -d "$WIN_SDK_BASE/lib"; then
32256        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32257$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32258        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32259$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32260      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32261        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32262$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32263        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32264        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32265          VS_ENV_ARGS="/x86"
32266        else
32267          VS_ENV_ARGS="/x64"
32268        fi
32269        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32270        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32271        # TODO: improve detection for other versions of SDK
32272        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32273      else
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32275$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32276        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32277$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32278      fi
32279    fi
32280  fi
32281
32282  fi
32283
32284    if test "x$VS_ENV_CMD" != x; then
32285      TOOLCHAIN_VERSION=$VS_VERSION
32286      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32287      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32288      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32289      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32290      # The rest of the variables are already evaled while probing
32291      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32292$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32293      break
32294    fi
32295  done
32296
32297
32298  # If we have a devkit, skip all of the below.
32299  if test "x$DEVKIT_VS_VERSION" = x; then
32300    if test "x$VS_ENV_CMD" != x; then
32301      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32302
32303  # Only process if variable expands to non-empty
32304
32305  if test "x$VS_ENV_CMD" != x; then
32306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32307
32308  # First separate the path from the arguments. This will split at the first
32309  # space.
32310  complete="$VS_ENV_CMD"
32311  path="${complete%% *}"
32312  tmp="$complete EOL"
32313  arguments="${tmp#* }"
32314
32315  # Input might be given as Windows format, start by converting to
32316  # unix format.
32317  new_path=`$CYGPATH -u "$path"`
32318
32319  # Now try to locate executable using which
32320  new_path=`$WHICH "$new_path" 2> /dev/null`
32321  # bat and cmd files are not always considered executable in cygwin causing which
32322  # to not find them
32323  if test "x$new_path" = x \
32324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32326    new_path=`$CYGPATH -u "$path"`
32327  fi
32328  if test "x$new_path" = x; then
32329    # Oops. Which didn't find the executable.
32330    # The splitting of arguments from the executable at a space might have been incorrect,
32331    # since paths with space are more likely in Windows. Give it another try with the whole
32332    # argument.
32333    path="$complete"
32334    arguments="EOL"
32335    new_path=`$CYGPATH -u "$path"`
32336    new_path=`$WHICH "$new_path" 2> /dev/null`
32337    # bat and cmd files are not always considered executable in cygwin causing which
32338    # to not find them
32339    if test "x$new_path" = x \
32340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32342      new_path=`$CYGPATH -u "$path"`
32343    fi
32344    if test "x$new_path" = x; then
32345      # It's still not found. Now this is an unrecoverable error.
32346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32347$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32348      has_space=`$ECHO "$complete" | $GREP " "`
32349      if test "x$has_space" != x; then
32350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32352      fi
32353      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32354    fi
32355  fi
32356
32357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32360  # "foo.exe" is OK but "foo" is an error.
32361  #
32362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32363  # It is also a way to make sure we got the proper file name for the real test later on.
32364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32365  if test "x$test_shortpath" = x; then
32366    # Short path failed, file does not exist as specified.
32367    # Try adding .exe or .cmd
32368    if test -f "${new_path}.exe"; then
32369      input_to_shortpath="${new_path}.exe"
32370    elif test -f "${new_path}.cmd"; then
32371      input_to_shortpath="${new_path}.cmd"
32372    else
32373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32374$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32377      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32378    fi
32379  else
32380    input_to_shortpath="$new_path"
32381  fi
32382
32383  # Call helper function which possibly converts this using DOS-style short mode.
32384  # If so, the updated path is stored in $new_path.
32385  new_path="$input_to_shortpath"
32386
32387  input_path="$input_to_shortpath"
32388  # Check if we need to convert this using DOS-style short mode. If the path
32389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32390  # take no chances and rewrite it.
32391  # Note: m4 eats our [], so we need to use [ and ] instead.
32392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32393  if test "x$has_forbidden_chars" != x; then
32394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32398      # Going to short mode and back again did indeed matter. Since short mode is
32399      # case insensitive, let's make it lowercase to improve readability.
32400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32401      # Now convert it back to Unix-style (cygpath)
32402      input_path=`$CYGPATH -u "$shortmode_path"`
32403      new_path="$input_path"
32404    fi
32405  fi
32406
32407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32408  if test "x$test_cygdrive_prefix" = x; then
32409    # As a simple fix, exclude /usr/bin since it's not a real path.
32410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32412      # a path prefixed by /cygdrive for fixpath to work.
32413      new_path="$CYGWIN_ROOT_PATH$input_path"
32414    fi
32415  fi
32416
32417  # remove trailing .exe if any
32418  new_path="${new_path/%.exe/}"
32419
32420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32421
32422  # First separate the path from the arguments. This will split at the first
32423  # space.
32424  complete="$VS_ENV_CMD"
32425  path="${complete%% *}"
32426  tmp="$complete EOL"
32427  arguments="${tmp#* }"
32428
32429  # Input might be given as Windows format, start by converting to
32430  # unix format.
32431  new_path="$path"
32432
32433  windows_path="$new_path"
32434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32435    unix_path=`$CYGPATH -u "$windows_path"`
32436    new_path="$unix_path"
32437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32439    new_path="$unix_path"
32440  fi
32441
32442
32443  # Now try to locate executable using which
32444  new_path=`$WHICH "$new_path" 2> /dev/null`
32445
32446  if test "x$new_path" = x; then
32447    # Oops. Which didn't find the executable.
32448    # The splitting of arguments from the executable at a space might have been incorrect,
32449    # since paths with space are more likely in Windows. Give it another try with the whole
32450    # argument.
32451    path="$complete"
32452    arguments="EOL"
32453    new_path="$path"
32454
32455  windows_path="$new_path"
32456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32457    unix_path=`$CYGPATH -u "$windows_path"`
32458    new_path="$unix_path"
32459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32461    new_path="$unix_path"
32462  fi
32463
32464
32465    new_path=`$WHICH "$new_path" 2> /dev/null`
32466    # bat and cmd files are not always considered executable in MSYS causing which
32467    # to not find them
32468    if test "x$new_path" = x \
32469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32471      new_path="$path"
32472
32473  windows_path="$new_path"
32474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32475    unix_path=`$CYGPATH -u "$windows_path"`
32476    new_path="$unix_path"
32477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32479    new_path="$unix_path"
32480  fi
32481
32482    fi
32483
32484    if test "x$new_path" = x; then
32485      # It's still not found. Now this is an unrecoverable error.
32486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32487$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32488      has_space=`$ECHO "$complete" | $GREP " "`
32489      if test "x$has_space" != x; then
32490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32492      fi
32493      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32494    fi
32495  fi
32496
32497  # Now new_path has a complete unix path to the binary
32498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32499    # Keep paths in /bin as-is, but remove trailing .exe if any
32500    new_path="${new_path/%.exe/}"
32501    # Do not save /bin paths to all_fixpath_prefixes!
32502  else
32503    # Not in mixed or Windows style, start by that.
32504    new_path=`cmd //c echo $new_path`
32505
32506  input_path="$new_path"
32507  # Check if we need to convert this using DOS-style short mode. If the path
32508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32509  # take no chances and rewrite it.
32510  # Note: m4 eats our [], so we need to use [ and ] instead.
32511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32512  if test "x$has_forbidden_chars" != x; then
32513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32515  fi
32516
32517    # Output is in $new_path
32518
32519  windows_path="$new_path"
32520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32521    unix_path=`$CYGPATH -u "$windows_path"`
32522    new_path="$unix_path"
32523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32525    new_path="$unix_path"
32526  fi
32527
32528    # remove trailing .exe if any
32529    new_path="${new_path/%.exe/}"
32530
32531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32533  fi
32534
32535    else
32536      # We're on a unix platform. Hooray! :)
32537      # First separate the path from the arguments. This will split at the first
32538      # space.
32539      complete="$VS_ENV_CMD"
32540      path="${complete%% *}"
32541      tmp="$complete EOL"
32542      arguments="${tmp#* }"
32543
32544      # Cannot rely on the command "which" here since it doesn't always work.
32545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32546      if test -z "$is_absolute_path"; then
32547        # Path to executable is not absolute. Find it.
32548        IFS_save="$IFS"
32549        IFS=:
32550        for p in $PATH; do
32551          if test -f "$p/$path" && test -x "$p/$path"; then
32552            new_path="$p/$path"
32553            break
32554          fi
32555        done
32556        IFS="$IFS_save"
32557      else
32558        # This is an absolute path, we can use it without further modifications.
32559        new_path="$path"
32560      fi
32561
32562      if test "x$new_path" = x; then
32563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32564$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32565        has_space=`$ECHO "$complete" | $GREP " "`
32566        if test "x$has_space" != x; then
32567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32569        fi
32570        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32571      fi
32572    fi
32573
32574    # Now join together the path and the arguments once again
32575    if test "x$arguments" != xEOL; then
32576      new_complete="$new_path ${arguments% *}"
32577    else
32578      new_complete="$new_path"
32579    fi
32580
32581    if test "x$complete" != "x$new_complete"; then
32582      VS_ENV_CMD="$new_complete"
32583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32584$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32585    fi
32586  fi
32587
32588
32589      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32590      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32591$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32592
32593      # We need to create a couple of temporary files.
32594      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32595      $MKDIR -p $VS_ENV_TMP_DIR
32596
32597      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32598      # Instead create a shell script which will set the relevant variables when run.
32599      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32600
32601  unix_path="$WINPATH_VS_ENV_CMD"
32602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32603    windows_path=`$CYGPATH -m "$unix_path"`
32604    WINPATH_VS_ENV_CMD="$windows_path"
32605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32606    windows_path=`cmd //c echo $unix_path`
32607    WINPATH_VS_ENV_CMD="$windows_path"
32608  fi
32609
32610      WINPATH_BASH="$BASH"
32611
32612  unix_path="$WINPATH_BASH"
32613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32614    windows_path=`$CYGPATH -m "$unix_path"`
32615    WINPATH_BASH="$windows_path"
32616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32617    windows_path=`cmd //c echo $unix_path`
32618    WINPATH_BASH="$windows_path"
32619  fi
32620
32621
32622      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32623      # script (executable by bash) that will setup the important variables.
32624      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32625      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32626      # This will end up something like:
32627      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32628      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32629      # These will end up something like:
32630      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32631      # The trailing space for everyone except PATH is no typo, but is needed due
32632      # to trailing \ in the Windows paths. These will be stripped later.
32633      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32634          >> $EXTRACT_VC_ENV_BAT_FILE
32635      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32636          >> $EXTRACT_VC_ENV_BAT_FILE
32637      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32638          >> $EXTRACT_VC_ENV_BAT_FILE
32639      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32640          >> $EXTRACT_VC_ENV_BAT_FILE
32641      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32642          >> $EXTRACT_VC_ENV_BAT_FILE
32643      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32644          >> $EXTRACT_VC_ENV_BAT_FILE
32645
32646      # Now execute the newly created bat file.
32647      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32648      # Change directory so we don't need to mess with Windows paths in redirects.
32649      cd $VS_ENV_TMP_DIR
32650      cmd /c extract-vs-env.bat | $CAT
32651      cd $CURDIR
32652
32653      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32654        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32655$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32656        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32657$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32658        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32659$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32660        as_fn_error $? "Cannot continue" "$LINENO" 5
32661      fi
32662
32663      # Now set all paths and other env variables. This will allow the rest of
32664      # the configure script to find and run the compiler in the proper way.
32665      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32666$as_echo "$as_me: Setting extracted environment variables" >&6;}
32667      . $VS_ENV_TMP_DIR/set-vs-env.sh
32668      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32669      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32670    else
32671      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32673$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32674    fi
32675  fi
32676
32677  # At this point, we should have correct variables in the environment, or we can't continue.
32678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32679$as_echo_n "checking for Visual Studio variables... " >&6; }
32680
32681  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32682      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32683    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32685$as_echo "present but broken" >&6; }
32686      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32687    else
32688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32689$as_echo "ok" >&6; }
32690      # Remove any trailing "\" ";" and " " from the variables.
32691      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32692      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32693      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32694      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32695      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32696      # Remove any paths containing # (typically F#) as that messes up make. This
32697      # is needed if visual studio was installed with F# support.
32698      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32699
32700
32701
32702
32703
32704      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32705      OLDIFS="$IFS"
32706      IFS=";"
32707      for i in $VS_INCLUDE; do
32708        ipath=$i
32709        # Only process non-empty elements
32710        if test "x$ipath" != x; then
32711          IFS="$OLDIFS"
32712          # Check that directory exists before calling fixup_path
32713          testpath=$ipath
32714
32715  windows_path="$testpath"
32716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32717    unix_path=`$CYGPATH -u "$windows_path"`
32718    testpath="$unix_path"
32719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32721    testpath="$unix_path"
32722  fi
32723
32724          if test -d "$testpath"; then
32725
32726  # Only process if variable expands to non-empty
32727
32728  if test "x$ipath" != x; then
32729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32730
32731  # Input might be given as Windows format, start by converting to
32732  # unix format.
32733  path="$ipath"
32734  new_path=`$CYGPATH -u "$path"`
32735
32736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32739  # "foo.exe" is OK but "foo" is an error.
32740  #
32741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32742  # It is also a way to make sure we got the proper file name for the real test later on.
32743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32744  if test "x$test_shortpath" = x; then
32745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32746$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32747    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32748  fi
32749
32750  # Call helper function which possibly converts this using DOS-style short mode.
32751  # If so, the updated path is stored in $new_path.
32752
32753  input_path="$new_path"
32754  # Check if we need to convert this using DOS-style short mode. If the path
32755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32756  # take no chances and rewrite it.
32757  # Note: m4 eats our [], so we need to use [ and ] instead.
32758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32759  if test "x$has_forbidden_chars" != x; then
32760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32764      # Going to short mode and back again did indeed matter. Since short mode is
32765      # case insensitive, let's make it lowercase to improve readability.
32766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32767      # Now convert it back to Unix-style (cygpath)
32768      input_path=`$CYGPATH -u "$shortmode_path"`
32769      new_path="$input_path"
32770    fi
32771  fi
32772
32773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32774  if test "x$test_cygdrive_prefix" = x; then
32775    # As a simple fix, exclude /usr/bin since it's not a real path.
32776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32778      # a path prefixed by /cygdrive for fixpath to work.
32779      new_path="$CYGWIN_ROOT_PATH$input_path"
32780    fi
32781  fi
32782
32783
32784  if test "x$path" != "x$new_path"; then
32785    ipath="$new_path"
32786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32787$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32788  fi
32789
32790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32791
32792  path="$ipath"
32793  has_colon=`$ECHO $path | $GREP ^.:`
32794  new_path="$path"
32795  if test "x$has_colon" = x; then
32796    # Not in mixed or Windows style, start by that.
32797    new_path=`cmd //c echo $path`
32798  fi
32799
32800
32801  input_path="$new_path"
32802  # Check if we need to convert this using DOS-style short mode. If the path
32803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32804  # take no chances and rewrite it.
32805  # Note: m4 eats our [], so we need to use [ and ] instead.
32806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32807  if test "x$has_forbidden_chars" != x; then
32808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32810  fi
32811
32812
32813  windows_path="$new_path"
32814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815    unix_path=`$CYGPATH -u "$windows_path"`
32816    new_path="$unix_path"
32817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32819    new_path="$unix_path"
32820  fi
32821
32822  if test "x$path" != "x$new_path"; then
32823    ipath="$new_path"
32824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32825$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32826  fi
32827
32828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32830
32831    else
32832      # We're on a unix platform. Hooray! :)
32833      path="$ipath"
32834      has_space=`$ECHO "$path" | $GREP " "`
32835      if test "x$has_space" != x; then
32836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32837$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32839      fi
32840
32841      # Use eval to expand a potential ~
32842      eval path="$path"
32843      if test ! -f "$path" && test ! -d "$path"; then
32844        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32845      fi
32846
32847      if test -d "$path"; then
32848        ipath="`cd "$path"; $THEPWDCMD -L`"
32849      else
32850        dir="`$DIRNAME "$path"`"
32851        base="`$BASENAME "$path"`"
32852        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32853      fi
32854    fi
32855  fi
32856
32857            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32858          fi
32859          IFS=";"
32860        fi
32861      done
32862      # Convert VS_LIB into SYSROOT_LDFLAGS
32863      for i in $VS_LIB; do
32864        libpath=$i
32865        # Only process non-empty elements
32866        if test "x$libpath" != x; then
32867          IFS="$OLDIFS"
32868          # Check that directory exists before calling fixup_path
32869          testpath=$libpath
32870
32871  windows_path="$testpath"
32872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32873    unix_path=`$CYGPATH -u "$windows_path"`
32874    testpath="$unix_path"
32875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32877    testpath="$unix_path"
32878  fi
32879
32880          if test -d "$testpath"; then
32881
32882  # Only process if variable expands to non-empty
32883
32884  if test "x$libpath" != x; then
32885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32886
32887  # Input might be given as Windows format, start by converting to
32888  # unix format.
32889  path="$libpath"
32890  new_path=`$CYGPATH -u "$path"`
32891
32892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32895  # "foo.exe" is OK but "foo" is an error.
32896  #
32897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32898  # It is also a way to make sure we got the proper file name for the real test later on.
32899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32900  if test "x$test_shortpath" = x; then
32901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32902$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32903    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32904  fi
32905
32906  # Call helper function which possibly converts this using DOS-style short mode.
32907  # If so, the updated path is stored in $new_path.
32908
32909  input_path="$new_path"
32910  # Check if we need to convert this using DOS-style short mode. If the path
32911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32912  # take no chances and rewrite it.
32913  # Note: m4 eats our [], so we need to use [ and ] instead.
32914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32915  if test "x$has_forbidden_chars" != x; then
32916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32920      # Going to short mode and back again did indeed matter. Since short mode is
32921      # case insensitive, let's make it lowercase to improve readability.
32922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32923      # Now convert it back to Unix-style (cygpath)
32924      input_path=`$CYGPATH -u "$shortmode_path"`
32925      new_path="$input_path"
32926    fi
32927  fi
32928
32929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32930  if test "x$test_cygdrive_prefix" = x; then
32931    # As a simple fix, exclude /usr/bin since it's not a real path.
32932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32934      # a path prefixed by /cygdrive for fixpath to work.
32935      new_path="$CYGWIN_ROOT_PATH$input_path"
32936    fi
32937  fi
32938
32939
32940  if test "x$path" != "x$new_path"; then
32941    libpath="$new_path"
32942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32943$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32944  fi
32945
32946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32947
32948  path="$libpath"
32949  has_colon=`$ECHO $path | $GREP ^.:`
32950  new_path="$path"
32951  if test "x$has_colon" = x; then
32952    # Not in mixed or Windows style, start by that.
32953    new_path=`cmd //c echo $path`
32954  fi
32955
32956
32957  input_path="$new_path"
32958  # Check if we need to convert this using DOS-style short mode. If the path
32959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32960  # take no chances and rewrite it.
32961  # Note: m4 eats our [], so we need to use [ and ] instead.
32962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32963  if test "x$has_forbidden_chars" != x; then
32964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32966  fi
32967
32968
32969  windows_path="$new_path"
32970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32971    unix_path=`$CYGPATH -u "$windows_path"`
32972    new_path="$unix_path"
32973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32975    new_path="$unix_path"
32976  fi
32977
32978  if test "x$path" != "x$new_path"; then
32979    libpath="$new_path"
32980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32981$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32982  fi
32983
32984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32986
32987    else
32988      # We're on a unix platform. Hooray! :)
32989      path="$libpath"
32990      has_space=`$ECHO "$path" | $GREP " "`
32991      if test "x$has_space" != x; then
32992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32993$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32995      fi
32996
32997      # Use eval to expand a potential ~
32998      eval path="$path"
32999      if test ! -f "$path" && test ! -d "$path"; then
33000        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33001      fi
33002
33003      if test -d "$path"; then
33004        libpath="`cd "$path"; $THEPWDCMD -L`"
33005      else
33006        dir="`$DIRNAME "$path"`"
33007        base="`$BASENAME "$path"`"
33008        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33009      fi
33010    fi
33011  fi
33012
33013            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33014          fi
33015          IFS=";"
33016        fi
33017      done
33018      IFS="$OLDIFS"
33019    fi
33020  else
33021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33022$as_echo "not found" >&6; }
33023
33024    if test "x$VS_ENV_CMD" = x; then
33025      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33026$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33027      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33028$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33029    else
33030      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33031$as_echo "$as_me: Running the extraction script failed." >&6;}
33032    fi
33033    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33034$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33035    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33036$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33037    as_fn_error $? "Cannot continue" "$LINENO" 5
33038  fi
33039
33040    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33041    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33042    PATH="$VS_PATH"
33043    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33044    export INCLUDE="$VS_INCLUDE"
33045    export LIB="$VS_LIB"
33046  else
33047    if test "x$XCODE_VERSION_OUTPUT" != x; then
33048      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33049      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33050      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33051    else
33052      # Currently we do not define this for other toolchains. This might change as the need arise.
33053      TOOLCHAIN_VERSION=
33054    fi
33055  fi
33056
33057
33058  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33059  # override all other locations.
33060  if test "x$TOOLCHAIN_PATH" != x; then
33061    PATH=$TOOLCHAIN_PATH:$PATH
33062  fi
33063
33064
33065  #
33066  # Setup the compilers (CC and CXX)
33067  #
33068
33069  COMPILER_NAME=C
33070  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33071
33072  if test "x$CC" != x; then
33073    # User has supplied compiler name already, always let that override.
33074    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33075$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33076    if test "x`basename $CC`" = "x$CC"; then
33077      # A command without a complete path is provided, search $PATH.
33078
33079      for ac_prog in $CC
33080do
33081  # Extract the first word of "$ac_prog", so it can be a program name with args.
33082set dummy $ac_prog; ac_word=$2
33083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33084$as_echo_n "checking for $ac_word... " >&6; }
33085if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33086  $as_echo_n "(cached) " >&6
33087else
33088  case $POTENTIAL_CC in
33089  [\\/]* | ?:[\\/]*)
33090  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33091  ;;
33092  *)
33093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33094for as_dir in $PATH
33095do
33096  IFS=$as_save_IFS
33097  test -z "$as_dir" && as_dir=.
33098    for ac_exec_ext in '' $ac_executable_extensions; do
33099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33100    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33102    break 2
33103  fi
33104done
33105  done
33106IFS=$as_save_IFS
33107
33108  ;;
33109esac
33110fi
33111POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33112if test -n "$POTENTIAL_CC"; then
33113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33114$as_echo "$POTENTIAL_CC" >&6; }
33115else
33116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33117$as_echo "no" >&6; }
33118fi
33119
33120
33121  test -n "$POTENTIAL_CC" && break
33122done
33123
33124      if test "x$POTENTIAL_CC" != x; then
33125        CC=$POTENTIAL_CC
33126      else
33127        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33128      fi
33129    else
33130      # Otherwise it might already be a complete path
33131      if test ! -x "$CC"; then
33132        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33133      fi
33134    fi
33135  else
33136    # No user supplied value. Locate compiler ourselves.
33137
33138    # If we are cross compiling, assume cross compilation tools follows the
33139    # cross compilation standard where they are prefixed with the autoconf
33140    # standard name for the target. For example the binary
33141    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33142    # If we are not cross compiling, then the default compiler name will be
33143    # used.
33144
33145    CC=
33146    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33147    # before checking the rest of the PATH.
33148    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33149    # step, this should not be necessary.
33150    if test -n "$TOOLCHAIN_PATH"; then
33151      PATH_save="$PATH"
33152      PATH="$TOOLCHAIN_PATH"
33153      for ac_prog in $SEARCH_LIST
33154do
33155  # Extract the first word of "$ac_prog", so it can be a program name with args.
33156set dummy $ac_prog; ac_word=$2
33157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33158$as_echo_n "checking for $ac_word... " >&6; }
33159if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33160  $as_echo_n "(cached) " >&6
33161else
33162  case $TOOLCHAIN_PATH_CC in
33163  [\\/]* | ?:[\\/]*)
33164  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33165  ;;
33166  *)
33167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33168for as_dir in $PATH
33169do
33170  IFS=$as_save_IFS
33171  test -z "$as_dir" && as_dir=.
33172    for ac_exec_ext in '' $ac_executable_extensions; do
33173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33174    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33176    break 2
33177  fi
33178done
33179  done
33180IFS=$as_save_IFS
33181
33182  ;;
33183esac
33184fi
33185TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33186if test -n "$TOOLCHAIN_PATH_CC"; then
33187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33188$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33189else
33190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33191$as_echo "no" >&6; }
33192fi
33193
33194
33195  test -n "$TOOLCHAIN_PATH_CC" && break
33196done
33197
33198      CC=$TOOLCHAIN_PATH_CC
33199      PATH="$PATH_save"
33200    fi
33201
33202    # AC_PATH_PROGS can't be run multiple times with the same variable,
33203    # so create a new name for this run.
33204    if test "x$CC" = x; then
33205      for ac_prog in $SEARCH_LIST
33206do
33207  # Extract the first word of "$ac_prog", so it can be a program name with args.
33208set dummy $ac_prog; ac_word=$2
33209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33210$as_echo_n "checking for $ac_word... " >&6; }
33211if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33212  $as_echo_n "(cached) " >&6
33213else
33214  case $POTENTIAL_CC in
33215  [\\/]* | ?:[\\/]*)
33216  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33217  ;;
33218  *)
33219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33220for as_dir in $PATH
33221do
33222  IFS=$as_save_IFS
33223  test -z "$as_dir" && as_dir=.
33224    for ac_exec_ext in '' $ac_executable_extensions; do
33225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33226    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33228    break 2
33229  fi
33230done
33231  done
33232IFS=$as_save_IFS
33233
33234  ;;
33235esac
33236fi
33237POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33238if test -n "$POTENTIAL_CC"; then
33239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33240$as_echo "$POTENTIAL_CC" >&6; }
33241else
33242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33243$as_echo "no" >&6; }
33244fi
33245
33246
33247  test -n "$POTENTIAL_CC" && break
33248done
33249
33250      CC=$POTENTIAL_CC
33251    fi
33252
33253    if test "x$CC" = x; then
33254
33255  # Print a helpful message on how to acquire the necessary build dependency.
33256  # devkit is the help tag: freetype, cups, alsa etc
33257  MISSING_DEPENDENCY=devkit
33258
33259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33260    cygwin_help $MISSING_DEPENDENCY
33261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33262    msys_help $MISSING_DEPENDENCY
33263  else
33264    PKGHANDLER_COMMAND=
33265
33266    case $PKGHANDLER in
33267      apt-get)
33268        apt_help     $MISSING_DEPENDENCY ;;
33269      yum)
33270        yum_help     $MISSING_DEPENDENCY ;;
33271      port)
33272        port_help    $MISSING_DEPENDENCY ;;
33273      pkgutil)
33274        pkgutil_help $MISSING_DEPENDENCY ;;
33275      pkgadd)
33276        pkgadd_help  $MISSING_DEPENDENCY ;;
33277    esac
33278
33279    if test "x$PKGHANDLER_COMMAND" != x; then
33280      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33281    fi
33282  fi
33283
33284      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33285    fi
33286  fi
33287
33288  # Now we have a compiler binary in CC. Make sure it's okay.
33289
33290  # Only process if variable expands to non-empty
33291
33292  if test "x$CC" != x; then
33293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33294
33295  # First separate the path from the arguments. This will split at the first
33296  # space.
33297  complete="$CC"
33298  path="${complete%% *}"
33299  tmp="$complete EOL"
33300  arguments="${tmp#* }"
33301
33302  # Input might be given as Windows format, start by converting to
33303  # unix format.
33304  new_path=`$CYGPATH -u "$path"`
33305
33306  # Now try to locate executable using which
33307  new_path=`$WHICH "$new_path" 2> /dev/null`
33308  # bat and cmd files are not always considered executable in cygwin causing which
33309  # to not find them
33310  if test "x$new_path" = x \
33311      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33312      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33313    new_path=`$CYGPATH -u "$path"`
33314  fi
33315  if test "x$new_path" = x; then
33316    # Oops. Which didn't find the executable.
33317    # The splitting of arguments from the executable at a space might have been incorrect,
33318    # since paths with space are more likely in Windows. Give it another try with the whole
33319    # argument.
33320    path="$complete"
33321    arguments="EOL"
33322    new_path=`$CYGPATH -u "$path"`
33323    new_path=`$WHICH "$new_path" 2> /dev/null`
33324    # bat and cmd files are not always considered executable in cygwin causing which
33325    # to not find them
33326    if test "x$new_path" = x \
33327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33329      new_path=`$CYGPATH -u "$path"`
33330    fi
33331    if test "x$new_path" = x; then
33332      # It's still not found. Now this is an unrecoverable error.
33333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33334$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33335      has_space=`$ECHO "$complete" | $GREP " "`
33336      if test "x$has_space" != x; then
33337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33339      fi
33340      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33341    fi
33342  fi
33343
33344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33347  # "foo.exe" is OK but "foo" is an error.
33348  #
33349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33350  # It is also a way to make sure we got the proper file name for the real test later on.
33351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33352  if test "x$test_shortpath" = x; then
33353    # Short path failed, file does not exist as specified.
33354    # Try adding .exe or .cmd
33355    if test -f "${new_path}.exe"; then
33356      input_to_shortpath="${new_path}.exe"
33357    elif test -f "${new_path}.cmd"; then
33358      input_to_shortpath="${new_path}.cmd"
33359    else
33360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33361$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33364      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33365    fi
33366  else
33367    input_to_shortpath="$new_path"
33368  fi
33369
33370  # Call helper function which possibly converts this using DOS-style short mode.
33371  # If so, the updated path is stored in $new_path.
33372  new_path="$input_to_shortpath"
33373
33374  input_path="$input_to_shortpath"
33375  # Check if we need to convert this using DOS-style short mode. If the path
33376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33377  # take no chances and rewrite it.
33378  # Note: m4 eats our [], so we need to use [ and ] instead.
33379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33380  if test "x$has_forbidden_chars" != x; then
33381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33385      # Going to short mode and back again did indeed matter. Since short mode is
33386      # case insensitive, let's make it lowercase to improve readability.
33387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33388      # Now convert it back to Unix-style (cygpath)
33389      input_path=`$CYGPATH -u "$shortmode_path"`
33390      new_path="$input_path"
33391    fi
33392  fi
33393
33394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33395  if test "x$test_cygdrive_prefix" = x; then
33396    # As a simple fix, exclude /usr/bin since it's not a real path.
33397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33399      # a path prefixed by /cygdrive for fixpath to work.
33400      new_path="$CYGWIN_ROOT_PATH$input_path"
33401    fi
33402  fi
33403
33404  # remove trailing .exe if any
33405  new_path="${new_path/%.exe/}"
33406
33407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33408
33409  # First separate the path from the arguments. This will split at the first
33410  # space.
33411  complete="$CC"
33412  path="${complete%% *}"
33413  tmp="$complete EOL"
33414  arguments="${tmp#* }"
33415
33416  # Input might be given as Windows format, start by converting to
33417  # unix format.
33418  new_path="$path"
33419
33420  windows_path="$new_path"
33421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33422    unix_path=`$CYGPATH -u "$windows_path"`
33423    new_path="$unix_path"
33424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33426    new_path="$unix_path"
33427  fi
33428
33429
33430  # Now try to locate executable using which
33431  new_path=`$WHICH "$new_path" 2> /dev/null`
33432
33433  if test "x$new_path" = x; then
33434    # Oops. Which didn't find the executable.
33435    # The splitting of arguments from the executable at a space might have been incorrect,
33436    # since paths with space are more likely in Windows. Give it another try with the whole
33437    # argument.
33438    path="$complete"
33439    arguments="EOL"
33440    new_path="$path"
33441
33442  windows_path="$new_path"
33443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33444    unix_path=`$CYGPATH -u "$windows_path"`
33445    new_path="$unix_path"
33446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33448    new_path="$unix_path"
33449  fi
33450
33451
33452    new_path=`$WHICH "$new_path" 2> /dev/null`
33453    # bat and cmd files are not always considered executable in MSYS causing which
33454    # to not find them
33455    if test "x$new_path" = x \
33456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33458      new_path="$path"
33459
33460  windows_path="$new_path"
33461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33462    unix_path=`$CYGPATH -u "$windows_path"`
33463    new_path="$unix_path"
33464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33466    new_path="$unix_path"
33467  fi
33468
33469    fi
33470
33471    if test "x$new_path" = x; then
33472      # It's still not found. Now this is an unrecoverable error.
33473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33474$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33475      has_space=`$ECHO "$complete" | $GREP " "`
33476      if test "x$has_space" != x; then
33477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33479      fi
33480      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33481    fi
33482  fi
33483
33484  # Now new_path has a complete unix path to the binary
33485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33486    # Keep paths in /bin as-is, but remove trailing .exe if any
33487    new_path="${new_path/%.exe/}"
33488    # Do not save /bin paths to all_fixpath_prefixes!
33489  else
33490    # Not in mixed or Windows style, start by that.
33491    new_path=`cmd //c echo $new_path`
33492
33493  input_path="$new_path"
33494  # Check if we need to convert this using DOS-style short mode. If the path
33495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33496  # take no chances and rewrite it.
33497  # Note: m4 eats our [], so we need to use [ and ] instead.
33498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33499  if test "x$has_forbidden_chars" != x; then
33500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33502  fi
33503
33504    # Output is in $new_path
33505
33506  windows_path="$new_path"
33507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33508    unix_path=`$CYGPATH -u "$windows_path"`
33509    new_path="$unix_path"
33510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33512    new_path="$unix_path"
33513  fi
33514
33515    # remove trailing .exe if any
33516    new_path="${new_path/%.exe/}"
33517
33518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33520  fi
33521
33522    else
33523      # We're on a unix platform. Hooray! :)
33524      # First separate the path from the arguments. This will split at the first
33525      # space.
33526      complete="$CC"
33527      path="${complete%% *}"
33528      tmp="$complete EOL"
33529      arguments="${tmp#* }"
33530
33531      # Cannot rely on the command "which" here since it doesn't always work.
33532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33533      if test -z "$is_absolute_path"; then
33534        # Path to executable is not absolute. Find it.
33535        IFS_save="$IFS"
33536        IFS=:
33537        for p in $PATH; do
33538          if test -f "$p/$path" && test -x "$p/$path"; then
33539            new_path="$p/$path"
33540            break
33541          fi
33542        done
33543        IFS="$IFS_save"
33544      else
33545        # This is an absolute path, we can use it without further modifications.
33546        new_path="$path"
33547      fi
33548
33549      if test "x$new_path" = x; then
33550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33551$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33552        has_space=`$ECHO "$complete" | $GREP " "`
33553        if test "x$has_space" != x; then
33554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33556        fi
33557        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33558      fi
33559    fi
33560
33561    # Now join together the path and the arguments once again
33562    if test "x$arguments" != xEOL; then
33563      new_complete="$new_path ${arguments% *}"
33564    else
33565      new_complete="$new_path"
33566    fi
33567
33568    if test "x$complete" != "x$new_complete"; then
33569      CC="$new_complete"
33570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33571$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33572    fi
33573  fi
33574
33575  TEST_COMPILER="$CC"
33576
33577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33578$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33579  SYMLINK_ORIGINAL="$TEST_COMPILER"
33580
33581  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33582    # Follow a chain of symbolic links. Use readlink
33583    # where it exists, else fall back to horribly
33584    # complicated shell code.
33585    if test "x$READLINK_TESTED" != yes; then
33586      # On MacOSX there is a readlink tool with a different
33587      # purpose than the GNU readlink tool. Check the found readlink.
33588      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33589      if test "x$ISGNU" = x; then
33590        # A readlink that we do not know how to use.
33591        # Are there other non-GNU readlinks out there?
33592        READLINK_TESTED=yes
33593        READLINK=
33594      fi
33595    fi
33596
33597    if test "x$READLINK" != x; then
33598      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33599    else
33600      # Save the current directory for restoring afterwards
33601      STARTDIR=$PWD
33602      COUNTER=0
33603      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33604      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33605      cd $sym_link_dir
33606      # Use -P flag to resolve symlinks in directories.
33607      cd `$THEPWDCMD -P`
33608      sym_link_dir=`$THEPWDCMD -P`
33609      # Resolve file symlinks
33610      while test $COUNTER -lt 20; do
33611        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33612        if test "x$ISLINK" == x; then
33613          # This is not a symbolic link! We are done!
33614          break
33615        fi
33616        # Again resolve directory symlinks since the target of the just found
33617        # link could be in a different directory
33618        cd `$DIRNAME $ISLINK`
33619        sym_link_dir=`$THEPWDCMD -P`
33620        sym_link_file=`$BASENAME $ISLINK`
33621        let COUNTER=COUNTER+1
33622      done
33623      cd $STARTDIR
33624      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33625    fi
33626  fi
33627
33628  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33630$as_echo "no symlink" >&6; }
33631  else
33632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33633$as_echo "$SYMLINK_ORIGINAL" >&6; }
33634
33635    # We can't handle ccache by gcc wrappers, since we need to know if we're
33636    # using ccache. Instead ccache usage must be controlled by a configure option.
33637    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33638    if test "x$COMPILER_BASENAME" = "xccache"; then
33639      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33640$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33641      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33642    fi
33643  fi
33644
33645
33646  COMPILER=$CC
33647  COMPILER_NAME=$COMPILER_NAME
33648
33649  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33650    # cc -V output typically looks like
33651    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33652    # or
33653    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33654    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33655    # Check that this is likely to be the Solaris Studio cc.
33656    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33657    if test $? -ne 0; then
33658      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33659      { $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
33660$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33661      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33662$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33663      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33664$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33665      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33666    fi
33667    # Remove usage instructions (if present), and
33668    # collapse compiler output into a single line
33669    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33670        $SED -e 's/ *[Uu]sage:.*//'`
33671    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33672        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33673  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33674    # xlc -qversion output typically looks like
33675    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33676    #     Version: 11.01.0000.0015
33677    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33678    # Check that this is likely to be the IBM XL C compiler.
33679    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33680    if test $? -ne 0; then
33681      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33682      { $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
33683$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33684      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33685$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33686      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33687$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33688      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33689    fi
33690    # Collapse compiler output into a single line
33691    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33692    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33693        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33694  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33695    # There is no specific version flag, but all output starts with a version string.
33696    # First line typically looks something like:
33697    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33698    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33699    # Check that this is likely to be Microsoft CL.EXE.
33700    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33701    if test $? -ne 0; then
33702      { $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
33703$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33704      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33705$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33706      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33707    fi
33708    # Collapse compiler output into a single line
33709    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33710    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33711        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33712  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33713    # gcc --version output typically looks like
33714    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33715    #     Copyright (C) 2013 Free Software Foundation, Inc.
33716    #     This is free software; see the source for copying conditions.  There is NO
33717    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33718    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33719    # Check that this is likely to be GCC.
33720    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33721    if test $? -ne 0; then
33722      { $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
33723$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33724      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33725$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33726      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33727    fi
33728    # Remove Copyright and legalese from version string, and
33729    # collapse into a single line
33730    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33731        $SED -e 's/ *Copyright .*//'`
33732    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33733        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33734  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33735    # clang --version output typically looks like
33736    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33737    #    clang version 3.3 (tags/RELEASE_33/final)
33738    # or
33739    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33740    #    Target: x86_64-pc-linux-gnu
33741    #    Thread model: posix
33742    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33743    # Check that this is likely to be clang
33744    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33745    if test $? -ne 0; then
33746      { $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
33747$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33748      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33749$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33750      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33751    fi
33752    # Collapse compiler output into a single line
33753    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33754    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33755        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33756  else
33757      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33758  fi
33759  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33760  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33761  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33762  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33763
33764  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33765$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33766
33767
33768  # Now that we have resolved CC ourself, let autoconf have its go at it
33769  ac_ext=c
33770ac_cpp='$CPP $CPPFLAGS'
33771ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33772ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33773ac_compiler_gnu=$ac_cv_c_compiler_gnu
33774if test -n "$ac_tool_prefix"; then
33775  for ac_prog in $CC
33776  do
33777    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33778set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33780$as_echo_n "checking for $ac_word... " >&6; }
33781if ${ac_cv_prog_CC+:} false; then :
33782  $as_echo_n "(cached) " >&6
33783else
33784  if test -n "$CC"; then
33785  ac_cv_prog_CC="$CC" # Let the user override the test.
33786else
33787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33788for as_dir in $PATH
33789do
33790  IFS=$as_save_IFS
33791  test -z "$as_dir" && as_dir=.
33792    for ac_exec_ext in '' $ac_executable_extensions; do
33793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33794    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33796    break 2
33797  fi
33798done
33799  done
33800IFS=$as_save_IFS
33801
33802fi
33803fi
33804CC=$ac_cv_prog_CC
33805if test -n "$CC"; then
33806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33807$as_echo "$CC" >&6; }
33808else
33809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33810$as_echo "no" >&6; }
33811fi
33812
33813
33814    test -n "$CC" && break
33815  done
33816fi
33817if test -z "$CC"; then
33818  ac_ct_CC=$CC
33819  for ac_prog in $CC
33820do
33821  # Extract the first word of "$ac_prog", so it can be a program name with args.
33822set dummy $ac_prog; ac_word=$2
33823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33824$as_echo_n "checking for $ac_word... " >&6; }
33825if ${ac_cv_prog_ac_ct_CC+:} false; then :
33826  $as_echo_n "(cached) " >&6
33827else
33828  if test -n "$ac_ct_CC"; then
33829  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33830else
33831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33832for as_dir in $PATH
33833do
33834  IFS=$as_save_IFS
33835  test -z "$as_dir" && as_dir=.
33836    for ac_exec_ext in '' $ac_executable_extensions; do
33837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33838    ac_cv_prog_ac_ct_CC="$ac_prog"
33839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33840    break 2
33841  fi
33842done
33843  done
33844IFS=$as_save_IFS
33845
33846fi
33847fi
33848ac_ct_CC=$ac_cv_prog_ac_ct_CC
33849if test -n "$ac_ct_CC"; then
33850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33851$as_echo "$ac_ct_CC" >&6; }
33852else
33853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33854$as_echo "no" >&6; }
33855fi
33856
33857
33858  test -n "$ac_ct_CC" && break
33859done
33860
33861  if test "x$ac_ct_CC" = x; then
33862    CC=""
33863  else
33864    case $cross_compiling:$ac_tool_warned in
33865yes:)
33866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33868ac_tool_warned=yes ;;
33869esac
33870    CC=$ac_ct_CC
33871  fi
33872fi
33873
33874
33875test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33877as_fn_error $? "no acceptable C compiler found in \$PATH
33878See \`config.log' for more details" "$LINENO" 5; }
33879
33880# Provide some information about the compiler.
33881$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33882set X $ac_compile
33883ac_compiler=$2
33884for ac_option in --version -v -V -qversion; do
33885  { { ac_try="$ac_compiler $ac_option >&5"
33886case "(($ac_try" in
33887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33888  *) ac_try_echo=$ac_try;;
33889esac
33890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33891$as_echo "$ac_try_echo"; } >&5
33892  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33893  ac_status=$?
33894  if test -s conftest.err; then
33895    sed '10a\
33896... rest of stderr output deleted ...
33897         10q' conftest.err >conftest.er1
33898    cat conftest.er1 >&5
33899  fi
33900  rm -f conftest.er1 conftest.err
33901  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33902  test $ac_status = 0; }
33903done
33904
33905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33906/* end confdefs.h.  */
33907
33908int
33909main ()
33910{
33911
33912  ;
33913  return 0;
33914}
33915_ACEOF
33916ac_clean_files_save=$ac_clean_files
33917ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33918# Try to create an executable without -o first, disregard a.out.
33919# It will help us diagnose broken compilers, and finding out an intuition
33920# of exeext.
33921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33922$as_echo_n "checking whether the C compiler works... " >&6; }
33923ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33924
33925# The possible output files:
33926ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33927
33928ac_rmfiles=
33929for ac_file in $ac_files
33930do
33931  case $ac_file in
33932    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33933    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33934  esac
33935done
33936rm -f $ac_rmfiles
33937
33938if { { ac_try="$ac_link_default"
33939case "(($ac_try" in
33940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33941  *) ac_try_echo=$ac_try;;
33942esac
33943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33944$as_echo "$ac_try_echo"; } >&5
33945  (eval "$ac_link_default") 2>&5
33946  ac_status=$?
33947  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33948  test $ac_status = 0; }; then :
33949  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33950# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33951# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33952# so that the user can short-circuit this test for compilers unknown to
33953# Autoconf.
33954for ac_file in $ac_files ''
33955do
33956  test -f "$ac_file" || continue
33957  case $ac_file in
33958    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33959	;;
33960    [ab].out )
33961	# We found the default executable, but exeext='' is most
33962	# certainly right.
33963	break;;
33964    *.* )
33965	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33966	then :; else
33967	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33968	fi
33969	# We set ac_cv_exeext here because the later test for it is not
33970	# safe: cross compilers may not add the suffix if given an `-o'
33971	# argument, so we may need to know it at that point already.
33972	# Even if this section looks crufty: it has the advantage of
33973	# actually working.
33974	break;;
33975    * )
33976	break;;
33977  esac
33978done
33979test "$ac_cv_exeext" = no && ac_cv_exeext=
33980
33981else
33982  ac_file=''
33983fi
33984if test -z "$ac_file"; then :
33985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33986$as_echo "no" >&6; }
33987$as_echo "$as_me: failed program was:" >&5
33988sed 's/^/| /' conftest.$ac_ext >&5
33989
33990{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33992as_fn_error 77 "C compiler cannot create executables
33993See \`config.log' for more details" "$LINENO" 5; }
33994else
33995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33996$as_echo "yes" >&6; }
33997fi
33998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33999$as_echo_n "checking for C compiler default output file name... " >&6; }
34000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34001$as_echo "$ac_file" >&6; }
34002ac_exeext=$ac_cv_exeext
34003
34004rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34005ac_clean_files=$ac_clean_files_save
34006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34007$as_echo_n "checking for suffix of executables... " >&6; }
34008if { { ac_try="$ac_link"
34009case "(($ac_try" in
34010  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34011  *) ac_try_echo=$ac_try;;
34012esac
34013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34014$as_echo "$ac_try_echo"; } >&5
34015  (eval "$ac_link") 2>&5
34016  ac_status=$?
34017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34018  test $ac_status = 0; }; then :
34019  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34020# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34021# work properly (i.e., refer to `conftest.exe'), while it won't with
34022# `rm'.
34023for ac_file in conftest.exe conftest conftest.*; do
34024  test -f "$ac_file" || continue
34025  case $ac_file in
34026    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34027    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34028	  break;;
34029    * ) break;;
34030  esac
34031done
34032else
34033  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34035as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34036See \`config.log' for more details" "$LINENO" 5; }
34037fi
34038rm -f conftest conftest$ac_cv_exeext
34039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34040$as_echo "$ac_cv_exeext" >&6; }
34041
34042rm -f conftest.$ac_ext
34043EXEEXT=$ac_cv_exeext
34044ac_exeext=$EXEEXT
34045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34046/* end confdefs.h.  */
34047#include <stdio.h>
34048int
34049main ()
34050{
34051FILE *f = fopen ("conftest.out", "w");
34052 return ferror (f) || fclose (f) != 0;
34053
34054  ;
34055  return 0;
34056}
34057_ACEOF
34058ac_clean_files="$ac_clean_files conftest.out"
34059# Check that the compiler produces executables we can run.  If not, either
34060# the compiler is broken, or we cross compile.
34061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34062$as_echo_n "checking whether we are cross compiling... " >&6; }
34063if test "$cross_compiling" != yes; then
34064  { { ac_try="$ac_link"
34065case "(($ac_try" in
34066  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34067  *) ac_try_echo=$ac_try;;
34068esac
34069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34070$as_echo "$ac_try_echo"; } >&5
34071  (eval "$ac_link") 2>&5
34072  ac_status=$?
34073  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34074  test $ac_status = 0; }
34075  if { ac_try='./conftest$ac_cv_exeext'
34076  { { case "(($ac_try" in
34077  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34078  *) ac_try_echo=$ac_try;;
34079esac
34080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34081$as_echo "$ac_try_echo"; } >&5
34082  (eval "$ac_try") 2>&5
34083  ac_status=$?
34084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34085  test $ac_status = 0; }; }; then
34086    cross_compiling=no
34087  else
34088    if test "$cross_compiling" = maybe; then
34089	cross_compiling=yes
34090    else
34091	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34093as_fn_error $? "cannot run C compiled programs.
34094If you meant to cross compile, use \`--host'.
34095See \`config.log' for more details" "$LINENO" 5; }
34096    fi
34097  fi
34098fi
34099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34100$as_echo "$cross_compiling" >&6; }
34101
34102rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34103ac_clean_files=$ac_clean_files_save
34104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34105$as_echo_n "checking for suffix of object files... " >&6; }
34106if ${ac_cv_objext+:} false; then :
34107  $as_echo_n "(cached) " >&6
34108else
34109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34110/* end confdefs.h.  */
34111
34112int
34113main ()
34114{
34115
34116  ;
34117  return 0;
34118}
34119_ACEOF
34120rm -f conftest.o conftest.obj
34121if { { ac_try="$ac_compile"
34122case "(($ac_try" in
34123  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34124  *) ac_try_echo=$ac_try;;
34125esac
34126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34127$as_echo "$ac_try_echo"; } >&5
34128  (eval "$ac_compile") 2>&5
34129  ac_status=$?
34130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34131  test $ac_status = 0; }; then :
34132  for ac_file in conftest.o conftest.obj conftest.*; do
34133  test -f "$ac_file" || continue;
34134  case $ac_file in
34135    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34136    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34137       break;;
34138  esac
34139done
34140else
34141  $as_echo "$as_me: failed program was:" >&5
34142sed 's/^/| /' conftest.$ac_ext >&5
34143
34144{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34146as_fn_error $? "cannot compute suffix of object files: cannot compile
34147See \`config.log' for more details" "$LINENO" 5; }
34148fi
34149rm -f conftest.$ac_cv_objext conftest.$ac_ext
34150fi
34151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34152$as_echo "$ac_cv_objext" >&6; }
34153OBJEXT=$ac_cv_objext
34154ac_objext=$OBJEXT
34155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34156$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34157if ${ac_cv_c_compiler_gnu+:} false; then :
34158  $as_echo_n "(cached) " >&6
34159else
34160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34161/* end confdefs.h.  */
34162
34163int
34164main ()
34165{
34166#ifndef __GNUC__
34167       choke me
34168#endif
34169
34170  ;
34171  return 0;
34172}
34173_ACEOF
34174if ac_fn_c_try_compile "$LINENO"; then :
34175  ac_compiler_gnu=yes
34176else
34177  ac_compiler_gnu=no
34178fi
34179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34180ac_cv_c_compiler_gnu=$ac_compiler_gnu
34181
34182fi
34183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34184$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34185if test $ac_compiler_gnu = yes; then
34186  GCC=yes
34187else
34188  GCC=
34189fi
34190ac_test_CFLAGS=${CFLAGS+set}
34191ac_save_CFLAGS=$CFLAGS
34192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34193$as_echo_n "checking whether $CC accepts -g... " >&6; }
34194if ${ac_cv_prog_cc_g+:} false; then :
34195  $as_echo_n "(cached) " >&6
34196else
34197  ac_save_c_werror_flag=$ac_c_werror_flag
34198   ac_c_werror_flag=yes
34199   ac_cv_prog_cc_g=no
34200   CFLAGS="-g"
34201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34202/* end confdefs.h.  */
34203
34204int
34205main ()
34206{
34207
34208  ;
34209  return 0;
34210}
34211_ACEOF
34212if ac_fn_c_try_compile "$LINENO"; then :
34213  ac_cv_prog_cc_g=yes
34214else
34215  CFLAGS=""
34216      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34217/* end confdefs.h.  */
34218
34219int
34220main ()
34221{
34222
34223  ;
34224  return 0;
34225}
34226_ACEOF
34227if ac_fn_c_try_compile "$LINENO"; then :
34228
34229else
34230  ac_c_werror_flag=$ac_save_c_werror_flag
34231	 CFLAGS="-g"
34232	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34233/* end confdefs.h.  */
34234
34235int
34236main ()
34237{
34238
34239  ;
34240  return 0;
34241}
34242_ACEOF
34243if ac_fn_c_try_compile "$LINENO"; then :
34244  ac_cv_prog_cc_g=yes
34245fi
34246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34247fi
34248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34249fi
34250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34251   ac_c_werror_flag=$ac_save_c_werror_flag
34252fi
34253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34254$as_echo "$ac_cv_prog_cc_g" >&6; }
34255if test "$ac_test_CFLAGS" = set; then
34256  CFLAGS=$ac_save_CFLAGS
34257elif test $ac_cv_prog_cc_g = yes; then
34258  if test "$GCC" = yes; then
34259    CFLAGS="-g -O2"
34260  else
34261    CFLAGS="-g"
34262  fi
34263else
34264  if test "$GCC" = yes; then
34265    CFLAGS="-O2"
34266  else
34267    CFLAGS=
34268  fi
34269fi
34270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34271$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34272if ${ac_cv_prog_cc_c89+:} false; then :
34273  $as_echo_n "(cached) " >&6
34274else
34275  ac_cv_prog_cc_c89=no
34276ac_save_CC=$CC
34277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34278/* end confdefs.h.  */
34279#include <stdarg.h>
34280#include <stdio.h>
34281struct stat;
34282/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34283struct buf { int x; };
34284FILE * (*rcsopen) (struct buf *, struct stat *, int);
34285static char *e (p, i)
34286     char **p;
34287     int i;
34288{
34289  return p[i];
34290}
34291static char *f (char * (*g) (char **, int), char **p, ...)
34292{
34293  char *s;
34294  va_list v;
34295  va_start (v,p);
34296  s = g (p, va_arg (v,int));
34297  va_end (v);
34298  return s;
34299}
34300
34301/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34302   function prototypes and stuff, but not '\xHH' hex character constants.
34303   These don't provoke an error unfortunately, instead are silently treated
34304   as 'x'.  The following induces an error, until -std is added to get
34305   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34306   array size at least.  It's necessary to write '\x00'==0 to get something
34307   that's true only with -std.  */
34308int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34309
34310/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34311   inside strings and character constants.  */
34312#define FOO(x) 'x'
34313int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34314
34315int test (int i, double x);
34316struct s1 {int (*f) (int a);};
34317struct s2 {int (*f) (double a);};
34318int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34319int argc;
34320char **argv;
34321int
34322main ()
34323{
34324return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34325  ;
34326  return 0;
34327}
34328_ACEOF
34329for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34330	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34331do
34332  CC="$ac_save_CC $ac_arg"
34333  if ac_fn_c_try_compile "$LINENO"; then :
34334  ac_cv_prog_cc_c89=$ac_arg
34335fi
34336rm -f core conftest.err conftest.$ac_objext
34337  test "x$ac_cv_prog_cc_c89" != "xno" && break
34338done
34339rm -f conftest.$ac_ext
34340CC=$ac_save_CC
34341
34342fi
34343# AC_CACHE_VAL
34344case "x$ac_cv_prog_cc_c89" in
34345  x)
34346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34347$as_echo "none needed" >&6; } ;;
34348  xno)
34349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34350$as_echo "unsupported" >&6; } ;;
34351  *)
34352    CC="$CC $ac_cv_prog_cc_c89"
34353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34354$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34355esac
34356if test "x$ac_cv_prog_cc_c89" != xno; then :
34357
34358fi
34359
34360ac_ext=cpp
34361ac_cpp='$CXXCPP $CPPFLAGS'
34362ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34363ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34364ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34365
34366
34367
34368  COMPILER_NAME=C++
34369  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34370
34371  if test "x$CXX" != x; then
34372    # User has supplied compiler name already, always let that override.
34373    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34374$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34375    if test "x`basename $CXX`" = "x$CXX"; then
34376      # A command without a complete path is provided, search $PATH.
34377
34378      for ac_prog in $CXX
34379do
34380  # Extract the first word of "$ac_prog", so it can be a program name with args.
34381set dummy $ac_prog; ac_word=$2
34382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34383$as_echo_n "checking for $ac_word... " >&6; }
34384if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34385  $as_echo_n "(cached) " >&6
34386else
34387  case $POTENTIAL_CXX in
34388  [\\/]* | ?:[\\/]*)
34389  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34390  ;;
34391  *)
34392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34393for as_dir in $PATH
34394do
34395  IFS=$as_save_IFS
34396  test -z "$as_dir" && as_dir=.
34397    for ac_exec_ext in '' $ac_executable_extensions; do
34398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34399    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34401    break 2
34402  fi
34403done
34404  done
34405IFS=$as_save_IFS
34406
34407  ;;
34408esac
34409fi
34410POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34411if test -n "$POTENTIAL_CXX"; then
34412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34413$as_echo "$POTENTIAL_CXX" >&6; }
34414else
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34416$as_echo "no" >&6; }
34417fi
34418
34419
34420  test -n "$POTENTIAL_CXX" && break
34421done
34422
34423      if test "x$POTENTIAL_CXX" != x; then
34424        CXX=$POTENTIAL_CXX
34425      else
34426        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34427      fi
34428    else
34429      # Otherwise it might already be a complete path
34430      if test ! -x "$CXX"; then
34431        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34432      fi
34433    fi
34434  else
34435    # No user supplied value. Locate compiler ourselves.
34436
34437    # If we are cross compiling, assume cross compilation tools follows the
34438    # cross compilation standard where they are prefixed with the autoconf
34439    # standard name for the target. For example the binary
34440    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34441    # If we are not cross compiling, then the default compiler name will be
34442    # used.
34443
34444    CXX=
34445    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34446    # before checking the rest of the PATH.
34447    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34448    # step, this should not be necessary.
34449    if test -n "$TOOLCHAIN_PATH"; then
34450      PATH_save="$PATH"
34451      PATH="$TOOLCHAIN_PATH"
34452      for ac_prog in $SEARCH_LIST
34453do
34454  # Extract the first word of "$ac_prog", so it can be a program name with args.
34455set dummy $ac_prog; ac_word=$2
34456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34457$as_echo_n "checking for $ac_word... " >&6; }
34458if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34459  $as_echo_n "(cached) " >&6
34460else
34461  case $TOOLCHAIN_PATH_CXX in
34462  [\\/]* | ?:[\\/]*)
34463  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34464  ;;
34465  *)
34466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34467for as_dir in $PATH
34468do
34469  IFS=$as_save_IFS
34470  test -z "$as_dir" && as_dir=.
34471    for ac_exec_ext in '' $ac_executable_extensions; do
34472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34473    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34475    break 2
34476  fi
34477done
34478  done
34479IFS=$as_save_IFS
34480
34481  ;;
34482esac
34483fi
34484TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34485if test -n "$TOOLCHAIN_PATH_CXX"; then
34486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34487$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34488else
34489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34490$as_echo "no" >&6; }
34491fi
34492
34493
34494  test -n "$TOOLCHAIN_PATH_CXX" && break
34495done
34496
34497      CXX=$TOOLCHAIN_PATH_CXX
34498      PATH="$PATH_save"
34499    fi
34500
34501    # AC_PATH_PROGS can't be run multiple times with the same variable,
34502    # so create a new name for this run.
34503    if test "x$CXX" = x; then
34504      for ac_prog in $SEARCH_LIST
34505do
34506  # Extract the first word of "$ac_prog", so it can be a program name with args.
34507set dummy $ac_prog; ac_word=$2
34508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34509$as_echo_n "checking for $ac_word... " >&6; }
34510if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34511  $as_echo_n "(cached) " >&6
34512else
34513  case $POTENTIAL_CXX in
34514  [\\/]* | ?:[\\/]*)
34515  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34516  ;;
34517  *)
34518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34519for as_dir in $PATH
34520do
34521  IFS=$as_save_IFS
34522  test -z "$as_dir" && as_dir=.
34523    for ac_exec_ext in '' $ac_executable_extensions; do
34524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34525    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34527    break 2
34528  fi
34529done
34530  done
34531IFS=$as_save_IFS
34532
34533  ;;
34534esac
34535fi
34536POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34537if test -n "$POTENTIAL_CXX"; then
34538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34539$as_echo "$POTENTIAL_CXX" >&6; }
34540else
34541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34542$as_echo "no" >&6; }
34543fi
34544
34545
34546  test -n "$POTENTIAL_CXX" && break
34547done
34548
34549      CXX=$POTENTIAL_CXX
34550    fi
34551
34552    if test "x$CXX" = x; then
34553
34554  # Print a helpful message on how to acquire the necessary build dependency.
34555  # devkit is the help tag: freetype, cups, alsa etc
34556  MISSING_DEPENDENCY=devkit
34557
34558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34559    cygwin_help $MISSING_DEPENDENCY
34560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34561    msys_help $MISSING_DEPENDENCY
34562  else
34563    PKGHANDLER_COMMAND=
34564
34565    case $PKGHANDLER in
34566      apt-get)
34567        apt_help     $MISSING_DEPENDENCY ;;
34568      yum)
34569        yum_help     $MISSING_DEPENDENCY ;;
34570      port)
34571        port_help    $MISSING_DEPENDENCY ;;
34572      pkgutil)
34573        pkgutil_help $MISSING_DEPENDENCY ;;
34574      pkgadd)
34575        pkgadd_help  $MISSING_DEPENDENCY ;;
34576    esac
34577
34578    if test "x$PKGHANDLER_COMMAND" != x; then
34579      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34580    fi
34581  fi
34582
34583      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34584    fi
34585  fi
34586
34587  # Now we have a compiler binary in CXX. Make sure it's okay.
34588
34589  # Only process if variable expands to non-empty
34590
34591  if test "x$CXX" != x; then
34592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34593
34594  # First separate the path from the arguments. This will split at the first
34595  # space.
34596  complete="$CXX"
34597  path="${complete%% *}"
34598  tmp="$complete EOL"
34599  arguments="${tmp#* }"
34600
34601  # Input might be given as Windows format, start by converting to
34602  # unix format.
34603  new_path=`$CYGPATH -u "$path"`
34604
34605  # Now try to locate executable using which
34606  new_path=`$WHICH "$new_path" 2> /dev/null`
34607  # bat and cmd files are not always considered executable in cygwin causing which
34608  # to not find them
34609  if test "x$new_path" = x \
34610      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34611      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34612    new_path=`$CYGPATH -u "$path"`
34613  fi
34614  if test "x$new_path" = x; then
34615    # Oops. Which didn't find the executable.
34616    # The splitting of arguments from the executable at a space might have been incorrect,
34617    # since paths with space are more likely in Windows. Give it another try with the whole
34618    # argument.
34619    path="$complete"
34620    arguments="EOL"
34621    new_path=`$CYGPATH -u "$path"`
34622    new_path=`$WHICH "$new_path" 2> /dev/null`
34623    # bat and cmd files are not always considered executable in cygwin causing which
34624    # to not find them
34625    if test "x$new_path" = x \
34626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34628      new_path=`$CYGPATH -u "$path"`
34629    fi
34630    if test "x$new_path" = x; then
34631      # It's still not found. Now this is an unrecoverable error.
34632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34633$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34634      has_space=`$ECHO "$complete" | $GREP " "`
34635      if test "x$has_space" != x; then
34636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34638      fi
34639      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34640    fi
34641  fi
34642
34643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34646  # "foo.exe" is OK but "foo" is an error.
34647  #
34648  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34649  # It is also a way to make sure we got the proper file name for the real test later on.
34650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34651  if test "x$test_shortpath" = x; then
34652    # Short path failed, file does not exist as specified.
34653    # Try adding .exe or .cmd
34654    if test -f "${new_path}.exe"; then
34655      input_to_shortpath="${new_path}.exe"
34656    elif test -f "${new_path}.cmd"; then
34657      input_to_shortpath="${new_path}.cmd"
34658    else
34659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34660$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34661      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34662$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34663      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34664    fi
34665  else
34666    input_to_shortpath="$new_path"
34667  fi
34668
34669  # Call helper function which possibly converts this using DOS-style short mode.
34670  # If so, the updated path is stored in $new_path.
34671  new_path="$input_to_shortpath"
34672
34673  input_path="$input_to_shortpath"
34674  # Check if we need to convert this using DOS-style short mode. If the path
34675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34676  # take no chances and rewrite it.
34677  # Note: m4 eats our [], so we need to use [ and ] instead.
34678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34679  if test "x$has_forbidden_chars" != x; then
34680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34684      # Going to short mode and back again did indeed matter. Since short mode is
34685      # case insensitive, let's make it lowercase to improve readability.
34686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34687      # Now convert it back to Unix-style (cygpath)
34688      input_path=`$CYGPATH -u "$shortmode_path"`
34689      new_path="$input_path"
34690    fi
34691  fi
34692
34693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34694  if test "x$test_cygdrive_prefix" = x; then
34695    # As a simple fix, exclude /usr/bin since it's not a real path.
34696    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34698      # a path prefixed by /cygdrive for fixpath to work.
34699      new_path="$CYGWIN_ROOT_PATH$input_path"
34700    fi
34701  fi
34702
34703  # remove trailing .exe if any
34704  new_path="${new_path/%.exe/}"
34705
34706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34707
34708  # First separate the path from the arguments. This will split at the first
34709  # space.
34710  complete="$CXX"
34711  path="${complete%% *}"
34712  tmp="$complete EOL"
34713  arguments="${tmp#* }"
34714
34715  # Input might be given as Windows format, start by converting to
34716  # unix format.
34717  new_path="$path"
34718
34719  windows_path="$new_path"
34720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34721    unix_path=`$CYGPATH -u "$windows_path"`
34722    new_path="$unix_path"
34723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34725    new_path="$unix_path"
34726  fi
34727
34728
34729  # Now try to locate executable using which
34730  new_path=`$WHICH "$new_path" 2> /dev/null`
34731
34732  if test "x$new_path" = x; then
34733    # Oops. Which didn't find the executable.
34734    # The splitting of arguments from the executable at a space might have been incorrect,
34735    # since paths with space are more likely in Windows. Give it another try with the whole
34736    # argument.
34737    path="$complete"
34738    arguments="EOL"
34739    new_path="$path"
34740
34741  windows_path="$new_path"
34742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34743    unix_path=`$CYGPATH -u "$windows_path"`
34744    new_path="$unix_path"
34745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34747    new_path="$unix_path"
34748  fi
34749
34750
34751    new_path=`$WHICH "$new_path" 2> /dev/null`
34752    # bat and cmd files are not always considered executable in MSYS causing which
34753    # to not find them
34754    if test "x$new_path" = x \
34755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34757      new_path="$path"
34758
34759  windows_path="$new_path"
34760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34761    unix_path=`$CYGPATH -u "$windows_path"`
34762    new_path="$unix_path"
34763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34765    new_path="$unix_path"
34766  fi
34767
34768    fi
34769
34770    if test "x$new_path" = x; then
34771      # It's still not found. Now this is an unrecoverable error.
34772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34773$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34774      has_space=`$ECHO "$complete" | $GREP " "`
34775      if test "x$has_space" != x; then
34776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34778      fi
34779      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34780    fi
34781  fi
34782
34783  # Now new_path has a complete unix path to the binary
34784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34785    # Keep paths in /bin as-is, but remove trailing .exe if any
34786    new_path="${new_path/%.exe/}"
34787    # Do not save /bin paths to all_fixpath_prefixes!
34788  else
34789    # Not in mixed or Windows style, start by that.
34790    new_path=`cmd //c echo $new_path`
34791
34792  input_path="$new_path"
34793  # Check if we need to convert this using DOS-style short mode. If the path
34794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34795  # take no chances and rewrite it.
34796  # Note: m4 eats our [], so we need to use [ and ] instead.
34797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34798  if test "x$has_forbidden_chars" != x; then
34799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34801  fi
34802
34803    # Output is in $new_path
34804
34805  windows_path="$new_path"
34806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34807    unix_path=`$CYGPATH -u "$windows_path"`
34808    new_path="$unix_path"
34809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34811    new_path="$unix_path"
34812  fi
34813
34814    # remove trailing .exe if any
34815    new_path="${new_path/%.exe/}"
34816
34817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34819  fi
34820
34821    else
34822      # We're on a unix platform. Hooray! :)
34823      # First separate the path from the arguments. This will split at the first
34824      # space.
34825      complete="$CXX"
34826      path="${complete%% *}"
34827      tmp="$complete EOL"
34828      arguments="${tmp#* }"
34829
34830      # Cannot rely on the command "which" here since it doesn't always work.
34831      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34832      if test -z "$is_absolute_path"; then
34833        # Path to executable is not absolute. Find it.
34834        IFS_save="$IFS"
34835        IFS=:
34836        for p in $PATH; do
34837          if test -f "$p/$path" && test -x "$p/$path"; then
34838            new_path="$p/$path"
34839            break
34840          fi
34841        done
34842        IFS="$IFS_save"
34843      else
34844        # This is an absolute path, we can use it without further modifications.
34845        new_path="$path"
34846      fi
34847
34848      if test "x$new_path" = x; then
34849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34850$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34851        has_space=`$ECHO "$complete" | $GREP " "`
34852        if test "x$has_space" != x; then
34853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34855        fi
34856        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34857      fi
34858    fi
34859
34860    # Now join together the path and the arguments once again
34861    if test "x$arguments" != xEOL; then
34862      new_complete="$new_path ${arguments% *}"
34863    else
34864      new_complete="$new_path"
34865    fi
34866
34867    if test "x$complete" != "x$new_complete"; then
34868      CXX="$new_complete"
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34870$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34871    fi
34872  fi
34873
34874  TEST_COMPILER="$CXX"
34875
34876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34877$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34878  SYMLINK_ORIGINAL="$TEST_COMPILER"
34879
34880  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34881    # Follow a chain of symbolic links. Use readlink
34882    # where it exists, else fall back to horribly
34883    # complicated shell code.
34884    if test "x$READLINK_TESTED" != yes; then
34885      # On MacOSX there is a readlink tool with a different
34886      # purpose than the GNU readlink tool. Check the found readlink.
34887      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34888      if test "x$ISGNU" = x; then
34889        # A readlink that we do not know how to use.
34890        # Are there other non-GNU readlinks out there?
34891        READLINK_TESTED=yes
34892        READLINK=
34893      fi
34894    fi
34895
34896    if test "x$READLINK" != x; then
34897      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34898    else
34899      # Save the current directory for restoring afterwards
34900      STARTDIR=$PWD
34901      COUNTER=0
34902      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34903      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34904      cd $sym_link_dir
34905      # Use -P flag to resolve symlinks in directories.
34906      cd `$THEPWDCMD -P`
34907      sym_link_dir=`$THEPWDCMD -P`
34908      # Resolve file symlinks
34909      while test $COUNTER -lt 20; do
34910        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34911        if test "x$ISLINK" == x; then
34912          # This is not a symbolic link! We are done!
34913          break
34914        fi
34915        # Again resolve directory symlinks since the target of the just found
34916        # link could be in a different directory
34917        cd `$DIRNAME $ISLINK`
34918        sym_link_dir=`$THEPWDCMD -P`
34919        sym_link_file=`$BASENAME $ISLINK`
34920        let COUNTER=COUNTER+1
34921      done
34922      cd $STARTDIR
34923      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34924    fi
34925  fi
34926
34927  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34929$as_echo "no symlink" >&6; }
34930  else
34931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34932$as_echo "$SYMLINK_ORIGINAL" >&6; }
34933
34934    # We can't handle ccache by gcc wrappers, since we need to know if we're
34935    # using ccache. Instead ccache usage must be controlled by a configure option.
34936    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34937    if test "x$COMPILER_BASENAME" = "xccache"; then
34938      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34939$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34940      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34941    fi
34942  fi
34943
34944
34945  COMPILER=$CXX
34946  COMPILER_NAME=$COMPILER_NAME
34947
34948  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34949    # cc -V output typically looks like
34950    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34951    # or
34952    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34953    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34954    # Check that this is likely to be the Solaris Studio cc.
34955    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34956    if test $? -ne 0; then
34957      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34958      { $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
34959$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34960      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34961$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34962      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34963$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34964      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34965    fi
34966    # Remove usage instructions (if present), and
34967    # collapse compiler output into a single line
34968    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34969        $SED -e 's/ *[Uu]sage:.*//'`
34970    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34971        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34972  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34973    # xlc -qversion output typically looks like
34974    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34975    #     Version: 11.01.0000.0015
34976    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34977    # Check that this is likely to be the IBM XL C compiler.
34978    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34979    if test $? -ne 0; then
34980      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34981      { $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
34982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34984$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34985      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34986$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34987      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34988    fi
34989    # Collapse compiler output into a single line
34990    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34991    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34992        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34993  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34994    # There is no specific version flag, but all output starts with a version string.
34995    # First line typically looks something like:
34996    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34997    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34998    # Check that this is likely to be Microsoft CL.EXE.
34999    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35000    if test $? -ne 0; then
35001      { $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
35002$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35003      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35004$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35005      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35006    fi
35007    # Collapse compiler output into a single line
35008    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35009    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35010        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35011  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35012    # gcc --version output typically looks like
35013    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35014    #     Copyright (C) 2013 Free Software Foundation, Inc.
35015    #     This is free software; see the source for copying conditions.  There is NO
35016    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35017    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35018    # Check that this is likely to be GCC.
35019    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35020    if test $? -ne 0; then
35021      { $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
35022$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35023      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35024$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35025      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35026    fi
35027    # Remove Copyright and legalese from version string, and
35028    # collapse into a single line
35029    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35030        $SED -e 's/ *Copyright .*//'`
35031    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35032        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35033  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35034    # clang --version output typically looks like
35035    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35036    #    clang version 3.3 (tags/RELEASE_33/final)
35037    # or
35038    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35039    #    Target: x86_64-pc-linux-gnu
35040    #    Thread model: posix
35041    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35042    # Check that this is likely to be clang
35043    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35044    if test $? -ne 0; then
35045      { $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
35046$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35047      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35048$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35049      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35050    fi
35051    # Collapse compiler output into a single line
35052    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35053    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35054        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35055  else
35056      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35057  fi
35058  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35059  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35060  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35061  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35062
35063  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35064$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35065
35066
35067  # Now that we have resolved CXX ourself, let autoconf have its go at it
35068  ac_ext=cpp
35069ac_cpp='$CXXCPP $CPPFLAGS'
35070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35073if test -z "$CXX"; then
35074  if test -n "$CCC"; then
35075    CXX=$CCC
35076  else
35077    if test -n "$ac_tool_prefix"; then
35078  for ac_prog in $CXX
35079  do
35080    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35083$as_echo_n "checking for $ac_word... " >&6; }
35084if ${ac_cv_prog_CXX+:} false; then :
35085  $as_echo_n "(cached) " >&6
35086else
35087  if test -n "$CXX"; then
35088  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35089else
35090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35091for as_dir in $PATH
35092do
35093  IFS=$as_save_IFS
35094  test -z "$as_dir" && as_dir=.
35095    for ac_exec_ext in '' $ac_executable_extensions; do
35096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35097    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35099    break 2
35100  fi
35101done
35102  done
35103IFS=$as_save_IFS
35104
35105fi
35106fi
35107CXX=$ac_cv_prog_CXX
35108if test -n "$CXX"; then
35109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35110$as_echo "$CXX" >&6; }
35111else
35112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35113$as_echo "no" >&6; }
35114fi
35115
35116
35117    test -n "$CXX" && break
35118  done
35119fi
35120if test -z "$CXX"; then
35121  ac_ct_CXX=$CXX
35122  for ac_prog in $CXX
35123do
35124  # Extract the first word of "$ac_prog", so it can be a program name with args.
35125set dummy $ac_prog; ac_word=$2
35126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35127$as_echo_n "checking for $ac_word... " >&6; }
35128if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35129  $as_echo_n "(cached) " >&6
35130else
35131  if test -n "$ac_ct_CXX"; then
35132  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35133else
35134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35135for as_dir in $PATH
35136do
35137  IFS=$as_save_IFS
35138  test -z "$as_dir" && as_dir=.
35139    for ac_exec_ext in '' $ac_executable_extensions; do
35140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35141    ac_cv_prog_ac_ct_CXX="$ac_prog"
35142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35143    break 2
35144  fi
35145done
35146  done
35147IFS=$as_save_IFS
35148
35149fi
35150fi
35151ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35152if test -n "$ac_ct_CXX"; then
35153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35154$as_echo "$ac_ct_CXX" >&6; }
35155else
35156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35157$as_echo "no" >&6; }
35158fi
35159
35160
35161  test -n "$ac_ct_CXX" && break
35162done
35163
35164  if test "x$ac_ct_CXX" = x; then
35165    CXX="g++"
35166  else
35167    case $cross_compiling:$ac_tool_warned in
35168yes:)
35169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35171ac_tool_warned=yes ;;
35172esac
35173    CXX=$ac_ct_CXX
35174  fi
35175fi
35176
35177  fi
35178fi
35179# Provide some information about the compiler.
35180$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35181set X $ac_compile
35182ac_compiler=$2
35183for ac_option in --version -v -V -qversion; do
35184  { { ac_try="$ac_compiler $ac_option >&5"
35185case "(($ac_try" in
35186  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35187  *) ac_try_echo=$ac_try;;
35188esac
35189eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35190$as_echo "$ac_try_echo"; } >&5
35191  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35192  ac_status=$?
35193  if test -s conftest.err; then
35194    sed '10a\
35195... rest of stderr output deleted ...
35196         10q' conftest.err >conftest.er1
35197    cat conftest.er1 >&5
35198  fi
35199  rm -f conftest.er1 conftest.err
35200  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35201  test $ac_status = 0; }
35202done
35203
35204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35205$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35206if ${ac_cv_cxx_compiler_gnu+:} false; then :
35207  $as_echo_n "(cached) " >&6
35208else
35209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35210/* end confdefs.h.  */
35211
35212int
35213main ()
35214{
35215#ifndef __GNUC__
35216       choke me
35217#endif
35218
35219  ;
35220  return 0;
35221}
35222_ACEOF
35223if ac_fn_cxx_try_compile "$LINENO"; then :
35224  ac_compiler_gnu=yes
35225else
35226  ac_compiler_gnu=no
35227fi
35228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35229ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35230
35231fi
35232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35233$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35234if test $ac_compiler_gnu = yes; then
35235  GXX=yes
35236else
35237  GXX=
35238fi
35239ac_test_CXXFLAGS=${CXXFLAGS+set}
35240ac_save_CXXFLAGS=$CXXFLAGS
35241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35242$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35243if ${ac_cv_prog_cxx_g+:} false; then :
35244  $as_echo_n "(cached) " >&6
35245else
35246  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35247   ac_cxx_werror_flag=yes
35248   ac_cv_prog_cxx_g=no
35249   CXXFLAGS="-g"
35250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35251/* end confdefs.h.  */
35252
35253int
35254main ()
35255{
35256
35257  ;
35258  return 0;
35259}
35260_ACEOF
35261if ac_fn_cxx_try_compile "$LINENO"; then :
35262  ac_cv_prog_cxx_g=yes
35263else
35264  CXXFLAGS=""
35265      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35266/* end confdefs.h.  */
35267
35268int
35269main ()
35270{
35271
35272  ;
35273  return 0;
35274}
35275_ACEOF
35276if ac_fn_cxx_try_compile "$LINENO"; then :
35277
35278else
35279  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35280	 CXXFLAGS="-g"
35281	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35282/* end confdefs.h.  */
35283
35284int
35285main ()
35286{
35287
35288  ;
35289  return 0;
35290}
35291_ACEOF
35292if ac_fn_cxx_try_compile "$LINENO"; then :
35293  ac_cv_prog_cxx_g=yes
35294fi
35295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35296fi
35297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35298fi
35299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35300   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35301fi
35302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35303$as_echo "$ac_cv_prog_cxx_g" >&6; }
35304if test "$ac_test_CXXFLAGS" = set; then
35305  CXXFLAGS=$ac_save_CXXFLAGS
35306elif test $ac_cv_prog_cxx_g = yes; then
35307  if test "$GXX" = yes; then
35308    CXXFLAGS="-g -O2"
35309  else
35310    CXXFLAGS="-g"
35311  fi
35312else
35313  if test "$GXX" = yes; then
35314    CXXFLAGS="-O2"
35315  else
35316    CXXFLAGS=
35317  fi
35318fi
35319ac_ext=cpp
35320ac_cpp='$CXXCPP $CPPFLAGS'
35321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35324
35325
35326  # This is the compiler version number on the form X.Y[.Z]
35327
35328
35329
35330
35331  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35332    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35333$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35334    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35335$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35336  fi
35337
35338  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35339  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35340    { $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
35341$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;}
35342  fi
35343
35344  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35345    { $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
35346$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35347  fi
35348
35349  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35350
35351
35352  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402    # Execute function body
35403
35404  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35405  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35406
35407  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35408    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35409  fi
35410
35411  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35412    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35413  fi
35414
35415  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35416  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35417
35418  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35419    :
35420
35421  else
35422    :
35423
35424          { $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
35425$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35426
35427
35428  fi
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443  fi
35444
35445  #
35446  # Setup the preprocessor (CPP and CXXCPP)
35447  #
35448  ac_ext=c
35449ac_cpp='$CPP $CPPFLAGS'
35450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35452ac_compiler_gnu=$ac_cv_c_compiler_gnu
35453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35454$as_echo_n "checking how to run the C preprocessor... " >&6; }
35455# On Suns, sometimes $CPP names a directory.
35456if test -n "$CPP" && test -d "$CPP"; then
35457  CPP=
35458fi
35459if test -z "$CPP"; then
35460  if ${ac_cv_prog_CPP+:} false; then :
35461  $as_echo_n "(cached) " >&6
35462else
35463      # Double quotes because CPP needs to be expanded
35464    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35465    do
35466      ac_preproc_ok=false
35467for ac_c_preproc_warn_flag in '' yes
35468do
35469  # Use a header file that comes with gcc, so configuring glibc
35470  # with a fresh cross-compiler works.
35471  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35472  # <limits.h> exists even on freestanding compilers.
35473  # On the NeXT, cc -E runs the code through the compiler's parser,
35474  # not just through cpp. "Syntax error" is here to catch this case.
35475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35476/* end confdefs.h.  */
35477#ifdef __STDC__
35478# include <limits.h>
35479#else
35480# include <assert.h>
35481#endif
35482		     Syntax error
35483_ACEOF
35484if ac_fn_c_try_cpp "$LINENO"; then :
35485
35486else
35487  # Broken: fails on valid input.
35488continue
35489fi
35490rm -f conftest.err conftest.i conftest.$ac_ext
35491
35492  # OK, works on sane cases.  Now check whether nonexistent headers
35493  # can be detected and how.
35494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35495/* end confdefs.h.  */
35496#include <ac_nonexistent.h>
35497_ACEOF
35498if ac_fn_c_try_cpp "$LINENO"; then :
35499  # Broken: success on invalid input.
35500continue
35501else
35502  # Passes both tests.
35503ac_preproc_ok=:
35504break
35505fi
35506rm -f conftest.err conftest.i conftest.$ac_ext
35507
35508done
35509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35510rm -f conftest.i conftest.err conftest.$ac_ext
35511if $ac_preproc_ok; then :
35512  break
35513fi
35514
35515    done
35516    ac_cv_prog_CPP=$CPP
35517
35518fi
35519  CPP=$ac_cv_prog_CPP
35520else
35521  ac_cv_prog_CPP=$CPP
35522fi
35523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35524$as_echo "$CPP" >&6; }
35525ac_preproc_ok=false
35526for ac_c_preproc_warn_flag in '' yes
35527do
35528  # Use a header file that comes with gcc, so configuring glibc
35529  # with a fresh cross-compiler works.
35530  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35531  # <limits.h> exists even on freestanding compilers.
35532  # On the NeXT, cc -E runs the code through the compiler's parser,
35533  # not just through cpp. "Syntax error" is here to catch this case.
35534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35535/* end confdefs.h.  */
35536#ifdef __STDC__
35537# include <limits.h>
35538#else
35539# include <assert.h>
35540#endif
35541		     Syntax error
35542_ACEOF
35543if ac_fn_c_try_cpp "$LINENO"; then :
35544
35545else
35546  # Broken: fails on valid input.
35547continue
35548fi
35549rm -f conftest.err conftest.i conftest.$ac_ext
35550
35551  # OK, works on sane cases.  Now check whether nonexistent headers
35552  # can be detected and how.
35553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35554/* end confdefs.h.  */
35555#include <ac_nonexistent.h>
35556_ACEOF
35557if ac_fn_c_try_cpp "$LINENO"; then :
35558  # Broken: success on invalid input.
35559continue
35560else
35561  # Passes both tests.
35562ac_preproc_ok=:
35563break
35564fi
35565rm -f conftest.err conftest.i conftest.$ac_ext
35566
35567done
35568# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35569rm -f conftest.i conftest.err conftest.$ac_ext
35570if $ac_preproc_ok; then :
35571
35572else
35573  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35575as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35576See \`config.log' for more details" "$LINENO" 5; }
35577fi
35578
35579ac_ext=cpp
35580ac_cpp='$CXXCPP $CPPFLAGS'
35581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35584
35585
35586  # Only process if variable expands to non-empty
35587
35588  if test "x$CPP" != x; then
35589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35590
35591  # First separate the path from the arguments. This will split at the first
35592  # space.
35593  complete="$CPP"
35594  path="${complete%% *}"
35595  tmp="$complete EOL"
35596  arguments="${tmp#* }"
35597
35598  # Input might be given as Windows format, start by converting to
35599  # unix format.
35600  new_path=`$CYGPATH -u "$path"`
35601
35602  # Now try to locate executable using which
35603  new_path=`$WHICH "$new_path" 2> /dev/null`
35604  # bat and cmd files are not always considered executable in cygwin causing which
35605  # to not find them
35606  if test "x$new_path" = x \
35607      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35608      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35609    new_path=`$CYGPATH -u "$path"`
35610  fi
35611  if test "x$new_path" = x; then
35612    # Oops. Which didn't find the executable.
35613    # The splitting of arguments from the executable at a space might have been incorrect,
35614    # since paths with space are more likely in Windows. Give it another try with the whole
35615    # argument.
35616    path="$complete"
35617    arguments="EOL"
35618    new_path=`$CYGPATH -u "$path"`
35619    new_path=`$WHICH "$new_path" 2> /dev/null`
35620    # bat and cmd files are not always considered executable in cygwin causing which
35621    # to not find them
35622    if test "x$new_path" = x \
35623        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35624        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35625      new_path=`$CYGPATH -u "$path"`
35626    fi
35627    if test "x$new_path" = x; then
35628      # It's still not found. Now this is an unrecoverable error.
35629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35630$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35631      has_space=`$ECHO "$complete" | $GREP " "`
35632      if test "x$has_space" != x; then
35633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35635      fi
35636      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35637    fi
35638  fi
35639
35640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35643  # "foo.exe" is OK but "foo" is an error.
35644  #
35645  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35646  # It is also a way to make sure we got the proper file name for the real test later on.
35647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35648  if test "x$test_shortpath" = x; then
35649    # Short path failed, file does not exist as specified.
35650    # Try adding .exe or .cmd
35651    if test -f "${new_path}.exe"; then
35652      input_to_shortpath="${new_path}.exe"
35653    elif test -f "${new_path}.cmd"; then
35654      input_to_shortpath="${new_path}.cmd"
35655    else
35656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35657$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35658      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35659$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35660      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35661    fi
35662  else
35663    input_to_shortpath="$new_path"
35664  fi
35665
35666  # Call helper function which possibly converts this using DOS-style short mode.
35667  # If so, the updated path is stored in $new_path.
35668  new_path="$input_to_shortpath"
35669
35670  input_path="$input_to_shortpath"
35671  # Check if we need to convert this using DOS-style short mode. If the path
35672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35673  # take no chances and rewrite it.
35674  # Note: m4 eats our [], so we need to use [ and ] instead.
35675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35676  if test "x$has_forbidden_chars" != x; then
35677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35681      # Going to short mode and back again did indeed matter. Since short mode is
35682      # case insensitive, let's make it lowercase to improve readability.
35683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35684      # Now convert it back to Unix-style (cygpath)
35685      input_path=`$CYGPATH -u "$shortmode_path"`
35686      new_path="$input_path"
35687    fi
35688  fi
35689
35690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35691  if test "x$test_cygdrive_prefix" = x; then
35692    # As a simple fix, exclude /usr/bin since it's not a real path.
35693    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35695      # a path prefixed by /cygdrive for fixpath to work.
35696      new_path="$CYGWIN_ROOT_PATH$input_path"
35697    fi
35698  fi
35699
35700  # remove trailing .exe if any
35701  new_path="${new_path/%.exe/}"
35702
35703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35704
35705  # First separate the path from the arguments. This will split at the first
35706  # space.
35707  complete="$CPP"
35708  path="${complete%% *}"
35709  tmp="$complete EOL"
35710  arguments="${tmp#* }"
35711
35712  # Input might be given as Windows format, start by converting to
35713  # unix format.
35714  new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725
35726  # Now try to locate executable using which
35727  new_path=`$WHICH "$new_path" 2> /dev/null`
35728
35729  if test "x$new_path" = x; then
35730    # Oops. Which didn't find the executable.
35731    # The splitting of arguments from the executable at a space might have been incorrect,
35732    # since paths with space are more likely in Windows. Give it another try with the whole
35733    # argument.
35734    path="$complete"
35735    arguments="EOL"
35736    new_path="$path"
35737
35738  windows_path="$new_path"
35739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35740    unix_path=`$CYGPATH -u "$windows_path"`
35741    new_path="$unix_path"
35742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35744    new_path="$unix_path"
35745  fi
35746
35747
35748    new_path=`$WHICH "$new_path" 2> /dev/null`
35749    # bat and cmd files are not always considered executable in MSYS causing which
35750    # to not find them
35751    if test "x$new_path" = x \
35752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35754      new_path="$path"
35755
35756  windows_path="$new_path"
35757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35758    unix_path=`$CYGPATH -u "$windows_path"`
35759    new_path="$unix_path"
35760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35762    new_path="$unix_path"
35763  fi
35764
35765    fi
35766
35767    if test "x$new_path" = x; then
35768      # It's still not found. Now this is an unrecoverable error.
35769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35770$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35771      has_space=`$ECHO "$complete" | $GREP " "`
35772      if test "x$has_space" != x; then
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35775      fi
35776      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35777    fi
35778  fi
35779
35780  # Now new_path has a complete unix path to the binary
35781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35782    # Keep paths in /bin as-is, but remove trailing .exe if any
35783    new_path="${new_path/%.exe/}"
35784    # Do not save /bin paths to all_fixpath_prefixes!
35785  else
35786    # Not in mixed or Windows style, start by that.
35787    new_path=`cmd //c echo $new_path`
35788
35789  input_path="$new_path"
35790  # Check if we need to convert this using DOS-style short mode. If the path
35791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35792  # take no chances and rewrite it.
35793  # Note: m4 eats our [], so we need to use [ and ] instead.
35794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35795  if test "x$has_forbidden_chars" != x; then
35796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35798  fi
35799
35800    # Output is in $new_path
35801
35802  windows_path="$new_path"
35803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35804    unix_path=`$CYGPATH -u "$windows_path"`
35805    new_path="$unix_path"
35806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35808    new_path="$unix_path"
35809  fi
35810
35811    # remove trailing .exe if any
35812    new_path="${new_path/%.exe/}"
35813
35814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35816  fi
35817
35818    else
35819      # We're on a unix platform. Hooray! :)
35820      # First separate the path from the arguments. This will split at the first
35821      # space.
35822      complete="$CPP"
35823      path="${complete%% *}"
35824      tmp="$complete EOL"
35825      arguments="${tmp#* }"
35826
35827      # Cannot rely on the command "which" here since it doesn't always work.
35828      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35829      if test -z "$is_absolute_path"; then
35830        # Path to executable is not absolute. Find it.
35831        IFS_save="$IFS"
35832        IFS=:
35833        for p in $PATH; do
35834          if test -f "$p/$path" && test -x "$p/$path"; then
35835            new_path="$p/$path"
35836            break
35837          fi
35838        done
35839        IFS="$IFS_save"
35840      else
35841        # This is an absolute path, we can use it without further modifications.
35842        new_path="$path"
35843      fi
35844
35845      if test "x$new_path" = x; then
35846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35847$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35848        has_space=`$ECHO "$complete" | $GREP " "`
35849        if test "x$has_space" != x; then
35850          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35851$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35852        fi
35853        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35854      fi
35855    fi
35856
35857    # Now join together the path and the arguments once again
35858    if test "x$arguments" != xEOL; then
35859      new_complete="$new_path ${arguments% *}"
35860    else
35861      new_complete="$new_path"
35862    fi
35863
35864    if test "x$complete" != "x$new_complete"; then
35865      CPP="$new_complete"
35866      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35867$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35868    fi
35869  fi
35870
35871  ac_ext=cpp
35872ac_cpp='$CXXCPP $CPPFLAGS'
35873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35877$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35878if test -z "$CXXCPP"; then
35879  if ${ac_cv_prog_CXXCPP+:} false; then :
35880  $as_echo_n "(cached) " >&6
35881else
35882      # Double quotes because CXXCPP needs to be expanded
35883    for CXXCPP in "$CXX -E" "/lib/cpp"
35884    do
35885      ac_preproc_ok=false
35886for ac_cxx_preproc_warn_flag in '' yes
35887do
35888  # Use a header file that comes with gcc, so configuring glibc
35889  # with a fresh cross-compiler works.
35890  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35891  # <limits.h> exists even on freestanding compilers.
35892  # On the NeXT, cc -E runs the code through the compiler's parser,
35893  # not just through cpp. "Syntax error" is here to catch this case.
35894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35895/* end confdefs.h.  */
35896#ifdef __STDC__
35897# include <limits.h>
35898#else
35899# include <assert.h>
35900#endif
35901		     Syntax error
35902_ACEOF
35903if ac_fn_cxx_try_cpp "$LINENO"; then :
35904
35905else
35906  # Broken: fails on valid input.
35907continue
35908fi
35909rm -f conftest.err conftest.i conftest.$ac_ext
35910
35911  # OK, works on sane cases.  Now check whether nonexistent headers
35912  # can be detected and how.
35913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35914/* end confdefs.h.  */
35915#include <ac_nonexistent.h>
35916_ACEOF
35917if ac_fn_cxx_try_cpp "$LINENO"; then :
35918  # Broken: success on invalid input.
35919continue
35920else
35921  # Passes both tests.
35922ac_preproc_ok=:
35923break
35924fi
35925rm -f conftest.err conftest.i conftest.$ac_ext
35926
35927done
35928# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35929rm -f conftest.i conftest.err conftest.$ac_ext
35930if $ac_preproc_ok; then :
35931  break
35932fi
35933
35934    done
35935    ac_cv_prog_CXXCPP=$CXXCPP
35936
35937fi
35938  CXXCPP=$ac_cv_prog_CXXCPP
35939else
35940  ac_cv_prog_CXXCPP=$CXXCPP
35941fi
35942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35943$as_echo "$CXXCPP" >&6; }
35944ac_preproc_ok=false
35945for ac_cxx_preproc_warn_flag in '' yes
35946do
35947  # Use a header file that comes with gcc, so configuring glibc
35948  # with a fresh cross-compiler works.
35949  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35950  # <limits.h> exists even on freestanding compilers.
35951  # On the NeXT, cc -E runs the code through the compiler's parser,
35952  # not just through cpp. "Syntax error" is here to catch this case.
35953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35954/* end confdefs.h.  */
35955#ifdef __STDC__
35956# include <limits.h>
35957#else
35958# include <assert.h>
35959#endif
35960		     Syntax error
35961_ACEOF
35962if ac_fn_cxx_try_cpp "$LINENO"; then :
35963
35964else
35965  # Broken: fails on valid input.
35966continue
35967fi
35968rm -f conftest.err conftest.i conftest.$ac_ext
35969
35970  # OK, works on sane cases.  Now check whether nonexistent headers
35971  # can be detected and how.
35972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35973/* end confdefs.h.  */
35974#include <ac_nonexistent.h>
35975_ACEOF
35976if ac_fn_cxx_try_cpp "$LINENO"; then :
35977  # Broken: success on invalid input.
35978continue
35979else
35980  # Passes both tests.
35981ac_preproc_ok=:
35982break
35983fi
35984rm -f conftest.err conftest.i conftest.$ac_ext
35985
35986done
35987# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35988rm -f conftest.i conftest.err conftest.$ac_ext
35989if $ac_preproc_ok; then :
35990
35991else
35992  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35994as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35995See \`config.log' for more details" "$LINENO" 5; }
35996fi
35997
35998ac_ext=cpp
35999ac_cpp='$CXXCPP $CPPFLAGS'
36000ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36001ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36002ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36003
36004
36005  # Only process if variable expands to non-empty
36006
36007  if test "x$CXXCPP" != x; then
36008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36009
36010  # First separate the path from the arguments. This will split at the first
36011  # space.
36012  complete="$CXXCPP"
36013  path="${complete%% *}"
36014  tmp="$complete EOL"
36015  arguments="${tmp#* }"
36016
36017  # Input might be given as Windows format, start by converting to
36018  # unix format.
36019  new_path=`$CYGPATH -u "$path"`
36020
36021  # Now try to locate executable using which
36022  new_path=`$WHICH "$new_path" 2> /dev/null`
36023  # bat and cmd files are not always considered executable in cygwin causing which
36024  # to not find them
36025  if test "x$new_path" = x \
36026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36028    new_path=`$CYGPATH -u "$path"`
36029  fi
36030  if test "x$new_path" = x; then
36031    # Oops. Which didn't find the executable.
36032    # The splitting of arguments from the executable at a space might have been incorrect,
36033    # since paths with space are more likely in Windows. Give it another try with the whole
36034    # argument.
36035    path="$complete"
36036    arguments="EOL"
36037    new_path=`$CYGPATH -u "$path"`
36038    new_path=`$WHICH "$new_path" 2> /dev/null`
36039    # bat and cmd files are not always considered executable in cygwin causing which
36040    # to not find them
36041    if test "x$new_path" = x \
36042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36044      new_path=`$CYGPATH -u "$path"`
36045    fi
36046    if test "x$new_path" = x; then
36047      # It's still not found. Now this is an unrecoverable error.
36048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36049$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36050      has_space=`$ECHO "$complete" | $GREP " "`
36051      if test "x$has_space" != x; then
36052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36054      fi
36055      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36056    fi
36057  fi
36058
36059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36062  # "foo.exe" is OK but "foo" is an error.
36063  #
36064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36065  # It is also a way to make sure we got the proper file name for the real test later on.
36066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36067  if test "x$test_shortpath" = x; then
36068    # Short path failed, file does not exist as specified.
36069    # Try adding .exe or .cmd
36070    if test -f "${new_path}.exe"; then
36071      input_to_shortpath="${new_path}.exe"
36072    elif test -f "${new_path}.cmd"; then
36073      input_to_shortpath="${new_path}.cmd"
36074    else
36075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36076$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36079      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36080    fi
36081  else
36082    input_to_shortpath="$new_path"
36083  fi
36084
36085  # Call helper function which possibly converts this using DOS-style short mode.
36086  # If so, the updated path is stored in $new_path.
36087  new_path="$input_to_shortpath"
36088
36089  input_path="$input_to_shortpath"
36090  # Check if we need to convert this using DOS-style short mode. If the path
36091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36092  # take no chances and rewrite it.
36093  # Note: m4 eats our [], so we need to use [ and ] instead.
36094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36095  if test "x$has_forbidden_chars" != x; then
36096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36100      # Going to short mode and back again did indeed matter. Since short mode is
36101      # case insensitive, let's make it lowercase to improve readability.
36102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36103      # Now convert it back to Unix-style (cygpath)
36104      input_path=`$CYGPATH -u "$shortmode_path"`
36105      new_path="$input_path"
36106    fi
36107  fi
36108
36109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36110  if test "x$test_cygdrive_prefix" = x; then
36111    # As a simple fix, exclude /usr/bin since it's not a real path.
36112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36114      # a path prefixed by /cygdrive for fixpath to work.
36115      new_path="$CYGWIN_ROOT_PATH$input_path"
36116    fi
36117  fi
36118
36119  # remove trailing .exe if any
36120  new_path="${new_path/%.exe/}"
36121
36122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36123
36124  # First separate the path from the arguments. This will split at the first
36125  # space.
36126  complete="$CXXCPP"
36127  path="${complete%% *}"
36128  tmp="$complete EOL"
36129  arguments="${tmp#* }"
36130
36131  # Input might be given as Windows format, start by converting to
36132  # unix format.
36133  new_path="$path"
36134
36135  windows_path="$new_path"
36136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36137    unix_path=`$CYGPATH -u "$windows_path"`
36138    new_path="$unix_path"
36139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36141    new_path="$unix_path"
36142  fi
36143
36144
36145  # Now try to locate executable using which
36146  new_path=`$WHICH "$new_path" 2> /dev/null`
36147
36148  if test "x$new_path" = x; then
36149    # Oops. Which didn't find the executable.
36150    # The splitting of arguments from the executable at a space might have been incorrect,
36151    # since paths with space are more likely in Windows. Give it another try with the whole
36152    # argument.
36153    path="$complete"
36154    arguments="EOL"
36155    new_path="$path"
36156
36157  windows_path="$new_path"
36158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36159    unix_path=`$CYGPATH -u "$windows_path"`
36160    new_path="$unix_path"
36161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36163    new_path="$unix_path"
36164  fi
36165
36166
36167    new_path=`$WHICH "$new_path" 2> /dev/null`
36168    # bat and cmd files are not always considered executable in MSYS causing which
36169    # to not find them
36170    if test "x$new_path" = x \
36171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36173      new_path="$path"
36174
36175  windows_path="$new_path"
36176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36177    unix_path=`$CYGPATH -u "$windows_path"`
36178    new_path="$unix_path"
36179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36181    new_path="$unix_path"
36182  fi
36183
36184    fi
36185
36186    if test "x$new_path" = x; then
36187      # It's still not found. Now this is an unrecoverable error.
36188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36189$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36190      has_space=`$ECHO "$complete" | $GREP " "`
36191      if test "x$has_space" != x; then
36192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36194      fi
36195      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36196    fi
36197  fi
36198
36199  # Now new_path has a complete unix path to the binary
36200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36201    # Keep paths in /bin as-is, but remove trailing .exe if any
36202    new_path="${new_path/%.exe/}"
36203    # Do not save /bin paths to all_fixpath_prefixes!
36204  else
36205    # Not in mixed or Windows style, start by that.
36206    new_path=`cmd //c echo $new_path`
36207
36208  input_path="$new_path"
36209  # Check if we need to convert this using DOS-style short mode. If the path
36210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36211  # take no chances and rewrite it.
36212  # Note: m4 eats our [], so we need to use [ and ] instead.
36213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36214  if test "x$has_forbidden_chars" != x; then
36215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36217  fi
36218
36219    # Output is in $new_path
36220
36221  windows_path="$new_path"
36222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36223    unix_path=`$CYGPATH -u "$windows_path"`
36224    new_path="$unix_path"
36225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36227    new_path="$unix_path"
36228  fi
36229
36230    # remove trailing .exe if any
36231    new_path="${new_path/%.exe/}"
36232
36233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36235  fi
36236
36237    else
36238      # We're on a unix platform. Hooray! :)
36239      # First separate the path from the arguments. This will split at the first
36240      # space.
36241      complete="$CXXCPP"
36242      path="${complete%% *}"
36243      tmp="$complete EOL"
36244      arguments="${tmp#* }"
36245
36246      # Cannot rely on the command "which" here since it doesn't always work.
36247      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36248      if test -z "$is_absolute_path"; then
36249        # Path to executable is not absolute. Find it.
36250        IFS_save="$IFS"
36251        IFS=:
36252        for p in $PATH; do
36253          if test -f "$p/$path" && test -x "$p/$path"; then
36254            new_path="$p/$path"
36255            break
36256          fi
36257        done
36258        IFS="$IFS_save"
36259      else
36260        # This is an absolute path, we can use it without further modifications.
36261        new_path="$path"
36262      fi
36263
36264      if test "x$new_path" = x; then
36265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36266$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36267        has_space=`$ECHO "$complete" | $GREP " "`
36268        if test "x$has_space" != x; then
36269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36271        fi
36272        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36273      fi
36274    fi
36275
36276    # Now join together the path and the arguments once again
36277    if test "x$arguments" != xEOL; then
36278      new_complete="$new_path ${arguments% *}"
36279    else
36280      new_complete="$new_path"
36281    fi
36282
36283    if test "x$complete" != "x$new_complete"; then
36284      CXXCPP="$new_complete"
36285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36286$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36287    fi
36288  fi
36289
36290
36291  #
36292  # Setup the linker (LD)
36293  #
36294  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36295    # In the Microsoft toolchain we have a separate LD command "link".
36296    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36297    # a cygwin program for something completely different.
36298    # Extract the first word of "link", so it can be a program name with args.
36299set dummy link; ac_word=$2
36300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36301$as_echo_n "checking for $ac_word... " >&6; }
36302if ${ac_cv_prog_LD+:} false; then :
36303  $as_echo_n "(cached) " >&6
36304else
36305  if test -n "$LD"; then
36306  ac_cv_prog_LD="$LD" # Let the user override the test.
36307else
36308  ac_prog_rejected=no
36309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36310for as_dir in $PATH
36311do
36312  IFS=$as_save_IFS
36313  test -z "$as_dir" && as_dir=.
36314    for ac_exec_ext in '' $ac_executable_extensions; do
36315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36316    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36317       ac_prog_rejected=yes
36318       continue
36319     fi
36320    ac_cv_prog_LD="link"
36321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36322    break 2
36323  fi
36324done
36325  done
36326IFS=$as_save_IFS
36327
36328if test $ac_prog_rejected = yes; then
36329  # We found a bogon in the path, so make sure we never use it.
36330  set dummy $ac_cv_prog_LD
36331  shift
36332  if test $# != 0; then
36333    # We chose a different compiler from the bogus one.
36334    # However, it has the same basename, so the bogon will be chosen
36335    # first if we set LD to just the basename; use the full file name.
36336    shift
36337    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36338  fi
36339fi
36340fi
36341fi
36342LD=$ac_cv_prog_LD
36343if test -n "$LD"; then
36344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36345$as_echo "$LD" >&6; }
36346else
36347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36348$as_echo "no" >&6; }
36349fi
36350
36351
36352
36353  # Only process if variable expands to non-empty
36354
36355  if test "x$LD" != x; then
36356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36357
36358  # First separate the path from the arguments. This will split at the first
36359  # space.
36360  complete="$LD"
36361  path="${complete%% *}"
36362  tmp="$complete EOL"
36363  arguments="${tmp#* }"
36364
36365  # Input might be given as Windows format, start by converting to
36366  # unix format.
36367  new_path=`$CYGPATH -u "$path"`
36368
36369  # Now try to locate executable using which
36370  new_path=`$WHICH "$new_path" 2> /dev/null`
36371  # bat and cmd files are not always considered executable in cygwin causing which
36372  # to not find them
36373  if test "x$new_path" = x \
36374      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36375      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36376    new_path=`$CYGPATH -u "$path"`
36377  fi
36378  if test "x$new_path" = x; then
36379    # Oops. Which didn't find the executable.
36380    # The splitting of arguments from the executable at a space might have been incorrect,
36381    # since paths with space are more likely in Windows. Give it another try with the whole
36382    # argument.
36383    path="$complete"
36384    arguments="EOL"
36385    new_path=`$CYGPATH -u "$path"`
36386    new_path=`$WHICH "$new_path" 2> /dev/null`
36387    # bat and cmd files are not always considered executable in cygwin causing which
36388    # to not find them
36389    if test "x$new_path" = x \
36390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36392      new_path=`$CYGPATH -u "$path"`
36393    fi
36394    if test "x$new_path" = x; then
36395      # It's still not found. Now this is an unrecoverable error.
36396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36397$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36398      has_space=`$ECHO "$complete" | $GREP " "`
36399      if test "x$has_space" != x; then
36400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36402      fi
36403      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36404    fi
36405  fi
36406
36407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36410  # "foo.exe" is OK but "foo" is an error.
36411  #
36412  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36413  # It is also a way to make sure we got the proper file name for the real test later on.
36414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36415  if test "x$test_shortpath" = x; then
36416    # Short path failed, file does not exist as specified.
36417    # Try adding .exe or .cmd
36418    if test -f "${new_path}.exe"; then
36419      input_to_shortpath="${new_path}.exe"
36420    elif test -f "${new_path}.cmd"; then
36421      input_to_shortpath="${new_path}.cmd"
36422    else
36423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36424$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36425      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36426$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36427      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36428    fi
36429  else
36430    input_to_shortpath="$new_path"
36431  fi
36432
36433  # Call helper function which possibly converts this using DOS-style short mode.
36434  # If so, the updated path is stored in $new_path.
36435  new_path="$input_to_shortpath"
36436
36437  input_path="$input_to_shortpath"
36438  # Check if we need to convert this using DOS-style short mode. If the path
36439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36440  # take no chances and rewrite it.
36441  # Note: m4 eats our [], so we need to use [ and ] instead.
36442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36443  if test "x$has_forbidden_chars" != x; then
36444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36448      # Going to short mode and back again did indeed matter. Since short mode is
36449      # case insensitive, let's make it lowercase to improve readability.
36450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36451      # Now convert it back to Unix-style (cygpath)
36452      input_path=`$CYGPATH -u "$shortmode_path"`
36453      new_path="$input_path"
36454    fi
36455  fi
36456
36457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36458  if test "x$test_cygdrive_prefix" = x; then
36459    # As a simple fix, exclude /usr/bin since it's not a real path.
36460    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36462      # a path prefixed by /cygdrive for fixpath to work.
36463      new_path="$CYGWIN_ROOT_PATH$input_path"
36464    fi
36465  fi
36466
36467  # remove trailing .exe if any
36468  new_path="${new_path/%.exe/}"
36469
36470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36471
36472  # First separate the path from the arguments. This will split at the first
36473  # space.
36474  complete="$LD"
36475  path="${complete%% *}"
36476  tmp="$complete EOL"
36477  arguments="${tmp#* }"
36478
36479  # Input might be given as Windows format, start by converting to
36480  # unix format.
36481  new_path="$path"
36482
36483  windows_path="$new_path"
36484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36485    unix_path=`$CYGPATH -u "$windows_path"`
36486    new_path="$unix_path"
36487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36489    new_path="$unix_path"
36490  fi
36491
36492
36493  # Now try to locate executable using which
36494  new_path=`$WHICH "$new_path" 2> /dev/null`
36495
36496  if test "x$new_path" = x; then
36497    # Oops. Which didn't find the executable.
36498    # The splitting of arguments from the executable at a space might have been incorrect,
36499    # since paths with space are more likely in Windows. Give it another try with the whole
36500    # argument.
36501    path="$complete"
36502    arguments="EOL"
36503    new_path="$path"
36504
36505  windows_path="$new_path"
36506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36507    unix_path=`$CYGPATH -u "$windows_path"`
36508    new_path="$unix_path"
36509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36511    new_path="$unix_path"
36512  fi
36513
36514
36515    new_path=`$WHICH "$new_path" 2> /dev/null`
36516    # bat and cmd files are not always considered executable in MSYS causing which
36517    # to not find them
36518    if test "x$new_path" = x \
36519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36521      new_path="$path"
36522
36523  windows_path="$new_path"
36524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36525    unix_path=`$CYGPATH -u "$windows_path"`
36526    new_path="$unix_path"
36527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36529    new_path="$unix_path"
36530  fi
36531
36532    fi
36533
36534    if test "x$new_path" = x; then
36535      # It's still not found. Now this is an unrecoverable error.
36536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36537$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36538      has_space=`$ECHO "$complete" | $GREP " "`
36539      if test "x$has_space" != x; then
36540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36542      fi
36543      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36544    fi
36545  fi
36546
36547  # Now new_path has a complete unix path to the binary
36548  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36549    # Keep paths in /bin as-is, but remove trailing .exe if any
36550    new_path="${new_path/%.exe/}"
36551    # Do not save /bin paths to all_fixpath_prefixes!
36552  else
36553    # Not in mixed or Windows style, start by that.
36554    new_path=`cmd //c echo $new_path`
36555
36556  input_path="$new_path"
36557  # Check if we need to convert this using DOS-style short mode. If the path
36558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36559  # take no chances and rewrite it.
36560  # Note: m4 eats our [], so we need to use [ and ] instead.
36561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36562  if test "x$has_forbidden_chars" != x; then
36563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36565  fi
36566
36567    # Output is in $new_path
36568
36569  windows_path="$new_path"
36570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36571    unix_path=`$CYGPATH -u "$windows_path"`
36572    new_path="$unix_path"
36573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36575    new_path="$unix_path"
36576  fi
36577
36578    # remove trailing .exe if any
36579    new_path="${new_path/%.exe/}"
36580
36581    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36582    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36583  fi
36584
36585    else
36586      # We're on a unix platform. Hooray! :)
36587      # First separate the path from the arguments. This will split at the first
36588      # space.
36589      complete="$LD"
36590      path="${complete%% *}"
36591      tmp="$complete EOL"
36592      arguments="${tmp#* }"
36593
36594      # Cannot rely on the command "which" here since it doesn't always work.
36595      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36596      if test -z "$is_absolute_path"; then
36597        # Path to executable is not absolute. Find it.
36598        IFS_save="$IFS"
36599        IFS=:
36600        for p in $PATH; do
36601          if test -f "$p/$path" && test -x "$p/$path"; then
36602            new_path="$p/$path"
36603            break
36604          fi
36605        done
36606        IFS="$IFS_save"
36607      else
36608        # This is an absolute path, we can use it without further modifications.
36609        new_path="$path"
36610      fi
36611
36612      if test "x$new_path" = x; then
36613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36614$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36615        has_space=`$ECHO "$complete" | $GREP " "`
36616        if test "x$has_space" != x; then
36617          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36618$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36619        fi
36620        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36621      fi
36622    fi
36623
36624    # Now join together the path and the arguments once again
36625    if test "x$arguments" != xEOL; then
36626      new_complete="$new_path ${arguments% *}"
36627    else
36628      new_complete="$new_path"
36629    fi
36630
36631    if test "x$complete" != "x$new_complete"; then
36632      LD="$new_complete"
36633      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36634$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36635    fi
36636  fi
36637
36638    # Verify that we indeed succeeded with this trick.
36639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36640$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36641    "$LD" --version > /dev/null
36642    if test $? -eq 0 ; then
36643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36644$as_echo "no" >&6; }
36645      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36646    else
36647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36648$as_echo "yes" >&6; }
36649    fi
36650    LDCXX="$LD"
36651  else
36652    # All other toolchains use the compiler to link.
36653    LD="$CC"
36654    LDCXX="$CXX"
36655  fi
36656
36657  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36658
36659
36660  #
36661  # Setup the assembler (AS)
36662  #
36663  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36664
36665
36666  # Publish this variable in the help.
36667
36668
36669  if [ -z "${AS+x}" ]; then
36670    # The variable is not set by user, try to locate tool using the code snippet
36671    for ac_prog in as
36672do
36673  # Extract the first word of "$ac_prog", so it can be a program name with args.
36674set dummy $ac_prog; ac_word=$2
36675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36676$as_echo_n "checking for $ac_word... " >&6; }
36677if ${ac_cv_path_AS+:} false; then :
36678  $as_echo_n "(cached) " >&6
36679else
36680  case $AS in
36681  [\\/]* | ?:[\\/]*)
36682  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36683  ;;
36684  *)
36685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36686for as_dir in $PATH
36687do
36688  IFS=$as_save_IFS
36689  test -z "$as_dir" && as_dir=.
36690    for ac_exec_ext in '' $ac_executable_extensions; do
36691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36692    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36694    break 2
36695  fi
36696done
36697  done
36698IFS=$as_save_IFS
36699
36700  ;;
36701esac
36702fi
36703AS=$ac_cv_path_AS
36704if test -n "$AS"; then
36705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36706$as_echo "$AS" >&6; }
36707else
36708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36709$as_echo "no" >&6; }
36710fi
36711
36712
36713  test -n "$AS" && break
36714done
36715
36716  else
36717    # The variable is set, but is it from the command line or the environment?
36718
36719    # Try to remove the string !AS! from our list.
36720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36722      # If it failed, the variable was not from the command line. Ignore it,
36723      # but warn the user (except for BASH, which is always set by the calling BASH).
36724      if test "xAS" != xBASH; then
36725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36726$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36727      fi
36728      # Try to locate tool using the code snippet
36729      for ac_prog in as
36730do
36731  # Extract the first word of "$ac_prog", so it can be a program name with args.
36732set dummy $ac_prog; ac_word=$2
36733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36734$as_echo_n "checking for $ac_word... " >&6; }
36735if ${ac_cv_path_AS+:} false; then :
36736  $as_echo_n "(cached) " >&6
36737else
36738  case $AS in
36739  [\\/]* | ?:[\\/]*)
36740  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36741  ;;
36742  *)
36743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36744for as_dir in $PATH
36745do
36746  IFS=$as_save_IFS
36747  test -z "$as_dir" && as_dir=.
36748    for ac_exec_ext in '' $ac_executable_extensions; do
36749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36750    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36752    break 2
36753  fi
36754done
36755  done
36756IFS=$as_save_IFS
36757
36758  ;;
36759esac
36760fi
36761AS=$ac_cv_path_AS
36762if test -n "$AS"; then
36763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36764$as_echo "$AS" >&6; }
36765else
36766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36767$as_echo "no" >&6; }
36768fi
36769
36770
36771  test -n "$AS" && break
36772done
36773
36774    else
36775      # If it succeeded, then it was overridden by the user. We will use it
36776      # for the tool.
36777
36778      # First remove it from the list of overridden variables, so we can test
36779      # for unknown variables in the end.
36780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36781
36782      # Check if we try to supply an empty value
36783      if test "x$AS" = x; then
36784        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36785$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36787$as_echo_n "checking for AS... " >&6; }
36788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36789$as_echo "disabled" >&6; }
36790      else
36791        # Check if the provided tool contains a complete path.
36792        tool_specified="$AS"
36793        tool_basename="${tool_specified##*/}"
36794        if test "x$tool_basename" = "x$tool_specified"; then
36795          # A command without a complete path is provided, search $PATH.
36796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36797$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36798          # Extract the first word of "$tool_basename", so it can be a program name with args.
36799set dummy $tool_basename; ac_word=$2
36800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36801$as_echo_n "checking for $ac_word... " >&6; }
36802if ${ac_cv_path_AS+:} false; then :
36803  $as_echo_n "(cached) " >&6
36804else
36805  case $AS in
36806  [\\/]* | ?:[\\/]*)
36807  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36808  ;;
36809  *)
36810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36811for as_dir in $PATH
36812do
36813  IFS=$as_save_IFS
36814  test -z "$as_dir" && as_dir=.
36815    for ac_exec_ext in '' $ac_executable_extensions; do
36816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36817    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36819    break 2
36820  fi
36821done
36822  done
36823IFS=$as_save_IFS
36824
36825  ;;
36826esac
36827fi
36828AS=$ac_cv_path_AS
36829if test -n "$AS"; then
36830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36831$as_echo "$AS" >&6; }
36832else
36833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36834$as_echo "no" >&6; }
36835fi
36836
36837
36838          if test "x$AS" = x; then
36839            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36840          fi
36841        else
36842          # Otherwise we believe it is a complete path. Use it as it is.
36843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36844$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36845          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36846$as_echo_n "checking for AS... " >&6; }
36847          if test ! -x "$tool_specified"; then
36848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36849$as_echo "not found" >&6; }
36850            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36851          fi
36852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36853$as_echo "$tool_specified" >&6; }
36854        fi
36855      fi
36856    fi
36857
36858  fi
36859
36860
36861
36862  # Only process if variable expands to non-empty
36863
36864  if test "x$AS" != x; then
36865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36866
36867  # First separate the path from the arguments. This will split at the first
36868  # space.
36869  complete="$AS"
36870  path="${complete%% *}"
36871  tmp="$complete EOL"
36872  arguments="${tmp#* }"
36873
36874  # Input might be given as Windows format, start by converting to
36875  # unix format.
36876  new_path=`$CYGPATH -u "$path"`
36877
36878  # Now try to locate executable using which
36879  new_path=`$WHICH "$new_path" 2> /dev/null`
36880  # bat and cmd files are not always considered executable in cygwin causing which
36881  # to not find them
36882  if test "x$new_path" = x \
36883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36885    new_path=`$CYGPATH -u "$path"`
36886  fi
36887  if test "x$new_path" = x; then
36888    # Oops. Which didn't find the executable.
36889    # The splitting of arguments from the executable at a space might have been incorrect,
36890    # since paths with space are more likely in Windows. Give it another try with the whole
36891    # argument.
36892    path="$complete"
36893    arguments="EOL"
36894    new_path=`$CYGPATH -u "$path"`
36895    new_path=`$WHICH "$new_path" 2> /dev/null`
36896    # bat and cmd files are not always considered executable in cygwin causing which
36897    # to not find them
36898    if test "x$new_path" = x \
36899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36901      new_path=`$CYGPATH -u "$path"`
36902    fi
36903    if test "x$new_path" = x; then
36904      # It's still not found. Now this is an unrecoverable error.
36905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36906$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36907      has_space=`$ECHO "$complete" | $GREP " "`
36908      if test "x$has_space" != x; then
36909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36911      fi
36912      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36913    fi
36914  fi
36915
36916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36919  # "foo.exe" is OK but "foo" is an error.
36920  #
36921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36922  # It is also a way to make sure we got the proper file name for the real test later on.
36923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36924  if test "x$test_shortpath" = x; then
36925    # Short path failed, file does not exist as specified.
36926    # Try adding .exe or .cmd
36927    if test -f "${new_path}.exe"; then
36928      input_to_shortpath="${new_path}.exe"
36929    elif test -f "${new_path}.cmd"; then
36930      input_to_shortpath="${new_path}.cmd"
36931    else
36932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36933$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36936      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36937    fi
36938  else
36939    input_to_shortpath="$new_path"
36940  fi
36941
36942  # Call helper function which possibly converts this using DOS-style short mode.
36943  # If so, the updated path is stored in $new_path.
36944  new_path="$input_to_shortpath"
36945
36946  input_path="$input_to_shortpath"
36947  # Check if we need to convert this using DOS-style short mode. If the path
36948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36949  # take no chances and rewrite it.
36950  # Note: m4 eats our [], so we need to use [ and ] instead.
36951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36952  if test "x$has_forbidden_chars" != x; then
36953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36957      # Going to short mode and back again did indeed matter. Since short mode is
36958      # case insensitive, let's make it lowercase to improve readability.
36959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36960      # Now convert it back to Unix-style (cygpath)
36961      input_path=`$CYGPATH -u "$shortmode_path"`
36962      new_path="$input_path"
36963    fi
36964  fi
36965
36966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36967  if test "x$test_cygdrive_prefix" = x; then
36968    # As a simple fix, exclude /usr/bin since it's not a real path.
36969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36971      # a path prefixed by /cygdrive for fixpath to work.
36972      new_path="$CYGWIN_ROOT_PATH$input_path"
36973    fi
36974  fi
36975
36976  # remove trailing .exe if any
36977  new_path="${new_path/%.exe/}"
36978
36979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36980
36981  # First separate the path from the arguments. This will split at the first
36982  # space.
36983  complete="$AS"
36984  path="${complete%% *}"
36985  tmp="$complete EOL"
36986  arguments="${tmp#* }"
36987
36988  # Input might be given as Windows format, start by converting to
36989  # unix format.
36990  new_path="$path"
36991
36992  windows_path="$new_path"
36993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994    unix_path=`$CYGPATH -u "$windows_path"`
36995    new_path="$unix_path"
36996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998    new_path="$unix_path"
36999  fi
37000
37001
37002  # Now try to locate executable using which
37003  new_path=`$WHICH "$new_path" 2> /dev/null`
37004
37005  if test "x$new_path" = x; then
37006    # Oops. Which didn't find the executable.
37007    # The splitting of arguments from the executable at a space might have been incorrect,
37008    # since paths with space are more likely in Windows. Give it another try with the whole
37009    # argument.
37010    path="$complete"
37011    arguments="EOL"
37012    new_path="$path"
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023
37024    new_path=`$WHICH "$new_path" 2> /dev/null`
37025    # bat and cmd files are not always considered executable in MSYS causing which
37026    # to not find them
37027    if test "x$new_path" = x \
37028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37030      new_path="$path"
37031
37032  windows_path="$new_path"
37033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37034    unix_path=`$CYGPATH -u "$windows_path"`
37035    new_path="$unix_path"
37036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37038    new_path="$unix_path"
37039  fi
37040
37041    fi
37042
37043    if test "x$new_path" = x; then
37044      # It's still not found. Now this is an unrecoverable error.
37045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37046$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37047      has_space=`$ECHO "$complete" | $GREP " "`
37048      if test "x$has_space" != x; then
37049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37051      fi
37052      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37053    fi
37054  fi
37055
37056  # Now new_path has a complete unix path to the binary
37057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37058    # Keep paths in /bin as-is, but remove trailing .exe if any
37059    new_path="${new_path/%.exe/}"
37060    # Do not save /bin paths to all_fixpath_prefixes!
37061  else
37062    # Not in mixed or Windows style, start by that.
37063    new_path=`cmd //c echo $new_path`
37064
37065  input_path="$new_path"
37066  # Check if we need to convert this using DOS-style short mode. If the path
37067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37068  # take no chances and rewrite it.
37069  # Note: m4 eats our [], so we need to use [ and ] instead.
37070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37071  if test "x$has_forbidden_chars" != x; then
37072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37074  fi
37075
37076    # Output is in $new_path
37077
37078  windows_path="$new_path"
37079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37080    unix_path=`$CYGPATH -u "$windows_path"`
37081    new_path="$unix_path"
37082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37084    new_path="$unix_path"
37085  fi
37086
37087    # remove trailing .exe if any
37088    new_path="${new_path/%.exe/}"
37089
37090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37092  fi
37093
37094    else
37095      # We're on a unix platform. Hooray! :)
37096      # First separate the path from the arguments. This will split at the first
37097      # space.
37098      complete="$AS"
37099      path="${complete%% *}"
37100      tmp="$complete EOL"
37101      arguments="${tmp#* }"
37102
37103      # Cannot rely on the command "which" here since it doesn't always work.
37104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37105      if test -z "$is_absolute_path"; then
37106        # Path to executable is not absolute. Find it.
37107        IFS_save="$IFS"
37108        IFS=:
37109        for p in $PATH; do
37110          if test -f "$p/$path" && test -x "$p/$path"; then
37111            new_path="$p/$path"
37112            break
37113          fi
37114        done
37115        IFS="$IFS_save"
37116      else
37117        # This is an absolute path, we can use it without further modifications.
37118        new_path="$path"
37119      fi
37120
37121      if test "x$new_path" = x; then
37122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37123$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37124        has_space=`$ECHO "$complete" | $GREP " "`
37125        if test "x$has_space" != x; then
37126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37128        fi
37129        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37130      fi
37131    fi
37132
37133    # Now join together the path and the arguments once again
37134    if test "x$arguments" != xEOL; then
37135      new_complete="$new_path ${arguments% *}"
37136    else
37137      new_complete="$new_path"
37138    fi
37139
37140    if test "x$complete" != "x$new_complete"; then
37141      AS="$new_complete"
37142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37143$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37144    fi
37145  fi
37146
37147    if test "x$AS" = x; then
37148      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37149    fi
37150  else
37151    # FIXME: is this correct for microsoft?
37152    AS="$CC -c"
37153  fi
37154
37155
37156  #
37157  # Setup the archiver (AR)
37158  #
37159  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37160    # The corresponding ar tool is lib.exe (used to create static libraries)
37161    # Extract the first word of "lib", so it can be a program name with args.
37162set dummy lib; ac_word=$2
37163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37164$as_echo_n "checking for $ac_word... " >&6; }
37165if ${ac_cv_prog_AR+:} false; then :
37166  $as_echo_n "(cached) " >&6
37167else
37168  if test -n "$AR"; then
37169  ac_cv_prog_AR="$AR" # Let the user override the test.
37170else
37171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37172for as_dir in $PATH
37173do
37174  IFS=$as_save_IFS
37175  test -z "$as_dir" && as_dir=.
37176    for ac_exec_ext in '' $ac_executable_extensions; do
37177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37178    ac_cv_prog_AR="lib"
37179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37180    break 2
37181  fi
37182done
37183  done
37184IFS=$as_save_IFS
37185
37186fi
37187fi
37188AR=$ac_cv_prog_AR
37189if test -n "$AR"; then
37190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37191$as_echo "$AR" >&6; }
37192else
37193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37194$as_echo "no" >&6; }
37195fi
37196
37197
37198  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37199
37200
37201  # Publish this variable in the help.
37202
37203
37204  if [ -z "${AR+x}" ]; then
37205    # The variable is not set by user, try to locate tool using the code snippet
37206    if test -n "$ac_tool_prefix"; then
37207  for ac_prog in ar gcc-ar
37208  do
37209    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37210set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37212$as_echo_n "checking for $ac_word... " >&6; }
37213if ${ac_cv_prog_AR+:} false; then :
37214  $as_echo_n "(cached) " >&6
37215else
37216  if test -n "$AR"; then
37217  ac_cv_prog_AR="$AR" # Let the user override the test.
37218else
37219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37220for as_dir in $PATH
37221do
37222  IFS=$as_save_IFS
37223  test -z "$as_dir" && as_dir=.
37224    for ac_exec_ext in '' $ac_executable_extensions; do
37225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37226    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37228    break 2
37229  fi
37230done
37231  done
37232IFS=$as_save_IFS
37233
37234fi
37235fi
37236AR=$ac_cv_prog_AR
37237if test -n "$AR"; then
37238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37239$as_echo "$AR" >&6; }
37240else
37241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37242$as_echo "no" >&6; }
37243fi
37244
37245
37246    test -n "$AR" && break
37247  done
37248fi
37249if test -z "$AR"; then
37250  ac_ct_AR=$AR
37251  for ac_prog in ar gcc-ar
37252do
37253  # Extract the first word of "$ac_prog", so it can be a program name with args.
37254set dummy $ac_prog; ac_word=$2
37255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37256$as_echo_n "checking for $ac_word... " >&6; }
37257if ${ac_cv_prog_ac_ct_AR+:} false; then :
37258  $as_echo_n "(cached) " >&6
37259else
37260  if test -n "$ac_ct_AR"; then
37261  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37262else
37263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37264for as_dir in $PATH
37265do
37266  IFS=$as_save_IFS
37267  test -z "$as_dir" && as_dir=.
37268    for ac_exec_ext in '' $ac_executable_extensions; do
37269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37270    ac_cv_prog_ac_ct_AR="$ac_prog"
37271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37272    break 2
37273  fi
37274done
37275  done
37276IFS=$as_save_IFS
37277
37278fi
37279fi
37280ac_ct_AR=$ac_cv_prog_ac_ct_AR
37281if test -n "$ac_ct_AR"; then
37282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37283$as_echo "$ac_ct_AR" >&6; }
37284else
37285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37286$as_echo "no" >&6; }
37287fi
37288
37289
37290  test -n "$ac_ct_AR" && break
37291done
37292
37293  if test "x$ac_ct_AR" = x; then
37294    AR=""
37295  else
37296    case $cross_compiling:$ac_tool_warned in
37297yes:)
37298{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37299$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37300ac_tool_warned=yes ;;
37301esac
37302    AR=$ac_ct_AR
37303  fi
37304fi
37305
37306  else
37307    # The variable is set, but is it from the command line or the environment?
37308
37309    # Try to remove the string !AR! from our list.
37310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37312      # If it failed, the variable was not from the command line. Ignore it,
37313      # but warn the user (except for BASH, which is always set by the calling BASH).
37314      if test "xAR" != xBASH; then
37315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37316$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37317      fi
37318      # Try to locate tool using the code snippet
37319      if test -n "$ac_tool_prefix"; then
37320  for ac_prog in ar gcc-ar
37321  do
37322    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37323set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37325$as_echo_n "checking for $ac_word... " >&6; }
37326if ${ac_cv_prog_AR+:} false; then :
37327  $as_echo_n "(cached) " >&6
37328else
37329  if test -n "$AR"; then
37330  ac_cv_prog_AR="$AR" # Let the user override the test.
37331else
37332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37333for as_dir in $PATH
37334do
37335  IFS=$as_save_IFS
37336  test -z "$as_dir" && as_dir=.
37337    for ac_exec_ext in '' $ac_executable_extensions; do
37338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37339    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37341    break 2
37342  fi
37343done
37344  done
37345IFS=$as_save_IFS
37346
37347fi
37348fi
37349AR=$ac_cv_prog_AR
37350if test -n "$AR"; then
37351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37352$as_echo "$AR" >&6; }
37353else
37354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37355$as_echo "no" >&6; }
37356fi
37357
37358
37359    test -n "$AR" && break
37360  done
37361fi
37362if test -z "$AR"; then
37363  ac_ct_AR=$AR
37364  for ac_prog in ar gcc-ar
37365do
37366  # Extract the first word of "$ac_prog", so it can be a program name with args.
37367set dummy $ac_prog; ac_word=$2
37368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37369$as_echo_n "checking for $ac_word... " >&6; }
37370if ${ac_cv_prog_ac_ct_AR+:} false; then :
37371  $as_echo_n "(cached) " >&6
37372else
37373  if test -n "$ac_ct_AR"; then
37374  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37375else
37376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37377for as_dir in $PATH
37378do
37379  IFS=$as_save_IFS
37380  test -z "$as_dir" && as_dir=.
37381    for ac_exec_ext in '' $ac_executable_extensions; do
37382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37383    ac_cv_prog_ac_ct_AR="$ac_prog"
37384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37385    break 2
37386  fi
37387done
37388  done
37389IFS=$as_save_IFS
37390
37391fi
37392fi
37393ac_ct_AR=$ac_cv_prog_ac_ct_AR
37394if test -n "$ac_ct_AR"; then
37395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37396$as_echo "$ac_ct_AR" >&6; }
37397else
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37399$as_echo "no" >&6; }
37400fi
37401
37402
37403  test -n "$ac_ct_AR" && break
37404done
37405
37406  if test "x$ac_ct_AR" = x; then
37407    AR=""
37408  else
37409    case $cross_compiling:$ac_tool_warned in
37410yes:)
37411{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37412$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37413ac_tool_warned=yes ;;
37414esac
37415    AR=$ac_ct_AR
37416  fi
37417fi
37418
37419    else
37420      # If it succeeded, then it was overridden by the user. We will use it
37421      # for the tool.
37422
37423      # First remove it from the list of overridden variables, so we can test
37424      # for unknown variables in the end.
37425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37426
37427      # Check if we try to supply an empty value
37428      if test "x$AR" = x; then
37429        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37430$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37432$as_echo_n "checking for AR... " >&6; }
37433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37434$as_echo "disabled" >&6; }
37435      else
37436        # Check if the provided tool contains a complete path.
37437        tool_specified="$AR"
37438        tool_basename="${tool_specified##*/}"
37439        if test "x$tool_basename" = "x$tool_specified"; then
37440          # A command without a complete path is provided, search $PATH.
37441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37442$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37443          # Extract the first word of "$tool_basename", so it can be a program name with args.
37444set dummy $tool_basename; ac_word=$2
37445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37446$as_echo_n "checking for $ac_word... " >&6; }
37447if ${ac_cv_path_AR+:} false; then :
37448  $as_echo_n "(cached) " >&6
37449else
37450  case $AR in
37451  [\\/]* | ?:[\\/]*)
37452  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37453  ;;
37454  *)
37455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37456for as_dir in $PATH
37457do
37458  IFS=$as_save_IFS
37459  test -z "$as_dir" && as_dir=.
37460    for ac_exec_ext in '' $ac_executable_extensions; do
37461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37462    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37464    break 2
37465  fi
37466done
37467  done
37468IFS=$as_save_IFS
37469
37470  ;;
37471esac
37472fi
37473AR=$ac_cv_path_AR
37474if test -n "$AR"; then
37475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37476$as_echo "$AR" >&6; }
37477else
37478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37479$as_echo "no" >&6; }
37480fi
37481
37482
37483          if test "x$AR" = x; then
37484            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37485          fi
37486        else
37487          # Otherwise we believe it is a complete path. Use it as it is.
37488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37489$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37490          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37491$as_echo_n "checking for AR... " >&6; }
37492          if test ! -x "$tool_specified"; then
37493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37494$as_echo "not found" >&6; }
37495            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37496          fi
37497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37498$as_echo "$tool_specified" >&6; }
37499        fi
37500      fi
37501    fi
37502
37503  fi
37504
37505
37506  else
37507
37508
37509  # Publish this variable in the help.
37510
37511
37512  if [ -z "${AR+x}" ]; then
37513    # The variable is not set by user, try to locate tool using the code snippet
37514    if test -n "$ac_tool_prefix"; then
37515  for ac_prog in ar
37516  do
37517    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37518set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37520$as_echo_n "checking for $ac_word... " >&6; }
37521if ${ac_cv_prog_AR+:} false; then :
37522  $as_echo_n "(cached) " >&6
37523else
37524  if test -n "$AR"; then
37525  ac_cv_prog_AR="$AR" # Let the user override the test.
37526else
37527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37528for as_dir in $PATH
37529do
37530  IFS=$as_save_IFS
37531  test -z "$as_dir" && as_dir=.
37532    for ac_exec_ext in '' $ac_executable_extensions; do
37533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37534    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37536    break 2
37537  fi
37538done
37539  done
37540IFS=$as_save_IFS
37541
37542fi
37543fi
37544AR=$ac_cv_prog_AR
37545if test -n "$AR"; then
37546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37547$as_echo "$AR" >&6; }
37548else
37549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37550$as_echo "no" >&6; }
37551fi
37552
37553
37554    test -n "$AR" && break
37555  done
37556fi
37557if test -z "$AR"; then
37558  ac_ct_AR=$AR
37559  for ac_prog in ar
37560do
37561  # Extract the first word of "$ac_prog", so it can be a program name with args.
37562set dummy $ac_prog; ac_word=$2
37563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37564$as_echo_n "checking for $ac_word... " >&6; }
37565if ${ac_cv_prog_ac_ct_AR+:} false; then :
37566  $as_echo_n "(cached) " >&6
37567else
37568  if test -n "$ac_ct_AR"; then
37569  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37570else
37571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37572for as_dir in $PATH
37573do
37574  IFS=$as_save_IFS
37575  test -z "$as_dir" && as_dir=.
37576    for ac_exec_ext in '' $ac_executable_extensions; do
37577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37578    ac_cv_prog_ac_ct_AR="$ac_prog"
37579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37580    break 2
37581  fi
37582done
37583  done
37584IFS=$as_save_IFS
37585
37586fi
37587fi
37588ac_ct_AR=$ac_cv_prog_ac_ct_AR
37589if test -n "$ac_ct_AR"; then
37590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37591$as_echo "$ac_ct_AR" >&6; }
37592else
37593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37594$as_echo "no" >&6; }
37595fi
37596
37597
37598  test -n "$ac_ct_AR" && break
37599done
37600
37601  if test "x$ac_ct_AR" = x; then
37602    AR=""
37603  else
37604    case $cross_compiling:$ac_tool_warned in
37605yes:)
37606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37608ac_tool_warned=yes ;;
37609esac
37610    AR=$ac_ct_AR
37611  fi
37612fi
37613
37614  else
37615    # The variable is set, but is it from the command line or the environment?
37616
37617    # Try to remove the string !AR! from our list.
37618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37620      # If it failed, the variable was not from the command line. Ignore it,
37621      # but warn the user (except for BASH, which is always set by the calling BASH).
37622      if test "xAR" != xBASH; then
37623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37624$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37625      fi
37626      # Try to locate tool using the code snippet
37627      if test -n "$ac_tool_prefix"; then
37628  for ac_prog in ar
37629  do
37630    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37631set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37633$as_echo_n "checking for $ac_word... " >&6; }
37634if ${ac_cv_prog_AR+:} false; then :
37635  $as_echo_n "(cached) " >&6
37636else
37637  if test -n "$AR"; then
37638  ac_cv_prog_AR="$AR" # Let the user override the test.
37639else
37640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37641for as_dir in $PATH
37642do
37643  IFS=$as_save_IFS
37644  test -z "$as_dir" && as_dir=.
37645    for ac_exec_ext in '' $ac_executable_extensions; do
37646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37647    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37649    break 2
37650  fi
37651done
37652  done
37653IFS=$as_save_IFS
37654
37655fi
37656fi
37657AR=$ac_cv_prog_AR
37658if test -n "$AR"; then
37659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37660$as_echo "$AR" >&6; }
37661else
37662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37663$as_echo "no" >&6; }
37664fi
37665
37666
37667    test -n "$AR" && break
37668  done
37669fi
37670if test -z "$AR"; then
37671  ac_ct_AR=$AR
37672  for ac_prog in ar
37673do
37674  # Extract the first word of "$ac_prog", so it can be a program name with args.
37675set dummy $ac_prog; 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_prog_ac_ct_AR+:} false; then :
37679  $as_echo_n "(cached) " >&6
37680else
37681  if test -n "$ac_ct_AR"; then
37682  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37683else
37684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37685for as_dir in $PATH
37686do
37687  IFS=$as_save_IFS
37688  test -z "$as_dir" && as_dir=.
37689    for ac_exec_ext in '' $ac_executable_extensions; do
37690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37691    ac_cv_prog_ac_ct_AR="$ac_prog"
37692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37693    break 2
37694  fi
37695done
37696  done
37697IFS=$as_save_IFS
37698
37699fi
37700fi
37701ac_ct_AR=$ac_cv_prog_ac_ct_AR
37702if test -n "$ac_ct_AR"; then
37703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37704$as_echo "$ac_ct_AR" >&6; }
37705else
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37707$as_echo "no" >&6; }
37708fi
37709
37710
37711  test -n "$ac_ct_AR" && break
37712done
37713
37714  if test "x$ac_ct_AR" = x; then
37715    AR=""
37716  else
37717    case $cross_compiling:$ac_tool_warned in
37718yes:)
37719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37721ac_tool_warned=yes ;;
37722esac
37723    AR=$ac_ct_AR
37724  fi
37725fi
37726
37727    else
37728      # If it succeeded, then it was overridden by the user. We will use it
37729      # for the tool.
37730
37731      # First remove it from the list of overridden variables, so we can test
37732      # for unknown variables in the end.
37733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37734
37735      # Check if we try to supply an empty value
37736      if test "x$AR" = x; then
37737        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37738$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37740$as_echo_n "checking for AR... " >&6; }
37741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37742$as_echo "disabled" >&6; }
37743      else
37744        # Check if the provided tool contains a complete path.
37745        tool_specified="$AR"
37746        tool_basename="${tool_specified##*/}"
37747        if test "x$tool_basename" = "x$tool_specified"; then
37748          # A command without a complete path is provided, search $PATH.
37749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37750$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37751          # Extract the first word of "$tool_basename", so it can be a program name with args.
37752set dummy $tool_basename; ac_word=$2
37753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37754$as_echo_n "checking for $ac_word... " >&6; }
37755if ${ac_cv_path_AR+:} false; then :
37756  $as_echo_n "(cached) " >&6
37757else
37758  case $AR in
37759  [\\/]* | ?:[\\/]*)
37760  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37761  ;;
37762  *)
37763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37764for as_dir in $PATH
37765do
37766  IFS=$as_save_IFS
37767  test -z "$as_dir" && as_dir=.
37768    for ac_exec_ext in '' $ac_executable_extensions; do
37769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37770    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37772    break 2
37773  fi
37774done
37775  done
37776IFS=$as_save_IFS
37777
37778  ;;
37779esac
37780fi
37781AR=$ac_cv_path_AR
37782if test -n "$AR"; then
37783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37784$as_echo "$AR" >&6; }
37785else
37786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37787$as_echo "no" >&6; }
37788fi
37789
37790
37791          if test "x$AR" = x; then
37792            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37793          fi
37794        else
37795          # Otherwise we believe it is a complete path. Use it as it is.
37796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37797$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37798          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37799$as_echo_n "checking for AR... " >&6; }
37800          if test ! -x "$tool_specified"; then
37801            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37802$as_echo "not found" >&6; }
37803            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37804          fi
37805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37806$as_echo "$tool_specified" >&6; }
37807        fi
37808      fi
37809    fi
37810
37811  fi
37812
37813
37814  fi
37815
37816  # Only process if variable expands to non-empty
37817
37818  if test "x$AR" != x; then
37819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37820
37821  # First separate the path from the arguments. This will split at the first
37822  # space.
37823  complete="$AR"
37824  path="${complete%% *}"
37825  tmp="$complete EOL"
37826  arguments="${tmp#* }"
37827
37828  # Input might be given as Windows format, start by converting to
37829  # unix format.
37830  new_path=`$CYGPATH -u "$path"`
37831
37832  # Now try to locate executable using which
37833  new_path=`$WHICH "$new_path" 2> /dev/null`
37834  # bat and cmd files are not always considered executable in cygwin causing which
37835  # to not find them
37836  if test "x$new_path" = x \
37837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37839    new_path=`$CYGPATH -u "$path"`
37840  fi
37841  if test "x$new_path" = x; then
37842    # Oops. Which didn't find the executable.
37843    # The splitting of arguments from the executable at a space might have been incorrect,
37844    # since paths with space are more likely in Windows. Give it another try with the whole
37845    # argument.
37846    path="$complete"
37847    arguments="EOL"
37848    new_path=`$CYGPATH -u "$path"`
37849    new_path=`$WHICH "$new_path" 2> /dev/null`
37850    # bat and cmd files are not always considered executable in cygwin causing which
37851    # to not find them
37852    if test "x$new_path" = x \
37853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37855      new_path=`$CYGPATH -u "$path"`
37856    fi
37857    if test "x$new_path" = x; then
37858      # It's still not found. Now this is an unrecoverable error.
37859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37860$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37861      has_space=`$ECHO "$complete" | $GREP " "`
37862      if test "x$has_space" != x; then
37863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37865      fi
37866      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37867    fi
37868  fi
37869
37870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37873  # "foo.exe" is OK but "foo" is an error.
37874  #
37875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37876  # It is also a way to make sure we got the proper file name for the real test later on.
37877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37878  if test "x$test_shortpath" = x; then
37879    # Short path failed, file does not exist as specified.
37880    # Try adding .exe or .cmd
37881    if test -f "${new_path}.exe"; then
37882      input_to_shortpath="${new_path}.exe"
37883    elif test -f "${new_path}.cmd"; then
37884      input_to_shortpath="${new_path}.cmd"
37885    else
37886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37887$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37890      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37891    fi
37892  else
37893    input_to_shortpath="$new_path"
37894  fi
37895
37896  # Call helper function which possibly converts this using DOS-style short mode.
37897  # If so, the updated path is stored in $new_path.
37898  new_path="$input_to_shortpath"
37899
37900  input_path="$input_to_shortpath"
37901  # Check if we need to convert this using DOS-style short mode. If the path
37902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37903  # take no chances and rewrite it.
37904  # Note: m4 eats our [], so we need to use [ and ] instead.
37905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37906  if test "x$has_forbidden_chars" != x; then
37907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37911      # Going to short mode and back again did indeed matter. Since short mode is
37912      # case insensitive, let's make it lowercase to improve readability.
37913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37914      # Now convert it back to Unix-style (cygpath)
37915      input_path=`$CYGPATH -u "$shortmode_path"`
37916      new_path="$input_path"
37917    fi
37918  fi
37919
37920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37921  if test "x$test_cygdrive_prefix" = x; then
37922    # As a simple fix, exclude /usr/bin since it's not a real path.
37923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37925      # a path prefixed by /cygdrive for fixpath to work.
37926      new_path="$CYGWIN_ROOT_PATH$input_path"
37927    fi
37928  fi
37929
37930  # remove trailing .exe if any
37931  new_path="${new_path/%.exe/}"
37932
37933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37934
37935  # First separate the path from the arguments. This will split at the first
37936  # space.
37937  complete="$AR"
37938  path="${complete%% *}"
37939  tmp="$complete EOL"
37940  arguments="${tmp#* }"
37941
37942  # Input might be given as Windows format, start by converting to
37943  # unix format.
37944  new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955
37956  # Now try to locate executable using which
37957  new_path=`$WHICH "$new_path" 2> /dev/null`
37958
37959  if test "x$new_path" = x; then
37960    # Oops. Which didn't find the executable.
37961    # The splitting of arguments from the executable at a space might have been incorrect,
37962    # since paths with space are more likely in Windows. Give it another try with the whole
37963    # argument.
37964    path="$complete"
37965    arguments="EOL"
37966    new_path="$path"
37967
37968  windows_path="$new_path"
37969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37970    unix_path=`$CYGPATH -u "$windows_path"`
37971    new_path="$unix_path"
37972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37974    new_path="$unix_path"
37975  fi
37976
37977
37978    new_path=`$WHICH "$new_path" 2> /dev/null`
37979    # bat and cmd files are not always considered executable in MSYS causing which
37980    # to not find them
37981    if test "x$new_path" = x \
37982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37984      new_path="$path"
37985
37986  windows_path="$new_path"
37987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37988    unix_path=`$CYGPATH -u "$windows_path"`
37989    new_path="$unix_path"
37990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37992    new_path="$unix_path"
37993  fi
37994
37995    fi
37996
37997    if test "x$new_path" = x; then
37998      # It's still not found. Now this is an unrecoverable error.
37999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38000$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38001      has_space=`$ECHO "$complete" | $GREP " "`
38002      if test "x$has_space" != x; then
38003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38005      fi
38006      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38007    fi
38008  fi
38009
38010  # Now new_path has a complete unix path to the binary
38011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38012    # Keep paths in /bin as-is, but remove trailing .exe if any
38013    new_path="${new_path/%.exe/}"
38014    # Do not save /bin paths to all_fixpath_prefixes!
38015  else
38016    # Not in mixed or Windows style, start by that.
38017    new_path=`cmd //c echo $new_path`
38018
38019  input_path="$new_path"
38020  # Check if we need to convert this using DOS-style short mode. If the path
38021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38022  # take no chances and rewrite it.
38023  # Note: m4 eats our [], so we need to use [ and ] instead.
38024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38025  if test "x$has_forbidden_chars" != x; then
38026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38028  fi
38029
38030    # Output is in $new_path
38031
38032  windows_path="$new_path"
38033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38034    unix_path=`$CYGPATH -u "$windows_path"`
38035    new_path="$unix_path"
38036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38038    new_path="$unix_path"
38039  fi
38040
38041    # remove trailing .exe if any
38042    new_path="${new_path/%.exe/}"
38043
38044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38046  fi
38047
38048    else
38049      # We're on a unix platform. Hooray! :)
38050      # First separate the path from the arguments. This will split at the first
38051      # space.
38052      complete="$AR"
38053      path="${complete%% *}"
38054      tmp="$complete EOL"
38055      arguments="${tmp#* }"
38056
38057      # Cannot rely on the command "which" here since it doesn't always work.
38058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38059      if test -z "$is_absolute_path"; then
38060        # Path to executable is not absolute. Find it.
38061        IFS_save="$IFS"
38062        IFS=:
38063        for p in $PATH; do
38064          if test -f "$p/$path" && test -x "$p/$path"; then
38065            new_path="$p/$path"
38066            break
38067          fi
38068        done
38069        IFS="$IFS_save"
38070      else
38071        # This is an absolute path, we can use it without further modifications.
38072        new_path="$path"
38073      fi
38074
38075      if test "x$new_path" = x; then
38076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38077$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38078        has_space=`$ECHO "$complete" | $GREP " "`
38079        if test "x$has_space" != x; then
38080          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38082        fi
38083        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38084      fi
38085    fi
38086
38087    # Now join together the path and the arguments once again
38088    if test "x$arguments" != xEOL; then
38089      new_complete="$new_path ${arguments% *}"
38090    else
38091      new_complete="$new_path"
38092    fi
38093
38094    if test "x$complete" != "x$new_complete"; then
38095      AR="$new_complete"
38096      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38097$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38098    fi
38099  fi
38100
38101
38102
38103  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38104
38105
38106  # Publish this variable in the help.
38107
38108
38109  if [ -z "${LIPO+x}" ]; then
38110    # The variable is not set by user, try to locate tool using the code snippet
38111    for ac_prog in lipo
38112do
38113  # Extract the first word of "$ac_prog", so it can be a program name with args.
38114set dummy $ac_prog; ac_word=$2
38115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38116$as_echo_n "checking for $ac_word... " >&6; }
38117if ${ac_cv_path_LIPO+:} false; then :
38118  $as_echo_n "(cached) " >&6
38119else
38120  case $LIPO in
38121  [\\/]* | ?:[\\/]*)
38122  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38123  ;;
38124  *)
38125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38126for as_dir in $PATH
38127do
38128  IFS=$as_save_IFS
38129  test -z "$as_dir" && as_dir=.
38130    for ac_exec_ext in '' $ac_executable_extensions; do
38131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38132    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38134    break 2
38135  fi
38136done
38137  done
38138IFS=$as_save_IFS
38139
38140  ;;
38141esac
38142fi
38143LIPO=$ac_cv_path_LIPO
38144if test -n "$LIPO"; then
38145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38146$as_echo "$LIPO" >&6; }
38147else
38148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38149$as_echo "no" >&6; }
38150fi
38151
38152
38153  test -n "$LIPO" && break
38154done
38155
38156  else
38157    # The variable is set, but is it from the command line or the environment?
38158
38159    # Try to remove the string !LIPO! from our list.
38160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38162      # If it failed, the variable was not from the command line. Ignore it,
38163      # but warn the user (except for BASH, which is always set by the calling BASH).
38164      if test "xLIPO" != xBASH; then
38165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38166$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38167      fi
38168      # Try to locate tool using the code snippet
38169      for ac_prog in lipo
38170do
38171  # Extract the first word of "$ac_prog", so it can be a program name with args.
38172set dummy $ac_prog; ac_word=$2
38173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38174$as_echo_n "checking for $ac_word... " >&6; }
38175if ${ac_cv_path_LIPO+:} false; then :
38176  $as_echo_n "(cached) " >&6
38177else
38178  case $LIPO in
38179  [\\/]* | ?:[\\/]*)
38180  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38181  ;;
38182  *)
38183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38184for as_dir in $PATH
38185do
38186  IFS=$as_save_IFS
38187  test -z "$as_dir" && as_dir=.
38188    for ac_exec_ext in '' $ac_executable_extensions; do
38189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38190    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38192    break 2
38193  fi
38194done
38195  done
38196IFS=$as_save_IFS
38197
38198  ;;
38199esac
38200fi
38201LIPO=$ac_cv_path_LIPO
38202if test -n "$LIPO"; then
38203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38204$as_echo "$LIPO" >&6; }
38205else
38206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38207$as_echo "no" >&6; }
38208fi
38209
38210
38211  test -n "$LIPO" && break
38212done
38213
38214    else
38215      # If it succeeded, then it was overridden by the user. We will use it
38216      # for the tool.
38217
38218      # First remove it from the list of overridden variables, so we can test
38219      # for unknown variables in the end.
38220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38221
38222      # Check if we try to supply an empty value
38223      if test "x$LIPO" = x; then
38224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38225$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38227$as_echo_n "checking for LIPO... " >&6; }
38228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38229$as_echo "disabled" >&6; }
38230      else
38231        # Check if the provided tool contains a complete path.
38232        tool_specified="$LIPO"
38233        tool_basename="${tool_specified##*/}"
38234        if test "x$tool_basename" = "x$tool_specified"; then
38235          # A command without a complete path is provided, search $PATH.
38236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38237$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38238          # Extract the first word of "$tool_basename", so it can be a program name with args.
38239set dummy $tool_basename; ac_word=$2
38240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38241$as_echo_n "checking for $ac_word... " >&6; }
38242if ${ac_cv_path_LIPO+:} false; then :
38243  $as_echo_n "(cached) " >&6
38244else
38245  case $LIPO in
38246  [\\/]* | ?:[\\/]*)
38247  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38248  ;;
38249  *)
38250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38251for as_dir in $PATH
38252do
38253  IFS=$as_save_IFS
38254  test -z "$as_dir" && as_dir=.
38255    for ac_exec_ext in '' $ac_executable_extensions; do
38256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38257    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38259    break 2
38260  fi
38261done
38262  done
38263IFS=$as_save_IFS
38264
38265  ;;
38266esac
38267fi
38268LIPO=$ac_cv_path_LIPO
38269if test -n "$LIPO"; then
38270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38271$as_echo "$LIPO" >&6; }
38272else
38273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38274$as_echo "no" >&6; }
38275fi
38276
38277
38278          if test "x$LIPO" = x; then
38279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38280          fi
38281        else
38282          # Otherwise we believe it is a complete path. Use it as it is.
38283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38284$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38286$as_echo_n "checking for LIPO... " >&6; }
38287          if test ! -x "$tool_specified"; then
38288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38289$as_echo "not found" >&6; }
38290            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38291          fi
38292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38293$as_echo "$tool_specified" >&6; }
38294        fi
38295      fi
38296    fi
38297
38298  fi
38299
38300
38301
38302  # Only process if variable expands to non-empty
38303
38304  if test "x$LIPO" != x; then
38305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38306
38307  # First separate the path from the arguments. This will split at the first
38308  # space.
38309  complete="$LIPO"
38310  path="${complete%% *}"
38311  tmp="$complete EOL"
38312  arguments="${tmp#* }"
38313
38314  # Input might be given as Windows format, start by converting to
38315  # unix format.
38316  new_path=`$CYGPATH -u "$path"`
38317
38318  # Now try to locate executable using which
38319  new_path=`$WHICH "$new_path" 2> /dev/null`
38320  # bat and cmd files are not always considered executable in cygwin causing which
38321  # to not find them
38322  if test "x$new_path" = x \
38323      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38324      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38325    new_path=`$CYGPATH -u "$path"`
38326  fi
38327  if test "x$new_path" = x; then
38328    # Oops. Which didn't find the executable.
38329    # The splitting of arguments from the executable at a space might have been incorrect,
38330    # since paths with space are more likely in Windows. Give it another try with the whole
38331    # argument.
38332    path="$complete"
38333    arguments="EOL"
38334    new_path=`$CYGPATH -u "$path"`
38335    new_path=`$WHICH "$new_path" 2> /dev/null`
38336    # bat and cmd files are not always considered executable in cygwin causing which
38337    # to not find them
38338    if test "x$new_path" = x \
38339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38341      new_path=`$CYGPATH -u "$path"`
38342    fi
38343    if test "x$new_path" = x; then
38344      # It's still not found. Now this is an unrecoverable error.
38345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38346$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38347      has_space=`$ECHO "$complete" | $GREP " "`
38348      if test "x$has_space" != x; then
38349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38351      fi
38352      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38353    fi
38354  fi
38355
38356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38359  # "foo.exe" is OK but "foo" is an error.
38360  #
38361  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38362  # It is also a way to make sure we got the proper file name for the real test later on.
38363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38364  if test "x$test_shortpath" = x; then
38365    # Short path failed, file does not exist as specified.
38366    # Try adding .exe or .cmd
38367    if test -f "${new_path}.exe"; then
38368      input_to_shortpath="${new_path}.exe"
38369    elif test -f "${new_path}.cmd"; then
38370      input_to_shortpath="${new_path}.cmd"
38371    else
38372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38373$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38376      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38377    fi
38378  else
38379    input_to_shortpath="$new_path"
38380  fi
38381
38382  # Call helper function which possibly converts this using DOS-style short mode.
38383  # If so, the updated path is stored in $new_path.
38384  new_path="$input_to_shortpath"
38385
38386  input_path="$input_to_shortpath"
38387  # Check if we need to convert this using DOS-style short mode. If the path
38388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38389  # take no chances and rewrite it.
38390  # Note: m4 eats our [], so we need to use [ and ] instead.
38391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38392  if test "x$has_forbidden_chars" != x; then
38393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38397      # Going to short mode and back again did indeed matter. Since short mode is
38398      # case insensitive, let's make it lowercase to improve readability.
38399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38400      # Now convert it back to Unix-style (cygpath)
38401      input_path=`$CYGPATH -u "$shortmode_path"`
38402      new_path="$input_path"
38403    fi
38404  fi
38405
38406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38407  if test "x$test_cygdrive_prefix" = x; then
38408    # As a simple fix, exclude /usr/bin since it's not a real path.
38409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38411      # a path prefixed by /cygdrive for fixpath to work.
38412      new_path="$CYGWIN_ROOT_PATH$input_path"
38413    fi
38414  fi
38415
38416  # remove trailing .exe if any
38417  new_path="${new_path/%.exe/}"
38418
38419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38420
38421  # First separate the path from the arguments. This will split at the first
38422  # space.
38423  complete="$LIPO"
38424  path="${complete%% *}"
38425  tmp="$complete EOL"
38426  arguments="${tmp#* }"
38427
38428  # Input might be given as Windows format, start by converting to
38429  # unix format.
38430  new_path="$path"
38431
38432  windows_path="$new_path"
38433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38434    unix_path=`$CYGPATH -u "$windows_path"`
38435    new_path="$unix_path"
38436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38438    new_path="$unix_path"
38439  fi
38440
38441
38442  # Now try to locate executable using which
38443  new_path=`$WHICH "$new_path" 2> /dev/null`
38444
38445  if test "x$new_path" = x; then
38446    # Oops. Which didn't find the executable.
38447    # The splitting of arguments from the executable at a space might have been incorrect,
38448    # since paths with space are more likely in Windows. Give it another try with the whole
38449    # argument.
38450    path="$complete"
38451    arguments="EOL"
38452    new_path="$path"
38453
38454  windows_path="$new_path"
38455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38456    unix_path=`$CYGPATH -u "$windows_path"`
38457    new_path="$unix_path"
38458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38460    new_path="$unix_path"
38461  fi
38462
38463
38464    new_path=`$WHICH "$new_path" 2> /dev/null`
38465    # bat and cmd files are not always considered executable in MSYS causing which
38466    # to not find them
38467    if test "x$new_path" = x \
38468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38470      new_path="$path"
38471
38472  windows_path="$new_path"
38473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38474    unix_path=`$CYGPATH -u "$windows_path"`
38475    new_path="$unix_path"
38476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38478    new_path="$unix_path"
38479  fi
38480
38481    fi
38482
38483    if test "x$new_path" = x; then
38484      # It's still not found. Now this is an unrecoverable error.
38485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38486$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38487      has_space=`$ECHO "$complete" | $GREP " "`
38488      if test "x$has_space" != x; then
38489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38491      fi
38492      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38493    fi
38494  fi
38495
38496  # Now new_path has a complete unix path to the binary
38497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38498    # Keep paths in /bin as-is, but remove trailing .exe if any
38499    new_path="${new_path/%.exe/}"
38500    # Do not save /bin paths to all_fixpath_prefixes!
38501  else
38502    # Not in mixed or Windows style, start by that.
38503    new_path=`cmd //c echo $new_path`
38504
38505  input_path="$new_path"
38506  # Check if we need to convert this using DOS-style short mode. If the path
38507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38508  # take no chances and rewrite it.
38509  # Note: m4 eats our [], so we need to use [ and ] instead.
38510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38511  if test "x$has_forbidden_chars" != x; then
38512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38514  fi
38515
38516    # Output is in $new_path
38517
38518  windows_path="$new_path"
38519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38520    unix_path=`$CYGPATH -u "$windows_path"`
38521    new_path="$unix_path"
38522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38524    new_path="$unix_path"
38525  fi
38526
38527    # remove trailing .exe if any
38528    new_path="${new_path/%.exe/}"
38529
38530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38532  fi
38533
38534    else
38535      # We're on a unix platform. Hooray! :)
38536      # First separate the path from the arguments. This will split at the first
38537      # space.
38538      complete="$LIPO"
38539      path="${complete%% *}"
38540      tmp="$complete EOL"
38541      arguments="${tmp#* }"
38542
38543      # Cannot rely on the command "which" here since it doesn't always work.
38544      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38545      if test -z "$is_absolute_path"; then
38546        # Path to executable is not absolute. Find it.
38547        IFS_save="$IFS"
38548        IFS=:
38549        for p in $PATH; do
38550          if test -f "$p/$path" && test -x "$p/$path"; then
38551            new_path="$p/$path"
38552            break
38553          fi
38554        done
38555        IFS="$IFS_save"
38556      else
38557        # This is an absolute path, we can use it without further modifications.
38558        new_path="$path"
38559      fi
38560
38561      if test "x$new_path" = x; then
38562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38563$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38564        has_space=`$ECHO "$complete" | $GREP " "`
38565        if test "x$has_space" != x; then
38566          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38567$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38568        fi
38569        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38570      fi
38571    fi
38572
38573    # Now join together the path and the arguments once again
38574    if test "x$arguments" != xEOL; then
38575      new_complete="$new_path ${arguments% *}"
38576    else
38577      new_complete="$new_path"
38578    fi
38579
38580    if test "x$complete" != "x$new_complete"; then
38581      LIPO="$new_complete"
38582      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38583$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38584    fi
38585  fi
38586
38587  fi
38588
38589  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38590    # Extract the first word of "mt", so it can be a program name with args.
38591set dummy mt; ac_word=$2
38592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38593$as_echo_n "checking for $ac_word... " >&6; }
38594if ${ac_cv_prog_MT+:} false; then :
38595  $as_echo_n "(cached) " >&6
38596else
38597  if test -n "$MT"; then
38598  ac_cv_prog_MT="$MT" # Let the user override the test.
38599else
38600  ac_prog_rejected=no
38601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38602for as_dir in $PATH
38603do
38604  IFS=$as_save_IFS
38605  test -z "$as_dir" && as_dir=.
38606    for ac_exec_ext in '' $ac_executable_extensions; do
38607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38608    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38609       ac_prog_rejected=yes
38610       continue
38611     fi
38612    ac_cv_prog_MT="mt"
38613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38614    break 2
38615  fi
38616done
38617  done
38618IFS=$as_save_IFS
38619
38620if test $ac_prog_rejected = yes; then
38621  # We found a bogon in the path, so make sure we never use it.
38622  set dummy $ac_cv_prog_MT
38623  shift
38624  if test $# != 0; then
38625    # We chose a different compiler from the bogus one.
38626    # However, it has the same basename, so the bogon will be chosen
38627    # first if we set MT to just the basename; use the full file name.
38628    shift
38629    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38630  fi
38631fi
38632fi
38633fi
38634MT=$ac_cv_prog_MT
38635if test -n "$MT"; then
38636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38637$as_echo "$MT" >&6; }
38638else
38639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38640$as_echo "no" >&6; }
38641fi
38642
38643
38644
38645  # Only process if variable expands to non-empty
38646
38647  if test "x$MT" != x; then
38648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38649
38650  # First separate the path from the arguments. This will split at the first
38651  # space.
38652  complete="$MT"
38653  path="${complete%% *}"
38654  tmp="$complete EOL"
38655  arguments="${tmp#* }"
38656
38657  # Input might be given as Windows format, start by converting to
38658  # unix format.
38659  new_path=`$CYGPATH -u "$path"`
38660
38661  # Now try to locate executable using which
38662  new_path=`$WHICH "$new_path" 2> /dev/null`
38663  # bat and cmd files are not always considered executable in cygwin causing which
38664  # to not find them
38665  if test "x$new_path" = x \
38666      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38667      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38668    new_path=`$CYGPATH -u "$path"`
38669  fi
38670  if test "x$new_path" = x; then
38671    # Oops. Which didn't find the executable.
38672    # The splitting of arguments from the executable at a space might have been incorrect,
38673    # since paths with space are more likely in Windows. Give it another try with the whole
38674    # argument.
38675    path="$complete"
38676    arguments="EOL"
38677    new_path=`$CYGPATH -u "$path"`
38678    new_path=`$WHICH "$new_path" 2> /dev/null`
38679    # bat and cmd files are not always considered executable in cygwin causing which
38680    # to not find them
38681    if test "x$new_path" = x \
38682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38684      new_path=`$CYGPATH -u "$path"`
38685    fi
38686    if test "x$new_path" = x; then
38687      # It's still not found. Now this is an unrecoverable error.
38688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38689$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38690      has_space=`$ECHO "$complete" | $GREP " "`
38691      if test "x$has_space" != x; then
38692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38694      fi
38695      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38696    fi
38697  fi
38698
38699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38702  # "foo.exe" is OK but "foo" is an error.
38703  #
38704  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38705  # It is also a way to make sure we got the proper file name for the real test later on.
38706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38707  if test "x$test_shortpath" = x; then
38708    # Short path failed, file does not exist as specified.
38709    # Try adding .exe or .cmd
38710    if test -f "${new_path}.exe"; then
38711      input_to_shortpath="${new_path}.exe"
38712    elif test -f "${new_path}.cmd"; then
38713      input_to_shortpath="${new_path}.cmd"
38714    else
38715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38716$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38717      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38718$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38719      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38720    fi
38721  else
38722    input_to_shortpath="$new_path"
38723  fi
38724
38725  # Call helper function which possibly converts this using DOS-style short mode.
38726  # If so, the updated path is stored in $new_path.
38727  new_path="$input_to_shortpath"
38728
38729  input_path="$input_to_shortpath"
38730  # Check if we need to convert this using DOS-style short mode. If the path
38731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38732  # take no chances and rewrite it.
38733  # Note: m4 eats our [], so we need to use [ and ] instead.
38734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38735  if test "x$has_forbidden_chars" != x; then
38736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38740      # Going to short mode and back again did indeed matter. Since short mode is
38741      # case insensitive, let's make it lowercase to improve readability.
38742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38743      # Now convert it back to Unix-style (cygpath)
38744      input_path=`$CYGPATH -u "$shortmode_path"`
38745      new_path="$input_path"
38746    fi
38747  fi
38748
38749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38750  if test "x$test_cygdrive_prefix" = x; then
38751    # As a simple fix, exclude /usr/bin since it's not a real path.
38752    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38754      # a path prefixed by /cygdrive for fixpath to work.
38755      new_path="$CYGWIN_ROOT_PATH$input_path"
38756    fi
38757  fi
38758
38759  # remove trailing .exe if any
38760  new_path="${new_path/%.exe/}"
38761
38762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38763
38764  # First separate the path from the arguments. This will split at the first
38765  # space.
38766  complete="$MT"
38767  path="${complete%% *}"
38768  tmp="$complete EOL"
38769  arguments="${tmp#* }"
38770
38771  # Input might be given as Windows format, start by converting to
38772  # unix format.
38773  new_path="$path"
38774
38775  windows_path="$new_path"
38776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38777    unix_path=`$CYGPATH -u "$windows_path"`
38778    new_path="$unix_path"
38779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38781    new_path="$unix_path"
38782  fi
38783
38784
38785  # Now try to locate executable using which
38786  new_path=`$WHICH "$new_path" 2> /dev/null`
38787
38788  if test "x$new_path" = x; then
38789    # Oops. Which didn't find the executable.
38790    # The splitting of arguments from the executable at a space might have been incorrect,
38791    # since paths with space are more likely in Windows. Give it another try with the whole
38792    # argument.
38793    path="$complete"
38794    arguments="EOL"
38795    new_path="$path"
38796
38797  windows_path="$new_path"
38798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38799    unix_path=`$CYGPATH -u "$windows_path"`
38800    new_path="$unix_path"
38801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38803    new_path="$unix_path"
38804  fi
38805
38806
38807    new_path=`$WHICH "$new_path" 2> /dev/null`
38808    # bat and cmd files are not always considered executable in MSYS causing which
38809    # to not find them
38810    if test "x$new_path" = x \
38811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38813      new_path="$path"
38814
38815  windows_path="$new_path"
38816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38817    unix_path=`$CYGPATH -u "$windows_path"`
38818    new_path="$unix_path"
38819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38821    new_path="$unix_path"
38822  fi
38823
38824    fi
38825
38826    if test "x$new_path" = x; then
38827      # It's still not found. Now this is an unrecoverable error.
38828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38829$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38830      has_space=`$ECHO "$complete" | $GREP " "`
38831      if test "x$has_space" != x; then
38832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38834      fi
38835      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38836    fi
38837  fi
38838
38839  # Now new_path has a complete unix path to the binary
38840  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38841    # Keep paths in /bin as-is, but remove trailing .exe if any
38842    new_path="${new_path/%.exe/}"
38843    # Do not save /bin paths to all_fixpath_prefixes!
38844  else
38845    # Not in mixed or Windows style, start by that.
38846    new_path=`cmd //c echo $new_path`
38847
38848  input_path="$new_path"
38849  # Check if we need to convert this using DOS-style short mode. If the path
38850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38851  # take no chances and rewrite it.
38852  # Note: m4 eats our [], so we need to use [ and ] instead.
38853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38854  if test "x$has_forbidden_chars" != x; then
38855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38857  fi
38858
38859    # Output is in $new_path
38860
38861  windows_path="$new_path"
38862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38863    unix_path=`$CYGPATH -u "$windows_path"`
38864    new_path="$unix_path"
38865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38867    new_path="$unix_path"
38868  fi
38869
38870    # remove trailing .exe if any
38871    new_path="${new_path/%.exe/}"
38872
38873    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38874    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38875  fi
38876
38877    else
38878      # We're on a unix platform. Hooray! :)
38879      # First separate the path from the arguments. This will split at the first
38880      # space.
38881      complete="$MT"
38882      path="${complete%% *}"
38883      tmp="$complete EOL"
38884      arguments="${tmp#* }"
38885
38886      # Cannot rely on the command "which" here since it doesn't always work.
38887      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38888      if test -z "$is_absolute_path"; then
38889        # Path to executable is not absolute. Find it.
38890        IFS_save="$IFS"
38891        IFS=:
38892        for p in $PATH; do
38893          if test -f "$p/$path" && test -x "$p/$path"; then
38894            new_path="$p/$path"
38895            break
38896          fi
38897        done
38898        IFS="$IFS_save"
38899      else
38900        # This is an absolute path, we can use it without further modifications.
38901        new_path="$path"
38902      fi
38903
38904      if test "x$new_path" = x; then
38905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38906$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38907        has_space=`$ECHO "$complete" | $GREP " "`
38908        if test "x$has_space" != x; then
38909          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38910$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38911        fi
38912        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38913      fi
38914    fi
38915
38916    # Now join together the path and the arguments once again
38917    if test "x$arguments" != xEOL; then
38918      new_complete="$new_path ${arguments% *}"
38919    else
38920      new_complete="$new_path"
38921    fi
38922
38923    if test "x$complete" != "x$new_complete"; then
38924      MT="$new_complete"
38925      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38926$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38927    fi
38928  fi
38929
38930    # Setup the resource compiler (RC)
38931    # Extract the first word of "rc", so it can be a program name with args.
38932set dummy rc; ac_word=$2
38933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38934$as_echo_n "checking for $ac_word... " >&6; }
38935if ${ac_cv_prog_RC+:} false; then :
38936  $as_echo_n "(cached) " >&6
38937else
38938  if test -n "$RC"; then
38939  ac_cv_prog_RC="$RC" # Let the user override the test.
38940else
38941  ac_prog_rejected=no
38942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38943for as_dir in $PATH
38944do
38945  IFS=$as_save_IFS
38946  test -z "$as_dir" && as_dir=.
38947    for ac_exec_ext in '' $ac_executable_extensions; do
38948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38949    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38950       ac_prog_rejected=yes
38951       continue
38952     fi
38953    ac_cv_prog_RC="rc"
38954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38955    break 2
38956  fi
38957done
38958  done
38959IFS=$as_save_IFS
38960
38961if test $ac_prog_rejected = yes; then
38962  # We found a bogon in the path, so make sure we never use it.
38963  set dummy $ac_cv_prog_RC
38964  shift
38965  if test $# != 0; then
38966    # We chose a different compiler from the bogus one.
38967    # However, it has the same basename, so the bogon will be chosen
38968    # first if we set RC to just the basename; use the full file name.
38969    shift
38970    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38971  fi
38972fi
38973fi
38974fi
38975RC=$ac_cv_prog_RC
38976if test -n "$RC"; then
38977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38978$as_echo "$RC" >&6; }
38979else
38980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38981$as_echo "no" >&6; }
38982fi
38983
38984
38985
38986  # Only process if variable expands to non-empty
38987
38988  if test "x$RC" != x; then
38989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38990
38991  # First separate the path from the arguments. This will split at the first
38992  # space.
38993  complete="$RC"
38994  path="${complete%% *}"
38995  tmp="$complete EOL"
38996  arguments="${tmp#* }"
38997
38998  # Input might be given as Windows format, start by converting to
38999  # unix format.
39000  new_path=`$CYGPATH -u "$path"`
39001
39002  # Now try to locate executable using which
39003  new_path=`$WHICH "$new_path" 2> /dev/null`
39004  # bat and cmd files are not always considered executable in cygwin causing which
39005  # to not find them
39006  if test "x$new_path" = x \
39007      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39008      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39009    new_path=`$CYGPATH -u "$path"`
39010  fi
39011  if test "x$new_path" = x; then
39012    # Oops. Which didn't find the executable.
39013    # The splitting of arguments from the executable at a space might have been incorrect,
39014    # since paths with space are more likely in Windows. Give it another try with the whole
39015    # argument.
39016    path="$complete"
39017    arguments="EOL"
39018    new_path=`$CYGPATH -u "$path"`
39019    new_path=`$WHICH "$new_path" 2> /dev/null`
39020    # bat and cmd files are not always considered executable in cygwin causing which
39021    # to not find them
39022    if test "x$new_path" = x \
39023        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39024        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39025      new_path=`$CYGPATH -u "$path"`
39026    fi
39027    if test "x$new_path" = x; then
39028      # It's still not found. Now this is an unrecoverable error.
39029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39030$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39031      has_space=`$ECHO "$complete" | $GREP " "`
39032      if test "x$has_space" != x; then
39033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39035      fi
39036      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39037    fi
39038  fi
39039
39040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39043  # "foo.exe" is OK but "foo" is an error.
39044  #
39045  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39046  # It is also a way to make sure we got the proper file name for the real test later on.
39047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39048  if test "x$test_shortpath" = x; then
39049    # Short path failed, file does not exist as specified.
39050    # Try adding .exe or .cmd
39051    if test -f "${new_path}.exe"; then
39052      input_to_shortpath="${new_path}.exe"
39053    elif test -f "${new_path}.cmd"; then
39054      input_to_shortpath="${new_path}.cmd"
39055    else
39056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39057$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39060      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39061    fi
39062  else
39063    input_to_shortpath="$new_path"
39064  fi
39065
39066  # Call helper function which possibly converts this using DOS-style short mode.
39067  # If so, the updated path is stored in $new_path.
39068  new_path="$input_to_shortpath"
39069
39070  input_path="$input_to_shortpath"
39071  # Check if we need to convert this using DOS-style short mode. If the path
39072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39073  # take no chances and rewrite it.
39074  # Note: m4 eats our [], so we need to use [ and ] instead.
39075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39076  if test "x$has_forbidden_chars" != x; then
39077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39081      # Going to short mode and back again did indeed matter. Since short mode is
39082      # case insensitive, let's make it lowercase to improve readability.
39083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39084      # Now convert it back to Unix-style (cygpath)
39085      input_path=`$CYGPATH -u "$shortmode_path"`
39086      new_path="$input_path"
39087    fi
39088  fi
39089
39090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39091  if test "x$test_cygdrive_prefix" = x; then
39092    # As a simple fix, exclude /usr/bin since it's not a real path.
39093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39095      # a path prefixed by /cygdrive for fixpath to work.
39096      new_path="$CYGWIN_ROOT_PATH$input_path"
39097    fi
39098  fi
39099
39100  # remove trailing .exe if any
39101  new_path="${new_path/%.exe/}"
39102
39103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39104
39105  # First separate the path from the arguments. This will split at the first
39106  # space.
39107  complete="$RC"
39108  path="${complete%% *}"
39109  tmp="$complete EOL"
39110  arguments="${tmp#* }"
39111
39112  # Input might be given as Windows format, start by converting to
39113  # unix format.
39114  new_path="$path"
39115
39116  windows_path="$new_path"
39117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39118    unix_path=`$CYGPATH -u "$windows_path"`
39119    new_path="$unix_path"
39120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39122    new_path="$unix_path"
39123  fi
39124
39125
39126  # Now try to locate executable using which
39127  new_path=`$WHICH "$new_path" 2> /dev/null`
39128
39129  if test "x$new_path" = x; then
39130    # Oops. Which didn't find the executable.
39131    # The splitting of arguments from the executable at a space might have been incorrect,
39132    # since paths with space are more likely in Windows. Give it another try with the whole
39133    # argument.
39134    path="$complete"
39135    arguments="EOL"
39136    new_path="$path"
39137
39138  windows_path="$new_path"
39139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39140    unix_path=`$CYGPATH -u "$windows_path"`
39141    new_path="$unix_path"
39142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39144    new_path="$unix_path"
39145  fi
39146
39147
39148    new_path=`$WHICH "$new_path" 2> /dev/null`
39149    # bat and cmd files are not always considered executable in MSYS causing which
39150    # to not find them
39151    if test "x$new_path" = x \
39152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39154      new_path="$path"
39155
39156  windows_path="$new_path"
39157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39158    unix_path=`$CYGPATH -u "$windows_path"`
39159    new_path="$unix_path"
39160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39162    new_path="$unix_path"
39163  fi
39164
39165    fi
39166
39167    if test "x$new_path" = x; then
39168      # It's still not found. Now this is an unrecoverable error.
39169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39170$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39171      has_space=`$ECHO "$complete" | $GREP " "`
39172      if test "x$has_space" != x; then
39173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39175      fi
39176      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39177    fi
39178  fi
39179
39180  # Now new_path has a complete unix path to the binary
39181  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39182    # Keep paths in /bin as-is, but remove trailing .exe if any
39183    new_path="${new_path/%.exe/}"
39184    # Do not save /bin paths to all_fixpath_prefixes!
39185  else
39186    # Not in mixed or Windows style, start by that.
39187    new_path=`cmd //c echo $new_path`
39188
39189  input_path="$new_path"
39190  # Check if we need to convert this using DOS-style short mode. If the path
39191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39192  # take no chances and rewrite it.
39193  # Note: m4 eats our [], so we need to use [ and ] instead.
39194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39195  if test "x$has_forbidden_chars" != x; then
39196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39198  fi
39199
39200    # Output is in $new_path
39201
39202  windows_path="$new_path"
39203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39204    unix_path=`$CYGPATH -u "$windows_path"`
39205    new_path="$unix_path"
39206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39208    new_path="$unix_path"
39209  fi
39210
39211    # remove trailing .exe if any
39212    new_path="${new_path/%.exe/}"
39213
39214    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39215    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39216  fi
39217
39218    else
39219      # We're on a unix platform. Hooray! :)
39220      # First separate the path from the arguments. This will split at the first
39221      # space.
39222      complete="$RC"
39223      path="${complete%% *}"
39224      tmp="$complete EOL"
39225      arguments="${tmp#* }"
39226
39227      # Cannot rely on the command "which" here since it doesn't always work.
39228      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39229      if test -z "$is_absolute_path"; then
39230        # Path to executable is not absolute. Find it.
39231        IFS_save="$IFS"
39232        IFS=:
39233        for p in $PATH; do
39234          if test -f "$p/$path" && test -x "$p/$path"; then
39235            new_path="$p/$path"
39236            break
39237          fi
39238        done
39239        IFS="$IFS_save"
39240      else
39241        # This is an absolute path, we can use it without further modifications.
39242        new_path="$path"
39243      fi
39244
39245      if test "x$new_path" = x; then
39246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39247$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39248        has_space=`$ECHO "$complete" | $GREP " "`
39249        if test "x$has_space" != x; then
39250          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39251$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39252        fi
39253        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39254      fi
39255    fi
39256
39257    # Now join together the path and the arguments once again
39258    if test "x$arguments" != xEOL; then
39259      new_complete="$new_path ${arguments% *}"
39260    else
39261      new_complete="$new_path"
39262    fi
39263
39264    if test "x$complete" != "x$new_complete"; then
39265      RC="$new_complete"
39266      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39267$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39268    fi
39269  fi
39270
39271    # Extract the first word of "dumpbin", so it can be a program name with args.
39272set dummy dumpbin; ac_word=$2
39273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39274$as_echo_n "checking for $ac_word... " >&6; }
39275if ${ac_cv_prog_DUMPBIN+:} false; then :
39276  $as_echo_n "(cached) " >&6
39277else
39278  if test -n "$DUMPBIN"; then
39279  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39280else
39281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39282for as_dir in $PATH
39283do
39284  IFS=$as_save_IFS
39285  test -z "$as_dir" && as_dir=.
39286    for ac_exec_ext in '' $ac_executable_extensions; do
39287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39288    ac_cv_prog_DUMPBIN="dumpbin"
39289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39290    break 2
39291  fi
39292done
39293  done
39294IFS=$as_save_IFS
39295
39296fi
39297fi
39298DUMPBIN=$ac_cv_prog_DUMPBIN
39299if test -n "$DUMPBIN"; then
39300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39301$as_echo "$DUMPBIN" >&6; }
39302else
39303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39304$as_echo "no" >&6; }
39305fi
39306
39307
39308
39309  # Only process if variable expands to non-empty
39310
39311  if test "x$DUMPBIN" != x; then
39312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39313
39314  # First separate the path from the arguments. This will split at the first
39315  # space.
39316  complete="$DUMPBIN"
39317  path="${complete%% *}"
39318  tmp="$complete EOL"
39319  arguments="${tmp#* }"
39320
39321  # Input might be given as Windows format, start by converting to
39322  # unix format.
39323  new_path=`$CYGPATH -u "$path"`
39324
39325  # Now try to locate executable using which
39326  new_path=`$WHICH "$new_path" 2> /dev/null`
39327  # bat and cmd files are not always considered executable in cygwin causing which
39328  # to not find them
39329  if test "x$new_path" = x \
39330      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39331      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39332    new_path=`$CYGPATH -u "$path"`
39333  fi
39334  if test "x$new_path" = x; then
39335    # Oops. Which didn't find the executable.
39336    # The splitting of arguments from the executable at a space might have been incorrect,
39337    # since paths with space are more likely in Windows. Give it another try with the whole
39338    # argument.
39339    path="$complete"
39340    arguments="EOL"
39341    new_path=`$CYGPATH -u "$path"`
39342    new_path=`$WHICH "$new_path" 2> /dev/null`
39343    # bat and cmd files are not always considered executable in cygwin causing which
39344    # to not find them
39345    if test "x$new_path" = x \
39346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39348      new_path=`$CYGPATH -u "$path"`
39349    fi
39350    if test "x$new_path" = x; then
39351      # It's still not found. Now this is an unrecoverable error.
39352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39353$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39354      has_space=`$ECHO "$complete" | $GREP " "`
39355      if test "x$has_space" != x; then
39356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39358      fi
39359      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39360    fi
39361  fi
39362
39363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39366  # "foo.exe" is OK but "foo" is an error.
39367  #
39368  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39369  # It is also a way to make sure we got the proper file name for the real test later on.
39370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39371  if test "x$test_shortpath" = x; then
39372    # Short path failed, file does not exist as specified.
39373    # Try adding .exe or .cmd
39374    if test -f "${new_path}.exe"; then
39375      input_to_shortpath="${new_path}.exe"
39376    elif test -f "${new_path}.cmd"; then
39377      input_to_shortpath="${new_path}.cmd"
39378    else
39379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39380$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39381      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39382$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39383      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39384    fi
39385  else
39386    input_to_shortpath="$new_path"
39387  fi
39388
39389  # Call helper function which possibly converts this using DOS-style short mode.
39390  # If so, the updated path is stored in $new_path.
39391  new_path="$input_to_shortpath"
39392
39393  input_path="$input_to_shortpath"
39394  # Check if we need to convert this using DOS-style short mode. If the path
39395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39396  # take no chances and rewrite it.
39397  # Note: m4 eats our [], so we need to use [ and ] instead.
39398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39399  if test "x$has_forbidden_chars" != x; then
39400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39404      # Going to short mode and back again did indeed matter. Since short mode is
39405      # case insensitive, let's make it lowercase to improve readability.
39406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39407      # Now convert it back to Unix-style (cygpath)
39408      input_path=`$CYGPATH -u "$shortmode_path"`
39409      new_path="$input_path"
39410    fi
39411  fi
39412
39413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39414  if test "x$test_cygdrive_prefix" = x; then
39415    # As a simple fix, exclude /usr/bin since it's not a real path.
39416    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39418      # a path prefixed by /cygdrive for fixpath to work.
39419      new_path="$CYGWIN_ROOT_PATH$input_path"
39420    fi
39421  fi
39422
39423  # remove trailing .exe if any
39424  new_path="${new_path/%.exe/}"
39425
39426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39427
39428  # First separate the path from the arguments. This will split at the first
39429  # space.
39430  complete="$DUMPBIN"
39431  path="${complete%% *}"
39432  tmp="$complete EOL"
39433  arguments="${tmp#* }"
39434
39435  # Input might be given as Windows format, start by converting to
39436  # unix format.
39437  new_path="$path"
39438
39439  windows_path="$new_path"
39440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39441    unix_path=`$CYGPATH -u "$windows_path"`
39442    new_path="$unix_path"
39443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39445    new_path="$unix_path"
39446  fi
39447
39448
39449  # Now try to locate executable using which
39450  new_path=`$WHICH "$new_path" 2> /dev/null`
39451
39452  if test "x$new_path" = x; then
39453    # Oops. Which didn't find the executable.
39454    # The splitting of arguments from the executable at a space might have been incorrect,
39455    # since paths with space are more likely in Windows. Give it another try with the whole
39456    # argument.
39457    path="$complete"
39458    arguments="EOL"
39459    new_path="$path"
39460
39461  windows_path="$new_path"
39462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39463    unix_path=`$CYGPATH -u "$windows_path"`
39464    new_path="$unix_path"
39465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39467    new_path="$unix_path"
39468  fi
39469
39470
39471    new_path=`$WHICH "$new_path" 2> /dev/null`
39472    # bat and cmd files are not always considered executable in MSYS causing which
39473    # to not find them
39474    if test "x$new_path" = x \
39475        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39476        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39477      new_path="$path"
39478
39479  windows_path="$new_path"
39480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39481    unix_path=`$CYGPATH -u "$windows_path"`
39482    new_path="$unix_path"
39483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39485    new_path="$unix_path"
39486  fi
39487
39488    fi
39489
39490    if test "x$new_path" = x; then
39491      # It's still not found. Now this is an unrecoverable error.
39492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39493$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39494      has_space=`$ECHO "$complete" | $GREP " "`
39495      if test "x$has_space" != x; then
39496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39498      fi
39499      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39500    fi
39501  fi
39502
39503  # Now new_path has a complete unix path to the binary
39504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39505    # Keep paths in /bin as-is, but remove trailing .exe if any
39506    new_path="${new_path/%.exe/}"
39507    # Do not save /bin paths to all_fixpath_prefixes!
39508  else
39509    # Not in mixed or Windows style, start by that.
39510    new_path=`cmd //c echo $new_path`
39511
39512  input_path="$new_path"
39513  # Check if we need to convert this using DOS-style short mode. If the path
39514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39515  # take no chances and rewrite it.
39516  # Note: m4 eats our [], so we need to use [ and ] instead.
39517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39518  if test "x$has_forbidden_chars" != x; then
39519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39521  fi
39522
39523    # Output is in $new_path
39524
39525  windows_path="$new_path"
39526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39527    unix_path=`$CYGPATH -u "$windows_path"`
39528    new_path="$unix_path"
39529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39531    new_path="$unix_path"
39532  fi
39533
39534    # remove trailing .exe if any
39535    new_path="${new_path/%.exe/}"
39536
39537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39539  fi
39540
39541    else
39542      # We're on a unix platform. Hooray! :)
39543      # First separate the path from the arguments. This will split at the first
39544      # space.
39545      complete="$DUMPBIN"
39546      path="${complete%% *}"
39547      tmp="$complete EOL"
39548      arguments="${tmp#* }"
39549
39550      # Cannot rely on the command "which" here since it doesn't always work.
39551      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39552      if test -z "$is_absolute_path"; then
39553        # Path to executable is not absolute. Find it.
39554        IFS_save="$IFS"
39555        IFS=:
39556        for p in $PATH; do
39557          if test -f "$p/$path" && test -x "$p/$path"; then
39558            new_path="$p/$path"
39559            break
39560          fi
39561        done
39562        IFS="$IFS_save"
39563      else
39564        # This is an absolute path, we can use it without further modifications.
39565        new_path="$path"
39566      fi
39567
39568      if test "x$new_path" = x; then
39569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39570$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39571        has_space=`$ECHO "$complete" | $GREP " "`
39572        if test "x$has_space" != x; then
39573          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39575        fi
39576        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39577      fi
39578    fi
39579
39580    # Now join together the path and the arguments once again
39581    if test "x$arguments" != xEOL; then
39582      new_complete="$new_path ${arguments% *}"
39583    else
39584      new_complete="$new_path"
39585    fi
39586
39587    if test "x$complete" != "x$new_complete"; then
39588      DUMPBIN="$new_complete"
39589      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39590$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39591    fi
39592  fi
39593
39594    # We need to check for 'msbuild.exe' because at the place where we expect to
39595    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39596    # won't find the 'msbuild.exe' executable in that case (and the
39597    # 'ac_executable_extensions' is unusable due to performance reasons).
39598    # Notice that we intentionally don't fix up the path to MSBUILD because we
39599    # will call it in a DOS shell during freetype detection on Windows (see
39600    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39601    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39602set dummy msbuild.exe; ac_word=$2
39603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39604$as_echo_n "checking for $ac_word... " >&6; }
39605if ${ac_cv_prog_MSBUILD+:} false; then :
39606  $as_echo_n "(cached) " >&6
39607else
39608  if test -n "$MSBUILD"; then
39609  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39610else
39611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39612for as_dir in $PATH
39613do
39614  IFS=$as_save_IFS
39615  test -z "$as_dir" && as_dir=.
39616    for ac_exec_ext in '' $ac_executable_extensions; do
39617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39618    ac_cv_prog_MSBUILD="msbuild.exe"
39619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39620    break 2
39621  fi
39622done
39623  done
39624IFS=$as_save_IFS
39625
39626fi
39627fi
39628MSBUILD=$ac_cv_prog_MSBUILD
39629if test -n "$MSBUILD"; then
39630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39631$as_echo "$MSBUILD" >&6; }
39632else
39633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39634$as_echo "no" >&6; }
39635fi
39636
39637
39638  fi
39639
39640  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39641
39642
39643  # Publish this variable in the help.
39644
39645
39646  if [ -z "${STRIP+x}" ]; then
39647    # The variable is not set by user, try to locate tool using the code snippet
39648    for ac_prog in strip
39649do
39650  # Extract the first word of "$ac_prog", so it can be a program name with args.
39651set dummy $ac_prog; ac_word=$2
39652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39653$as_echo_n "checking for $ac_word... " >&6; }
39654if ${ac_cv_path_STRIP+:} false; then :
39655  $as_echo_n "(cached) " >&6
39656else
39657  case $STRIP in
39658  [\\/]* | ?:[\\/]*)
39659  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39660  ;;
39661  *)
39662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39663for as_dir in $PATH
39664do
39665  IFS=$as_save_IFS
39666  test -z "$as_dir" && as_dir=.
39667    for ac_exec_ext in '' $ac_executable_extensions; do
39668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39669    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39671    break 2
39672  fi
39673done
39674  done
39675IFS=$as_save_IFS
39676
39677  ;;
39678esac
39679fi
39680STRIP=$ac_cv_path_STRIP
39681if test -n "$STRIP"; then
39682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39683$as_echo "$STRIP" >&6; }
39684else
39685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39686$as_echo "no" >&6; }
39687fi
39688
39689
39690  test -n "$STRIP" && break
39691done
39692
39693  else
39694    # The variable is set, but is it from the command line or the environment?
39695
39696    # Try to remove the string !STRIP! from our list.
39697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39699      # If it failed, the variable was not from the command line. Ignore it,
39700      # but warn the user (except for BASH, which is always set by the calling BASH).
39701      if test "xSTRIP" != xBASH; then
39702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39703$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39704      fi
39705      # Try to locate tool using the code snippet
39706      for ac_prog in strip
39707do
39708  # Extract the first word of "$ac_prog", so it can be a program name with args.
39709set dummy $ac_prog; ac_word=$2
39710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39711$as_echo_n "checking for $ac_word... " >&6; }
39712if ${ac_cv_path_STRIP+:} false; then :
39713  $as_echo_n "(cached) " >&6
39714else
39715  case $STRIP in
39716  [\\/]* | ?:[\\/]*)
39717  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39718  ;;
39719  *)
39720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39721for as_dir in $PATH
39722do
39723  IFS=$as_save_IFS
39724  test -z "$as_dir" && as_dir=.
39725    for ac_exec_ext in '' $ac_executable_extensions; do
39726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39727    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39729    break 2
39730  fi
39731done
39732  done
39733IFS=$as_save_IFS
39734
39735  ;;
39736esac
39737fi
39738STRIP=$ac_cv_path_STRIP
39739if test -n "$STRIP"; then
39740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39741$as_echo "$STRIP" >&6; }
39742else
39743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39744$as_echo "no" >&6; }
39745fi
39746
39747
39748  test -n "$STRIP" && break
39749done
39750
39751    else
39752      # If it succeeded, then it was overridden by the user. We will use it
39753      # for the tool.
39754
39755      # First remove it from the list of overridden variables, so we can test
39756      # for unknown variables in the end.
39757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39758
39759      # Check if we try to supply an empty value
39760      if test "x$STRIP" = x; then
39761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39762$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39764$as_echo_n "checking for STRIP... " >&6; }
39765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39766$as_echo "disabled" >&6; }
39767      else
39768        # Check if the provided tool contains a complete path.
39769        tool_specified="$STRIP"
39770        tool_basename="${tool_specified##*/}"
39771        if test "x$tool_basename" = "x$tool_specified"; then
39772          # A command without a complete path is provided, search $PATH.
39773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39774$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39775          # Extract the first word of "$tool_basename", so it can be a program name with args.
39776set dummy $tool_basename; ac_word=$2
39777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39778$as_echo_n "checking for $ac_word... " >&6; }
39779if ${ac_cv_path_STRIP+:} false; then :
39780  $as_echo_n "(cached) " >&6
39781else
39782  case $STRIP in
39783  [\\/]* | ?:[\\/]*)
39784  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39785  ;;
39786  *)
39787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39788for as_dir in $PATH
39789do
39790  IFS=$as_save_IFS
39791  test -z "$as_dir" && as_dir=.
39792    for ac_exec_ext in '' $ac_executable_extensions; do
39793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39794    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39796    break 2
39797  fi
39798done
39799  done
39800IFS=$as_save_IFS
39801
39802  ;;
39803esac
39804fi
39805STRIP=$ac_cv_path_STRIP
39806if test -n "$STRIP"; then
39807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39808$as_echo "$STRIP" >&6; }
39809else
39810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39811$as_echo "no" >&6; }
39812fi
39813
39814
39815          if test "x$STRIP" = x; then
39816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39817          fi
39818        else
39819          # Otherwise we believe it is a complete path. Use it as it is.
39820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39821$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39823$as_echo_n "checking for STRIP... " >&6; }
39824          if test ! -x "$tool_specified"; then
39825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39826$as_echo "not found" >&6; }
39827            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39828          fi
39829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39830$as_echo "$tool_specified" >&6; }
39831        fi
39832      fi
39833    fi
39834
39835  fi
39836
39837
39838
39839  # Only process if variable expands to non-empty
39840
39841  if test "x$STRIP" != x; then
39842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39843
39844  # First separate the path from the arguments. This will split at the first
39845  # space.
39846  complete="$STRIP"
39847  path="${complete%% *}"
39848  tmp="$complete EOL"
39849  arguments="${tmp#* }"
39850
39851  # Input might be given as Windows format, start by converting to
39852  # unix format.
39853  new_path=`$CYGPATH -u "$path"`
39854
39855  # Now try to locate executable using which
39856  new_path=`$WHICH "$new_path" 2> /dev/null`
39857  # bat and cmd files are not always considered executable in cygwin causing which
39858  # to not find them
39859  if test "x$new_path" = x \
39860      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39861      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39862    new_path=`$CYGPATH -u "$path"`
39863  fi
39864  if test "x$new_path" = x; then
39865    # Oops. Which didn't find the executable.
39866    # The splitting of arguments from the executable at a space might have been incorrect,
39867    # since paths with space are more likely in Windows. Give it another try with the whole
39868    # argument.
39869    path="$complete"
39870    arguments="EOL"
39871    new_path=`$CYGPATH -u "$path"`
39872    new_path=`$WHICH "$new_path" 2> /dev/null`
39873    # bat and cmd files are not always considered executable in cygwin causing which
39874    # to not find them
39875    if test "x$new_path" = x \
39876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39878      new_path=`$CYGPATH -u "$path"`
39879    fi
39880    if test "x$new_path" = x; then
39881      # It's still not found. Now this is an unrecoverable error.
39882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39883$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39884      has_space=`$ECHO "$complete" | $GREP " "`
39885      if test "x$has_space" != x; then
39886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39888      fi
39889      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39890    fi
39891  fi
39892
39893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39896  # "foo.exe" is OK but "foo" is an error.
39897  #
39898  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39899  # It is also a way to make sure we got the proper file name for the real test later on.
39900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39901  if test "x$test_shortpath" = x; then
39902    # Short path failed, file does not exist as specified.
39903    # Try adding .exe or .cmd
39904    if test -f "${new_path}.exe"; then
39905      input_to_shortpath="${new_path}.exe"
39906    elif test -f "${new_path}.cmd"; then
39907      input_to_shortpath="${new_path}.cmd"
39908    else
39909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39910$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39911      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39912$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39913      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39914    fi
39915  else
39916    input_to_shortpath="$new_path"
39917  fi
39918
39919  # Call helper function which possibly converts this using DOS-style short mode.
39920  # If so, the updated path is stored in $new_path.
39921  new_path="$input_to_shortpath"
39922
39923  input_path="$input_to_shortpath"
39924  # Check if we need to convert this using DOS-style short mode. If the path
39925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39926  # take no chances and rewrite it.
39927  # Note: m4 eats our [], so we need to use [ and ] instead.
39928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39929  if test "x$has_forbidden_chars" != x; then
39930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39934      # Going to short mode and back again did indeed matter. Since short mode is
39935      # case insensitive, let's make it lowercase to improve readability.
39936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39937      # Now convert it back to Unix-style (cygpath)
39938      input_path=`$CYGPATH -u "$shortmode_path"`
39939      new_path="$input_path"
39940    fi
39941  fi
39942
39943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39944  if test "x$test_cygdrive_prefix" = x; then
39945    # As a simple fix, exclude /usr/bin since it's not a real path.
39946    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39948      # a path prefixed by /cygdrive for fixpath to work.
39949      new_path="$CYGWIN_ROOT_PATH$input_path"
39950    fi
39951  fi
39952
39953  # remove trailing .exe if any
39954  new_path="${new_path/%.exe/}"
39955
39956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39957
39958  # First separate the path from the arguments. This will split at the first
39959  # space.
39960  complete="$STRIP"
39961  path="${complete%% *}"
39962  tmp="$complete EOL"
39963  arguments="${tmp#* }"
39964
39965  # Input might be given as Windows format, start by converting to
39966  # unix format.
39967  new_path="$path"
39968
39969  windows_path="$new_path"
39970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39971    unix_path=`$CYGPATH -u "$windows_path"`
39972    new_path="$unix_path"
39973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39975    new_path="$unix_path"
39976  fi
39977
39978
39979  # Now try to locate executable using which
39980  new_path=`$WHICH "$new_path" 2> /dev/null`
39981
39982  if test "x$new_path" = x; then
39983    # Oops. Which didn't find the executable.
39984    # The splitting of arguments from the executable at a space might have been incorrect,
39985    # since paths with space are more likely in Windows. Give it another try with the whole
39986    # argument.
39987    path="$complete"
39988    arguments="EOL"
39989    new_path="$path"
39990
39991  windows_path="$new_path"
39992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39993    unix_path=`$CYGPATH -u "$windows_path"`
39994    new_path="$unix_path"
39995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39997    new_path="$unix_path"
39998  fi
39999
40000
40001    new_path=`$WHICH "$new_path" 2> /dev/null`
40002    # bat and cmd files are not always considered executable in MSYS causing which
40003    # to not find them
40004    if test "x$new_path" = x \
40005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40007      new_path="$path"
40008
40009  windows_path="$new_path"
40010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40011    unix_path=`$CYGPATH -u "$windows_path"`
40012    new_path="$unix_path"
40013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40015    new_path="$unix_path"
40016  fi
40017
40018    fi
40019
40020    if test "x$new_path" = x; then
40021      # It's still not found. Now this is an unrecoverable error.
40022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40023$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40024      has_space=`$ECHO "$complete" | $GREP " "`
40025      if test "x$has_space" != x; then
40026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40028      fi
40029      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40030    fi
40031  fi
40032
40033  # Now new_path has a complete unix path to the binary
40034  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40035    # Keep paths in /bin as-is, but remove trailing .exe if any
40036    new_path="${new_path/%.exe/}"
40037    # Do not save /bin paths to all_fixpath_prefixes!
40038  else
40039    # Not in mixed or Windows style, start by that.
40040    new_path=`cmd //c echo $new_path`
40041
40042  input_path="$new_path"
40043  # Check if we need to convert this using DOS-style short mode. If the path
40044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40045  # take no chances and rewrite it.
40046  # Note: m4 eats our [], so we need to use [ and ] instead.
40047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40048  if test "x$has_forbidden_chars" != x; then
40049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40051  fi
40052
40053    # Output is in $new_path
40054
40055  windows_path="$new_path"
40056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40057    unix_path=`$CYGPATH -u "$windows_path"`
40058    new_path="$unix_path"
40059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40061    new_path="$unix_path"
40062  fi
40063
40064    # remove trailing .exe if any
40065    new_path="${new_path/%.exe/}"
40066
40067    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40068    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40069  fi
40070
40071    else
40072      # We're on a unix platform. Hooray! :)
40073      # First separate the path from the arguments. This will split at the first
40074      # space.
40075      complete="$STRIP"
40076      path="${complete%% *}"
40077      tmp="$complete EOL"
40078      arguments="${tmp#* }"
40079
40080      # Cannot rely on the command "which" here since it doesn't always work.
40081      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40082      if test -z "$is_absolute_path"; then
40083        # Path to executable is not absolute. Find it.
40084        IFS_save="$IFS"
40085        IFS=:
40086        for p in $PATH; do
40087          if test -f "$p/$path" && test -x "$p/$path"; then
40088            new_path="$p/$path"
40089            break
40090          fi
40091        done
40092        IFS="$IFS_save"
40093      else
40094        # This is an absolute path, we can use it without further modifications.
40095        new_path="$path"
40096      fi
40097
40098      if test "x$new_path" = x; then
40099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40100$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40101        has_space=`$ECHO "$complete" | $GREP " "`
40102        if test "x$has_space" != x; then
40103          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40104$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40105        fi
40106        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40107      fi
40108    fi
40109
40110    # Now join together the path and the arguments once again
40111    if test "x$arguments" != xEOL; then
40112      new_complete="$new_path ${arguments% *}"
40113    else
40114      new_complete="$new_path"
40115    fi
40116
40117    if test "x$complete" != "x$new_complete"; then
40118      STRIP="$new_complete"
40119      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40120$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40121    fi
40122  fi
40123
40124
40125
40126  # Publish this variable in the help.
40127
40128
40129  if [ -z "${NM+x}" ]; then
40130    # The variable is not set by user, try to locate tool using the code snippet
40131    for ac_prog in nm
40132do
40133  # Extract the first word of "$ac_prog", so it can be a program name with args.
40134set dummy $ac_prog; ac_word=$2
40135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40136$as_echo_n "checking for $ac_word... " >&6; }
40137if ${ac_cv_path_NM+:} false; then :
40138  $as_echo_n "(cached) " >&6
40139else
40140  case $NM in
40141  [\\/]* | ?:[\\/]*)
40142  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40143  ;;
40144  *)
40145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40146for as_dir in $PATH
40147do
40148  IFS=$as_save_IFS
40149  test -z "$as_dir" && as_dir=.
40150    for ac_exec_ext in '' $ac_executable_extensions; do
40151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40152    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40154    break 2
40155  fi
40156done
40157  done
40158IFS=$as_save_IFS
40159
40160  ;;
40161esac
40162fi
40163NM=$ac_cv_path_NM
40164if test -n "$NM"; then
40165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40166$as_echo "$NM" >&6; }
40167else
40168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40169$as_echo "no" >&6; }
40170fi
40171
40172
40173  test -n "$NM" && break
40174done
40175
40176  else
40177    # The variable is set, but is it from the command line or the environment?
40178
40179    # Try to remove the string !NM! from our list.
40180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40182      # If it failed, the variable was not from the command line. Ignore it,
40183      # but warn the user (except for BASH, which is always set by the calling BASH).
40184      if test "xNM" != xBASH; then
40185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40186$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40187      fi
40188      # Try to locate tool using the code snippet
40189      for ac_prog in nm
40190do
40191  # Extract the first word of "$ac_prog", so it can be a program name with args.
40192set dummy $ac_prog; ac_word=$2
40193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40194$as_echo_n "checking for $ac_word... " >&6; }
40195if ${ac_cv_path_NM+:} false; then :
40196  $as_echo_n "(cached) " >&6
40197else
40198  case $NM in
40199  [\\/]* | ?:[\\/]*)
40200  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40201  ;;
40202  *)
40203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40204for as_dir in $PATH
40205do
40206  IFS=$as_save_IFS
40207  test -z "$as_dir" && as_dir=.
40208    for ac_exec_ext in '' $ac_executable_extensions; do
40209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40210    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40212    break 2
40213  fi
40214done
40215  done
40216IFS=$as_save_IFS
40217
40218  ;;
40219esac
40220fi
40221NM=$ac_cv_path_NM
40222if test -n "$NM"; then
40223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40224$as_echo "$NM" >&6; }
40225else
40226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40227$as_echo "no" >&6; }
40228fi
40229
40230
40231  test -n "$NM" && break
40232done
40233
40234    else
40235      # If it succeeded, then it was overridden by the user. We will use it
40236      # for the tool.
40237
40238      # First remove it from the list of overridden variables, so we can test
40239      # for unknown variables in the end.
40240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40241
40242      # Check if we try to supply an empty value
40243      if test "x$NM" = x; then
40244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40245$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40247$as_echo_n "checking for NM... " >&6; }
40248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40249$as_echo "disabled" >&6; }
40250      else
40251        # Check if the provided tool contains a complete path.
40252        tool_specified="$NM"
40253        tool_basename="${tool_specified##*/}"
40254        if test "x$tool_basename" = "x$tool_specified"; then
40255          # A command without a complete path is provided, search $PATH.
40256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40257$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40258          # Extract the first word of "$tool_basename", so it can be a program name with args.
40259set dummy $tool_basename; ac_word=$2
40260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40261$as_echo_n "checking for $ac_word... " >&6; }
40262if ${ac_cv_path_NM+:} false; then :
40263  $as_echo_n "(cached) " >&6
40264else
40265  case $NM in
40266  [\\/]* | ?:[\\/]*)
40267  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40268  ;;
40269  *)
40270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40271for as_dir in $PATH
40272do
40273  IFS=$as_save_IFS
40274  test -z "$as_dir" && as_dir=.
40275    for ac_exec_ext in '' $ac_executable_extensions; do
40276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40277    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40279    break 2
40280  fi
40281done
40282  done
40283IFS=$as_save_IFS
40284
40285  ;;
40286esac
40287fi
40288NM=$ac_cv_path_NM
40289if test -n "$NM"; then
40290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40291$as_echo "$NM" >&6; }
40292else
40293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40294$as_echo "no" >&6; }
40295fi
40296
40297
40298          if test "x$NM" = x; then
40299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40300          fi
40301        else
40302          # Otherwise we believe it is a complete path. Use it as it is.
40303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40304$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40306$as_echo_n "checking for NM... " >&6; }
40307          if test ! -x "$tool_specified"; then
40308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40309$as_echo "not found" >&6; }
40310            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40311          fi
40312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40313$as_echo "$tool_specified" >&6; }
40314        fi
40315      fi
40316    fi
40317
40318  fi
40319
40320
40321
40322  # Only process if variable expands to non-empty
40323
40324  if test "x$NM" != x; then
40325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40326
40327  # First separate the path from the arguments. This will split at the first
40328  # space.
40329  complete="$NM"
40330  path="${complete%% *}"
40331  tmp="$complete EOL"
40332  arguments="${tmp#* }"
40333
40334  # Input might be given as Windows format, start by converting to
40335  # unix format.
40336  new_path=`$CYGPATH -u "$path"`
40337
40338  # Now try to locate executable using which
40339  new_path=`$WHICH "$new_path" 2> /dev/null`
40340  # bat and cmd files are not always considered executable in cygwin causing which
40341  # to not find them
40342  if test "x$new_path" = x \
40343      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40344      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40345    new_path=`$CYGPATH -u "$path"`
40346  fi
40347  if test "x$new_path" = x; then
40348    # Oops. Which didn't find the executable.
40349    # The splitting of arguments from the executable at a space might have been incorrect,
40350    # since paths with space are more likely in Windows. Give it another try with the whole
40351    # argument.
40352    path="$complete"
40353    arguments="EOL"
40354    new_path=`$CYGPATH -u "$path"`
40355    new_path=`$WHICH "$new_path" 2> /dev/null`
40356    # bat and cmd files are not always considered executable in cygwin causing which
40357    # to not find them
40358    if test "x$new_path" = x \
40359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40361      new_path=`$CYGPATH -u "$path"`
40362    fi
40363    if test "x$new_path" = x; then
40364      # It's still not found. Now this is an unrecoverable error.
40365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40366$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40367      has_space=`$ECHO "$complete" | $GREP " "`
40368      if test "x$has_space" != x; then
40369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40371      fi
40372      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40373    fi
40374  fi
40375
40376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40379  # "foo.exe" is OK but "foo" is an error.
40380  #
40381  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40382  # It is also a way to make sure we got the proper file name for the real test later on.
40383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40384  if test "x$test_shortpath" = x; then
40385    # Short path failed, file does not exist as specified.
40386    # Try adding .exe or .cmd
40387    if test -f "${new_path}.exe"; then
40388      input_to_shortpath="${new_path}.exe"
40389    elif test -f "${new_path}.cmd"; then
40390      input_to_shortpath="${new_path}.cmd"
40391    else
40392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40393$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40394      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40395$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40396      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40397    fi
40398  else
40399    input_to_shortpath="$new_path"
40400  fi
40401
40402  # Call helper function which possibly converts this using DOS-style short mode.
40403  # If so, the updated path is stored in $new_path.
40404  new_path="$input_to_shortpath"
40405
40406  input_path="$input_to_shortpath"
40407  # Check if we need to convert this using DOS-style short mode. If the path
40408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40409  # take no chances and rewrite it.
40410  # Note: m4 eats our [], so we need to use [ and ] instead.
40411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40412  if test "x$has_forbidden_chars" != x; then
40413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40417      # Going to short mode and back again did indeed matter. Since short mode is
40418      # case insensitive, let's make it lowercase to improve readability.
40419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40420      # Now convert it back to Unix-style (cygpath)
40421      input_path=`$CYGPATH -u "$shortmode_path"`
40422      new_path="$input_path"
40423    fi
40424  fi
40425
40426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40427  if test "x$test_cygdrive_prefix" = x; then
40428    # As a simple fix, exclude /usr/bin since it's not a real path.
40429    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40431      # a path prefixed by /cygdrive for fixpath to work.
40432      new_path="$CYGWIN_ROOT_PATH$input_path"
40433    fi
40434  fi
40435
40436  # remove trailing .exe if any
40437  new_path="${new_path/%.exe/}"
40438
40439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40440
40441  # First separate the path from the arguments. This will split at the first
40442  # space.
40443  complete="$NM"
40444  path="${complete%% *}"
40445  tmp="$complete EOL"
40446  arguments="${tmp#* }"
40447
40448  # Input might be given as Windows format, start by converting to
40449  # unix format.
40450  new_path="$path"
40451
40452  windows_path="$new_path"
40453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40454    unix_path=`$CYGPATH -u "$windows_path"`
40455    new_path="$unix_path"
40456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40458    new_path="$unix_path"
40459  fi
40460
40461
40462  # Now try to locate executable using which
40463  new_path=`$WHICH "$new_path" 2> /dev/null`
40464
40465  if test "x$new_path" = x; then
40466    # Oops. Which didn't find the executable.
40467    # The splitting of arguments from the executable at a space might have been incorrect,
40468    # since paths with space are more likely in Windows. Give it another try with the whole
40469    # argument.
40470    path="$complete"
40471    arguments="EOL"
40472    new_path="$path"
40473
40474  windows_path="$new_path"
40475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40476    unix_path=`$CYGPATH -u "$windows_path"`
40477    new_path="$unix_path"
40478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40480    new_path="$unix_path"
40481  fi
40482
40483
40484    new_path=`$WHICH "$new_path" 2> /dev/null`
40485    # bat and cmd files are not always considered executable in MSYS causing which
40486    # to not find them
40487    if test "x$new_path" = x \
40488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40490      new_path="$path"
40491
40492  windows_path="$new_path"
40493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40494    unix_path=`$CYGPATH -u "$windows_path"`
40495    new_path="$unix_path"
40496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40498    new_path="$unix_path"
40499  fi
40500
40501    fi
40502
40503    if test "x$new_path" = x; then
40504      # It's still not found. Now this is an unrecoverable error.
40505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40506$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40507      has_space=`$ECHO "$complete" | $GREP " "`
40508      if test "x$has_space" != x; then
40509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40511      fi
40512      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40513    fi
40514  fi
40515
40516  # Now new_path has a complete unix path to the binary
40517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40518    # Keep paths in /bin as-is, but remove trailing .exe if any
40519    new_path="${new_path/%.exe/}"
40520    # Do not save /bin paths to all_fixpath_prefixes!
40521  else
40522    # Not in mixed or Windows style, start by that.
40523    new_path=`cmd //c echo $new_path`
40524
40525  input_path="$new_path"
40526  # Check if we need to convert this using DOS-style short mode. If the path
40527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40528  # take no chances and rewrite it.
40529  # Note: m4 eats our [], so we need to use [ and ] instead.
40530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40531  if test "x$has_forbidden_chars" != x; then
40532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40534  fi
40535
40536    # Output is in $new_path
40537
40538  windows_path="$new_path"
40539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40540    unix_path=`$CYGPATH -u "$windows_path"`
40541    new_path="$unix_path"
40542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40544    new_path="$unix_path"
40545  fi
40546
40547    # remove trailing .exe if any
40548    new_path="${new_path/%.exe/}"
40549
40550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40552  fi
40553
40554    else
40555      # We're on a unix platform. Hooray! :)
40556      # First separate the path from the arguments. This will split at the first
40557      # space.
40558      complete="$NM"
40559      path="${complete%% *}"
40560      tmp="$complete EOL"
40561      arguments="${tmp#* }"
40562
40563      # Cannot rely on the command "which" here since it doesn't always work.
40564      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40565      if test -z "$is_absolute_path"; then
40566        # Path to executable is not absolute. Find it.
40567        IFS_save="$IFS"
40568        IFS=:
40569        for p in $PATH; do
40570          if test -f "$p/$path" && test -x "$p/$path"; then
40571            new_path="$p/$path"
40572            break
40573          fi
40574        done
40575        IFS="$IFS_save"
40576      else
40577        # This is an absolute path, we can use it without further modifications.
40578        new_path="$path"
40579      fi
40580
40581      if test "x$new_path" = x; then
40582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40583$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40584        has_space=`$ECHO "$complete" | $GREP " "`
40585        if test "x$has_space" != x; then
40586          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40588        fi
40589        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40590      fi
40591    fi
40592
40593    # Now join together the path and the arguments once again
40594    if test "x$arguments" != xEOL; then
40595      new_complete="$new_path ${arguments% *}"
40596    else
40597      new_complete="$new_path"
40598    fi
40599
40600    if test "x$complete" != "x$new_complete"; then
40601      NM="$new_complete"
40602      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40603$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40604    fi
40605  fi
40606
40607
40608
40609  # Publish this variable in the help.
40610
40611
40612  if [ -z "${GNM+x}" ]; then
40613    # The variable is not set by user, try to locate tool using the code snippet
40614    for ac_prog in gnm
40615do
40616  # Extract the first word of "$ac_prog", so it can be a program name with args.
40617set dummy $ac_prog; ac_word=$2
40618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40619$as_echo_n "checking for $ac_word... " >&6; }
40620if ${ac_cv_path_GNM+:} false; then :
40621  $as_echo_n "(cached) " >&6
40622else
40623  case $GNM in
40624  [\\/]* | ?:[\\/]*)
40625  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40626  ;;
40627  *)
40628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40629for as_dir in $PATH
40630do
40631  IFS=$as_save_IFS
40632  test -z "$as_dir" && as_dir=.
40633    for ac_exec_ext in '' $ac_executable_extensions; do
40634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40635    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40637    break 2
40638  fi
40639done
40640  done
40641IFS=$as_save_IFS
40642
40643  ;;
40644esac
40645fi
40646GNM=$ac_cv_path_GNM
40647if test -n "$GNM"; then
40648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40649$as_echo "$GNM" >&6; }
40650else
40651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40652$as_echo "no" >&6; }
40653fi
40654
40655
40656  test -n "$GNM" && break
40657done
40658
40659  else
40660    # The variable is set, but is it from the command line or the environment?
40661
40662    # Try to remove the string !GNM! from our list.
40663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40665      # If it failed, the variable was not from the command line. Ignore it,
40666      # but warn the user (except for BASH, which is always set by the calling BASH).
40667      if test "xGNM" != xBASH; then
40668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40669$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40670      fi
40671      # Try to locate tool using the code snippet
40672      for ac_prog in gnm
40673do
40674  # Extract the first word of "$ac_prog", so it can be a program name with args.
40675set dummy $ac_prog; ac_word=$2
40676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40677$as_echo_n "checking for $ac_word... " >&6; }
40678if ${ac_cv_path_GNM+:} false; then :
40679  $as_echo_n "(cached) " >&6
40680else
40681  case $GNM in
40682  [\\/]* | ?:[\\/]*)
40683  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40684  ;;
40685  *)
40686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40687for as_dir in $PATH
40688do
40689  IFS=$as_save_IFS
40690  test -z "$as_dir" && as_dir=.
40691    for ac_exec_ext in '' $ac_executable_extensions; do
40692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40693    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40695    break 2
40696  fi
40697done
40698  done
40699IFS=$as_save_IFS
40700
40701  ;;
40702esac
40703fi
40704GNM=$ac_cv_path_GNM
40705if test -n "$GNM"; then
40706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40707$as_echo "$GNM" >&6; }
40708else
40709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40710$as_echo "no" >&6; }
40711fi
40712
40713
40714  test -n "$GNM" && break
40715done
40716
40717    else
40718      # If it succeeded, then it was overridden by the user. We will use it
40719      # for the tool.
40720
40721      # First remove it from the list of overridden variables, so we can test
40722      # for unknown variables in the end.
40723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40724
40725      # Check if we try to supply an empty value
40726      if test "x$GNM" = x; then
40727        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40728$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40730$as_echo_n "checking for GNM... " >&6; }
40731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40732$as_echo "disabled" >&6; }
40733      else
40734        # Check if the provided tool contains a complete path.
40735        tool_specified="$GNM"
40736        tool_basename="${tool_specified##*/}"
40737        if test "x$tool_basename" = "x$tool_specified"; then
40738          # A command without a complete path is provided, search $PATH.
40739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40740$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40741          # Extract the first word of "$tool_basename", so it can be a program name with args.
40742set dummy $tool_basename; ac_word=$2
40743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40744$as_echo_n "checking for $ac_word... " >&6; }
40745if ${ac_cv_path_GNM+:} false; then :
40746  $as_echo_n "(cached) " >&6
40747else
40748  case $GNM in
40749  [\\/]* | ?:[\\/]*)
40750  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40751  ;;
40752  *)
40753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40754for as_dir in $PATH
40755do
40756  IFS=$as_save_IFS
40757  test -z "$as_dir" && as_dir=.
40758    for ac_exec_ext in '' $ac_executable_extensions; do
40759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40760    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40762    break 2
40763  fi
40764done
40765  done
40766IFS=$as_save_IFS
40767
40768  ;;
40769esac
40770fi
40771GNM=$ac_cv_path_GNM
40772if test -n "$GNM"; then
40773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40774$as_echo "$GNM" >&6; }
40775else
40776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40777$as_echo "no" >&6; }
40778fi
40779
40780
40781          if test "x$GNM" = x; then
40782            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40783          fi
40784        else
40785          # Otherwise we believe it is a complete path. Use it as it is.
40786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40787$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40788          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40789$as_echo_n "checking for GNM... " >&6; }
40790          if test ! -x "$tool_specified"; then
40791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40792$as_echo "not found" >&6; }
40793            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40794          fi
40795          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40796$as_echo "$tool_specified" >&6; }
40797        fi
40798      fi
40799    fi
40800
40801  fi
40802
40803
40804
40805  # Only process if variable expands to non-empty
40806
40807  if test "x$GNM" != x; then
40808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40809
40810  # First separate the path from the arguments. This will split at the first
40811  # space.
40812  complete="$GNM"
40813  path="${complete%% *}"
40814  tmp="$complete EOL"
40815  arguments="${tmp#* }"
40816
40817  # Input might be given as Windows format, start by converting to
40818  # unix format.
40819  new_path=`$CYGPATH -u "$path"`
40820
40821  # Now try to locate executable using which
40822  new_path=`$WHICH "$new_path" 2> /dev/null`
40823  # bat and cmd files are not always considered executable in cygwin causing which
40824  # to not find them
40825  if test "x$new_path" = x \
40826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40828    new_path=`$CYGPATH -u "$path"`
40829  fi
40830  if test "x$new_path" = x; then
40831    # Oops. Which didn't find the executable.
40832    # The splitting of arguments from the executable at a space might have been incorrect,
40833    # since paths with space are more likely in Windows. Give it another try with the whole
40834    # argument.
40835    path="$complete"
40836    arguments="EOL"
40837    new_path=`$CYGPATH -u "$path"`
40838    new_path=`$WHICH "$new_path" 2> /dev/null`
40839    # bat and cmd files are not always considered executable in cygwin causing which
40840    # to not find them
40841    if test "x$new_path" = x \
40842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40844      new_path=`$CYGPATH -u "$path"`
40845    fi
40846    if test "x$new_path" = x; then
40847      # It's still not found. Now this is an unrecoverable error.
40848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40849$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40850      has_space=`$ECHO "$complete" | $GREP " "`
40851      if test "x$has_space" != x; then
40852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40854      fi
40855      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40856    fi
40857  fi
40858
40859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40862  # "foo.exe" is OK but "foo" is an error.
40863  #
40864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40865  # It is also a way to make sure we got the proper file name for the real test later on.
40866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40867  if test "x$test_shortpath" = x; then
40868    # Short path failed, file does not exist as specified.
40869    # Try adding .exe or .cmd
40870    if test -f "${new_path}.exe"; then
40871      input_to_shortpath="${new_path}.exe"
40872    elif test -f "${new_path}.cmd"; then
40873      input_to_shortpath="${new_path}.cmd"
40874    else
40875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40876$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40879      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40880    fi
40881  else
40882    input_to_shortpath="$new_path"
40883  fi
40884
40885  # Call helper function which possibly converts this using DOS-style short mode.
40886  # If so, the updated path is stored in $new_path.
40887  new_path="$input_to_shortpath"
40888
40889  input_path="$input_to_shortpath"
40890  # Check if we need to convert this using DOS-style short mode. If the path
40891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40892  # take no chances and rewrite it.
40893  # Note: m4 eats our [], so we need to use [ and ] instead.
40894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40895  if test "x$has_forbidden_chars" != x; then
40896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40900      # Going to short mode and back again did indeed matter. Since short mode is
40901      # case insensitive, let's make it lowercase to improve readability.
40902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40903      # Now convert it back to Unix-style (cygpath)
40904      input_path=`$CYGPATH -u "$shortmode_path"`
40905      new_path="$input_path"
40906    fi
40907  fi
40908
40909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40910  if test "x$test_cygdrive_prefix" = x; then
40911    # As a simple fix, exclude /usr/bin since it's not a real path.
40912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40914      # a path prefixed by /cygdrive for fixpath to work.
40915      new_path="$CYGWIN_ROOT_PATH$input_path"
40916    fi
40917  fi
40918
40919  # remove trailing .exe if any
40920  new_path="${new_path/%.exe/}"
40921
40922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40923
40924  # First separate the path from the arguments. This will split at the first
40925  # space.
40926  complete="$GNM"
40927  path="${complete%% *}"
40928  tmp="$complete EOL"
40929  arguments="${tmp#* }"
40930
40931  # Input might be given as Windows format, start by converting to
40932  # unix format.
40933  new_path="$path"
40934
40935  windows_path="$new_path"
40936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40937    unix_path=`$CYGPATH -u "$windows_path"`
40938    new_path="$unix_path"
40939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40941    new_path="$unix_path"
40942  fi
40943
40944
40945  # Now try to locate executable using which
40946  new_path=`$WHICH "$new_path" 2> /dev/null`
40947
40948  if test "x$new_path" = x; then
40949    # Oops. Which didn't find the executable.
40950    # The splitting of arguments from the executable at a space might have been incorrect,
40951    # since paths with space are more likely in Windows. Give it another try with the whole
40952    # argument.
40953    path="$complete"
40954    arguments="EOL"
40955    new_path="$path"
40956
40957  windows_path="$new_path"
40958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40959    unix_path=`$CYGPATH -u "$windows_path"`
40960    new_path="$unix_path"
40961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40963    new_path="$unix_path"
40964  fi
40965
40966
40967    new_path=`$WHICH "$new_path" 2> /dev/null`
40968    # bat and cmd files are not always considered executable in MSYS causing which
40969    # to not find them
40970    if test "x$new_path" = x \
40971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40973      new_path="$path"
40974
40975  windows_path="$new_path"
40976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40977    unix_path=`$CYGPATH -u "$windows_path"`
40978    new_path="$unix_path"
40979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40981    new_path="$unix_path"
40982  fi
40983
40984    fi
40985
40986    if test "x$new_path" = x; then
40987      # It's still not found. Now this is an unrecoverable error.
40988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40989$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40990      has_space=`$ECHO "$complete" | $GREP " "`
40991      if test "x$has_space" != x; then
40992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40994      fi
40995      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40996    fi
40997  fi
40998
40999  # Now new_path has a complete unix path to the binary
41000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41001    # Keep paths in /bin as-is, but remove trailing .exe if any
41002    new_path="${new_path/%.exe/}"
41003    # Do not save /bin paths to all_fixpath_prefixes!
41004  else
41005    # Not in mixed or Windows style, start by that.
41006    new_path=`cmd //c echo $new_path`
41007
41008  input_path="$new_path"
41009  # Check if we need to convert this using DOS-style short mode. If the path
41010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41011  # take no chances and rewrite it.
41012  # Note: m4 eats our [], so we need to use [ and ] instead.
41013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41014  if test "x$has_forbidden_chars" != x; then
41015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41017  fi
41018
41019    # Output is in $new_path
41020
41021  windows_path="$new_path"
41022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41023    unix_path=`$CYGPATH -u "$windows_path"`
41024    new_path="$unix_path"
41025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41027    new_path="$unix_path"
41028  fi
41029
41030    # remove trailing .exe if any
41031    new_path="${new_path/%.exe/}"
41032
41033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41035  fi
41036
41037    else
41038      # We're on a unix platform. Hooray! :)
41039      # First separate the path from the arguments. This will split at the first
41040      # space.
41041      complete="$GNM"
41042      path="${complete%% *}"
41043      tmp="$complete EOL"
41044      arguments="${tmp#* }"
41045
41046      # Cannot rely on the command "which" here since it doesn't always work.
41047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41048      if test -z "$is_absolute_path"; then
41049        # Path to executable is not absolute. Find it.
41050        IFS_save="$IFS"
41051        IFS=:
41052        for p in $PATH; do
41053          if test -f "$p/$path" && test -x "$p/$path"; then
41054            new_path="$p/$path"
41055            break
41056          fi
41057        done
41058        IFS="$IFS_save"
41059      else
41060        # This is an absolute path, we can use it without further modifications.
41061        new_path="$path"
41062      fi
41063
41064      if test "x$new_path" = x; then
41065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41066$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41067        has_space=`$ECHO "$complete" | $GREP " "`
41068        if test "x$has_space" != x; then
41069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41071        fi
41072        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41073      fi
41074    fi
41075
41076    # Now join together the path and the arguments once again
41077    if test "x$arguments" != xEOL; then
41078      new_complete="$new_path ${arguments% *}"
41079    else
41080      new_complete="$new_path"
41081    fi
41082
41083    if test "x$complete" != "x$new_complete"; then
41084      GNM="$new_complete"
41085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41086$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41087    fi
41088  fi
41089
41090  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41091    # FIXME: we should unify this with the solaris case above.
41092
41093
41094  # Publish this variable in the help.
41095
41096
41097  if [ -z "${STRIP+x}" ]; then
41098    # The variable is not set by user, try to locate tool using the code snippet
41099    if test -n "$ac_tool_prefix"; then
41100  for ac_prog in strip
41101  do
41102    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41105$as_echo_n "checking for $ac_word... " >&6; }
41106if ${ac_cv_prog_STRIP+:} false; then :
41107  $as_echo_n "(cached) " >&6
41108else
41109  if test -n "$STRIP"; then
41110  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41111else
41112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41113for as_dir in $PATH
41114do
41115  IFS=$as_save_IFS
41116  test -z "$as_dir" && as_dir=.
41117    for ac_exec_ext in '' $ac_executable_extensions; do
41118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41119    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41121    break 2
41122  fi
41123done
41124  done
41125IFS=$as_save_IFS
41126
41127fi
41128fi
41129STRIP=$ac_cv_prog_STRIP
41130if test -n "$STRIP"; then
41131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41132$as_echo "$STRIP" >&6; }
41133else
41134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41135$as_echo "no" >&6; }
41136fi
41137
41138
41139    test -n "$STRIP" && break
41140  done
41141fi
41142if test -z "$STRIP"; then
41143  ac_ct_STRIP=$STRIP
41144  for ac_prog in strip
41145do
41146  # Extract the first word of "$ac_prog", so it can be a program name with args.
41147set dummy $ac_prog; ac_word=$2
41148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41149$as_echo_n "checking for $ac_word... " >&6; }
41150if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41151  $as_echo_n "(cached) " >&6
41152else
41153  if test -n "$ac_ct_STRIP"; then
41154  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41155else
41156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41157for as_dir in $PATH
41158do
41159  IFS=$as_save_IFS
41160  test -z "$as_dir" && as_dir=.
41161    for ac_exec_ext in '' $ac_executable_extensions; do
41162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41163    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41165    break 2
41166  fi
41167done
41168  done
41169IFS=$as_save_IFS
41170
41171fi
41172fi
41173ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41174if test -n "$ac_ct_STRIP"; then
41175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41176$as_echo "$ac_ct_STRIP" >&6; }
41177else
41178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41179$as_echo "no" >&6; }
41180fi
41181
41182
41183  test -n "$ac_ct_STRIP" && break
41184done
41185
41186  if test "x$ac_ct_STRIP" = x; then
41187    STRIP=""
41188  else
41189    case $cross_compiling:$ac_tool_warned in
41190yes:)
41191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41193ac_tool_warned=yes ;;
41194esac
41195    STRIP=$ac_ct_STRIP
41196  fi
41197fi
41198
41199  else
41200    # The variable is set, but is it from the command line or the environment?
41201
41202    # Try to remove the string !STRIP! from our list.
41203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41205      # If it failed, the variable was not from the command line. Ignore it,
41206      # but warn the user (except for BASH, which is always set by the calling BASH).
41207      if test "xSTRIP" != xBASH; then
41208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41209$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41210      fi
41211      # Try to locate tool using the code snippet
41212      if test -n "$ac_tool_prefix"; then
41213  for ac_prog in strip
41214  do
41215    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41216set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41218$as_echo_n "checking for $ac_word... " >&6; }
41219if ${ac_cv_prog_STRIP+:} false; then :
41220  $as_echo_n "(cached) " >&6
41221else
41222  if test -n "$STRIP"; then
41223  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41224else
41225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41226for as_dir in $PATH
41227do
41228  IFS=$as_save_IFS
41229  test -z "$as_dir" && as_dir=.
41230    for ac_exec_ext in '' $ac_executable_extensions; do
41231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41232    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41234    break 2
41235  fi
41236done
41237  done
41238IFS=$as_save_IFS
41239
41240fi
41241fi
41242STRIP=$ac_cv_prog_STRIP
41243if test -n "$STRIP"; then
41244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41245$as_echo "$STRIP" >&6; }
41246else
41247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41248$as_echo "no" >&6; }
41249fi
41250
41251
41252    test -n "$STRIP" && break
41253  done
41254fi
41255if test -z "$STRIP"; then
41256  ac_ct_STRIP=$STRIP
41257  for ac_prog in strip
41258do
41259  # Extract the first word of "$ac_prog", so it can be a program name with args.
41260set dummy $ac_prog; ac_word=$2
41261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41262$as_echo_n "checking for $ac_word... " >&6; }
41263if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41264  $as_echo_n "(cached) " >&6
41265else
41266  if test -n "$ac_ct_STRIP"; then
41267  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41268else
41269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41270for as_dir in $PATH
41271do
41272  IFS=$as_save_IFS
41273  test -z "$as_dir" && as_dir=.
41274    for ac_exec_ext in '' $ac_executable_extensions; do
41275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41276    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41278    break 2
41279  fi
41280done
41281  done
41282IFS=$as_save_IFS
41283
41284fi
41285fi
41286ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41287if test -n "$ac_ct_STRIP"; then
41288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41289$as_echo "$ac_ct_STRIP" >&6; }
41290else
41291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41292$as_echo "no" >&6; }
41293fi
41294
41295
41296  test -n "$ac_ct_STRIP" && break
41297done
41298
41299  if test "x$ac_ct_STRIP" = x; then
41300    STRIP=""
41301  else
41302    case $cross_compiling:$ac_tool_warned in
41303yes:)
41304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41306ac_tool_warned=yes ;;
41307esac
41308    STRIP=$ac_ct_STRIP
41309  fi
41310fi
41311
41312    else
41313      # If it succeeded, then it was overridden by the user. We will use it
41314      # for the tool.
41315
41316      # First remove it from the list of overridden variables, so we can test
41317      # for unknown variables in the end.
41318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41319
41320      # Check if we try to supply an empty value
41321      if test "x$STRIP" = x; then
41322        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41323$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41325$as_echo_n "checking for STRIP... " >&6; }
41326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41327$as_echo "disabled" >&6; }
41328      else
41329        # Check if the provided tool contains a complete path.
41330        tool_specified="$STRIP"
41331        tool_basename="${tool_specified##*/}"
41332        if test "x$tool_basename" = "x$tool_specified"; then
41333          # A command without a complete path is provided, search $PATH.
41334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41335$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41336          # Extract the first word of "$tool_basename", so it can be a program name with args.
41337set dummy $tool_basename; ac_word=$2
41338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41339$as_echo_n "checking for $ac_word... " >&6; }
41340if ${ac_cv_path_STRIP+:} false; then :
41341  $as_echo_n "(cached) " >&6
41342else
41343  case $STRIP in
41344  [\\/]* | ?:[\\/]*)
41345  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41346  ;;
41347  *)
41348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41349for as_dir in $PATH
41350do
41351  IFS=$as_save_IFS
41352  test -z "$as_dir" && as_dir=.
41353    for ac_exec_ext in '' $ac_executable_extensions; do
41354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41355    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41357    break 2
41358  fi
41359done
41360  done
41361IFS=$as_save_IFS
41362
41363  ;;
41364esac
41365fi
41366STRIP=$ac_cv_path_STRIP
41367if test -n "$STRIP"; then
41368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41369$as_echo "$STRIP" >&6; }
41370else
41371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41372$as_echo "no" >&6; }
41373fi
41374
41375
41376          if test "x$STRIP" = x; then
41377            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41378          fi
41379        else
41380          # Otherwise we believe it is a complete path. Use it as it is.
41381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41382$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41383          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41384$as_echo_n "checking for STRIP... " >&6; }
41385          if test ! -x "$tool_specified"; then
41386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41387$as_echo "not found" >&6; }
41388            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41389          fi
41390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41391$as_echo "$tool_specified" >&6; }
41392        fi
41393      fi
41394    fi
41395
41396  fi
41397
41398
41399
41400  # Only process if variable expands to non-empty
41401
41402  if test "x$STRIP" != x; then
41403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41404
41405  # First separate the path from the arguments. This will split at the first
41406  # space.
41407  complete="$STRIP"
41408  path="${complete%% *}"
41409  tmp="$complete EOL"
41410  arguments="${tmp#* }"
41411
41412  # Input might be given as Windows format, start by converting to
41413  # unix format.
41414  new_path=`$CYGPATH -u "$path"`
41415
41416  # Now try to locate executable using which
41417  new_path=`$WHICH "$new_path" 2> /dev/null`
41418  # bat and cmd files are not always considered executable in cygwin causing which
41419  # to not find them
41420  if test "x$new_path" = x \
41421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41423    new_path=`$CYGPATH -u "$path"`
41424  fi
41425  if test "x$new_path" = x; then
41426    # Oops. Which didn't find the executable.
41427    # The splitting of arguments from the executable at a space might have been incorrect,
41428    # since paths with space are more likely in Windows. Give it another try with the whole
41429    # argument.
41430    path="$complete"
41431    arguments="EOL"
41432    new_path=`$CYGPATH -u "$path"`
41433    new_path=`$WHICH "$new_path" 2> /dev/null`
41434    # bat and cmd files are not always considered executable in cygwin causing which
41435    # to not find them
41436    if test "x$new_path" = x \
41437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41439      new_path=`$CYGPATH -u "$path"`
41440    fi
41441    if test "x$new_path" = x; then
41442      # It's still not found. Now this is an unrecoverable error.
41443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41444$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41445      has_space=`$ECHO "$complete" | $GREP " "`
41446      if test "x$has_space" != x; then
41447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41449      fi
41450      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41451    fi
41452  fi
41453
41454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41457  # "foo.exe" is OK but "foo" is an error.
41458  #
41459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41460  # It is also a way to make sure we got the proper file name for the real test later on.
41461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41462  if test "x$test_shortpath" = x; then
41463    # Short path failed, file does not exist as specified.
41464    # Try adding .exe or .cmd
41465    if test -f "${new_path}.exe"; then
41466      input_to_shortpath="${new_path}.exe"
41467    elif test -f "${new_path}.cmd"; then
41468      input_to_shortpath="${new_path}.cmd"
41469    else
41470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41471$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41474      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41475    fi
41476  else
41477    input_to_shortpath="$new_path"
41478  fi
41479
41480  # Call helper function which possibly converts this using DOS-style short mode.
41481  # If so, the updated path is stored in $new_path.
41482  new_path="$input_to_shortpath"
41483
41484  input_path="$input_to_shortpath"
41485  # Check if we need to convert this using DOS-style short mode. If the path
41486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41487  # take no chances and rewrite it.
41488  # Note: m4 eats our [], so we need to use [ and ] instead.
41489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41490  if test "x$has_forbidden_chars" != x; then
41491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41495      # Going to short mode and back again did indeed matter. Since short mode is
41496      # case insensitive, let's make it lowercase to improve readability.
41497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41498      # Now convert it back to Unix-style (cygpath)
41499      input_path=`$CYGPATH -u "$shortmode_path"`
41500      new_path="$input_path"
41501    fi
41502  fi
41503
41504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41505  if test "x$test_cygdrive_prefix" = x; then
41506    # As a simple fix, exclude /usr/bin since it's not a real path.
41507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41509      # a path prefixed by /cygdrive for fixpath to work.
41510      new_path="$CYGWIN_ROOT_PATH$input_path"
41511    fi
41512  fi
41513
41514  # remove trailing .exe if any
41515  new_path="${new_path/%.exe/}"
41516
41517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41518
41519  # First separate the path from the arguments. This will split at the first
41520  # space.
41521  complete="$STRIP"
41522  path="${complete%% *}"
41523  tmp="$complete EOL"
41524  arguments="${tmp#* }"
41525
41526  # Input might be given as Windows format, start by converting to
41527  # unix format.
41528  new_path="$path"
41529
41530  windows_path="$new_path"
41531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41532    unix_path=`$CYGPATH -u "$windows_path"`
41533    new_path="$unix_path"
41534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41536    new_path="$unix_path"
41537  fi
41538
41539
41540  # Now try to locate executable using which
41541  new_path=`$WHICH "$new_path" 2> /dev/null`
41542
41543  if test "x$new_path" = x; then
41544    # Oops. Which didn't find the executable.
41545    # The splitting of arguments from the executable at a space might have been incorrect,
41546    # since paths with space are more likely in Windows. Give it another try with the whole
41547    # argument.
41548    path="$complete"
41549    arguments="EOL"
41550    new_path="$path"
41551
41552  windows_path="$new_path"
41553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41554    unix_path=`$CYGPATH -u "$windows_path"`
41555    new_path="$unix_path"
41556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41558    new_path="$unix_path"
41559  fi
41560
41561
41562    new_path=`$WHICH "$new_path" 2> /dev/null`
41563    # bat and cmd files are not always considered executable in MSYS causing which
41564    # to not find them
41565    if test "x$new_path" = x \
41566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41568      new_path="$path"
41569
41570  windows_path="$new_path"
41571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41572    unix_path=`$CYGPATH -u "$windows_path"`
41573    new_path="$unix_path"
41574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41576    new_path="$unix_path"
41577  fi
41578
41579    fi
41580
41581    if test "x$new_path" = x; then
41582      # It's still not found. Now this is an unrecoverable error.
41583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41584$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41585      has_space=`$ECHO "$complete" | $GREP " "`
41586      if test "x$has_space" != x; then
41587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41589      fi
41590      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41591    fi
41592  fi
41593
41594  # Now new_path has a complete unix path to the binary
41595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41596    # Keep paths in /bin as-is, but remove trailing .exe if any
41597    new_path="${new_path/%.exe/}"
41598    # Do not save /bin paths to all_fixpath_prefixes!
41599  else
41600    # Not in mixed or Windows style, start by that.
41601    new_path=`cmd //c echo $new_path`
41602
41603  input_path="$new_path"
41604  # Check if we need to convert this using DOS-style short mode. If the path
41605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41606  # take no chances and rewrite it.
41607  # Note: m4 eats our [], so we need to use [ and ] instead.
41608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41609  if test "x$has_forbidden_chars" != x; then
41610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41612  fi
41613
41614    # Output is in $new_path
41615
41616  windows_path="$new_path"
41617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41618    unix_path=`$CYGPATH -u "$windows_path"`
41619    new_path="$unix_path"
41620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41622    new_path="$unix_path"
41623  fi
41624
41625    # remove trailing .exe if any
41626    new_path="${new_path/%.exe/}"
41627
41628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41630  fi
41631
41632    else
41633      # We're on a unix platform. Hooray! :)
41634      # First separate the path from the arguments. This will split at the first
41635      # space.
41636      complete="$STRIP"
41637      path="${complete%% *}"
41638      tmp="$complete EOL"
41639      arguments="${tmp#* }"
41640
41641      # Cannot rely on the command "which" here since it doesn't always work.
41642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41643      if test -z "$is_absolute_path"; then
41644        # Path to executable is not absolute. Find it.
41645        IFS_save="$IFS"
41646        IFS=:
41647        for p in $PATH; do
41648          if test -f "$p/$path" && test -x "$p/$path"; then
41649            new_path="$p/$path"
41650            break
41651          fi
41652        done
41653        IFS="$IFS_save"
41654      else
41655        # This is an absolute path, we can use it without further modifications.
41656        new_path="$path"
41657      fi
41658
41659      if test "x$new_path" = x; then
41660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41661$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41662        has_space=`$ECHO "$complete" | $GREP " "`
41663        if test "x$has_space" != x; then
41664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41666        fi
41667        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41668      fi
41669    fi
41670
41671    # Now join together the path and the arguments once again
41672    if test "x$arguments" != xEOL; then
41673      new_complete="$new_path ${arguments% *}"
41674    else
41675      new_complete="$new_path"
41676    fi
41677
41678    if test "x$complete" != "x$new_complete"; then
41679      STRIP="$new_complete"
41680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41681$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41682    fi
41683  fi
41684
41685    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41686
41687
41688  # Publish this variable in the help.
41689
41690
41691  if [ -z "${NM+x}" ]; then
41692    # The variable is not set by user, try to locate tool using the code snippet
41693    if test -n "$ac_tool_prefix"; then
41694  for ac_prog in nm gcc-nm
41695  do
41696    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41697set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41699$as_echo_n "checking for $ac_word... " >&6; }
41700if ${ac_cv_prog_NM+:} false; then :
41701  $as_echo_n "(cached) " >&6
41702else
41703  if test -n "$NM"; then
41704  ac_cv_prog_NM="$NM" # Let the user override the test.
41705else
41706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41707for as_dir in $PATH
41708do
41709  IFS=$as_save_IFS
41710  test -z "$as_dir" && as_dir=.
41711    for ac_exec_ext in '' $ac_executable_extensions; do
41712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41713    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41715    break 2
41716  fi
41717done
41718  done
41719IFS=$as_save_IFS
41720
41721fi
41722fi
41723NM=$ac_cv_prog_NM
41724if test -n "$NM"; then
41725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41726$as_echo "$NM" >&6; }
41727else
41728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41729$as_echo "no" >&6; }
41730fi
41731
41732
41733    test -n "$NM" && break
41734  done
41735fi
41736if test -z "$NM"; then
41737  ac_ct_NM=$NM
41738  for ac_prog in nm gcc-nm
41739do
41740  # Extract the first word of "$ac_prog", so it can be a program name with args.
41741set dummy $ac_prog; ac_word=$2
41742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41743$as_echo_n "checking for $ac_word... " >&6; }
41744if ${ac_cv_prog_ac_ct_NM+:} false; then :
41745  $as_echo_n "(cached) " >&6
41746else
41747  if test -n "$ac_ct_NM"; then
41748  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41749else
41750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41751for as_dir in $PATH
41752do
41753  IFS=$as_save_IFS
41754  test -z "$as_dir" && as_dir=.
41755    for ac_exec_ext in '' $ac_executable_extensions; do
41756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41757    ac_cv_prog_ac_ct_NM="$ac_prog"
41758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41759    break 2
41760  fi
41761done
41762  done
41763IFS=$as_save_IFS
41764
41765fi
41766fi
41767ac_ct_NM=$ac_cv_prog_ac_ct_NM
41768if test -n "$ac_ct_NM"; then
41769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41770$as_echo "$ac_ct_NM" >&6; }
41771else
41772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41773$as_echo "no" >&6; }
41774fi
41775
41776
41777  test -n "$ac_ct_NM" && break
41778done
41779
41780  if test "x$ac_ct_NM" = x; then
41781    NM=""
41782  else
41783    case $cross_compiling:$ac_tool_warned in
41784yes:)
41785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41787ac_tool_warned=yes ;;
41788esac
41789    NM=$ac_ct_NM
41790  fi
41791fi
41792
41793  else
41794    # The variable is set, but is it from the command line or the environment?
41795
41796    # Try to remove the string !NM! from our list.
41797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41799      # If it failed, the variable was not from the command line. Ignore it,
41800      # but warn the user (except for BASH, which is always set by the calling BASH).
41801      if test "xNM" != xBASH; then
41802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41803$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41804      fi
41805      # Try to locate tool using the code snippet
41806      if test -n "$ac_tool_prefix"; then
41807  for ac_prog in nm gcc-nm
41808  do
41809    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41810set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41812$as_echo_n "checking for $ac_word... " >&6; }
41813if ${ac_cv_prog_NM+:} false; then :
41814  $as_echo_n "(cached) " >&6
41815else
41816  if test -n "$NM"; then
41817  ac_cv_prog_NM="$NM" # Let the user override the test.
41818else
41819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41820for as_dir in $PATH
41821do
41822  IFS=$as_save_IFS
41823  test -z "$as_dir" && as_dir=.
41824    for ac_exec_ext in '' $ac_executable_extensions; do
41825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41826    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41828    break 2
41829  fi
41830done
41831  done
41832IFS=$as_save_IFS
41833
41834fi
41835fi
41836NM=$ac_cv_prog_NM
41837if test -n "$NM"; then
41838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41839$as_echo "$NM" >&6; }
41840else
41841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41842$as_echo "no" >&6; }
41843fi
41844
41845
41846    test -n "$NM" && break
41847  done
41848fi
41849if test -z "$NM"; then
41850  ac_ct_NM=$NM
41851  for ac_prog in nm gcc-nm
41852do
41853  # Extract the first word of "$ac_prog", so it can be a program name with args.
41854set dummy $ac_prog; ac_word=$2
41855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41856$as_echo_n "checking for $ac_word... " >&6; }
41857if ${ac_cv_prog_ac_ct_NM+:} false; then :
41858  $as_echo_n "(cached) " >&6
41859else
41860  if test -n "$ac_ct_NM"; then
41861  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41862else
41863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41864for as_dir in $PATH
41865do
41866  IFS=$as_save_IFS
41867  test -z "$as_dir" && as_dir=.
41868    for ac_exec_ext in '' $ac_executable_extensions; do
41869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41870    ac_cv_prog_ac_ct_NM="$ac_prog"
41871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41872    break 2
41873  fi
41874done
41875  done
41876IFS=$as_save_IFS
41877
41878fi
41879fi
41880ac_ct_NM=$ac_cv_prog_ac_ct_NM
41881if test -n "$ac_ct_NM"; then
41882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41883$as_echo "$ac_ct_NM" >&6; }
41884else
41885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41886$as_echo "no" >&6; }
41887fi
41888
41889
41890  test -n "$ac_ct_NM" && break
41891done
41892
41893  if test "x$ac_ct_NM" = x; then
41894    NM=""
41895  else
41896    case $cross_compiling:$ac_tool_warned in
41897yes:)
41898{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41899$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41900ac_tool_warned=yes ;;
41901esac
41902    NM=$ac_ct_NM
41903  fi
41904fi
41905
41906    else
41907      # If it succeeded, then it was overridden by the user. We will use it
41908      # for the tool.
41909
41910      # First remove it from the list of overridden variables, so we can test
41911      # for unknown variables in the end.
41912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41913
41914      # Check if we try to supply an empty value
41915      if test "x$NM" = x; then
41916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41917$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41919$as_echo_n "checking for NM... " >&6; }
41920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41921$as_echo "disabled" >&6; }
41922      else
41923        # Check if the provided tool contains a complete path.
41924        tool_specified="$NM"
41925        tool_basename="${tool_specified##*/}"
41926        if test "x$tool_basename" = "x$tool_specified"; then
41927          # A command without a complete path is provided, search $PATH.
41928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41929$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41930          # Extract the first word of "$tool_basename", so it can be a program name with args.
41931set dummy $tool_basename; ac_word=$2
41932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41933$as_echo_n "checking for $ac_word... " >&6; }
41934if ${ac_cv_path_NM+:} false; then :
41935  $as_echo_n "(cached) " >&6
41936else
41937  case $NM in
41938  [\\/]* | ?:[\\/]*)
41939  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41940  ;;
41941  *)
41942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41943for as_dir in $PATH
41944do
41945  IFS=$as_save_IFS
41946  test -z "$as_dir" && as_dir=.
41947    for ac_exec_ext in '' $ac_executable_extensions; do
41948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41949    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41951    break 2
41952  fi
41953done
41954  done
41955IFS=$as_save_IFS
41956
41957  ;;
41958esac
41959fi
41960NM=$ac_cv_path_NM
41961if test -n "$NM"; then
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41963$as_echo "$NM" >&6; }
41964else
41965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41966$as_echo "no" >&6; }
41967fi
41968
41969
41970          if test "x$NM" = x; then
41971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41972          fi
41973        else
41974          # Otherwise we believe it is a complete path. Use it as it is.
41975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41976$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41978$as_echo_n "checking for NM... " >&6; }
41979          if test ! -x "$tool_specified"; then
41980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41981$as_echo "not found" >&6; }
41982            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41983          fi
41984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41985$as_echo "$tool_specified" >&6; }
41986        fi
41987      fi
41988    fi
41989
41990  fi
41991
41992
41993    else
41994
41995
41996  # Publish this variable in the help.
41997
41998
41999  if [ -z "${NM+x}" ]; then
42000    # The variable is not set by user, try to locate tool using the code snippet
42001    if test -n "$ac_tool_prefix"; then
42002  for ac_prog in nm
42003  do
42004    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42005set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42007$as_echo_n "checking for $ac_word... " >&6; }
42008if ${ac_cv_prog_NM+:} false; then :
42009  $as_echo_n "(cached) " >&6
42010else
42011  if test -n "$NM"; then
42012  ac_cv_prog_NM="$NM" # Let the user override the test.
42013else
42014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42015for as_dir in $PATH
42016do
42017  IFS=$as_save_IFS
42018  test -z "$as_dir" && as_dir=.
42019    for ac_exec_ext in '' $ac_executable_extensions; do
42020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42021    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42023    break 2
42024  fi
42025done
42026  done
42027IFS=$as_save_IFS
42028
42029fi
42030fi
42031NM=$ac_cv_prog_NM
42032if test -n "$NM"; then
42033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42034$as_echo "$NM" >&6; }
42035else
42036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42037$as_echo "no" >&6; }
42038fi
42039
42040
42041    test -n "$NM" && break
42042  done
42043fi
42044if test -z "$NM"; then
42045  ac_ct_NM=$NM
42046  for ac_prog in nm
42047do
42048  # Extract the first word of "$ac_prog", so it can be a program name with args.
42049set dummy $ac_prog; ac_word=$2
42050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42051$as_echo_n "checking for $ac_word... " >&6; }
42052if ${ac_cv_prog_ac_ct_NM+:} false; then :
42053  $as_echo_n "(cached) " >&6
42054else
42055  if test -n "$ac_ct_NM"; then
42056  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42057else
42058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42059for as_dir in $PATH
42060do
42061  IFS=$as_save_IFS
42062  test -z "$as_dir" && as_dir=.
42063    for ac_exec_ext in '' $ac_executable_extensions; do
42064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42065    ac_cv_prog_ac_ct_NM="$ac_prog"
42066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42067    break 2
42068  fi
42069done
42070  done
42071IFS=$as_save_IFS
42072
42073fi
42074fi
42075ac_ct_NM=$ac_cv_prog_ac_ct_NM
42076if test -n "$ac_ct_NM"; then
42077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42078$as_echo "$ac_ct_NM" >&6; }
42079else
42080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42081$as_echo "no" >&6; }
42082fi
42083
42084
42085  test -n "$ac_ct_NM" && break
42086done
42087
42088  if test "x$ac_ct_NM" = x; then
42089    NM=""
42090  else
42091    case $cross_compiling:$ac_tool_warned in
42092yes:)
42093{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42094$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42095ac_tool_warned=yes ;;
42096esac
42097    NM=$ac_ct_NM
42098  fi
42099fi
42100
42101  else
42102    # The variable is set, but is it from the command line or the environment?
42103
42104    # Try to remove the string !NM! from our list.
42105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42107      # If it failed, the variable was not from the command line. Ignore it,
42108      # but warn the user (except for BASH, which is always set by the calling BASH).
42109      if test "xNM" != xBASH; then
42110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42111$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42112      fi
42113      # Try to locate tool using the code snippet
42114      if test -n "$ac_tool_prefix"; then
42115  for ac_prog in nm
42116  do
42117    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42118set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42120$as_echo_n "checking for $ac_word... " >&6; }
42121if ${ac_cv_prog_NM+:} false; then :
42122  $as_echo_n "(cached) " >&6
42123else
42124  if test -n "$NM"; then
42125  ac_cv_prog_NM="$NM" # Let the user override the test.
42126else
42127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42128for as_dir in $PATH
42129do
42130  IFS=$as_save_IFS
42131  test -z "$as_dir" && as_dir=.
42132    for ac_exec_ext in '' $ac_executable_extensions; do
42133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42134    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42136    break 2
42137  fi
42138done
42139  done
42140IFS=$as_save_IFS
42141
42142fi
42143fi
42144NM=$ac_cv_prog_NM
42145if test -n "$NM"; then
42146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42147$as_echo "$NM" >&6; }
42148else
42149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42150$as_echo "no" >&6; }
42151fi
42152
42153
42154    test -n "$NM" && break
42155  done
42156fi
42157if test -z "$NM"; then
42158  ac_ct_NM=$NM
42159  for ac_prog in nm
42160do
42161  # Extract the first word of "$ac_prog", so it can be a program name with args.
42162set dummy $ac_prog; ac_word=$2
42163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42164$as_echo_n "checking for $ac_word... " >&6; }
42165if ${ac_cv_prog_ac_ct_NM+:} false; then :
42166  $as_echo_n "(cached) " >&6
42167else
42168  if test -n "$ac_ct_NM"; then
42169  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42170else
42171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42172for as_dir in $PATH
42173do
42174  IFS=$as_save_IFS
42175  test -z "$as_dir" && as_dir=.
42176    for ac_exec_ext in '' $ac_executable_extensions; do
42177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42178    ac_cv_prog_ac_ct_NM="$ac_prog"
42179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42180    break 2
42181  fi
42182done
42183  done
42184IFS=$as_save_IFS
42185
42186fi
42187fi
42188ac_ct_NM=$ac_cv_prog_ac_ct_NM
42189if test -n "$ac_ct_NM"; then
42190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42191$as_echo "$ac_ct_NM" >&6; }
42192else
42193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42194$as_echo "no" >&6; }
42195fi
42196
42197
42198  test -n "$ac_ct_NM" && break
42199done
42200
42201  if test "x$ac_ct_NM" = x; then
42202    NM=""
42203  else
42204    case $cross_compiling:$ac_tool_warned in
42205yes:)
42206{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42207$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42208ac_tool_warned=yes ;;
42209esac
42210    NM=$ac_ct_NM
42211  fi
42212fi
42213
42214    else
42215      # If it succeeded, then it was overridden by the user. We will use it
42216      # for the tool.
42217
42218      # First remove it from the list of overridden variables, so we can test
42219      # for unknown variables in the end.
42220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42221
42222      # Check if we try to supply an empty value
42223      if test "x$NM" = x; then
42224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42225$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42227$as_echo_n "checking for NM... " >&6; }
42228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42229$as_echo "disabled" >&6; }
42230      else
42231        # Check if the provided tool contains a complete path.
42232        tool_specified="$NM"
42233        tool_basename="${tool_specified##*/}"
42234        if test "x$tool_basename" = "x$tool_specified"; then
42235          # A command without a complete path is provided, search $PATH.
42236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42237$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42238          # Extract the first word of "$tool_basename", so it can be a program name with args.
42239set dummy $tool_basename; ac_word=$2
42240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42241$as_echo_n "checking for $ac_word... " >&6; }
42242if ${ac_cv_path_NM+:} false; then :
42243  $as_echo_n "(cached) " >&6
42244else
42245  case $NM in
42246  [\\/]* | ?:[\\/]*)
42247  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42248  ;;
42249  *)
42250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42251for as_dir in $PATH
42252do
42253  IFS=$as_save_IFS
42254  test -z "$as_dir" && as_dir=.
42255    for ac_exec_ext in '' $ac_executable_extensions; do
42256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42257    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42259    break 2
42260  fi
42261done
42262  done
42263IFS=$as_save_IFS
42264
42265  ;;
42266esac
42267fi
42268NM=$ac_cv_path_NM
42269if test -n "$NM"; then
42270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42271$as_echo "$NM" >&6; }
42272else
42273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42274$as_echo "no" >&6; }
42275fi
42276
42277
42278          if test "x$NM" = x; then
42279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42280          fi
42281        else
42282          # Otherwise we believe it is a complete path. Use it as it is.
42283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42284$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42286$as_echo_n "checking for NM... " >&6; }
42287          if test ! -x "$tool_specified"; then
42288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42289$as_echo "not found" >&6; }
42290            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42291          fi
42292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42293$as_echo "$tool_specified" >&6; }
42294        fi
42295      fi
42296    fi
42297
42298  fi
42299
42300
42301    fi
42302
42303  # Only process if variable expands to non-empty
42304
42305  if test "x$NM" != x; then
42306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42307
42308  # First separate the path from the arguments. This will split at the first
42309  # space.
42310  complete="$NM"
42311  path="${complete%% *}"
42312  tmp="$complete EOL"
42313  arguments="${tmp#* }"
42314
42315  # Input might be given as Windows format, start by converting to
42316  # unix format.
42317  new_path=`$CYGPATH -u "$path"`
42318
42319  # Now try to locate executable using which
42320  new_path=`$WHICH "$new_path" 2> /dev/null`
42321  # bat and cmd files are not always considered executable in cygwin causing which
42322  # to not find them
42323  if test "x$new_path" = x \
42324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42326    new_path=`$CYGPATH -u "$path"`
42327  fi
42328  if test "x$new_path" = x; then
42329    # Oops. Which didn't find the executable.
42330    # The splitting of arguments from the executable at a space might have been incorrect,
42331    # since paths with space are more likely in Windows. Give it another try with the whole
42332    # argument.
42333    path="$complete"
42334    arguments="EOL"
42335    new_path=`$CYGPATH -u "$path"`
42336    new_path=`$WHICH "$new_path" 2> /dev/null`
42337    # bat and cmd files are not always considered executable in cygwin causing which
42338    # to not find them
42339    if test "x$new_path" = x \
42340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42342      new_path=`$CYGPATH -u "$path"`
42343    fi
42344    if test "x$new_path" = x; then
42345      # It's still not found. Now this is an unrecoverable error.
42346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42347$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42348      has_space=`$ECHO "$complete" | $GREP " "`
42349      if test "x$has_space" != x; then
42350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42352      fi
42353      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42354    fi
42355  fi
42356
42357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42360  # "foo.exe" is OK but "foo" is an error.
42361  #
42362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42363  # It is also a way to make sure we got the proper file name for the real test later on.
42364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42365  if test "x$test_shortpath" = x; then
42366    # Short path failed, file does not exist as specified.
42367    # Try adding .exe or .cmd
42368    if test -f "${new_path}.exe"; then
42369      input_to_shortpath="${new_path}.exe"
42370    elif test -f "${new_path}.cmd"; then
42371      input_to_shortpath="${new_path}.cmd"
42372    else
42373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42374$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42377      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42378    fi
42379  else
42380    input_to_shortpath="$new_path"
42381  fi
42382
42383  # Call helper function which possibly converts this using DOS-style short mode.
42384  # If so, the updated path is stored in $new_path.
42385  new_path="$input_to_shortpath"
42386
42387  input_path="$input_to_shortpath"
42388  # Check if we need to convert this using DOS-style short mode. If the path
42389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42390  # take no chances and rewrite it.
42391  # Note: m4 eats our [], so we need to use [ and ] instead.
42392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42393  if test "x$has_forbidden_chars" != x; then
42394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42398      # Going to short mode and back again did indeed matter. Since short mode is
42399      # case insensitive, let's make it lowercase to improve readability.
42400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42401      # Now convert it back to Unix-style (cygpath)
42402      input_path=`$CYGPATH -u "$shortmode_path"`
42403      new_path="$input_path"
42404    fi
42405  fi
42406
42407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42408  if test "x$test_cygdrive_prefix" = x; then
42409    # As a simple fix, exclude /usr/bin since it's not a real path.
42410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42412      # a path prefixed by /cygdrive for fixpath to work.
42413      new_path="$CYGWIN_ROOT_PATH$input_path"
42414    fi
42415  fi
42416
42417  # remove trailing .exe if any
42418  new_path="${new_path/%.exe/}"
42419
42420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42421
42422  # First separate the path from the arguments. This will split at the first
42423  # space.
42424  complete="$NM"
42425  path="${complete%% *}"
42426  tmp="$complete EOL"
42427  arguments="${tmp#* }"
42428
42429  # Input might be given as Windows format, start by converting to
42430  # unix format.
42431  new_path="$path"
42432
42433  windows_path="$new_path"
42434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42435    unix_path=`$CYGPATH -u "$windows_path"`
42436    new_path="$unix_path"
42437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42439    new_path="$unix_path"
42440  fi
42441
42442
42443  # Now try to locate executable using which
42444  new_path=`$WHICH "$new_path" 2> /dev/null`
42445
42446  if test "x$new_path" = x; then
42447    # Oops. Which didn't find the executable.
42448    # The splitting of arguments from the executable at a space might have been incorrect,
42449    # since paths with space are more likely in Windows. Give it another try with the whole
42450    # argument.
42451    path="$complete"
42452    arguments="EOL"
42453    new_path="$path"
42454
42455  windows_path="$new_path"
42456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42457    unix_path=`$CYGPATH -u "$windows_path"`
42458    new_path="$unix_path"
42459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42461    new_path="$unix_path"
42462  fi
42463
42464
42465    new_path=`$WHICH "$new_path" 2> /dev/null`
42466    # bat and cmd files are not always considered executable in MSYS causing which
42467    # to not find them
42468    if test "x$new_path" = x \
42469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42471      new_path="$path"
42472
42473  windows_path="$new_path"
42474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42475    unix_path=`$CYGPATH -u "$windows_path"`
42476    new_path="$unix_path"
42477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42479    new_path="$unix_path"
42480  fi
42481
42482    fi
42483
42484    if test "x$new_path" = x; then
42485      # It's still not found. Now this is an unrecoverable error.
42486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42487$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42488      has_space=`$ECHO "$complete" | $GREP " "`
42489      if test "x$has_space" != x; then
42490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42492      fi
42493      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42494    fi
42495  fi
42496
42497  # Now new_path has a complete unix path to the binary
42498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42499    # Keep paths in /bin as-is, but remove trailing .exe if any
42500    new_path="${new_path/%.exe/}"
42501    # Do not save /bin paths to all_fixpath_prefixes!
42502  else
42503    # Not in mixed or Windows style, start by that.
42504    new_path=`cmd //c echo $new_path`
42505
42506  input_path="$new_path"
42507  # Check if we need to convert this using DOS-style short mode. If the path
42508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42509  # take no chances and rewrite it.
42510  # Note: m4 eats our [], so we need to use [ and ] instead.
42511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42512  if test "x$has_forbidden_chars" != x; then
42513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42515  fi
42516
42517    # Output is in $new_path
42518
42519  windows_path="$new_path"
42520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42521    unix_path=`$CYGPATH -u "$windows_path"`
42522    new_path="$unix_path"
42523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42525    new_path="$unix_path"
42526  fi
42527
42528    # remove trailing .exe if any
42529    new_path="${new_path/%.exe/}"
42530
42531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42533  fi
42534
42535    else
42536      # We're on a unix platform. Hooray! :)
42537      # First separate the path from the arguments. This will split at the first
42538      # space.
42539      complete="$NM"
42540      path="${complete%% *}"
42541      tmp="$complete EOL"
42542      arguments="${tmp#* }"
42543
42544      # Cannot rely on the command "which" here since it doesn't always work.
42545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42546      if test -z "$is_absolute_path"; then
42547        # Path to executable is not absolute. Find it.
42548        IFS_save="$IFS"
42549        IFS=:
42550        for p in $PATH; do
42551          if test -f "$p/$path" && test -x "$p/$path"; then
42552            new_path="$p/$path"
42553            break
42554          fi
42555        done
42556        IFS="$IFS_save"
42557      else
42558        # This is an absolute path, we can use it without further modifications.
42559        new_path="$path"
42560      fi
42561
42562      if test "x$new_path" = x; then
42563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42564$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42565        has_space=`$ECHO "$complete" | $GREP " "`
42566        if test "x$has_space" != x; then
42567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42569        fi
42570        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42571      fi
42572    fi
42573
42574    # Now join together the path and the arguments once again
42575    if test "x$arguments" != xEOL; then
42576      new_complete="$new_path ${arguments% *}"
42577    else
42578      new_complete="$new_path"
42579    fi
42580
42581    if test "x$complete" != "x$new_complete"; then
42582      NM="$new_complete"
42583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42584$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42585    fi
42586  fi
42587
42588    GNM="$NM"
42589
42590  fi
42591
42592  # objcopy is used for moving debug symbols to separate files when
42593  # full debug symbols are enabled.
42594  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42595
42596
42597  # Publish this variable in the help.
42598
42599
42600  if [ -z "${OBJCOPY+x}" ]; then
42601    # The variable is not set by user, try to locate tool using the code snippet
42602    if test -n "$ac_tool_prefix"; then
42603  for ac_prog in gobjcopy objcopy
42604  do
42605    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42606set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42608$as_echo_n "checking for $ac_word... " >&6; }
42609if ${ac_cv_prog_OBJCOPY+:} false; then :
42610  $as_echo_n "(cached) " >&6
42611else
42612  if test -n "$OBJCOPY"; then
42613  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42614else
42615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42616for as_dir in $PATH
42617do
42618  IFS=$as_save_IFS
42619  test -z "$as_dir" && as_dir=.
42620    for ac_exec_ext in '' $ac_executable_extensions; do
42621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42622    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42624    break 2
42625  fi
42626done
42627  done
42628IFS=$as_save_IFS
42629
42630fi
42631fi
42632OBJCOPY=$ac_cv_prog_OBJCOPY
42633if test -n "$OBJCOPY"; then
42634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42635$as_echo "$OBJCOPY" >&6; }
42636else
42637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42638$as_echo "no" >&6; }
42639fi
42640
42641
42642    test -n "$OBJCOPY" && break
42643  done
42644fi
42645if test -z "$OBJCOPY"; then
42646  ac_ct_OBJCOPY=$OBJCOPY
42647  for ac_prog in gobjcopy objcopy
42648do
42649  # Extract the first word of "$ac_prog", so it can be a program name with args.
42650set dummy $ac_prog; ac_word=$2
42651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42652$as_echo_n "checking for $ac_word... " >&6; }
42653if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42654  $as_echo_n "(cached) " >&6
42655else
42656  if test -n "$ac_ct_OBJCOPY"; then
42657  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42658else
42659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42660for as_dir in $PATH
42661do
42662  IFS=$as_save_IFS
42663  test -z "$as_dir" && as_dir=.
42664    for ac_exec_ext in '' $ac_executable_extensions; do
42665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42666    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42668    break 2
42669  fi
42670done
42671  done
42672IFS=$as_save_IFS
42673
42674fi
42675fi
42676ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42677if test -n "$ac_ct_OBJCOPY"; then
42678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42679$as_echo "$ac_ct_OBJCOPY" >&6; }
42680else
42681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42682$as_echo "no" >&6; }
42683fi
42684
42685
42686  test -n "$ac_ct_OBJCOPY" && break
42687done
42688
42689  if test "x$ac_ct_OBJCOPY" = x; then
42690    OBJCOPY=""
42691  else
42692    case $cross_compiling:$ac_tool_warned in
42693yes:)
42694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42696ac_tool_warned=yes ;;
42697esac
42698    OBJCOPY=$ac_ct_OBJCOPY
42699  fi
42700fi
42701
42702  else
42703    # The variable is set, but is it from the command line or the environment?
42704
42705    # Try to remove the string !OBJCOPY! from our list.
42706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42708      # If it failed, the variable was not from the command line. Ignore it,
42709      # but warn the user (except for BASH, which is always set by the calling BASH).
42710      if test "xOBJCOPY" != xBASH; then
42711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42712$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42713      fi
42714      # Try to locate tool using the code snippet
42715      if test -n "$ac_tool_prefix"; then
42716  for ac_prog in gobjcopy objcopy
42717  do
42718    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42719set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42721$as_echo_n "checking for $ac_word... " >&6; }
42722if ${ac_cv_prog_OBJCOPY+:} false; then :
42723  $as_echo_n "(cached) " >&6
42724else
42725  if test -n "$OBJCOPY"; then
42726  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42727else
42728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42729for as_dir in $PATH
42730do
42731  IFS=$as_save_IFS
42732  test -z "$as_dir" && as_dir=.
42733    for ac_exec_ext in '' $ac_executable_extensions; do
42734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42735    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42737    break 2
42738  fi
42739done
42740  done
42741IFS=$as_save_IFS
42742
42743fi
42744fi
42745OBJCOPY=$ac_cv_prog_OBJCOPY
42746if test -n "$OBJCOPY"; then
42747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42748$as_echo "$OBJCOPY" >&6; }
42749else
42750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42751$as_echo "no" >&6; }
42752fi
42753
42754
42755    test -n "$OBJCOPY" && break
42756  done
42757fi
42758if test -z "$OBJCOPY"; then
42759  ac_ct_OBJCOPY=$OBJCOPY
42760  for ac_prog in gobjcopy objcopy
42761do
42762  # Extract the first word of "$ac_prog", so it can be a program name with args.
42763set dummy $ac_prog; ac_word=$2
42764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42765$as_echo_n "checking for $ac_word... " >&6; }
42766if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42767  $as_echo_n "(cached) " >&6
42768else
42769  if test -n "$ac_ct_OBJCOPY"; then
42770  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42771else
42772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42773for as_dir in $PATH
42774do
42775  IFS=$as_save_IFS
42776  test -z "$as_dir" && as_dir=.
42777    for ac_exec_ext in '' $ac_executable_extensions; do
42778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42779    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42781    break 2
42782  fi
42783done
42784  done
42785IFS=$as_save_IFS
42786
42787fi
42788fi
42789ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42790if test -n "$ac_ct_OBJCOPY"; then
42791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42792$as_echo "$ac_ct_OBJCOPY" >&6; }
42793else
42794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42795$as_echo "no" >&6; }
42796fi
42797
42798
42799  test -n "$ac_ct_OBJCOPY" && break
42800done
42801
42802  if test "x$ac_ct_OBJCOPY" = x; then
42803    OBJCOPY=""
42804  else
42805    case $cross_compiling:$ac_tool_warned in
42806yes:)
42807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42809ac_tool_warned=yes ;;
42810esac
42811    OBJCOPY=$ac_ct_OBJCOPY
42812  fi
42813fi
42814
42815    else
42816      # If it succeeded, then it was overridden by the user. We will use it
42817      # for the tool.
42818
42819      # First remove it from the list of overridden variables, so we can test
42820      # for unknown variables in the end.
42821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42822
42823      # Check if we try to supply an empty value
42824      if test "x$OBJCOPY" = x; then
42825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42826$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42828$as_echo_n "checking for OBJCOPY... " >&6; }
42829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42830$as_echo "disabled" >&6; }
42831      else
42832        # Check if the provided tool contains a complete path.
42833        tool_specified="$OBJCOPY"
42834        tool_basename="${tool_specified##*/}"
42835        if test "x$tool_basename" = "x$tool_specified"; then
42836          # A command without a complete path is provided, search $PATH.
42837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42838$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42839          # Extract the first word of "$tool_basename", so it can be a program name with args.
42840set dummy $tool_basename; ac_word=$2
42841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42842$as_echo_n "checking for $ac_word... " >&6; }
42843if ${ac_cv_path_OBJCOPY+:} false; then :
42844  $as_echo_n "(cached) " >&6
42845else
42846  case $OBJCOPY in
42847  [\\/]* | ?:[\\/]*)
42848  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42849  ;;
42850  *)
42851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42852for as_dir in $PATH
42853do
42854  IFS=$as_save_IFS
42855  test -z "$as_dir" && as_dir=.
42856    for ac_exec_ext in '' $ac_executable_extensions; do
42857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42858    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42860    break 2
42861  fi
42862done
42863  done
42864IFS=$as_save_IFS
42865
42866  ;;
42867esac
42868fi
42869OBJCOPY=$ac_cv_path_OBJCOPY
42870if test -n "$OBJCOPY"; then
42871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42872$as_echo "$OBJCOPY" >&6; }
42873else
42874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42875$as_echo "no" >&6; }
42876fi
42877
42878
42879          if test "x$OBJCOPY" = x; then
42880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42881          fi
42882        else
42883          # Otherwise we believe it is a complete path. Use it as it is.
42884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42885$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42887$as_echo_n "checking for OBJCOPY... " >&6; }
42888          if test ! -x "$tool_specified"; then
42889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42890$as_echo "not found" >&6; }
42891            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42892          fi
42893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42894$as_echo "$tool_specified" >&6; }
42895        fi
42896      fi
42897    fi
42898
42899  fi
42900
42901
42902    # Only call fixup if objcopy was found.
42903    if test -n "$OBJCOPY"; then
42904
42905  # Only process if variable expands to non-empty
42906
42907  if test "x$OBJCOPY" != x; then
42908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42909
42910  # First separate the path from the arguments. This will split at the first
42911  # space.
42912  complete="$OBJCOPY"
42913  path="${complete%% *}"
42914  tmp="$complete EOL"
42915  arguments="${tmp#* }"
42916
42917  # Input might be given as Windows format, start by converting to
42918  # unix format.
42919  new_path=`$CYGPATH -u "$path"`
42920
42921  # Now try to locate executable using which
42922  new_path=`$WHICH "$new_path" 2> /dev/null`
42923  # bat and cmd files are not always considered executable in cygwin causing which
42924  # to not find them
42925  if test "x$new_path" = x \
42926      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42927      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42928    new_path=`$CYGPATH -u "$path"`
42929  fi
42930  if test "x$new_path" = x; then
42931    # Oops. Which didn't find the executable.
42932    # The splitting of arguments from the executable at a space might have been incorrect,
42933    # since paths with space are more likely in Windows. Give it another try with the whole
42934    # argument.
42935    path="$complete"
42936    arguments="EOL"
42937    new_path=`$CYGPATH -u "$path"`
42938    new_path=`$WHICH "$new_path" 2> /dev/null`
42939    # bat and cmd files are not always considered executable in cygwin causing which
42940    # to not find them
42941    if test "x$new_path" = x \
42942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42944      new_path=`$CYGPATH -u "$path"`
42945    fi
42946    if test "x$new_path" = x; then
42947      # It's still not found. Now this is an unrecoverable error.
42948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42949$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42950      has_space=`$ECHO "$complete" | $GREP " "`
42951      if test "x$has_space" != x; then
42952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42954      fi
42955      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42956    fi
42957  fi
42958
42959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42962  # "foo.exe" is OK but "foo" is an error.
42963  #
42964  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42965  # It is also a way to make sure we got the proper file name for the real test later on.
42966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42967  if test "x$test_shortpath" = x; then
42968    # Short path failed, file does not exist as specified.
42969    # Try adding .exe or .cmd
42970    if test -f "${new_path}.exe"; then
42971      input_to_shortpath="${new_path}.exe"
42972    elif test -f "${new_path}.cmd"; then
42973      input_to_shortpath="${new_path}.cmd"
42974    else
42975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42976$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42979      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42980    fi
42981  else
42982    input_to_shortpath="$new_path"
42983  fi
42984
42985  # Call helper function which possibly converts this using DOS-style short mode.
42986  # If so, the updated path is stored in $new_path.
42987  new_path="$input_to_shortpath"
42988
42989  input_path="$input_to_shortpath"
42990  # Check if we need to convert this using DOS-style short mode. If the path
42991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42992  # take no chances and rewrite it.
42993  # Note: m4 eats our [], so we need to use [ and ] instead.
42994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42995  if test "x$has_forbidden_chars" != x; then
42996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43000      # Going to short mode and back again did indeed matter. Since short mode is
43001      # case insensitive, let's make it lowercase to improve readability.
43002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43003      # Now convert it back to Unix-style (cygpath)
43004      input_path=`$CYGPATH -u "$shortmode_path"`
43005      new_path="$input_path"
43006    fi
43007  fi
43008
43009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43010  if test "x$test_cygdrive_prefix" = x; then
43011    # As a simple fix, exclude /usr/bin since it's not a real path.
43012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43014      # a path prefixed by /cygdrive for fixpath to work.
43015      new_path="$CYGWIN_ROOT_PATH$input_path"
43016    fi
43017  fi
43018
43019  # remove trailing .exe if any
43020  new_path="${new_path/%.exe/}"
43021
43022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43023
43024  # First separate the path from the arguments. This will split at the first
43025  # space.
43026  complete="$OBJCOPY"
43027  path="${complete%% *}"
43028  tmp="$complete EOL"
43029  arguments="${tmp#* }"
43030
43031  # Input might be given as Windows format, start by converting to
43032  # unix format.
43033  new_path="$path"
43034
43035  windows_path="$new_path"
43036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43037    unix_path=`$CYGPATH -u "$windows_path"`
43038    new_path="$unix_path"
43039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43041    new_path="$unix_path"
43042  fi
43043
43044
43045  # Now try to locate executable using which
43046  new_path=`$WHICH "$new_path" 2> /dev/null`
43047
43048  if test "x$new_path" = x; then
43049    # Oops. Which didn't find the executable.
43050    # The splitting of arguments from the executable at a space might have been incorrect,
43051    # since paths with space are more likely in Windows. Give it another try with the whole
43052    # argument.
43053    path="$complete"
43054    arguments="EOL"
43055    new_path="$path"
43056
43057  windows_path="$new_path"
43058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43059    unix_path=`$CYGPATH -u "$windows_path"`
43060    new_path="$unix_path"
43061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43063    new_path="$unix_path"
43064  fi
43065
43066
43067    new_path=`$WHICH "$new_path" 2> /dev/null`
43068    # bat and cmd files are not always considered executable in MSYS causing which
43069    # to not find them
43070    if test "x$new_path" = x \
43071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43073      new_path="$path"
43074
43075  windows_path="$new_path"
43076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43077    unix_path=`$CYGPATH -u "$windows_path"`
43078    new_path="$unix_path"
43079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43081    new_path="$unix_path"
43082  fi
43083
43084    fi
43085
43086    if test "x$new_path" = x; then
43087      # It's still not found. Now this is an unrecoverable error.
43088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43089$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43090      has_space=`$ECHO "$complete" | $GREP " "`
43091      if test "x$has_space" != x; then
43092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43094      fi
43095      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43096    fi
43097  fi
43098
43099  # Now new_path has a complete unix path to the binary
43100  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43101    # Keep paths in /bin as-is, but remove trailing .exe if any
43102    new_path="${new_path/%.exe/}"
43103    # Do not save /bin paths to all_fixpath_prefixes!
43104  else
43105    # Not in mixed or Windows style, start by that.
43106    new_path=`cmd //c echo $new_path`
43107
43108  input_path="$new_path"
43109  # Check if we need to convert this using DOS-style short mode. If the path
43110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43111  # take no chances and rewrite it.
43112  # Note: m4 eats our [], so we need to use [ and ] instead.
43113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43114  if test "x$has_forbidden_chars" != x; then
43115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43117  fi
43118
43119    # Output is in $new_path
43120
43121  windows_path="$new_path"
43122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43123    unix_path=`$CYGPATH -u "$windows_path"`
43124    new_path="$unix_path"
43125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43127    new_path="$unix_path"
43128  fi
43129
43130    # remove trailing .exe if any
43131    new_path="${new_path/%.exe/}"
43132
43133    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43134    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43135  fi
43136
43137    else
43138      # We're on a unix platform. Hooray! :)
43139      # First separate the path from the arguments. This will split at the first
43140      # space.
43141      complete="$OBJCOPY"
43142      path="${complete%% *}"
43143      tmp="$complete EOL"
43144      arguments="${tmp#* }"
43145
43146      # Cannot rely on the command "which" here since it doesn't always work.
43147      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43148      if test -z "$is_absolute_path"; then
43149        # Path to executable is not absolute. Find it.
43150        IFS_save="$IFS"
43151        IFS=:
43152        for p in $PATH; do
43153          if test -f "$p/$path" && test -x "$p/$path"; then
43154            new_path="$p/$path"
43155            break
43156          fi
43157        done
43158        IFS="$IFS_save"
43159      else
43160        # This is an absolute path, we can use it without further modifications.
43161        new_path="$path"
43162      fi
43163
43164      if test "x$new_path" = x; then
43165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43166$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43167        has_space=`$ECHO "$complete" | $GREP " "`
43168        if test "x$has_space" != x; then
43169          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43170$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43171        fi
43172        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43173      fi
43174    fi
43175
43176    # Now join together the path and the arguments once again
43177    if test "x$arguments" != xEOL; then
43178      new_complete="$new_path ${arguments% *}"
43179    else
43180      new_complete="$new_path"
43181    fi
43182
43183    if test "x$complete" != "x$new_complete"; then
43184      OBJCOPY="$new_complete"
43185      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43186$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43187    fi
43188  fi
43189
43190      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43191        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43192        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43193        # - version number is last blank separate word on first line
43194        # - version number formats that have been seen:
43195        #   - <major>.<minor>
43196        #   - <major>.<minor>.<micro>
43197        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43198        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43199         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43200              -e 's/.* //' \
43201              -e '/^[01]\./b bad' \
43202              -e '/^2\./{' \
43203              -e '  s/^2\.//' \
43204              -e '  /^[0-9]$/b bad' \
43205              -e '  /^[0-9]\./b bad' \
43206              -e '  /^1[0-9]$/b bad' \
43207              -e '  /^1[0-9]\./b bad' \
43208              -e '  /^20\./b bad' \
43209              -e '  /^21\.0$/b bad' \
43210              -e '  /^21\.0\./b bad' \
43211              -e '}' \
43212              -e ':good' \
43213              -e 's/.*/VALID_VERSION/p' \
43214              -e 'q' \
43215              -e ':bad' \
43216              -e 's/.*/BAD_VERSION/p' \
43217              -e 'q'`
43218        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43219          OBJCOPY=
43220          { $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
43221$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43222          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43223$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43224          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43225$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43226          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43227$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43228          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43229$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43230        fi
43231      fi
43232    fi
43233  fi
43234
43235
43236
43237  # Publish this variable in the help.
43238
43239
43240  if [ -z "${OBJDUMP+x}" ]; then
43241    # The variable is not set by user, try to locate tool using the code snippet
43242    if test -n "$ac_tool_prefix"; then
43243  for ac_prog in gobjdump objdump
43244  do
43245    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43246set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43248$as_echo_n "checking for $ac_word... " >&6; }
43249if ${ac_cv_prog_OBJDUMP+:} false; then :
43250  $as_echo_n "(cached) " >&6
43251else
43252  if test -n "$OBJDUMP"; then
43253  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43254else
43255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43256for as_dir in $PATH
43257do
43258  IFS=$as_save_IFS
43259  test -z "$as_dir" && as_dir=.
43260    for ac_exec_ext in '' $ac_executable_extensions; do
43261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43262    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43264    break 2
43265  fi
43266done
43267  done
43268IFS=$as_save_IFS
43269
43270fi
43271fi
43272OBJDUMP=$ac_cv_prog_OBJDUMP
43273if test -n "$OBJDUMP"; then
43274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43275$as_echo "$OBJDUMP" >&6; }
43276else
43277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43278$as_echo "no" >&6; }
43279fi
43280
43281
43282    test -n "$OBJDUMP" && break
43283  done
43284fi
43285if test -z "$OBJDUMP"; then
43286  ac_ct_OBJDUMP=$OBJDUMP
43287  for ac_prog in gobjdump objdump
43288do
43289  # Extract the first word of "$ac_prog", so it can be a program name with args.
43290set dummy $ac_prog; ac_word=$2
43291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43292$as_echo_n "checking for $ac_word... " >&6; }
43293if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43294  $as_echo_n "(cached) " >&6
43295else
43296  if test -n "$ac_ct_OBJDUMP"; then
43297  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43298else
43299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43300for as_dir in $PATH
43301do
43302  IFS=$as_save_IFS
43303  test -z "$as_dir" && as_dir=.
43304    for ac_exec_ext in '' $ac_executable_extensions; do
43305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43306    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43308    break 2
43309  fi
43310done
43311  done
43312IFS=$as_save_IFS
43313
43314fi
43315fi
43316ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43317if test -n "$ac_ct_OBJDUMP"; then
43318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43319$as_echo "$ac_ct_OBJDUMP" >&6; }
43320else
43321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43322$as_echo "no" >&6; }
43323fi
43324
43325
43326  test -n "$ac_ct_OBJDUMP" && break
43327done
43328
43329  if test "x$ac_ct_OBJDUMP" = x; then
43330    OBJDUMP=""
43331  else
43332    case $cross_compiling:$ac_tool_warned in
43333yes:)
43334{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43335$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43336ac_tool_warned=yes ;;
43337esac
43338    OBJDUMP=$ac_ct_OBJDUMP
43339  fi
43340fi
43341
43342  else
43343    # The variable is set, but is it from the command line or the environment?
43344
43345    # Try to remove the string !OBJDUMP! from our list.
43346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43348      # If it failed, the variable was not from the command line. Ignore it,
43349      # but warn the user (except for BASH, which is always set by the calling BASH).
43350      if test "xOBJDUMP" != xBASH; then
43351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43352$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43353      fi
43354      # Try to locate tool using the code snippet
43355      if test -n "$ac_tool_prefix"; then
43356  for ac_prog in gobjdump objdump
43357  do
43358    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43359set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43361$as_echo_n "checking for $ac_word... " >&6; }
43362if ${ac_cv_prog_OBJDUMP+:} false; then :
43363  $as_echo_n "(cached) " >&6
43364else
43365  if test -n "$OBJDUMP"; then
43366  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43367else
43368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43369for as_dir in $PATH
43370do
43371  IFS=$as_save_IFS
43372  test -z "$as_dir" && as_dir=.
43373    for ac_exec_ext in '' $ac_executable_extensions; do
43374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43375    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43377    break 2
43378  fi
43379done
43380  done
43381IFS=$as_save_IFS
43382
43383fi
43384fi
43385OBJDUMP=$ac_cv_prog_OBJDUMP
43386if test -n "$OBJDUMP"; then
43387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43388$as_echo "$OBJDUMP" >&6; }
43389else
43390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43391$as_echo "no" >&6; }
43392fi
43393
43394
43395    test -n "$OBJDUMP" && break
43396  done
43397fi
43398if test -z "$OBJDUMP"; then
43399  ac_ct_OBJDUMP=$OBJDUMP
43400  for ac_prog in gobjdump objdump
43401do
43402  # Extract the first word of "$ac_prog", so it can be a program name with args.
43403set dummy $ac_prog; ac_word=$2
43404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43405$as_echo_n "checking for $ac_word... " >&6; }
43406if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43407  $as_echo_n "(cached) " >&6
43408else
43409  if test -n "$ac_ct_OBJDUMP"; then
43410  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43411else
43412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43413for as_dir in $PATH
43414do
43415  IFS=$as_save_IFS
43416  test -z "$as_dir" && as_dir=.
43417    for ac_exec_ext in '' $ac_executable_extensions; do
43418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43419    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43421    break 2
43422  fi
43423done
43424  done
43425IFS=$as_save_IFS
43426
43427fi
43428fi
43429ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43430if test -n "$ac_ct_OBJDUMP"; then
43431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43432$as_echo "$ac_ct_OBJDUMP" >&6; }
43433else
43434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43435$as_echo "no" >&6; }
43436fi
43437
43438
43439  test -n "$ac_ct_OBJDUMP" && break
43440done
43441
43442  if test "x$ac_ct_OBJDUMP" = x; then
43443    OBJDUMP=""
43444  else
43445    case $cross_compiling:$ac_tool_warned in
43446yes:)
43447{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43448$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43449ac_tool_warned=yes ;;
43450esac
43451    OBJDUMP=$ac_ct_OBJDUMP
43452  fi
43453fi
43454
43455    else
43456      # If it succeeded, then it was overridden by the user. We will use it
43457      # for the tool.
43458
43459      # First remove it from the list of overridden variables, so we can test
43460      # for unknown variables in the end.
43461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43462
43463      # Check if we try to supply an empty value
43464      if test "x$OBJDUMP" = x; then
43465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43466$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43468$as_echo_n "checking for OBJDUMP... " >&6; }
43469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43470$as_echo "disabled" >&6; }
43471      else
43472        # Check if the provided tool contains a complete path.
43473        tool_specified="$OBJDUMP"
43474        tool_basename="${tool_specified##*/}"
43475        if test "x$tool_basename" = "x$tool_specified"; then
43476          # A command without a complete path is provided, search $PATH.
43477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43478$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43479          # Extract the first word of "$tool_basename", so it can be a program name with args.
43480set dummy $tool_basename; ac_word=$2
43481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43482$as_echo_n "checking for $ac_word... " >&6; }
43483if ${ac_cv_path_OBJDUMP+:} false; then :
43484  $as_echo_n "(cached) " >&6
43485else
43486  case $OBJDUMP in
43487  [\\/]* | ?:[\\/]*)
43488  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43489  ;;
43490  *)
43491  as_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_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
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
43506  ;;
43507esac
43508fi
43509OBJDUMP=$ac_cv_path_OBJDUMP
43510if test -n "$OBJDUMP"; then
43511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43512$as_echo "$OBJDUMP" >&6; }
43513else
43514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43515$as_echo "no" >&6; }
43516fi
43517
43518
43519          if test "x$OBJDUMP" = x; then
43520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43521          fi
43522        else
43523          # Otherwise we believe it is a complete path. Use it as it is.
43524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43525$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43527$as_echo_n "checking for OBJDUMP... " >&6; }
43528          if test ! -x "$tool_specified"; then
43529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43530$as_echo "not found" >&6; }
43531            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43532          fi
43533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43534$as_echo "$tool_specified" >&6; }
43535        fi
43536      fi
43537    fi
43538
43539  fi
43540
43541
43542  if test "x$OBJDUMP" != x; then
43543    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43544    # bails if argument is missing.
43545
43546  # Only process if variable expands to non-empty
43547
43548  if test "x$OBJDUMP" != x; then
43549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43550
43551  # First separate the path from the arguments. This will split at the first
43552  # space.
43553  complete="$OBJDUMP"
43554  path="${complete%% *}"
43555  tmp="$complete EOL"
43556  arguments="${tmp#* }"
43557
43558  # Input might be given as Windows format, start by converting to
43559  # unix format.
43560  new_path=`$CYGPATH -u "$path"`
43561
43562  # Now try to locate executable using which
43563  new_path=`$WHICH "$new_path" 2> /dev/null`
43564  # bat and cmd files are not always considered executable in cygwin causing which
43565  # to not find them
43566  if test "x$new_path" = x \
43567      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43568      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43569    new_path=`$CYGPATH -u "$path"`
43570  fi
43571  if test "x$new_path" = x; then
43572    # Oops. Which didn't find the executable.
43573    # The splitting of arguments from the executable at a space might have been incorrect,
43574    # since paths with space are more likely in Windows. Give it another try with the whole
43575    # argument.
43576    path="$complete"
43577    arguments="EOL"
43578    new_path=`$CYGPATH -u "$path"`
43579    new_path=`$WHICH "$new_path" 2> /dev/null`
43580    # bat and cmd files are not always considered executable in cygwin causing which
43581    # to not find them
43582    if test "x$new_path" = x \
43583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43585      new_path=`$CYGPATH -u "$path"`
43586    fi
43587    if test "x$new_path" = x; then
43588      # It's still not found. Now this is an unrecoverable error.
43589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43590$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43591      has_space=`$ECHO "$complete" | $GREP " "`
43592      if test "x$has_space" != x; then
43593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43595      fi
43596      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43597    fi
43598  fi
43599
43600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43603  # "foo.exe" is OK but "foo" is an error.
43604  #
43605  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43606  # It is also a way to make sure we got the proper file name for the real test later on.
43607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43608  if test "x$test_shortpath" = x; then
43609    # Short path failed, file does not exist as specified.
43610    # Try adding .exe or .cmd
43611    if test -f "${new_path}.exe"; then
43612      input_to_shortpath="${new_path}.exe"
43613    elif test -f "${new_path}.cmd"; then
43614      input_to_shortpath="${new_path}.cmd"
43615    else
43616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43617$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43618      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43619$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43620      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43621    fi
43622  else
43623    input_to_shortpath="$new_path"
43624  fi
43625
43626  # Call helper function which possibly converts this using DOS-style short mode.
43627  # If so, the updated path is stored in $new_path.
43628  new_path="$input_to_shortpath"
43629
43630  input_path="$input_to_shortpath"
43631  # Check if we need to convert this using DOS-style short mode. If the path
43632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43633  # take no chances and rewrite it.
43634  # Note: m4 eats our [], so we need to use [ and ] instead.
43635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43636  if test "x$has_forbidden_chars" != x; then
43637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43641      # Going to short mode and back again did indeed matter. Since short mode is
43642      # case insensitive, let's make it lowercase to improve readability.
43643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43644      # Now convert it back to Unix-style (cygpath)
43645      input_path=`$CYGPATH -u "$shortmode_path"`
43646      new_path="$input_path"
43647    fi
43648  fi
43649
43650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43651  if test "x$test_cygdrive_prefix" = x; then
43652    # As a simple fix, exclude /usr/bin since it's not a real path.
43653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43655      # a path prefixed by /cygdrive for fixpath to work.
43656      new_path="$CYGWIN_ROOT_PATH$input_path"
43657    fi
43658  fi
43659
43660  # remove trailing .exe if any
43661  new_path="${new_path/%.exe/}"
43662
43663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43664
43665  # First separate the path from the arguments. This will split at the first
43666  # space.
43667  complete="$OBJDUMP"
43668  path="${complete%% *}"
43669  tmp="$complete EOL"
43670  arguments="${tmp#* }"
43671
43672  # Input might be given as Windows format, start by converting to
43673  # unix format.
43674  new_path="$path"
43675
43676  windows_path="$new_path"
43677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43678    unix_path=`$CYGPATH -u "$windows_path"`
43679    new_path="$unix_path"
43680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43682    new_path="$unix_path"
43683  fi
43684
43685
43686  # Now try to locate executable using which
43687  new_path=`$WHICH "$new_path" 2> /dev/null`
43688
43689  if test "x$new_path" = x; then
43690    # Oops. Which didn't find the executable.
43691    # The splitting of arguments from the executable at a space might have been incorrect,
43692    # since paths with space are more likely in Windows. Give it another try with the whole
43693    # argument.
43694    path="$complete"
43695    arguments="EOL"
43696    new_path="$path"
43697
43698  windows_path="$new_path"
43699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43700    unix_path=`$CYGPATH -u "$windows_path"`
43701    new_path="$unix_path"
43702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43704    new_path="$unix_path"
43705  fi
43706
43707
43708    new_path=`$WHICH "$new_path" 2> /dev/null`
43709    # bat and cmd files are not always considered executable in MSYS causing which
43710    # to not find them
43711    if test "x$new_path" = x \
43712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43714      new_path="$path"
43715
43716  windows_path="$new_path"
43717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43718    unix_path=`$CYGPATH -u "$windows_path"`
43719    new_path="$unix_path"
43720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43722    new_path="$unix_path"
43723  fi
43724
43725    fi
43726
43727    if test "x$new_path" = x; then
43728      # It's still not found. Now this is an unrecoverable error.
43729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43730$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43731      has_space=`$ECHO "$complete" | $GREP " "`
43732      if test "x$has_space" != x; then
43733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43735      fi
43736      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43737    fi
43738  fi
43739
43740  # Now new_path has a complete unix path to the binary
43741  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43742    # Keep paths in /bin as-is, but remove trailing .exe if any
43743    new_path="${new_path/%.exe/}"
43744    # Do not save /bin paths to all_fixpath_prefixes!
43745  else
43746    # Not in mixed or Windows style, start by that.
43747    new_path=`cmd //c echo $new_path`
43748
43749  input_path="$new_path"
43750  # Check if we need to convert this using DOS-style short mode. If the path
43751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43752  # take no chances and rewrite it.
43753  # Note: m4 eats our [], so we need to use [ and ] instead.
43754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43755  if test "x$has_forbidden_chars" != x; then
43756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43758  fi
43759
43760    # Output is in $new_path
43761
43762  windows_path="$new_path"
43763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43764    unix_path=`$CYGPATH -u "$windows_path"`
43765    new_path="$unix_path"
43766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43768    new_path="$unix_path"
43769  fi
43770
43771    # remove trailing .exe if any
43772    new_path="${new_path/%.exe/}"
43773
43774    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43775    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43776  fi
43777
43778    else
43779      # We're on a unix platform. Hooray! :)
43780      # First separate the path from the arguments. This will split at the first
43781      # space.
43782      complete="$OBJDUMP"
43783      path="${complete%% *}"
43784      tmp="$complete EOL"
43785      arguments="${tmp#* }"
43786
43787      # Cannot rely on the command "which" here since it doesn't always work.
43788      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43789      if test -z "$is_absolute_path"; then
43790        # Path to executable is not absolute. Find it.
43791        IFS_save="$IFS"
43792        IFS=:
43793        for p in $PATH; do
43794          if test -f "$p/$path" && test -x "$p/$path"; then
43795            new_path="$p/$path"
43796            break
43797          fi
43798        done
43799        IFS="$IFS_save"
43800      else
43801        # This is an absolute path, we can use it without further modifications.
43802        new_path="$path"
43803      fi
43804
43805      if test "x$new_path" = x; then
43806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43807$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43808        has_space=`$ECHO "$complete" | $GREP " "`
43809        if test "x$has_space" != x; then
43810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43812        fi
43813        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43814      fi
43815    fi
43816
43817    # Now join together the path and the arguments once again
43818    if test "x$arguments" != xEOL; then
43819      new_complete="$new_path ${arguments% *}"
43820    else
43821      new_complete="$new_path"
43822    fi
43823
43824    if test "x$complete" != "x$new_complete"; then
43825      OBJDUMP="$new_complete"
43826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43827$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43828    fi
43829  fi
43830
43831  fi
43832
43833
43834  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43835  # to remain in place. Otherwise the compiler will not work in some siutations
43836  # in later configure checks.
43837  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43838    PATH="$OLD_PATH"
43839  fi
43840
43841  # Restore the flags to the user specified values.
43842  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43843  CFLAGS="$ORG_CFLAGS"
43844  CXXFLAGS="$ORG_CXXFLAGS"
43845
43846
43847# Finally do some processing after the detection phase
43848
43849  if test "x$COMPILE_TYPE" = "xcross"; then
43850    # Now we need to find a C/C++ compiler that can build executables for the
43851    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43852    # used once. Also, we need to do this without adding a tools dir to the
43853    # path, otherwise we might pick up cross-compilers which don't use standard
43854    # naming.
43855
43856    OLDPATH="$PATH"
43857
43858
43859# Check whether --with-build-devkit was given.
43860if test "${with_build_devkit+set}" = set; then :
43861  withval=$with_build_devkit;
43862fi
43863
43864    if test "x$with_build_devkit" = "xyes"; then
43865      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43866    elif test -n "$with_build_devkit"; then
43867      if test ! -d "$with_build_devkit"; then
43868        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43869      else
43870
43871  # Only process if variable expands to non-empty
43872
43873  if test "x$with_build_devkit" != x; then
43874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43875
43876  # Input might be given as Windows format, start by converting to
43877  # unix format.
43878  path="$with_build_devkit"
43879  new_path=`$CYGPATH -u "$path"`
43880
43881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43884  # "foo.exe" is OK but "foo" is an error.
43885  #
43886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43887  # It is also a way to make sure we got the proper file name for the real test later on.
43888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43889  if test "x$test_shortpath" = x; then
43890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43891$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43892    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43893  fi
43894
43895  # Call helper function which possibly converts this using DOS-style short mode.
43896  # If so, the updated path is stored in $new_path.
43897
43898  input_path="$new_path"
43899  # Check if we need to convert this using DOS-style short mode. If the path
43900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43901  # take no chances and rewrite it.
43902  # Note: m4 eats our [], so we need to use [ and ] instead.
43903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43904  if test "x$has_forbidden_chars" != x; then
43905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43909      # Going to short mode and back again did indeed matter. Since short mode is
43910      # case insensitive, let's make it lowercase to improve readability.
43911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43912      # Now convert it back to Unix-style (cygpath)
43913      input_path=`$CYGPATH -u "$shortmode_path"`
43914      new_path="$input_path"
43915    fi
43916  fi
43917
43918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43919  if test "x$test_cygdrive_prefix" = x; then
43920    # As a simple fix, exclude /usr/bin since it's not a real path.
43921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43923      # a path prefixed by /cygdrive for fixpath to work.
43924      new_path="$CYGWIN_ROOT_PATH$input_path"
43925    fi
43926  fi
43927
43928
43929  if test "x$path" != "x$new_path"; then
43930    with_build_devkit="$new_path"
43931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43932$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43933  fi
43934
43935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43936
43937  path="$with_build_devkit"
43938  has_colon=`$ECHO $path | $GREP ^.:`
43939  new_path="$path"
43940  if test "x$has_colon" = x; then
43941    # Not in mixed or Windows style, start by that.
43942    new_path=`cmd //c echo $path`
43943  fi
43944
43945
43946  input_path="$new_path"
43947  # Check if we need to convert this using DOS-style short mode. If the path
43948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43949  # take no chances and rewrite it.
43950  # Note: m4 eats our [], so we need to use [ and ] instead.
43951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43952  if test "x$has_forbidden_chars" != x; then
43953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43955  fi
43956
43957
43958  windows_path="$new_path"
43959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43960    unix_path=`$CYGPATH -u "$windows_path"`
43961    new_path="$unix_path"
43962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43964    new_path="$unix_path"
43965  fi
43966
43967  if test "x$path" != "x$new_path"; then
43968    with_build_devkit="$new_path"
43969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43970$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43971  fi
43972
43973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43975
43976    else
43977      # We're on a unix platform. Hooray! :)
43978      path="$with_build_devkit"
43979      has_space=`$ECHO "$path" | $GREP " "`
43980      if test "x$has_space" != x; then
43981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43982$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43984      fi
43985
43986      # Use eval to expand a potential ~
43987      eval path="$path"
43988      if test ! -f "$path" && test ! -d "$path"; then
43989        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43990      fi
43991
43992      if test -d "$path"; then
43993        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43994      else
43995        dir="`$DIRNAME "$path"`"
43996        base="`$BASENAME "$path"`"
43997        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43998      fi
43999    fi
44000  fi
44001
44002        BUILD_DEVKIT_ROOT="$with_build_devkit"
44003        # Check for a meta data info file in the root of the devkit
44004        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44005          # Process devkit.info so that existing devkit variables are not
44006          # modified by this
44007          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44008              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44009              -e "s/\$host/\$build/g" \
44010              $BUILD_DEVKIT_ROOT/devkit.info \
44011              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44012          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44013          # This potentially sets the following:
44014          # A descriptive name of the devkit
44015
44016  if test "x$BUILD_DEVKIT_NAME" = x; then
44017    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44018  fi
44019
44020          # Corresponds to --with-extra-path
44021
44022  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44023    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44024  fi
44025
44026          # Corresponds to --with-toolchain-path
44027
44028  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44029    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44030  fi
44031
44032          # Corresponds to --with-sysroot
44033
44034  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44035    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44036  fi
44037
44038          # Skip the Window specific parts
44039        fi
44040
44041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44042$as_echo_n "checking for build platform devkit... " >&6; }
44043        if test "x$BUILD_DEVKIT_NAME" != x; then
44044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44045$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44046        else
44047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44048$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44049        fi
44050
44051        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44052
44053  if test "x$BUILD_SYSROOT" != "x"; then
44054    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44055      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44056        # Solaris Studio does not have a concept of sysroot. Instead we must
44057        # make sure the default include and lib dirs are appended to each
44058        # compile and link command line. Must also add -I-xbuiltin to enable
44059        # inlining of system functions and intrinsics.
44060        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44061        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44062            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44063      fi
44064    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44065      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44066      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44067    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44068      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44069      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44070    fi
44071    # Propagate the sysroot args to hotspot
44072    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44073    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44074    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44075    # The global CFLAGS and LDFLAGS variables need these for configure to function
44076    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44077    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44078    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44079    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44080  fi
44081
44082  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44083    # We also need -iframework<path>/System/Library/Frameworks
44084    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44085    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44086    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44087    # set this here so it doesn't have to be peppered throughout the forest
44088    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44089    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44090  fi
44091
44092
44093
44094
44095
44096         # Fallback default of just /bin if DEVKIT_PATH is not defined
44097        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44098          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44099        fi
44100        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44101      fi
44102    fi
44103
44104    # FIXME: we should list the discovered compilers as an exclude pattern!
44105    # If we do that, we can do this detection before POST_DETECTION, and still
44106    # find the build compilers in the tools dir, if needed.
44107
44108
44109
44110  # Publish this variable in the help.
44111
44112
44113  if [ -z "${BUILD_CC+x}" ]; then
44114    # The variable is not set by user, try to locate tool using the code snippet
44115    for ac_prog in cl cc gcc
44116do
44117  # Extract the first word of "$ac_prog", so it can be a program name with args.
44118set dummy $ac_prog; ac_word=$2
44119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44120$as_echo_n "checking for $ac_word... " >&6; }
44121if ${ac_cv_path_BUILD_CC+:} false; then :
44122  $as_echo_n "(cached) " >&6
44123else
44124  case $BUILD_CC in
44125  [\\/]* | ?:[\\/]*)
44126  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44127  ;;
44128  *)
44129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44130for as_dir in $PATH
44131do
44132  IFS=$as_save_IFS
44133  test -z "$as_dir" && as_dir=.
44134    for ac_exec_ext in '' $ac_executable_extensions; do
44135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44136    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44138    break 2
44139  fi
44140done
44141  done
44142IFS=$as_save_IFS
44143
44144  ;;
44145esac
44146fi
44147BUILD_CC=$ac_cv_path_BUILD_CC
44148if test -n "$BUILD_CC"; then
44149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44150$as_echo "$BUILD_CC" >&6; }
44151else
44152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44153$as_echo "no" >&6; }
44154fi
44155
44156
44157  test -n "$BUILD_CC" && break
44158done
44159
44160  else
44161    # The variable is set, but is it from the command line or the environment?
44162
44163    # Try to remove the string !BUILD_CC! from our list.
44164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44166      # If it failed, the variable was not from the command line. Ignore it,
44167      # but warn the user (except for BASH, which is always set by the calling BASH).
44168      if test "xBUILD_CC" != xBASH; then
44169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44170$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44171      fi
44172      # Try to locate tool using the code snippet
44173      for ac_prog in cl cc gcc
44174do
44175  # Extract the first word of "$ac_prog", so it can be a program name with args.
44176set dummy $ac_prog; ac_word=$2
44177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44178$as_echo_n "checking for $ac_word... " >&6; }
44179if ${ac_cv_path_BUILD_CC+:} false; then :
44180  $as_echo_n "(cached) " >&6
44181else
44182  case $BUILD_CC in
44183  [\\/]* | ?:[\\/]*)
44184  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44185  ;;
44186  *)
44187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44188for as_dir in $PATH
44189do
44190  IFS=$as_save_IFS
44191  test -z "$as_dir" && as_dir=.
44192    for ac_exec_ext in '' $ac_executable_extensions; do
44193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44194    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44196    break 2
44197  fi
44198done
44199  done
44200IFS=$as_save_IFS
44201
44202  ;;
44203esac
44204fi
44205BUILD_CC=$ac_cv_path_BUILD_CC
44206if test -n "$BUILD_CC"; then
44207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44208$as_echo "$BUILD_CC" >&6; }
44209else
44210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44211$as_echo "no" >&6; }
44212fi
44213
44214
44215  test -n "$BUILD_CC" && break
44216done
44217
44218    else
44219      # If it succeeded, then it was overridden by the user. We will use it
44220      # for the tool.
44221
44222      # First remove it from the list of overridden variables, so we can test
44223      # for unknown variables in the end.
44224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44225
44226      # Check if we try to supply an empty value
44227      if test "x$BUILD_CC" = x; then
44228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44229$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44231$as_echo_n "checking for BUILD_CC... " >&6; }
44232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44233$as_echo "disabled" >&6; }
44234      else
44235        # Check if the provided tool contains a complete path.
44236        tool_specified="$BUILD_CC"
44237        tool_basename="${tool_specified##*/}"
44238        if test "x$tool_basename" = "x$tool_specified"; then
44239          # A command without a complete path is provided, search $PATH.
44240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44241$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44242          # Extract the first word of "$tool_basename", so it can be a program name with args.
44243set dummy $tool_basename; ac_word=$2
44244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44245$as_echo_n "checking for $ac_word... " >&6; }
44246if ${ac_cv_path_BUILD_CC+:} false; then :
44247  $as_echo_n "(cached) " >&6
44248else
44249  case $BUILD_CC in
44250  [\\/]* | ?:[\\/]*)
44251  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44252  ;;
44253  *)
44254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44255for as_dir in $PATH
44256do
44257  IFS=$as_save_IFS
44258  test -z "$as_dir" && as_dir=.
44259    for ac_exec_ext in '' $ac_executable_extensions; do
44260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44261    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44263    break 2
44264  fi
44265done
44266  done
44267IFS=$as_save_IFS
44268
44269  ;;
44270esac
44271fi
44272BUILD_CC=$ac_cv_path_BUILD_CC
44273if test -n "$BUILD_CC"; then
44274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44275$as_echo "$BUILD_CC" >&6; }
44276else
44277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44278$as_echo "no" >&6; }
44279fi
44280
44281
44282          if test "x$BUILD_CC" = x; then
44283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44284          fi
44285        else
44286          # Otherwise we believe it is a complete path. Use it as it is.
44287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44288$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44290$as_echo_n "checking for BUILD_CC... " >&6; }
44291          if test ! -x "$tool_specified"; then
44292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44293$as_echo "not found" >&6; }
44294            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44295          fi
44296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44297$as_echo "$tool_specified" >&6; }
44298        fi
44299      fi
44300    fi
44301
44302  fi
44303
44304
44305
44306  if test "x$BUILD_CC" = x; then
44307    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44308  fi
44309
44310
44311
44312  # Only process if variable expands to non-empty
44313
44314  if test "x$BUILD_CC" != x; then
44315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44316
44317  # First separate the path from the arguments. This will split at the first
44318  # space.
44319  complete="$BUILD_CC"
44320  path="${complete%% *}"
44321  tmp="$complete EOL"
44322  arguments="${tmp#* }"
44323
44324  # Input might be given as Windows format, start by converting to
44325  # unix format.
44326  new_path=`$CYGPATH -u "$path"`
44327
44328  # Now try to locate executable using which
44329  new_path=`$WHICH "$new_path" 2> /dev/null`
44330  # bat and cmd files are not always considered executable in cygwin causing which
44331  # to not find them
44332  if test "x$new_path" = x \
44333      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44334      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44335    new_path=`$CYGPATH -u "$path"`
44336  fi
44337  if test "x$new_path" = x; then
44338    # Oops. Which didn't find the executable.
44339    # The splitting of arguments from the executable at a space might have been incorrect,
44340    # since paths with space are more likely in Windows. Give it another try with the whole
44341    # argument.
44342    path="$complete"
44343    arguments="EOL"
44344    new_path=`$CYGPATH -u "$path"`
44345    new_path=`$WHICH "$new_path" 2> /dev/null`
44346    # bat and cmd files are not always considered executable in cygwin causing which
44347    # to not find them
44348    if test "x$new_path" = x \
44349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44351      new_path=`$CYGPATH -u "$path"`
44352    fi
44353    if test "x$new_path" = x; then
44354      # It's still not found. Now this is an unrecoverable error.
44355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44356$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44357      has_space=`$ECHO "$complete" | $GREP " "`
44358      if test "x$has_space" != x; then
44359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44361      fi
44362      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44363    fi
44364  fi
44365
44366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44369  # "foo.exe" is OK but "foo" is an error.
44370  #
44371  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44372  # It is also a way to make sure we got the proper file name for the real test later on.
44373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44374  if test "x$test_shortpath" = x; then
44375    # Short path failed, file does not exist as specified.
44376    # Try adding .exe or .cmd
44377    if test -f "${new_path}.exe"; then
44378      input_to_shortpath="${new_path}.exe"
44379    elif test -f "${new_path}.cmd"; then
44380      input_to_shortpath="${new_path}.cmd"
44381    else
44382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44383$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44386      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44387    fi
44388  else
44389    input_to_shortpath="$new_path"
44390  fi
44391
44392  # Call helper function which possibly converts this using DOS-style short mode.
44393  # If so, the updated path is stored in $new_path.
44394  new_path="$input_to_shortpath"
44395
44396  input_path="$input_to_shortpath"
44397  # Check if we need to convert this using DOS-style short mode. If the path
44398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44399  # take no chances and rewrite it.
44400  # Note: m4 eats our [], so we need to use [ and ] instead.
44401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44402  if test "x$has_forbidden_chars" != x; then
44403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44407      # Going to short mode and back again did indeed matter. Since short mode is
44408      # case insensitive, let's make it lowercase to improve readability.
44409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44410      # Now convert it back to Unix-style (cygpath)
44411      input_path=`$CYGPATH -u "$shortmode_path"`
44412      new_path="$input_path"
44413    fi
44414  fi
44415
44416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44417  if test "x$test_cygdrive_prefix" = x; then
44418    # As a simple fix, exclude /usr/bin since it's not a real path.
44419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44421      # a path prefixed by /cygdrive for fixpath to work.
44422      new_path="$CYGWIN_ROOT_PATH$input_path"
44423    fi
44424  fi
44425
44426  # remove trailing .exe if any
44427  new_path="${new_path/%.exe/}"
44428
44429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44430
44431  # First separate the path from the arguments. This will split at the first
44432  # space.
44433  complete="$BUILD_CC"
44434  path="${complete%% *}"
44435  tmp="$complete EOL"
44436  arguments="${tmp#* }"
44437
44438  # Input might be given as Windows format, start by converting to
44439  # unix format.
44440  new_path="$path"
44441
44442  windows_path="$new_path"
44443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44444    unix_path=`$CYGPATH -u "$windows_path"`
44445    new_path="$unix_path"
44446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44448    new_path="$unix_path"
44449  fi
44450
44451
44452  # Now try to locate executable using which
44453  new_path=`$WHICH "$new_path" 2> /dev/null`
44454
44455  if test "x$new_path" = x; then
44456    # Oops. Which didn't find the executable.
44457    # The splitting of arguments from the executable at a space might have been incorrect,
44458    # since paths with space are more likely in Windows. Give it another try with the whole
44459    # argument.
44460    path="$complete"
44461    arguments="EOL"
44462    new_path="$path"
44463
44464  windows_path="$new_path"
44465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44466    unix_path=`$CYGPATH -u "$windows_path"`
44467    new_path="$unix_path"
44468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44470    new_path="$unix_path"
44471  fi
44472
44473
44474    new_path=`$WHICH "$new_path" 2> /dev/null`
44475    # bat and cmd files are not always considered executable in MSYS causing which
44476    # to not find them
44477    if test "x$new_path" = x \
44478        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44479        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44480      new_path="$path"
44481
44482  windows_path="$new_path"
44483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44484    unix_path=`$CYGPATH -u "$windows_path"`
44485    new_path="$unix_path"
44486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44488    new_path="$unix_path"
44489  fi
44490
44491    fi
44492
44493    if test "x$new_path" = x; then
44494      # It's still not found. Now this is an unrecoverable error.
44495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44496$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44497      has_space=`$ECHO "$complete" | $GREP " "`
44498      if test "x$has_space" != x; then
44499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44501      fi
44502      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44503    fi
44504  fi
44505
44506  # Now new_path has a complete unix path to the binary
44507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44508    # Keep paths in /bin as-is, but remove trailing .exe if any
44509    new_path="${new_path/%.exe/}"
44510    # Do not save /bin paths to all_fixpath_prefixes!
44511  else
44512    # Not in mixed or Windows style, start by that.
44513    new_path=`cmd //c echo $new_path`
44514
44515  input_path="$new_path"
44516  # Check if we need to convert this using DOS-style short mode. If the path
44517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44518  # take no chances and rewrite it.
44519  # Note: m4 eats our [], so we need to use [ and ] instead.
44520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44521  if test "x$has_forbidden_chars" != x; then
44522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44524  fi
44525
44526    # Output is in $new_path
44527
44528  windows_path="$new_path"
44529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44530    unix_path=`$CYGPATH -u "$windows_path"`
44531    new_path="$unix_path"
44532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44534    new_path="$unix_path"
44535  fi
44536
44537    # remove trailing .exe if any
44538    new_path="${new_path/%.exe/}"
44539
44540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44542  fi
44543
44544    else
44545      # We're on a unix platform. Hooray! :)
44546      # First separate the path from the arguments. This will split at the first
44547      # space.
44548      complete="$BUILD_CC"
44549      path="${complete%% *}"
44550      tmp="$complete EOL"
44551      arguments="${tmp#* }"
44552
44553      # Cannot rely on the command "which" here since it doesn't always work.
44554      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44555      if test -z "$is_absolute_path"; then
44556        # Path to executable is not absolute. Find it.
44557        IFS_save="$IFS"
44558        IFS=:
44559        for p in $PATH; do
44560          if test -f "$p/$path" && test -x "$p/$path"; then
44561            new_path="$p/$path"
44562            break
44563          fi
44564        done
44565        IFS="$IFS_save"
44566      else
44567        # This is an absolute path, we can use it without further modifications.
44568        new_path="$path"
44569      fi
44570
44571      if test "x$new_path" = x; then
44572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44573$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44574        has_space=`$ECHO "$complete" | $GREP " "`
44575        if test "x$has_space" != x; then
44576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44578        fi
44579        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44580      fi
44581    fi
44582
44583    # Now join together the path and the arguments once again
44584    if test "x$arguments" != xEOL; then
44585      new_complete="$new_path ${arguments% *}"
44586    else
44587      new_complete="$new_path"
44588    fi
44589
44590    if test "x$complete" != "x$new_complete"; then
44591      BUILD_CC="$new_complete"
44592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44593$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44594    fi
44595  fi
44596
44597
44598
44599
44600  # Publish this variable in the help.
44601
44602
44603  if [ -z "${BUILD_CXX+x}" ]; then
44604    # The variable is not set by user, try to locate tool using the code snippet
44605    for ac_prog in cl CC g++
44606do
44607  # Extract the first word of "$ac_prog", so it can be a program name with args.
44608set dummy $ac_prog; ac_word=$2
44609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44610$as_echo_n "checking for $ac_word... " >&6; }
44611if ${ac_cv_path_BUILD_CXX+:} false; then :
44612  $as_echo_n "(cached) " >&6
44613else
44614  case $BUILD_CXX in
44615  [\\/]* | ?:[\\/]*)
44616  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44617  ;;
44618  *)
44619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44620for as_dir in $PATH
44621do
44622  IFS=$as_save_IFS
44623  test -z "$as_dir" && as_dir=.
44624    for ac_exec_ext in '' $ac_executable_extensions; do
44625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44626    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44628    break 2
44629  fi
44630done
44631  done
44632IFS=$as_save_IFS
44633
44634  ;;
44635esac
44636fi
44637BUILD_CXX=$ac_cv_path_BUILD_CXX
44638if test -n "$BUILD_CXX"; then
44639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44640$as_echo "$BUILD_CXX" >&6; }
44641else
44642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44643$as_echo "no" >&6; }
44644fi
44645
44646
44647  test -n "$BUILD_CXX" && break
44648done
44649
44650  else
44651    # The variable is set, but is it from the command line or the environment?
44652
44653    # Try to remove the string !BUILD_CXX! from our list.
44654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44656      # If it failed, the variable was not from the command line. Ignore it,
44657      # but warn the user (except for BASH, which is always set by the calling BASH).
44658      if test "xBUILD_CXX" != xBASH; then
44659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44660$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44661      fi
44662      # Try to locate tool using the code snippet
44663      for ac_prog in cl CC g++
44664do
44665  # Extract the first word of "$ac_prog", so it can be a program name with args.
44666set dummy $ac_prog; ac_word=$2
44667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44668$as_echo_n "checking for $ac_word... " >&6; }
44669if ${ac_cv_path_BUILD_CXX+:} false; then :
44670  $as_echo_n "(cached) " >&6
44671else
44672  case $BUILD_CXX in
44673  [\\/]* | ?:[\\/]*)
44674  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44675  ;;
44676  *)
44677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44678for as_dir in $PATH
44679do
44680  IFS=$as_save_IFS
44681  test -z "$as_dir" && as_dir=.
44682    for ac_exec_ext in '' $ac_executable_extensions; do
44683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44684    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44686    break 2
44687  fi
44688done
44689  done
44690IFS=$as_save_IFS
44691
44692  ;;
44693esac
44694fi
44695BUILD_CXX=$ac_cv_path_BUILD_CXX
44696if test -n "$BUILD_CXX"; then
44697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44698$as_echo "$BUILD_CXX" >&6; }
44699else
44700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44701$as_echo "no" >&6; }
44702fi
44703
44704
44705  test -n "$BUILD_CXX" && break
44706done
44707
44708    else
44709      # If it succeeded, then it was overridden by the user. We will use it
44710      # for the tool.
44711
44712      # First remove it from the list of overridden variables, so we can test
44713      # for unknown variables in the end.
44714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44715
44716      # Check if we try to supply an empty value
44717      if test "x$BUILD_CXX" = x; then
44718        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44719$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44721$as_echo_n "checking for BUILD_CXX... " >&6; }
44722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44723$as_echo "disabled" >&6; }
44724      else
44725        # Check if the provided tool contains a complete path.
44726        tool_specified="$BUILD_CXX"
44727        tool_basename="${tool_specified##*/}"
44728        if test "x$tool_basename" = "x$tool_specified"; then
44729          # A command without a complete path is provided, search $PATH.
44730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44731$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44732          # Extract the first word of "$tool_basename", so it can be a program name with args.
44733set dummy $tool_basename; ac_word=$2
44734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44735$as_echo_n "checking for $ac_word... " >&6; }
44736if ${ac_cv_path_BUILD_CXX+:} false; then :
44737  $as_echo_n "(cached) " >&6
44738else
44739  case $BUILD_CXX in
44740  [\\/]* | ?:[\\/]*)
44741  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44742  ;;
44743  *)
44744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44745for as_dir in $PATH
44746do
44747  IFS=$as_save_IFS
44748  test -z "$as_dir" && as_dir=.
44749    for ac_exec_ext in '' $ac_executable_extensions; do
44750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44751    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44753    break 2
44754  fi
44755done
44756  done
44757IFS=$as_save_IFS
44758
44759  ;;
44760esac
44761fi
44762BUILD_CXX=$ac_cv_path_BUILD_CXX
44763if test -n "$BUILD_CXX"; then
44764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44765$as_echo "$BUILD_CXX" >&6; }
44766else
44767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44768$as_echo "no" >&6; }
44769fi
44770
44771
44772          if test "x$BUILD_CXX" = x; then
44773            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44774          fi
44775        else
44776          # Otherwise we believe it is a complete path. Use it as it is.
44777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44778$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44779          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44780$as_echo_n "checking for BUILD_CXX... " >&6; }
44781          if test ! -x "$tool_specified"; then
44782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44783$as_echo "not found" >&6; }
44784            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44785          fi
44786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44787$as_echo "$tool_specified" >&6; }
44788        fi
44789      fi
44790    fi
44791
44792  fi
44793
44794
44795
44796  if test "x$BUILD_CXX" = x; then
44797    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44798  fi
44799
44800
44801
44802  # Only process if variable expands to non-empty
44803
44804  if test "x$BUILD_CXX" != x; then
44805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44806
44807  # First separate the path from the arguments. This will split at the first
44808  # space.
44809  complete="$BUILD_CXX"
44810  path="${complete%% *}"
44811  tmp="$complete EOL"
44812  arguments="${tmp#* }"
44813
44814  # Input might be given as Windows format, start by converting to
44815  # unix format.
44816  new_path=`$CYGPATH -u "$path"`
44817
44818  # Now try to locate executable using which
44819  new_path=`$WHICH "$new_path" 2> /dev/null`
44820  # bat and cmd files are not always considered executable in cygwin causing which
44821  # to not find them
44822  if test "x$new_path" = x \
44823      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44824      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44825    new_path=`$CYGPATH -u "$path"`
44826  fi
44827  if test "x$new_path" = x; then
44828    # Oops. Which didn't find the executable.
44829    # The splitting of arguments from the executable at a space might have been incorrect,
44830    # since paths with space are more likely in Windows. Give it another try with the whole
44831    # argument.
44832    path="$complete"
44833    arguments="EOL"
44834    new_path=`$CYGPATH -u "$path"`
44835    new_path=`$WHICH "$new_path" 2> /dev/null`
44836    # bat and cmd files are not always considered executable in cygwin causing which
44837    # to not find them
44838    if test "x$new_path" = x \
44839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44841      new_path=`$CYGPATH -u "$path"`
44842    fi
44843    if test "x$new_path" = x; then
44844      # It's still not found. Now this is an unrecoverable error.
44845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44846$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44847      has_space=`$ECHO "$complete" | $GREP " "`
44848      if test "x$has_space" != x; then
44849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44851      fi
44852      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44853    fi
44854  fi
44855
44856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44859  # "foo.exe" is OK but "foo" is an error.
44860  #
44861  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44862  # It is also a way to make sure we got the proper file name for the real test later on.
44863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44864  if test "x$test_shortpath" = x; then
44865    # Short path failed, file does not exist as specified.
44866    # Try adding .exe or .cmd
44867    if test -f "${new_path}.exe"; then
44868      input_to_shortpath="${new_path}.exe"
44869    elif test -f "${new_path}.cmd"; then
44870      input_to_shortpath="${new_path}.cmd"
44871    else
44872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44873$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44874      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44875$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44876      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44877    fi
44878  else
44879    input_to_shortpath="$new_path"
44880  fi
44881
44882  # Call helper function which possibly converts this using DOS-style short mode.
44883  # If so, the updated path is stored in $new_path.
44884  new_path="$input_to_shortpath"
44885
44886  input_path="$input_to_shortpath"
44887  # Check if we need to convert this using DOS-style short mode. If the path
44888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44889  # take no chances and rewrite it.
44890  # Note: m4 eats our [], so we need to use [ and ] instead.
44891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44892  if test "x$has_forbidden_chars" != x; then
44893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44897      # Going to short mode and back again did indeed matter. Since short mode is
44898      # case insensitive, let's make it lowercase to improve readability.
44899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44900      # Now convert it back to Unix-style (cygpath)
44901      input_path=`$CYGPATH -u "$shortmode_path"`
44902      new_path="$input_path"
44903    fi
44904  fi
44905
44906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44907  if test "x$test_cygdrive_prefix" = x; then
44908    # As a simple fix, exclude /usr/bin since it's not a real path.
44909    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44911      # a path prefixed by /cygdrive for fixpath to work.
44912      new_path="$CYGWIN_ROOT_PATH$input_path"
44913    fi
44914  fi
44915
44916  # remove trailing .exe if any
44917  new_path="${new_path/%.exe/}"
44918
44919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44920
44921  # First separate the path from the arguments. This will split at the first
44922  # space.
44923  complete="$BUILD_CXX"
44924  path="${complete%% *}"
44925  tmp="$complete EOL"
44926  arguments="${tmp#* }"
44927
44928  # Input might be given as Windows format, start by converting to
44929  # unix format.
44930  new_path="$path"
44931
44932  windows_path="$new_path"
44933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44934    unix_path=`$CYGPATH -u "$windows_path"`
44935    new_path="$unix_path"
44936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44938    new_path="$unix_path"
44939  fi
44940
44941
44942  # Now try to locate executable using which
44943  new_path=`$WHICH "$new_path" 2> /dev/null`
44944
44945  if test "x$new_path" = x; then
44946    # Oops. Which didn't find the executable.
44947    # The splitting of arguments from the executable at a space might have been incorrect,
44948    # since paths with space are more likely in Windows. Give it another try with the whole
44949    # argument.
44950    path="$complete"
44951    arguments="EOL"
44952    new_path="$path"
44953
44954  windows_path="$new_path"
44955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44956    unix_path=`$CYGPATH -u "$windows_path"`
44957    new_path="$unix_path"
44958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44960    new_path="$unix_path"
44961  fi
44962
44963
44964    new_path=`$WHICH "$new_path" 2> /dev/null`
44965    # bat and cmd files are not always considered executable in MSYS causing which
44966    # to not find them
44967    if test "x$new_path" = x \
44968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44970      new_path="$path"
44971
44972  windows_path="$new_path"
44973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44974    unix_path=`$CYGPATH -u "$windows_path"`
44975    new_path="$unix_path"
44976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44978    new_path="$unix_path"
44979  fi
44980
44981    fi
44982
44983    if test "x$new_path" = x; then
44984      # It's still not found. Now this is an unrecoverable error.
44985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44986$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44987      has_space=`$ECHO "$complete" | $GREP " "`
44988      if test "x$has_space" != x; then
44989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44991      fi
44992      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44993    fi
44994  fi
44995
44996  # Now new_path has a complete unix path to the binary
44997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44998    # Keep paths in /bin as-is, but remove trailing .exe if any
44999    new_path="${new_path/%.exe/}"
45000    # Do not save /bin paths to all_fixpath_prefixes!
45001  else
45002    # Not in mixed or Windows style, start by that.
45003    new_path=`cmd //c echo $new_path`
45004
45005  input_path="$new_path"
45006  # Check if we need to convert this using DOS-style short mode. If the path
45007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45008  # take no chances and rewrite it.
45009  # Note: m4 eats our [], so we need to use [ and ] instead.
45010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45011  if test "x$has_forbidden_chars" != x; then
45012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45014  fi
45015
45016    # Output is in $new_path
45017
45018  windows_path="$new_path"
45019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45020    unix_path=`$CYGPATH -u "$windows_path"`
45021    new_path="$unix_path"
45022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45024    new_path="$unix_path"
45025  fi
45026
45027    # remove trailing .exe if any
45028    new_path="${new_path/%.exe/}"
45029
45030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45032  fi
45033
45034    else
45035      # We're on a unix platform. Hooray! :)
45036      # First separate the path from the arguments. This will split at the first
45037      # space.
45038      complete="$BUILD_CXX"
45039      path="${complete%% *}"
45040      tmp="$complete EOL"
45041      arguments="${tmp#* }"
45042
45043      # Cannot rely on the command "which" here since it doesn't always work.
45044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45045      if test -z "$is_absolute_path"; then
45046        # Path to executable is not absolute. Find it.
45047        IFS_save="$IFS"
45048        IFS=:
45049        for p in $PATH; do
45050          if test -f "$p/$path" && test -x "$p/$path"; then
45051            new_path="$p/$path"
45052            break
45053          fi
45054        done
45055        IFS="$IFS_save"
45056      else
45057        # This is an absolute path, we can use it without further modifications.
45058        new_path="$path"
45059      fi
45060
45061      if test "x$new_path" = x; then
45062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45063$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45064        has_space=`$ECHO "$complete" | $GREP " "`
45065        if test "x$has_space" != x; then
45066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45068        fi
45069        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45070      fi
45071    fi
45072
45073    # Now join together the path and the arguments once again
45074    if test "x$arguments" != xEOL; then
45075      new_complete="$new_path ${arguments% *}"
45076    else
45077      new_complete="$new_path"
45078    fi
45079
45080    if test "x$complete" != "x$new_complete"; then
45081      BUILD_CXX="$new_complete"
45082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45083$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45084    fi
45085  fi
45086
45087
45088
45089  # Publish this variable in the help.
45090
45091
45092  if [ -z "${BUILD_NM+x}" ]; then
45093    # The variable is not set by user, try to locate tool using the code snippet
45094    for ac_prog in nm gcc-nm
45095do
45096  # Extract the first word of "$ac_prog", so it can be a program name with args.
45097set dummy $ac_prog; ac_word=$2
45098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45099$as_echo_n "checking for $ac_word... " >&6; }
45100if ${ac_cv_path_BUILD_NM+:} false; then :
45101  $as_echo_n "(cached) " >&6
45102else
45103  case $BUILD_NM in
45104  [\\/]* | ?:[\\/]*)
45105  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45106  ;;
45107  *)
45108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45109for as_dir in $PATH
45110do
45111  IFS=$as_save_IFS
45112  test -z "$as_dir" && as_dir=.
45113    for ac_exec_ext in '' $ac_executable_extensions; do
45114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45115    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45117    break 2
45118  fi
45119done
45120  done
45121IFS=$as_save_IFS
45122
45123  ;;
45124esac
45125fi
45126BUILD_NM=$ac_cv_path_BUILD_NM
45127if test -n "$BUILD_NM"; then
45128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45129$as_echo "$BUILD_NM" >&6; }
45130else
45131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45132$as_echo "no" >&6; }
45133fi
45134
45135
45136  test -n "$BUILD_NM" && break
45137done
45138
45139  else
45140    # The variable is set, but is it from the command line or the environment?
45141
45142    # Try to remove the string !BUILD_NM! from our list.
45143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45145      # If it failed, the variable was not from the command line. Ignore it,
45146      # but warn the user (except for BASH, which is always set by the calling BASH).
45147      if test "xBUILD_NM" != xBASH; then
45148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45149$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45150      fi
45151      # Try to locate tool using the code snippet
45152      for ac_prog in nm gcc-nm
45153do
45154  # Extract the first word of "$ac_prog", so it can be a program name with args.
45155set dummy $ac_prog; ac_word=$2
45156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45157$as_echo_n "checking for $ac_word... " >&6; }
45158if ${ac_cv_path_BUILD_NM+:} false; then :
45159  $as_echo_n "(cached) " >&6
45160else
45161  case $BUILD_NM in
45162  [\\/]* | ?:[\\/]*)
45163  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45164  ;;
45165  *)
45166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45167for as_dir in $PATH
45168do
45169  IFS=$as_save_IFS
45170  test -z "$as_dir" && as_dir=.
45171    for ac_exec_ext in '' $ac_executable_extensions; do
45172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45173    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45175    break 2
45176  fi
45177done
45178  done
45179IFS=$as_save_IFS
45180
45181  ;;
45182esac
45183fi
45184BUILD_NM=$ac_cv_path_BUILD_NM
45185if test -n "$BUILD_NM"; then
45186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45187$as_echo "$BUILD_NM" >&6; }
45188else
45189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45190$as_echo "no" >&6; }
45191fi
45192
45193
45194  test -n "$BUILD_NM" && break
45195done
45196
45197    else
45198      # If it succeeded, then it was overridden by the user. We will use it
45199      # for the tool.
45200
45201      # First remove it from the list of overridden variables, so we can test
45202      # for unknown variables in the end.
45203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45204
45205      # Check if we try to supply an empty value
45206      if test "x$BUILD_NM" = x; then
45207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45208$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45210$as_echo_n "checking for BUILD_NM... " >&6; }
45211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45212$as_echo "disabled" >&6; }
45213      else
45214        # Check if the provided tool contains a complete path.
45215        tool_specified="$BUILD_NM"
45216        tool_basename="${tool_specified##*/}"
45217        if test "x$tool_basename" = "x$tool_specified"; then
45218          # A command without a complete path is provided, search $PATH.
45219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45220$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45221          # Extract the first word of "$tool_basename", so it can be a program name with args.
45222set dummy $tool_basename; ac_word=$2
45223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45224$as_echo_n "checking for $ac_word... " >&6; }
45225if ${ac_cv_path_BUILD_NM+:} false; then :
45226  $as_echo_n "(cached) " >&6
45227else
45228  case $BUILD_NM in
45229  [\\/]* | ?:[\\/]*)
45230  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45231  ;;
45232  *)
45233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45234for as_dir in $PATH
45235do
45236  IFS=$as_save_IFS
45237  test -z "$as_dir" && as_dir=.
45238    for ac_exec_ext in '' $ac_executable_extensions; do
45239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45240    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45242    break 2
45243  fi
45244done
45245  done
45246IFS=$as_save_IFS
45247
45248  ;;
45249esac
45250fi
45251BUILD_NM=$ac_cv_path_BUILD_NM
45252if test -n "$BUILD_NM"; then
45253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45254$as_echo "$BUILD_NM" >&6; }
45255else
45256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45257$as_echo "no" >&6; }
45258fi
45259
45260
45261          if test "x$BUILD_NM" = x; then
45262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45263          fi
45264        else
45265          # Otherwise we believe it is a complete path. Use it as it is.
45266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45267$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45269$as_echo_n "checking for BUILD_NM... " >&6; }
45270          if test ! -x "$tool_specified"; then
45271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45272$as_echo "not found" >&6; }
45273            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45274          fi
45275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45276$as_echo "$tool_specified" >&6; }
45277        fi
45278      fi
45279    fi
45280
45281  fi
45282
45283
45284
45285  # Only process if variable expands to non-empty
45286
45287  if test "x$BUILD_NM" != x; then
45288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45289
45290  # First separate the path from the arguments. This will split at the first
45291  # space.
45292  complete="$BUILD_NM"
45293  path="${complete%% *}"
45294  tmp="$complete EOL"
45295  arguments="${tmp#* }"
45296
45297  # Input might be given as Windows format, start by converting to
45298  # unix format.
45299  new_path=`$CYGPATH -u "$path"`
45300
45301  # Now try to locate executable using which
45302  new_path=`$WHICH "$new_path" 2> /dev/null`
45303  # bat and cmd files are not always considered executable in cygwin causing which
45304  # to not find them
45305  if test "x$new_path" = x \
45306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45308    new_path=`$CYGPATH -u "$path"`
45309  fi
45310  if test "x$new_path" = x; then
45311    # Oops. Which didn't find the executable.
45312    # The splitting of arguments from the executable at a space might have been incorrect,
45313    # since paths with space are more likely in Windows. Give it another try with the whole
45314    # argument.
45315    path="$complete"
45316    arguments="EOL"
45317    new_path=`$CYGPATH -u "$path"`
45318    new_path=`$WHICH "$new_path" 2> /dev/null`
45319    # bat and cmd files are not always considered executable in cygwin causing which
45320    # to not find them
45321    if test "x$new_path" = x \
45322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45324      new_path=`$CYGPATH -u "$path"`
45325    fi
45326    if test "x$new_path" = x; then
45327      # It's still not found. Now this is an unrecoverable error.
45328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45329$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45330      has_space=`$ECHO "$complete" | $GREP " "`
45331      if test "x$has_space" != x; then
45332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45334      fi
45335      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45336    fi
45337  fi
45338
45339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45342  # "foo.exe" is OK but "foo" is an error.
45343  #
45344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45345  # It is also a way to make sure we got the proper file name for the real test later on.
45346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45347  if test "x$test_shortpath" = x; then
45348    # Short path failed, file does not exist as specified.
45349    # Try adding .exe or .cmd
45350    if test -f "${new_path}.exe"; then
45351      input_to_shortpath="${new_path}.exe"
45352    elif test -f "${new_path}.cmd"; then
45353      input_to_shortpath="${new_path}.cmd"
45354    else
45355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45356$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45359      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45360    fi
45361  else
45362    input_to_shortpath="$new_path"
45363  fi
45364
45365  # Call helper function which possibly converts this using DOS-style short mode.
45366  # If so, the updated path is stored in $new_path.
45367  new_path="$input_to_shortpath"
45368
45369  input_path="$input_to_shortpath"
45370  # Check if we need to convert this using DOS-style short mode. If the path
45371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45372  # take no chances and rewrite it.
45373  # Note: m4 eats our [], so we need to use [ and ] instead.
45374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45375  if test "x$has_forbidden_chars" != x; then
45376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45380      # Going to short mode and back again did indeed matter. Since short mode is
45381      # case insensitive, let's make it lowercase to improve readability.
45382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45383      # Now convert it back to Unix-style (cygpath)
45384      input_path=`$CYGPATH -u "$shortmode_path"`
45385      new_path="$input_path"
45386    fi
45387  fi
45388
45389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45390  if test "x$test_cygdrive_prefix" = x; then
45391    # As a simple fix, exclude /usr/bin since it's not a real path.
45392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45394      # a path prefixed by /cygdrive for fixpath to work.
45395      new_path="$CYGWIN_ROOT_PATH$input_path"
45396    fi
45397  fi
45398
45399  # remove trailing .exe if any
45400  new_path="${new_path/%.exe/}"
45401
45402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45403
45404  # First separate the path from the arguments. This will split at the first
45405  # space.
45406  complete="$BUILD_NM"
45407  path="${complete%% *}"
45408  tmp="$complete EOL"
45409  arguments="${tmp#* }"
45410
45411  # Input might be given as Windows format, start by converting to
45412  # unix format.
45413  new_path="$path"
45414
45415  windows_path="$new_path"
45416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45417    unix_path=`$CYGPATH -u "$windows_path"`
45418    new_path="$unix_path"
45419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45421    new_path="$unix_path"
45422  fi
45423
45424
45425  # Now try to locate executable using which
45426  new_path=`$WHICH "$new_path" 2> /dev/null`
45427
45428  if test "x$new_path" = x; then
45429    # Oops. Which didn't find the executable.
45430    # The splitting of arguments from the executable at a space might have been incorrect,
45431    # since paths with space are more likely in Windows. Give it another try with the whole
45432    # argument.
45433    path="$complete"
45434    arguments="EOL"
45435    new_path="$path"
45436
45437  windows_path="$new_path"
45438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45439    unix_path=`$CYGPATH -u "$windows_path"`
45440    new_path="$unix_path"
45441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45443    new_path="$unix_path"
45444  fi
45445
45446
45447    new_path=`$WHICH "$new_path" 2> /dev/null`
45448    # bat and cmd files are not always considered executable in MSYS causing which
45449    # to not find them
45450    if test "x$new_path" = x \
45451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45453      new_path="$path"
45454
45455  windows_path="$new_path"
45456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45457    unix_path=`$CYGPATH -u "$windows_path"`
45458    new_path="$unix_path"
45459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45461    new_path="$unix_path"
45462  fi
45463
45464    fi
45465
45466    if test "x$new_path" = x; then
45467      # It's still not found. Now this is an unrecoverable error.
45468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45469$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45470      has_space=`$ECHO "$complete" | $GREP " "`
45471      if test "x$has_space" != x; then
45472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45474      fi
45475      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45476    fi
45477  fi
45478
45479  # Now new_path has a complete unix path to the binary
45480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45481    # Keep paths in /bin as-is, but remove trailing .exe if any
45482    new_path="${new_path/%.exe/}"
45483    # Do not save /bin paths to all_fixpath_prefixes!
45484  else
45485    # Not in mixed or Windows style, start by that.
45486    new_path=`cmd //c echo $new_path`
45487
45488  input_path="$new_path"
45489  # Check if we need to convert this using DOS-style short mode. If the path
45490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45491  # take no chances and rewrite it.
45492  # Note: m4 eats our [], so we need to use [ and ] instead.
45493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45494  if test "x$has_forbidden_chars" != x; then
45495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45497  fi
45498
45499    # Output is in $new_path
45500
45501  windows_path="$new_path"
45502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45503    unix_path=`$CYGPATH -u "$windows_path"`
45504    new_path="$unix_path"
45505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45507    new_path="$unix_path"
45508  fi
45509
45510    # remove trailing .exe if any
45511    new_path="${new_path/%.exe/}"
45512
45513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45515  fi
45516
45517    else
45518      # We're on a unix platform. Hooray! :)
45519      # First separate the path from the arguments. This will split at the first
45520      # space.
45521      complete="$BUILD_NM"
45522      path="${complete%% *}"
45523      tmp="$complete EOL"
45524      arguments="${tmp#* }"
45525
45526      # Cannot rely on the command "which" here since it doesn't always work.
45527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45528      if test -z "$is_absolute_path"; then
45529        # Path to executable is not absolute. Find it.
45530        IFS_save="$IFS"
45531        IFS=:
45532        for p in $PATH; do
45533          if test -f "$p/$path" && test -x "$p/$path"; then
45534            new_path="$p/$path"
45535            break
45536          fi
45537        done
45538        IFS="$IFS_save"
45539      else
45540        # This is an absolute path, we can use it without further modifications.
45541        new_path="$path"
45542      fi
45543
45544      if test "x$new_path" = x; then
45545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45546$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45547        has_space=`$ECHO "$complete" | $GREP " "`
45548        if test "x$has_space" != x; then
45549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45551        fi
45552        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45553      fi
45554    fi
45555
45556    # Now join together the path and the arguments once again
45557    if test "x$arguments" != xEOL; then
45558      new_complete="$new_path ${arguments% *}"
45559    else
45560      new_complete="$new_path"
45561    fi
45562
45563    if test "x$complete" != "x$new_complete"; then
45564      BUILD_NM="$new_complete"
45565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45566$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45567    fi
45568  fi
45569
45570
45571
45572  # Publish this variable in the help.
45573
45574
45575  if [ -z "${BUILD_AR+x}" ]; then
45576    # The variable is not set by user, try to locate tool using the code snippet
45577    for ac_prog in ar gcc-ar
45578do
45579  # Extract the first word of "$ac_prog", so it can be a program name with args.
45580set dummy $ac_prog; ac_word=$2
45581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45582$as_echo_n "checking for $ac_word... " >&6; }
45583if ${ac_cv_path_BUILD_AR+:} false; then :
45584  $as_echo_n "(cached) " >&6
45585else
45586  case $BUILD_AR in
45587  [\\/]* | ?:[\\/]*)
45588  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45589  ;;
45590  *)
45591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45592for as_dir in $PATH
45593do
45594  IFS=$as_save_IFS
45595  test -z "$as_dir" && as_dir=.
45596    for ac_exec_ext in '' $ac_executable_extensions; do
45597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45598    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45600    break 2
45601  fi
45602done
45603  done
45604IFS=$as_save_IFS
45605
45606  ;;
45607esac
45608fi
45609BUILD_AR=$ac_cv_path_BUILD_AR
45610if test -n "$BUILD_AR"; then
45611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45612$as_echo "$BUILD_AR" >&6; }
45613else
45614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45615$as_echo "no" >&6; }
45616fi
45617
45618
45619  test -n "$BUILD_AR" && break
45620done
45621
45622  else
45623    # The variable is set, but is it from the command line or the environment?
45624
45625    # Try to remove the string !BUILD_AR! from our list.
45626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45628      # If it failed, the variable was not from the command line. Ignore it,
45629      # but warn the user (except for BASH, which is always set by the calling BASH).
45630      if test "xBUILD_AR" != xBASH; then
45631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45632$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45633      fi
45634      # Try to locate tool using the code snippet
45635      for ac_prog in ar gcc-ar
45636do
45637  # Extract the first word of "$ac_prog", so it can be a program name with args.
45638set dummy $ac_prog; ac_word=$2
45639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45640$as_echo_n "checking for $ac_word... " >&6; }
45641if ${ac_cv_path_BUILD_AR+:} false; then :
45642  $as_echo_n "(cached) " >&6
45643else
45644  case $BUILD_AR in
45645  [\\/]* | ?:[\\/]*)
45646  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45647  ;;
45648  *)
45649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45650for as_dir in $PATH
45651do
45652  IFS=$as_save_IFS
45653  test -z "$as_dir" && as_dir=.
45654    for ac_exec_ext in '' $ac_executable_extensions; do
45655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45656    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45658    break 2
45659  fi
45660done
45661  done
45662IFS=$as_save_IFS
45663
45664  ;;
45665esac
45666fi
45667BUILD_AR=$ac_cv_path_BUILD_AR
45668if test -n "$BUILD_AR"; then
45669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45670$as_echo "$BUILD_AR" >&6; }
45671else
45672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45673$as_echo "no" >&6; }
45674fi
45675
45676
45677  test -n "$BUILD_AR" && break
45678done
45679
45680    else
45681      # If it succeeded, then it was overridden by the user. We will use it
45682      # for the tool.
45683
45684      # First remove it from the list of overridden variables, so we can test
45685      # for unknown variables in the end.
45686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45687
45688      # Check if we try to supply an empty value
45689      if test "x$BUILD_AR" = x; then
45690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45691$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45693$as_echo_n "checking for BUILD_AR... " >&6; }
45694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45695$as_echo "disabled" >&6; }
45696      else
45697        # Check if the provided tool contains a complete path.
45698        tool_specified="$BUILD_AR"
45699        tool_basename="${tool_specified##*/}"
45700        if test "x$tool_basename" = "x$tool_specified"; then
45701          # A command without a complete path is provided, search $PATH.
45702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45703$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45704          # Extract the first word of "$tool_basename", so it can be a program name with args.
45705set dummy $tool_basename; ac_word=$2
45706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45707$as_echo_n "checking for $ac_word... " >&6; }
45708if ${ac_cv_path_BUILD_AR+:} false; then :
45709  $as_echo_n "(cached) " >&6
45710else
45711  case $BUILD_AR in
45712  [\\/]* | ?:[\\/]*)
45713  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45714  ;;
45715  *)
45716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45717for as_dir in $PATH
45718do
45719  IFS=$as_save_IFS
45720  test -z "$as_dir" && as_dir=.
45721    for ac_exec_ext in '' $ac_executable_extensions; do
45722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45723    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45725    break 2
45726  fi
45727done
45728  done
45729IFS=$as_save_IFS
45730
45731  ;;
45732esac
45733fi
45734BUILD_AR=$ac_cv_path_BUILD_AR
45735if test -n "$BUILD_AR"; then
45736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45737$as_echo "$BUILD_AR" >&6; }
45738else
45739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45740$as_echo "no" >&6; }
45741fi
45742
45743
45744          if test "x$BUILD_AR" = x; then
45745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45746          fi
45747        else
45748          # Otherwise we believe it is a complete path. Use it as it is.
45749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45750$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45752$as_echo_n "checking for BUILD_AR... " >&6; }
45753          if test ! -x "$tool_specified"; then
45754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45755$as_echo "not found" >&6; }
45756            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45757          fi
45758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45759$as_echo "$tool_specified" >&6; }
45760        fi
45761      fi
45762    fi
45763
45764  fi
45765
45766
45767
45768  # Only process if variable expands to non-empty
45769
45770  if test "x$BUILD_AR" != x; then
45771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45772
45773  # First separate the path from the arguments. This will split at the first
45774  # space.
45775  complete="$BUILD_AR"
45776  path="${complete%% *}"
45777  tmp="$complete EOL"
45778  arguments="${tmp#* }"
45779
45780  # Input might be given as Windows format, start by converting to
45781  # unix format.
45782  new_path=`$CYGPATH -u "$path"`
45783
45784  # Now try to locate executable using which
45785  new_path=`$WHICH "$new_path" 2> /dev/null`
45786  # bat and cmd files are not always considered executable in cygwin causing which
45787  # to not find them
45788  if test "x$new_path" = x \
45789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45791    new_path=`$CYGPATH -u "$path"`
45792  fi
45793  if test "x$new_path" = x; then
45794    # Oops. Which didn't find the executable.
45795    # The splitting of arguments from the executable at a space might have been incorrect,
45796    # since paths with space are more likely in Windows. Give it another try with the whole
45797    # argument.
45798    path="$complete"
45799    arguments="EOL"
45800    new_path=`$CYGPATH -u "$path"`
45801    new_path=`$WHICH "$new_path" 2> /dev/null`
45802    # bat and cmd files are not always considered executable in cygwin causing which
45803    # to not find them
45804    if test "x$new_path" = x \
45805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45807      new_path=`$CYGPATH -u "$path"`
45808    fi
45809    if test "x$new_path" = x; then
45810      # It's still not found. Now this is an unrecoverable error.
45811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45812$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45813      has_space=`$ECHO "$complete" | $GREP " "`
45814      if test "x$has_space" != x; then
45815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45817      fi
45818      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45819    fi
45820  fi
45821
45822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45825  # "foo.exe" is OK but "foo" is an error.
45826  #
45827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45828  # It is also a way to make sure we got the proper file name for the real test later on.
45829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45830  if test "x$test_shortpath" = x; then
45831    # Short path failed, file does not exist as specified.
45832    # Try adding .exe or .cmd
45833    if test -f "${new_path}.exe"; then
45834      input_to_shortpath="${new_path}.exe"
45835    elif test -f "${new_path}.cmd"; then
45836      input_to_shortpath="${new_path}.cmd"
45837    else
45838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45839$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45842      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45843    fi
45844  else
45845    input_to_shortpath="$new_path"
45846  fi
45847
45848  # Call helper function which possibly converts this using DOS-style short mode.
45849  # If so, the updated path is stored in $new_path.
45850  new_path="$input_to_shortpath"
45851
45852  input_path="$input_to_shortpath"
45853  # Check if we need to convert this using DOS-style short mode. If the path
45854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45855  # take no chances and rewrite it.
45856  # Note: m4 eats our [], so we need to use [ and ] instead.
45857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45858  if test "x$has_forbidden_chars" != x; then
45859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45863      # Going to short mode and back again did indeed matter. Since short mode is
45864      # case insensitive, let's make it lowercase to improve readability.
45865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45866      # Now convert it back to Unix-style (cygpath)
45867      input_path=`$CYGPATH -u "$shortmode_path"`
45868      new_path="$input_path"
45869    fi
45870  fi
45871
45872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45873  if test "x$test_cygdrive_prefix" = x; then
45874    # As a simple fix, exclude /usr/bin since it's not a real path.
45875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45877      # a path prefixed by /cygdrive for fixpath to work.
45878      new_path="$CYGWIN_ROOT_PATH$input_path"
45879    fi
45880  fi
45881
45882  # remove trailing .exe if any
45883  new_path="${new_path/%.exe/}"
45884
45885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45886
45887  # First separate the path from the arguments. This will split at the first
45888  # space.
45889  complete="$BUILD_AR"
45890  path="${complete%% *}"
45891  tmp="$complete EOL"
45892  arguments="${tmp#* }"
45893
45894  # Input might be given as Windows format, start by converting to
45895  # unix format.
45896  new_path="$path"
45897
45898  windows_path="$new_path"
45899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45900    unix_path=`$CYGPATH -u "$windows_path"`
45901    new_path="$unix_path"
45902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45904    new_path="$unix_path"
45905  fi
45906
45907
45908  # Now try to locate executable using which
45909  new_path=`$WHICH "$new_path" 2> /dev/null`
45910
45911  if test "x$new_path" = x; then
45912    # Oops. Which didn't find the executable.
45913    # The splitting of arguments from the executable at a space might have been incorrect,
45914    # since paths with space are more likely in Windows. Give it another try with the whole
45915    # argument.
45916    path="$complete"
45917    arguments="EOL"
45918    new_path="$path"
45919
45920  windows_path="$new_path"
45921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45922    unix_path=`$CYGPATH -u "$windows_path"`
45923    new_path="$unix_path"
45924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45926    new_path="$unix_path"
45927  fi
45928
45929
45930    new_path=`$WHICH "$new_path" 2> /dev/null`
45931    # bat and cmd files are not always considered executable in MSYS causing which
45932    # to not find them
45933    if test "x$new_path" = x \
45934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45936      new_path="$path"
45937
45938  windows_path="$new_path"
45939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45940    unix_path=`$CYGPATH -u "$windows_path"`
45941    new_path="$unix_path"
45942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45944    new_path="$unix_path"
45945  fi
45946
45947    fi
45948
45949    if test "x$new_path" = x; then
45950      # It's still not found. Now this is an unrecoverable error.
45951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45952$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45953      has_space=`$ECHO "$complete" | $GREP " "`
45954      if test "x$has_space" != x; then
45955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45957      fi
45958      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45959    fi
45960  fi
45961
45962  # Now new_path has a complete unix path to the binary
45963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45964    # Keep paths in /bin as-is, but remove trailing .exe if any
45965    new_path="${new_path/%.exe/}"
45966    # Do not save /bin paths to all_fixpath_prefixes!
45967  else
45968    # Not in mixed or Windows style, start by that.
45969    new_path=`cmd //c echo $new_path`
45970
45971  input_path="$new_path"
45972  # Check if we need to convert this using DOS-style short mode. If the path
45973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45974  # take no chances and rewrite it.
45975  # Note: m4 eats our [], so we need to use [ and ] instead.
45976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45977  if test "x$has_forbidden_chars" != x; then
45978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45980  fi
45981
45982    # Output is in $new_path
45983
45984  windows_path="$new_path"
45985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45986    unix_path=`$CYGPATH -u "$windows_path"`
45987    new_path="$unix_path"
45988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45990    new_path="$unix_path"
45991  fi
45992
45993    # remove trailing .exe if any
45994    new_path="${new_path/%.exe/}"
45995
45996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45998  fi
45999
46000    else
46001      # We're on a unix platform. Hooray! :)
46002      # First separate the path from the arguments. This will split at the first
46003      # space.
46004      complete="$BUILD_AR"
46005      path="${complete%% *}"
46006      tmp="$complete EOL"
46007      arguments="${tmp#* }"
46008
46009      # Cannot rely on the command "which" here since it doesn't always work.
46010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46011      if test -z "$is_absolute_path"; then
46012        # Path to executable is not absolute. Find it.
46013        IFS_save="$IFS"
46014        IFS=:
46015        for p in $PATH; do
46016          if test -f "$p/$path" && test -x "$p/$path"; then
46017            new_path="$p/$path"
46018            break
46019          fi
46020        done
46021        IFS="$IFS_save"
46022      else
46023        # This is an absolute path, we can use it without further modifications.
46024        new_path="$path"
46025      fi
46026
46027      if test "x$new_path" = x; then
46028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46029$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46030        has_space=`$ECHO "$complete" | $GREP " "`
46031        if test "x$has_space" != x; then
46032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46034        fi
46035        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46036      fi
46037    fi
46038
46039    # Now join together the path and the arguments once again
46040    if test "x$arguments" != xEOL; then
46041      new_complete="$new_path ${arguments% *}"
46042    else
46043      new_complete="$new_path"
46044    fi
46045
46046    if test "x$complete" != "x$new_complete"; then
46047      BUILD_AR="$new_complete"
46048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46049$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46050    fi
46051  fi
46052
46053
46054
46055  # Publish this variable in the help.
46056
46057
46058  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46059    # The variable is not set by user, try to locate tool using the code snippet
46060    for ac_prog in objcopy
46061do
46062  # Extract the first word of "$ac_prog", so it can be a program name with args.
46063set dummy $ac_prog; ac_word=$2
46064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46065$as_echo_n "checking for $ac_word... " >&6; }
46066if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46067  $as_echo_n "(cached) " >&6
46068else
46069  case $BUILD_OBJCOPY in
46070  [\\/]* | ?:[\\/]*)
46071  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46072  ;;
46073  *)
46074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46075for as_dir in $PATH
46076do
46077  IFS=$as_save_IFS
46078  test -z "$as_dir" && as_dir=.
46079    for ac_exec_ext in '' $ac_executable_extensions; do
46080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46081    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46083    break 2
46084  fi
46085done
46086  done
46087IFS=$as_save_IFS
46088
46089  ;;
46090esac
46091fi
46092BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46093if test -n "$BUILD_OBJCOPY"; then
46094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46095$as_echo "$BUILD_OBJCOPY" >&6; }
46096else
46097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46098$as_echo "no" >&6; }
46099fi
46100
46101
46102  test -n "$BUILD_OBJCOPY" && break
46103done
46104
46105  else
46106    # The variable is set, but is it from the command line or the environment?
46107
46108    # Try to remove the string !BUILD_OBJCOPY! from our list.
46109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46111      # If it failed, the variable was not from the command line. Ignore it,
46112      # but warn the user (except for BASH, which is always set by the calling BASH).
46113      if test "xBUILD_OBJCOPY" != xBASH; then
46114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46115$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46116      fi
46117      # Try to locate tool using the code snippet
46118      for ac_prog in objcopy
46119do
46120  # Extract the first word of "$ac_prog", so it can be a program name with args.
46121set dummy $ac_prog; ac_word=$2
46122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46123$as_echo_n "checking for $ac_word... " >&6; }
46124if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46125  $as_echo_n "(cached) " >&6
46126else
46127  case $BUILD_OBJCOPY in
46128  [\\/]* | ?:[\\/]*)
46129  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46130  ;;
46131  *)
46132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46133for as_dir in $PATH
46134do
46135  IFS=$as_save_IFS
46136  test -z "$as_dir" && as_dir=.
46137    for ac_exec_ext in '' $ac_executable_extensions; do
46138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46139    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46141    break 2
46142  fi
46143done
46144  done
46145IFS=$as_save_IFS
46146
46147  ;;
46148esac
46149fi
46150BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46151if test -n "$BUILD_OBJCOPY"; then
46152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46153$as_echo "$BUILD_OBJCOPY" >&6; }
46154else
46155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46156$as_echo "no" >&6; }
46157fi
46158
46159
46160  test -n "$BUILD_OBJCOPY" && break
46161done
46162
46163    else
46164      # If it succeeded, then it was overridden by the user. We will use it
46165      # for the tool.
46166
46167      # First remove it from the list of overridden variables, so we can test
46168      # for unknown variables in the end.
46169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46170
46171      # Check if we try to supply an empty value
46172      if test "x$BUILD_OBJCOPY" = x; then
46173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46174$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46176$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46178$as_echo "disabled" >&6; }
46179      else
46180        # Check if the provided tool contains a complete path.
46181        tool_specified="$BUILD_OBJCOPY"
46182        tool_basename="${tool_specified##*/}"
46183        if test "x$tool_basename" = "x$tool_specified"; then
46184          # A command without a complete path is provided, search $PATH.
46185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46186$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46187          # Extract the first word of "$tool_basename", so it can be a program name with args.
46188set dummy $tool_basename; ac_word=$2
46189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46190$as_echo_n "checking for $ac_word... " >&6; }
46191if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46192  $as_echo_n "(cached) " >&6
46193else
46194  case $BUILD_OBJCOPY in
46195  [\\/]* | ?:[\\/]*)
46196  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46197  ;;
46198  *)
46199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46200for as_dir in $PATH
46201do
46202  IFS=$as_save_IFS
46203  test -z "$as_dir" && as_dir=.
46204    for ac_exec_ext in '' $ac_executable_extensions; do
46205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46206    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46208    break 2
46209  fi
46210done
46211  done
46212IFS=$as_save_IFS
46213
46214  ;;
46215esac
46216fi
46217BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46218if test -n "$BUILD_OBJCOPY"; then
46219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46220$as_echo "$BUILD_OBJCOPY" >&6; }
46221else
46222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46223$as_echo "no" >&6; }
46224fi
46225
46226
46227          if test "x$BUILD_OBJCOPY" = x; then
46228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46229          fi
46230        else
46231          # Otherwise we believe it is a complete path. Use it as it is.
46232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46233$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46235$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46236          if test ! -x "$tool_specified"; then
46237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46238$as_echo "not found" >&6; }
46239            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46240          fi
46241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46242$as_echo "$tool_specified" >&6; }
46243        fi
46244      fi
46245    fi
46246
46247  fi
46248
46249
46250
46251  # Only process if variable expands to non-empty
46252
46253  if test "x$BUILD_OBJCOPY" != x; then
46254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46255
46256  # First separate the path from the arguments. This will split at the first
46257  # space.
46258  complete="$BUILD_OBJCOPY"
46259  path="${complete%% *}"
46260  tmp="$complete EOL"
46261  arguments="${tmp#* }"
46262
46263  # Input might be given as Windows format, start by converting to
46264  # unix format.
46265  new_path=`$CYGPATH -u "$path"`
46266
46267  # Now try to locate executable using which
46268  new_path=`$WHICH "$new_path" 2> /dev/null`
46269  # bat and cmd files are not always considered executable in cygwin causing which
46270  # to not find them
46271  if test "x$new_path" = x \
46272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46274    new_path=`$CYGPATH -u "$path"`
46275  fi
46276  if test "x$new_path" = x; then
46277    # Oops. Which didn't find the executable.
46278    # The splitting of arguments from the executable at a space might have been incorrect,
46279    # since paths with space are more likely in Windows. Give it another try with the whole
46280    # argument.
46281    path="$complete"
46282    arguments="EOL"
46283    new_path=`$CYGPATH -u "$path"`
46284    new_path=`$WHICH "$new_path" 2> /dev/null`
46285    # bat and cmd files are not always considered executable in cygwin causing which
46286    # to not find them
46287    if test "x$new_path" = x \
46288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46290      new_path=`$CYGPATH -u "$path"`
46291    fi
46292    if test "x$new_path" = x; then
46293      # It's still not found. Now this is an unrecoverable error.
46294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46295$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46296      has_space=`$ECHO "$complete" | $GREP " "`
46297      if test "x$has_space" != x; then
46298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46300      fi
46301      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46302    fi
46303  fi
46304
46305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46308  # "foo.exe" is OK but "foo" is an error.
46309  #
46310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46311  # It is also a way to make sure we got the proper file name for the real test later on.
46312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46313  if test "x$test_shortpath" = x; then
46314    # Short path failed, file does not exist as specified.
46315    # Try adding .exe or .cmd
46316    if test -f "${new_path}.exe"; then
46317      input_to_shortpath="${new_path}.exe"
46318    elif test -f "${new_path}.cmd"; then
46319      input_to_shortpath="${new_path}.cmd"
46320    else
46321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46322$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46325      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46326    fi
46327  else
46328    input_to_shortpath="$new_path"
46329  fi
46330
46331  # Call helper function which possibly converts this using DOS-style short mode.
46332  # If so, the updated path is stored in $new_path.
46333  new_path="$input_to_shortpath"
46334
46335  input_path="$input_to_shortpath"
46336  # Check if we need to convert this using DOS-style short mode. If the path
46337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46338  # take no chances and rewrite it.
46339  # Note: m4 eats our [], so we need to use [ and ] instead.
46340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46341  if test "x$has_forbidden_chars" != x; then
46342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46346      # Going to short mode and back again did indeed matter. Since short mode is
46347      # case insensitive, let's make it lowercase to improve readability.
46348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46349      # Now convert it back to Unix-style (cygpath)
46350      input_path=`$CYGPATH -u "$shortmode_path"`
46351      new_path="$input_path"
46352    fi
46353  fi
46354
46355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46356  if test "x$test_cygdrive_prefix" = x; then
46357    # As a simple fix, exclude /usr/bin since it's not a real path.
46358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46360      # a path prefixed by /cygdrive for fixpath to work.
46361      new_path="$CYGWIN_ROOT_PATH$input_path"
46362    fi
46363  fi
46364
46365  # remove trailing .exe if any
46366  new_path="${new_path/%.exe/}"
46367
46368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46369
46370  # First separate the path from the arguments. This will split at the first
46371  # space.
46372  complete="$BUILD_OBJCOPY"
46373  path="${complete%% *}"
46374  tmp="$complete EOL"
46375  arguments="${tmp#* }"
46376
46377  # Input might be given as Windows format, start by converting to
46378  # unix format.
46379  new_path="$path"
46380
46381  windows_path="$new_path"
46382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46383    unix_path=`$CYGPATH -u "$windows_path"`
46384    new_path="$unix_path"
46385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46387    new_path="$unix_path"
46388  fi
46389
46390
46391  # Now try to locate executable using which
46392  new_path=`$WHICH "$new_path" 2> /dev/null`
46393
46394  if test "x$new_path" = x; then
46395    # Oops. Which didn't find the executable.
46396    # The splitting of arguments from the executable at a space might have been incorrect,
46397    # since paths with space are more likely in Windows. Give it another try with the whole
46398    # argument.
46399    path="$complete"
46400    arguments="EOL"
46401    new_path="$path"
46402
46403  windows_path="$new_path"
46404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46405    unix_path=`$CYGPATH -u "$windows_path"`
46406    new_path="$unix_path"
46407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46409    new_path="$unix_path"
46410  fi
46411
46412
46413    new_path=`$WHICH "$new_path" 2> /dev/null`
46414    # bat and cmd files are not always considered executable in MSYS causing which
46415    # to not find them
46416    if test "x$new_path" = x \
46417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46419      new_path="$path"
46420
46421  windows_path="$new_path"
46422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46423    unix_path=`$CYGPATH -u "$windows_path"`
46424    new_path="$unix_path"
46425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46427    new_path="$unix_path"
46428  fi
46429
46430    fi
46431
46432    if test "x$new_path" = x; then
46433      # It's still not found. Now this is an unrecoverable error.
46434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46435$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46436      has_space=`$ECHO "$complete" | $GREP " "`
46437      if test "x$has_space" != x; then
46438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46440      fi
46441      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46442    fi
46443  fi
46444
46445  # Now new_path has a complete unix path to the binary
46446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46447    # Keep paths in /bin as-is, but remove trailing .exe if any
46448    new_path="${new_path/%.exe/}"
46449    # Do not save /bin paths to all_fixpath_prefixes!
46450  else
46451    # Not in mixed or Windows style, start by that.
46452    new_path=`cmd //c echo $new_path`
46453
46454  input_path="$new_path"
46455  # Check if we need to convert this using DOS-style short mode. If the path
46456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46457  # take no chances and rewrite it.
46458  # Note: m4 eats our [], so we need to use [ and ] instead.
46459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46460  if test "x$has_forbidden_chars" != x; then
46461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46463  fi
46464
46465    # Output is in $new_path
46466
46467  windows_path="$new_path"
46468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46469    unix_path=`$CYGPATH -u "$windows_path"`
46470    new_path="$unix_path"
46471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46473    new_path="$unix_path"
46474  fi
46475
46476    # remove trailing .exe if any
46477    new_path="${new_path/%.exe/}"
46478
46479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46481  fi
46482
46483    else
46484      # We're on a unix platform. Hooray! :)
46485      # First separate the path from the arguments. This will split at the first
46486      # space.
46487      complete="$BUILD_OBJCOPY"
46488      path="${complete%% *}"
46489      tmp="$complete EOL"
46490      arguments="${tmp#* }"
46491
46492      # Cannot rely on the command "which" here since it doesn't always work.
46493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46494      if test -z "$is_absolute_path"; then
46495        # Path to executable is not absolute. Find it.
46496        IFS_save="$IFS"
46497        IFS=:
46498        for p in $PATH; do
46499          if test -f "$p/$path" && test -x "$p/$path"; then
46500            new_path="$p/$path"
46501            break
46502          fi
46503        done
46504        IFS="$IFS_save"
46505      else
46506        # This is an absolute path, we can use it without further modifications.
46507        new_path="$path"
46508      fi
46509
46510      if test "x$new_path" = x; then
46511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46512$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46513        has_space=`$ECHO "$complete" | $GREP " "`
46514        if test "x$has_space" != x; then
46515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46517        fi
46518        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46519      fi
46520    fi
46521
46522    # Now join together the path and the arguments once again
46523    if test "x$arguments" != xEOL; then
46524      new_complete="$new_path ${arguments% *}"
46525    else
46526      new_complete="$new_path"
46527    fi
46528
46529    if test "x$complete" != "x$new_complete"; then
46530      BUILD_OBJCOPY="$new_complete"
46531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46532$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46533    fi
46534  fi
46535
46536
46537
46538  # Publish this variable in the help.
46539
46540
46541  if [ -z "${BUILD_STRIP+x}" ]; then
46542    # The variable is not set by user, try to locate tool using the code snippet
46543    for ac_prog in strip
46544do
46545  # Extract the first word of "$ac_prog", so it can be a program name with args.
46546set dummy $ac_prog; ac_word=$2
46547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46548$as_echo_n "checking for $ac_word... " >&6; }
46549if ${ac_cv_path_BUILD_STRIP+:} false; then :
46550  $as_echo_n "(cached) " >&6
46551else
46552  case $BUILD_STRIP in
46553  [\\/]* | ?:[\\/]*)
46554  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46555  ;;
46556  *)
46557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46558for as_dir in $PATH
46559do
46560  IFS=$as_save_IFS
46561  test -z "$as_dir" && as_dir=.
46562    for ac_exec_ext in '' $ac_executable_extensions; do
46563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46564    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46566    break 2
46567  fi
46568done
46569  done
46570IFS=$as_save_IFS
46571
46572  ;;
46573esac
46574fi
46575BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46576if test -n "$BUILD_STRIP"; then
46577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46578$as_echo "$BUILD_STRIP" >&6; }
46579else
46580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46581$as_echo "no" >&6; }
46582fi
46583
46584
46585  test -n "$BUILD_STRIP" && break
46586done
46587
46588  else
46589    # The variable is set, but is it from the command line or the environment?
46590
46591    # Try to remove the string !BUILD_STRIP! from our list.
46592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46594      # If it failed, the variable was not from the command line. Ignore it,
46595      # but warn the user (except for BASH, which is always set by the calling BASH).
46596      if test "xBUILD_STRIP" != xBASH; then
46597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46598$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46599      fi
46600      # Try to locate tool using the code snippet
46601      for ac_prog in strip
46602do
46603  # Extract the first word of "$ac_prog", so it can be a program name with args.
46604set dummy $ac_prog; ac_word=$2
46605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46606$as_echo_n "checking for $ac_word... " >&6; }
46607if ${ac_cv_path_BUILD_STRIP+:} false; then :
46608  $as_echo_n "(cached) " >&6
46609else
46610  case $BUILD_STRIP in
46611  [\\/]* | ?:[\\/]*)
46612  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46613  ;;
46614  *)
46615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46616for as_dir in $PATH
46617do
46618  IFS=$as_save_IFS
46619  test -z "$as_dir" && as_dir=.
46620    for ac_exec_ext in '' $ac_executable_extensions; do
46621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46622    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46624    break 2
46625  fi
46626done
46627  done
46628IFS=$as_save_IFS
46629
46630  ;;
46631esac
46632fi
46633BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46634if test -n "$BUILD_STRIP"; then
46635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46636$as_echo "$BUILD_STRIP" >&6; }
46637else
46638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46639$as_echo "no" >&6; }
46640fi
46641
46642
46643  test -n "$BUILD_STRIP" && break
46644done
46645
46646    else
46647      # If it succeeded, then it was overridden by the user. We will use it
46648      # for the tool.
46649
46650      # First remove it from the list of overridden variables, so we can test
46651      # for unknown variables in the end.
46652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46653
46654      # Check if we try to supply an empty value
46655      if test "x$BUILD_STRIP" = x; then
46656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46657$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46659$as_echo_n "checking for BUILD_STRIP... " >&6; }
46660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46661$as_echo "disabled" >&6; }
46662      else
46663        # Check if the provided tool contains a complete path.
46664        tool_specified="$BUILD_STRIP"
46665        tool_basename="${tool_specified##*/}"
46666        if test "x$tool_basename" = "x$tool_specified"; then
46667          # A command without a complete path is provided, search $PATH.
46668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46669$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46670          # Extract the first word of "$tool_basename", so it can be a program name with args.
46671set dummy $tool_basename; ac_word=$2
46672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46673$as_echo_n "checking for $ac_word... " >&6; }
46674if ${ac_cv_path_BUILD_STRIP+:} false; then :
46675  $as_echo_n "(cached) " >&6
46676else
46677  case $BUILD_STRIP in
46678  [\\/]* | ?:[\\/]*)
46679  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46680  ;;
46681  *)
46682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46683for as_dir in $PATH
46684do
46685  IFS=$as_save_IFS
46686  test -z "$as_dir" && as_dir=.
46687    for ac_exec_ext in '' $ac_executable_extensions; do
46688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46689    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46691    break 2
46692  fi
46693done
46694  done
46695IFS=$as_save_IFS
46696
46697  ;;
46698esac
46699fi
46700BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46701if test -n "$BUILD_STRIP"; then
46702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46703$as_echo "$BUILD_STRIP" >&6; }
46704else
46705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46706$as_echo "no" >&6; }
46707fi
46708
46709
46710          if test "x$BUILD_STRIP" = x; then
46711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46712          fi
46713        else
46714          # Otherwise we believe it is a complete path. Use it as it is.
46715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46716$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46718$as_echo_n "checking for BUILD_STRIP... " >&6; }
46719          if test ! -x "$tool_specified"; then
46720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46721$as_echo "not found" >&6; }
46722            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46723          fi
46724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46725$as_echo "$tool_specified" >&6; }
46726        fi
46727      fi
46728    fi
46729
46730  fi
46731
46732
46733
46734  # Only process if variable expands to non-empty
46735
46736  if test "x$BUILD_STRIP" != x; then
46737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46738
46739  # First separate the path from the arguments. This will split at the first
46740  # space.
46741  complete="$BUILD_STRIP"
46742  path="${complete%% *}"
46743  tmp="$complete EOL"
46744  arguments="${tmp#* }"
46745
46746  # Input might be given as Windows format, start by converting to
46747  # unix format.
46748  new_path=`$CYGPATH -u "$path"`
46749
46750  # Now try to locate executable using which
46751  new_path=`$WHICH "$new_path" 2> /dev/null`
46752  # bat and cmd files are not always considered executable in cygwin causing which
46753  # to not find them
46754  if test "x$new_path" = x \
46755      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46756      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46757    new_path=`$CYGPATH -u "$path"`
46758  fi
46759  if test "x$new_path" = x; then
46760    # Oops. Which didn't find the executable.
46761    # The splitting of arguments from the executable at a space might have been incorrect,
46762    # since paths with space are more likely in Windows. Give it another try with the whole
46763    # argument.
46764    path="$complete"
46765    arguments="EOL"
46766    new_path=`$CYGPATH -u "$path"`
46767    new_path=`$WHICH "$new_path" 2> /dev/null`
46768    # bat and cmd files are not always considered executable in cygwin causing which
46769    # to not find them
46770    if test "x$new_path" = x \
46771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46773      new_path=`$CYGPATH -u "$path"`
46774    fi
46775    if test "x$new_path" = x; then
46776      # It's still not found. Now this is an unrecoverable error.
46777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46778$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46779      has_space=`$ECHO "$complete" | $GREP " "`
46780      if test "x$has_space" != x; then
46781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46783      fi
46784      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46785    fi
46786  fi
46787
46788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46791  # "foo.exe" is OK but "foo" is an error.
46792  #
46793  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46794  # It is also a way to make sure we got the proper file name for the real test later on.
46795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46796  if test "x$test_shortpath" = x; then
46797    # Short path failed, file does not exist as specified.
46798    # Try adding .exe or .cmd
46799    if test -f "${new_path}.exe"; then
46800      input_to_shortpath="${new_path}.exe"
46801    elif test -f "${new_path}.cmd"; then
46802      input_to_shortpath="${new_path}.cmd"
46803    else
46804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46805$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46806      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46807$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46808      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46809    fi
46810  else
46811    input_to_shortpath="$new_path"
46812  fi
46813
46814  # Call helper function which possibly converts this using DOS-style short mode.
46815  # If so, the updated path is stored in $new_path.
46816  new_path="$input_to_shortpath"
46817
46818  input_path="$input_to_shortpath"
46819  # Check if we need to convert this using DOS-style short mode. If the path
46820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46821  # take no chances and rewrite it.
46822  # Note: m4 eats our [], so we need to use [ and ] instead.
46823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46824  if test "x$has_forbidden_chars" != x; then
46825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46829      # Going to short mode and back again did indeed matter. Since short mode is
46830      # case insensitive, let's make it lowercase to improve readability.
46831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46832      # Now convert it back to Unix-style (cygpath)
46833      input_path=`$CYGPATH -u "$shortmode_path"`
46834      new_path="$input_path"
46835    fi
46836  fi
46837
46838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46839  if test "x$test_cygdrive_prefix" = x; then
46840    # As a simple fix, exclude /usr/bin since it's not a real path.
46841    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46843      # a path prefixed by /cygdrive for fixpath to work.
46844      new_path="$CYGWIN_ROOT_PATH$input_path"
46845    fi
46846  fi
46847
46848  # remove trailing .exe if any
46849  new_path="${new_path/%.exe/}"
46850
46851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46852
46853  # First separate the path from the arguments. This will split at the first
46854  # space.
46855  complete="$BUILD_STRIP"
46856  path="${complete%% *}"
46857  tmp="$complete EOL"
46858  arguments="${tmp#* }"
46859
46860  # Input might be given as Windows format, start by converting to
46861  # unix format.
46862  new_path="$path"
46863
46864  windows_path="$new_path"
46865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46866    unix_path=`$CYGPATH -u "$windows_path"`
46867    new_path="$unix_path"
46868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46870    new_path="$unix_path"
46871  fi
46872
46873
46874  # Now try to locate executable using which
46875  new_path=`$WHICH "$new_path" 2> /dev/null`
46876
46877  if test "x$new_path" = x; then
46878    # Oops. Which didn't find the executable.
46879    # The splitting of arguments from the executable at a space might have been incorrect,
46880    # since paths with space are more likely in Windows. Give it another try with the whole
46881    # argument.
46882    path="$complete"
46883    arguments="EOL"
46884    new_path="$path"
46885
46886  windows_path="$new_path"
46887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46888    unix_path=`$CYGPATH -u "$windows_path"`
46889    new_path="$unix_path"
46890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46892    new_path="$unix_path"
46893  fi
46894
46895
46896    new_path=`$WHICH "$new_path" 2> /dev/null`
46897    # bat and cmd files are not always considered executable in MSYS causing which
46898    # to not find them
46899    if test "x$new_path" = x \
46900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46902      new_path="$path"
46903
46904  windows_path="$new_path"
46905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46906    unix_path=`$CYGPATH -u "$windows_path"`
46907    new_path="$unix_path"
46908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46910    new_path="$unix_path"
46911  fi
46912
46913    fi
46914
46915    if test "x$new_path" = x; then
46916      # It's still not found. Now this is an unrecoverable error.
46917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46918$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46919      has_space=`$ECHO "$complete" | $GREP " "`
46920      if test "x$has_space" != x; then
46921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46923      fi
46924      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46925    fi
46926  fi
46927
46928  # Now new_path has a complete unix path to the binary
46929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46930    # Keep paths in /bin as-is, but remove trailing .exe if any
46931    new_path="${new_path/%.exe/}"
46932    # Do not save /bin paths to all_fixpath_prefixes!
46933  else
46934    # Not in mixed or Windows style, start by that.
46935    new_path=`cmd //c echo $new_path`
46936
46937  input_path="$new_path"
46938  # Check if we need to convert this using DOS-style short mode. If the path
46939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46940  # take no chances and rewrite it.
46941  # Note: m4 eats our [], so we need to use [ and ] instead.
46942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46943  if test "x$has_forbidden_chars" != x; then
46944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46946  fi
46947
46948    # Output is in $new_path
46949
46950  windows_path="$new_path"
46951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46952    unix_path=`$CYGPATH -u "$windows_path"`
46953    new_path="$unix_path"
46954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46956    new_path="$unix_path"
46957  fi
46958
46959    # remove trailing .exe if any
46960    new_path="${new_path/%.exe/}"
46961
46962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46964  fi
46965
46966    else
46967      # We're on a unix platform. Hooray! :)
46968      # First separate the path from the arguments. This will split at the first
46969      # space.
46970      complete="$BUILD_STRIP"
46971      path="${complete%% *}"
46972      tmp="$complete EOL"
46973      arguments="${tmp#* }"
46974
46975      # Cannot rely on the command "which" here since it doesn't always work.
46976      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46977      if test -z "$is_absolute_path"; then
46978        # Path to executable is not absolute. Find it.
46979        IFS_save="$IFS"
46980        IFS=:
46981        for p in $PATH; do
46982          if test -f "$p/$path" && test -x "$p/$path"; then
46983            new_path="$p/$path"
46984            break
46985          fi
46986        done
46987        IFS="$IFS_save"
46988      else
46989        # This is an absolute path, we can use it without further modifications.
46990        new_path="$path"
46991      fi
46992
46993      if test "x$new_path" = x; then
46994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46995$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46996        has_space=`$ECHO "$complete" | $GREP " "`
46997        if test "x$has_space" != x; then
46998          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47000        fi
47001        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47002      fi
47003    fi
47004
47005    # Now join together the path and the arguments once again
47006    if test "x$arguments" != xEOL; then
47007      new_complete="$new_path ${arguments% *}"
47008    else
47009      new_complete="$new_path"
47010    fi
47011
47012    if test "x$complete" != "x$new_complete"; then
47013      BUILD_STRIP="$new_complete"
47014      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47015$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47016    fi
47017  fi
47018
47019    # Assume the C compiler is the assembler
47020    BUILD_AS="$BUILD_CC -c"
47021    # Just like for the target compiler, use the compiler as linker
47022    BUILD_LD="$BUILD_CC"
47023    BUILD_LDCXX="$BUILD_CXX"
47024
47025    PATH="$OLDPATH"
47026
47027
47028  COMPILER=$BUILD_CC
47029  COMPILER_NAME=BuildC
47030
47031  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47032    # cc -V output typically looks like
47033    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47034    # or
47035    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47036    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47037    # Check that this is likely to be the Solaris Studio cc.
47038    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47039    if test $? -ne 0; then
47040      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47041      { $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
47042$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47043      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47044$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47045      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47046$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47047      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47048    fi
47049    # Remove usage instructions (if present), and
47050    # collapse compiler output into a single line
47051    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47052        $SED -e 's/ *[Uu]sage:.*//'`
47053    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47054        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47055  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47056    # xlc -qversion output typically looks like
47057    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47058    #     Version: 11.01.0000.0015
47059    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47060    # Check that this is likely to be the IBM XL C compiler.
47061    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47062    if test $? -ne 0; then
47063      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47064      { $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
47065$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47066      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47067$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47068      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47069$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47070      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47071    fi
47072    # Collapse compiler output into a single line
47073    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47074    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47075        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47076  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47077    # There is no specific version flag, but all output starts with a version string.
47078    # First line typically looks something like:
47079    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47080    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47081    # Check that this is likely to be Microsoft CL.EXE.
47082    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47083    if test $? -ne 0; then
47084      { $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
47085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47087$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47088      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47089    fi
47090    # Collapse compiler output into a single line
47091    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47092    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47093        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47094  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47095    # gcc --version output typically looks like
47096    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47097    #     Copyright (C) 2013 Free Software Foundation, Inc.
47098    #     This is free software; see the source for copying conditions.  There is NO
47099    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47100    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47101    # Check that this is likely to be GCC.
47102    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47103    if test $? -ne 0; then
47104      { $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
47105$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47106      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47107$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47108      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47109    fi
47110    # Remove Copyright and legalese from version string, and
47111    # collapse into a single line
47112    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47113        $SED -e 's/ *Copyright .*//'`
47114    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47115        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47116  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47117    # clang --version output typically looks like
47118    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47119    #    clang version 3.3 (tags/RELEASE_33/final)
47120    # or
47121    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47122    #    Target: x86_64-pc-linux-gnu
47123    #    Thread model: posix
47124    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47125    # Check that this is likely to be clang
47126    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47127    if test $? -ne 0; then
47128      { $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
47129$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47130      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47131$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47132      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47133    fi
47134    # Collapse compiler output into a single line
47135    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47136    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47137        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47138  else
47139      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47140  fi
47141  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47142  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47143  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47144  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47145
47146  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47147$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47148
47149
47150  COMPILER=$BUILD_CXX
47151  COMPILER_NAME=BuildC++
47152
47153  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47154    # cc -V output typically looks like
47155    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47156    # or
47157    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47158    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47159    # Check that this is likely to be the Solaris Studio cc.
47160    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47161    if test $? -ne 0; then
47162      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47163      { $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
47164$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47165      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47166$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47167      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47168$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47169      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47170    fi
47171    # Remove usage instructions (if present), and
47172    # collapse compiler output into a single line
47173    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47174        $SED -e 's/ *[Uu]sage:.*//'`
47175    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47176        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47177  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47178    # xlc -qversion output typically looks like
47179    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47180    #     Version: 11.01.0000.0015
47181    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47182    # Check that this is likely to be the IBM XL C compiler.
47183    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47184    if test $? -ne 0; then
47185      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47186      { $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
47187$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47188      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47189$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47190      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47191$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47192      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47193    fi
47194    # Collapse compiler output into a single line
47195    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47196    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47197        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47198  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47199    # There is no specific version flag, but all output starts with a version string.
47200    # First line typically looks something like:
47201    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47202    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47203    # Check that this is likely to be Microsoft CL.EXE.
47204    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47205    if test $? -ne 0; then
47206      { $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
47207$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47208      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47209$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47210      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47211    fi
47212    # Collapse compiler output into a single line
47213    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47214    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47215        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47216  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47217    # gcc --version output typically looks like
47218    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47219    #     Copyright (C) 2013 Free Software Foundation, Inc.
47220    #     This is free software; see the source for copying conditions.  There is NO
47221    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47222    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47223    # Check that this is likely to be GCC.
47224    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47225    if test $? -ne 0; then
47226      { $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
47227$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47228      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47229$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47230      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47231    fi
47232    # Remove Copyright and legalese from version string, and
47233    # collapse into a single line
47234    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47235        $SED -e 's/ *Copyright .*//'`
47236    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47237        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47238  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47239    # clang --version output typically looks like
47240    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47241    #    clang version 3.3 (tags/RELEASE_33/final)
47242    # or
47243    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47244    #    Target: x86_64-pc-linux-gnu
47245    #    Thread model: posix
47246    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47247    # Check that this is likely to be clang
47248    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47249    if test $? -ne 0; then
47250      { $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
47251$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47252      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47253$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47254      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47255    fi
47256    # Collapse compiler output into a single line
47257    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47258    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47259        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47260  else
47261      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47262  fi
47263  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47264  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47265  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47266  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47267
47268  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47269$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47270
47271
47272  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47273    { $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
47274$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47275    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47276$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47277  fi
47278
47279  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47280  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47281    { $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
47282$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;}
47283  fi
47284
47285  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47286    { $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
47287$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47288  fi
47289
47290  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47291
47292  else
47293    # If we are not cross compiling, use the normal target compilers for
47294    # building the build platform executables.
47295    BUILD_CC="$CC"
47296    BUILD_CXX="$CXX"
47297    BUILD_LD="$LD"
47298    BUILD_LDCXX="$LDCXX"
47299    BUILD_NM="$NM"
47300    BUILD_AS="$AS"
47301    BUILD_OBJCOPY="$OBJCOPY"
47302    BUILD_STRIP="$STRIP"
47303    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47304    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47305    BUILD_AR="$AR"
47306
47307
47308  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47309    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47310$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47311    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47312$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47313  fi
47314
47315  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47316  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47317    { $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
47318$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;}
47319  fi
47320
47321  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47322    { $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
47323$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47324  fi
47325
47326  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47327
47328  fi
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343  # The package path is used only on macosx?
47344  # FIXME: clean this up, and/or move it elsewhere.
47345  PACKAGE_PATH=/opt/local
47346
47347
47348  # Check for extra potential brokenness.
47349  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47350    # On Windows, double-check that we got the right compiler.
47351    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47352    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47353    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47354      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47355        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
47356      fi
47357    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47358      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47359        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47360      fi
47361    fi
47362  fi
47363
47364  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47365    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47366    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47367    # This is later checked when setting flags.
47368
47369    # "-Og" suppported for GCC 4.8 and later
47370    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418    # Execute function body
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467    # Execute function body
47468
47469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47470$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47471  supports=yes
47472
47473  saved_cflags="$CFLAGS"
47474  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47475  ac_ext=c
47476ac_cpp='$CPP $CPPFLAGS'
47477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47479ac_compiler_gnu=$ac_cv_c_compiler_gnu
47480
47481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47482/* end confdefs.h.  */
47483int i;
47484_ACEOF
47485if ac_fn_c_try_compile "$LINENO"; then :
47486
47487else
47488  supports=no
47489fi
47490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47491  ac_ext=cpp
47492ac_cpp='$CXXCPP $CPPFLAGS'
47493ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47494ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47495ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47496
47497  CFLAGS="$saved_cflags"
47498
47499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47500$as_echo "$supports" >&6; }
47501  if test "x$supports" = "xyes" ; then
47502    :
47503    C_COMP_SUPPORTS="yes"
47504  else
47505    :
47506    C_COMP_SUPPORTS="no"
47507  fi
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567    # Execute function body
47568
47569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47570$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47571  supports=yes
47572
47573  saved_cxxflags="$CXXFLAGS"
47574  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47575  ac_ext=cpp
47576ac_cpp='$CXXCPP $CPPFLAGS'
47577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47580
47581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47582/* end confdefs.h.  */
47583int i;
47584_ACEOF
47585if ac_fn_cxx_try_compile "$LINENO"; then :
47586
47587else
47588  supports=no
47589fi
47590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47591  ac_ext=cpp
47592ac_cpp='$CXXCPP $CPPFLAGS'
47593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47596
47597  CXXFLAGS="$saved_cxxflags"
47598
47599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47600$as_echo "$supports" >&6; }
47601  if test "x$supports" = "xyes" ; then
47602    :
47603    CXX_COMP_SUPPORTS="yes"
47604  else
47605    :
47606    CXX_COMP_SUPPORTS="no"
47607  fi
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47622$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47623  supports=no
47624  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47625
47626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47627$as_echo "$supports" >&6; }
47628  if test "x$supports" = "xyes" ; then
47629    :
47630    HAS_CFLAG_OPTIMIZE_DEBUG=true
47631  else
47632    :
47633    HAS_CFLAG_OPTIMIZE_DEBUG=false
47634  fi
47635
47636
47637
47638
47639
47640
47641
47642    # "-z relro" supported in GNU binutils 2.17 and later
47643    LINKER_RELRO_FLAG="-Wl,-z,relro"
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691    # Execute function body
47692
47693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47694$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47695  supports=yes
47696
47697  saved_ldflags="$LDFLAGS"
47698  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47699  ac_ext=c
47700ac_cpp='$CPP $CPPFLAGS'
47701ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47702ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47703ac_compiler_gnu=$ac_cv_c_compiler_gnu
47704
47705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47706/* end confdefs.h.  */
47707
47708int
47709main ()
47710{
47711
47712  ;
47713  return 0;
47714}
47715_ACEOF
47716if ac_fn_c_try_link "$LINENO"; then :
47717
47718else
47719  supports=no
47720fi
47721rm -f core conftest.err conftest.$ac_objext \
47722    conftest$ac_exeext conftest.$ac_ext
47723  ac_ext=cpp
47724ac_cpp='$CXXCPP $CPPFLAGS'
47725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47728
47729  LDFLAGS="$saved_ldflags"
47730
47731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47732$as_echo "$supports" >&6; }
47733  if test "x$supports" = "xyes" ; then
47734    :
47735    HAS_LINKER_RELRO=true
47736  else
47737    :
47738    HAS_LINKER_RELRO=false
47739  fi
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753    # "-z now" supported in GNU binutils 2.11 and later
47754    LINKER_NOW_FLAG="-Wl,-z,now"
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802    # Execute function body
47803
47804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47805$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47806  supports=yes
47807
47808  saved_ldflags="$LDFLAGS"
47809  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47810  ac_ext=c
47811ac_cpp='$CPP $CPPFLAGS'
47812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47814ac_compiler_gnu=$ac_cv_c_compiler_gnu
47815
47816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47817/* end confdefs.h.  */
47818
47819int
47820main ()
47821{
47822
47823  ;
47824  return 0;
47825}
47826_ACEOF
47827if ac_fn_c_try_link "$LINENO"; then :
47828
47829else
47830  supports=no
47831fi
47832rm -f core conftest.err conftest.$ac_objext \
47833    conftest$ac_exeext conftest.$ac_ext
47834  ac_ext=cpp
47835ac_cpp='$CXXCPP $CPPFLAGS'
47836ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47837ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47838ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47839
47840  LDFLAGS="$saved_ldflags"
47841
47842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47843$as_echo "$supports" >&6; }
47844  if test "x$supports" = "xyes" ; then
47845    :
47846    HAS_LINKER_NOW=true
47847  else
47848    :
47849    HAS_LINKER_NOW=false
47850  fi
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863  fi
47864
47865  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47866  # in executable.'
47867  USING_BROKEN_SUSE_LD=no
47868  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47870$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47871    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47872    $ECHO "int main() { }" > main.c
47873    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47875$as_echo "no" >&6; }
47876      USING_BROKEN_SUSE_LD=no
47877    else
47878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47879$as_echo "yes" >&6; }
47880      USING_BROKEN_SUSE_LD=yes
47881    fi
47882    $RM version-script.map main.c a.out
47883  fi
47884
47885
47886  # Setup hotspot lecagy names for toolchains
47887  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47888  if test "x$TOOLCHAIN_TYPE" = xclang; then
47889    HOTSPOT_TOOLCHAIN_TYPE=gcc
47890  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47891    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47892  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47893    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47894  fi
47895
47896
47897
47898# Setup the JTReg Regression Test Harness.
47899
47900
47901# Check whether --with-jtreg was given.
47902if test "${with_jtreg+set}" = set; then :
47903  withval=$with_jtreg;
47904else
47905  with_jtreg=no
47906fi
47907
47908
47909  if test "x$with_jtreg" = xno; then
47910    # jtreg disabled
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47912$as_echo_n "checking for jtreg... " >&6; }
47913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47914$as_echo "no" >&6; }
47915  else
47916    if test "x$with_jtreg" != xyes; then
47917      # with path specified.
47918      JT_HOME="$with_jtreg"
47919    fi
47920
47921    if test "x$JT_HOME" != x; then
47922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47923$as_echo_n "checking for jtreg... " >&6; }
47924
47925      # use JT_HOME enviroment var.
47926
47927  # Only process if variable expands to non-empty
47928
47929  if test "x$JT_HOME" != x; then
47930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47931
47932  # Input might be given as Windows format, start by converting to
47933  # unix format.
47934  path="$JT_HOME"
47935  new_path=`$CYGPATH -u "$path"`
47936
47937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47940  # "foo.exe" is OK but "foo" is an error.
47941  #
47942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47943  # It is also a way to make sure we got the proper file name for the real test later on.
47944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47945  if test "x$test_shortpath" = x; then
47946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47947$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47948    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47949  fi
47950
47951  # Call helper function which possibly converts this using DOS-style short mode.
47952  # If so, the updated path is stored in $new_path.
47953
47954  input_path="$new_path"
47955  # Check if we need to convert this using DOS-style short mode. If the path
47956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47957  # take no chances and rewrite it.
47958  # Note: m4 eats our [], so we need to use [ and ] instead.
47959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47960  if test "x$has_forbidden_chars" != x; then
47961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47965      # Going to short mode and back again did indeed matter. Since short mode is
47966      # case insensitive, let's make it lowercase to improve readability.
47967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47968      # Now convert it back to Unix-style (cygpath)
47969      input_path=`$CYGPATH -u "$shortmode_path"`
47970      new_path="$input_path"
47971    fi
47972  fi
47973
47974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47975  if test "x$test_cygdrive_prefix" = x; then
47976    # As a simple fix, exclude /usr/bin since it's not a real path.
47977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47979      # a path prefixed by /cygdrive for fixpath to work.
47980      new_path="$CYGWIN_ROOT_PATH$input_path"
47981    fi
47982  fi
47983
47984
47985  if test "x$path" != "x$new_path"; then
47986    JT_HOME="$new_path"
47987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47988$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47989  fi
47990
47991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47992
47993  path="$JT_HOME"
47994  has_colon=`$ECHO $path | $GREP ^.:`
47995  new_path="$path"
47996  if test "x$has_colon" = x; then
47997    # Not in mixed or Windows style, start by that.
47998    new_path=`cmd //c echo $path`
47999  fi
48000
48001
48002  input_path="$new_path"
48003  # Check if we need to convert this using DOS-style short mode. If the path
48004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48005  # take no chances and rewrite it.
48006  # Note: m4 eats our [], so we need to use [ and ] instead.
48007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48008  if test "x$has_forbidden_chars" != x; then
48009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48011  fi
48012
48013
48014  windows_path="$new_path"
48015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016    unix_path=`$CYGPATH -u "$windows_path"`
48017    new_path="$unix_path"
48018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48020    new_path="$unix_path"
48021  fi
48022
48023  if test "x$path" != "x$new_path"; then
48024    JT_HOME="$new_path"
48025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48026$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48027  fi
48028
48029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48031
48032    else
48033      # We're on a unix platform. Hooray! :)
48034      path="$JT_HOME"
48035      has_space=`$ECHO "$path" | $GREP " "`
48036      if test "x$has_space" != x; then
48037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48038$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48040      fi
48041
48042      # Use eval to expand a potential ~
48043      eval path="$path"
48044      if test ! -f "$path" && test ! -d "$path"; then
48045        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48046      fi
48047
48048      if test -d "$path"; then
48049        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48050      else
48051        dir="`$DIRNAME "$path"`"
48052        base="`$BASENAME "$path"`"
48053        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48054      fi
48055    fi
48056  fi
48057
48058
48059      # jtreg win32 script works for everybody
48060      JTREGEXE="$JT_HOME/bin/jtreg"
48061
48062      if test ! -f "$JTREGEXE"; then
48063        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48064      fi
48065
48066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48067$as_echo "$JTREGEXE" >&6; }
48068    else
48069      # try to find jtreg on path
48070
48071
48072
48073  # Publish this variable in the help.
48074
48075
48076  if [ -z "${JTREGEXE+x}" ]; then
48077    # The variable is not set by user, try to locate tool using the code snippet
48078    for ac_prog in jtreg
48079do
48080  # Extract the first word of "$ac_prog", so it can be a program name with args.
48081set dummy $ac_prog; ac_word=$2
48082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48083$as_echo_n "checking for $ac_word... " >&6; }
48084if ${ac_cv_path_JTREGEXE+:} false; then :
48085  $as_echo_n "(cached) " >&6
48086else
48087  case $JTREGEXE in
48088  [\\/]* | ?:[\\/]*)
48089  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48090  ;;
48091  *)
48092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48093for as_dir in $PATH
48094do
48095  IFS=$as_save_IFS
48096  test -z "$as_dir" && as_dir=.
48097    for ac_exec_ext in '' $ac_executable_extensions; do
48098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48099    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48101    break 2
48102  fi
48103done
48104  done
48105IFS=$as_save_IFS
48106
48107  ;;
48108esac
48109fi
48110JTREGEXE=$ac_cv_path_JTREGEXE
48111if test -n "$JTREGEXE"; then
48112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48113$as_echo "$JTREGEXE" >&6; }
48114else
48115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48116$as_echo "no" >&6; }
48117fi
48118
48119
48120  test -n "$JTREGEXE" && break
48121done
48122
48123  else
48124    # The variable is set, but is it from the command line or the environment?
48125
48126    # Try to remove the string !JTREGEXE! from our list.
48127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48129      # If it failed, the variable was not from the command line. Ignore it,
48130      # but warn the user (except for BASH, which is always set by the calling BASH).
48131      if test "xJTREGEXE" != xBASH; then
48132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48133$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48134      fi
48135      # Try to locate tool using the code snippet
48136      for ac_prog in jtreg
48137do
48138  # Extract the first word of "$ac_prog", so it can be a program name with args.
48139set dummy $ac_prog; ac_word=$2
48140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48141$as_echo_n "checking for $ac_word... " >&6; }
48142if ${ac_cv_path_JTREGEXE+:} false; then :
48143  $as_echo_n "(cached) " >&6
48144else
48145  case $JTREGEXE in
48146  [\\/]* | ?:[\\/]*)
48147  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48148  ;;
48149  *)
48150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48151for as_dir in $PATH
48152do
48153  IFS=$as_save_IFS
48154  test -z "$as_dir" && as_dir=.
48155    for ac_exec_ext in '' $ac_executable_extensions; do
48156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48157    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48159    break 2
48160  fi
48161done
48162  done
48163IFS=$as_save_IFS
48164
48165  ;;
48166esac
48167fi
48168JTREGEXE=$ac_cv_path_JTREGEXE
48169if test -n "$JTREGEXE"; then
48170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48171$as_echo "$JTREGEXE" >&6; }
48172else
48173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48174$as_echo "no" >&6; }
48175fi
48176
48177
48178  test -n "$JTREGEXE" && break
48179done
48180
48181    else
48182      # If it succeeded, then it was overridden by the user. We will use it
48183      # for the tool.
48184
48185      # First remove it from the list of overridden variables, so we can test
48186      # for unknown variables in the end.
48187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48188
48189      # Check if we try to supply an empty value
48190      if test "x$JTREGEXE" = x; then
48191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48192$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48194$as_echo_n "checking for JTREGEXE... " >&6; }
48195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48196$as_echo "disabled" >&6; }
48197      else
48198        # Check if the provided tool contains a complete path.
48199        tool_specified="$JTREGEXE"
48200        tool_basename="${tool_specified##*/}"
48201        if test "x$tool_basename" = "x$tool_specified"; then
48202          # A command without a complete path is provided, search $PATH.
48203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48204$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48205          # Extract the first word of "$tool_basename", so it can be a program name with args.
48206set dummy $tool_basename; ac_word=$2
48207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48208$as_echo_n "checking for $ac_word... " >&6; }
48209if ${ac_cv_path_JTREGEXE+:} false; then :
48210  $as_echo_n "(cached) " >&6
48211else
48212  case $JTREGEXE in
48213  [\\/]* | ?:[\\/]*)
48214  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48215  ;;
48216  *)
48217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48218for as_dir in $PATH
48219do
48220  IFS=$as_save_IFS
48221  test -z "$as_dir" && as_dir=.
48222    for ac_exec_ext in '' $ac_executable_extensions; do
48223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48224    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48226    break 2
48227  fi
48228done
48229  done
48230IFS=$as_save_IFS
48231
48232  ;;
48233esac
48234fi
48235JTREGEXE=$ac_cv_path_JTREGEXE
48236if test -n "$JTREGEXE"; then
48237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48238$as_echo "$JTREGEXE" >&6; }
48239else
48240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48241$as_echo "no" >&6; }
48242fi
48243
48244
48245          if test "x$JTREGEXE" = x; then
48246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48247          fi
48248        else
48249          # Otherwise we believe it is a complete path. Use it as it is.
48250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48251$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48253$as_echo_n "checking for JTREGEXE... " >&6; }
48254          if test ! -x "$tool_specified"; then
48255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48256$as_echo "not found" >&6; }
48257            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48258          fi
48259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48260$as_echo "$tool_specified" >&6; }
48261        fi
48262      fi
48263    fi
48264
48265  fi
48266
48267
48268
48269  if test "x$JTREGEXE" = x; then
48270    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48271  fi
48272
48273
48274      JT_HOME="`$DIRNAME $JTREGEXE`"
48275    fi
48276  fi
48277
48278
48279
48280
48281
48282
48283  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48284  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48285  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48286  #                              commands produced by the link step (currently AIX only)
48287  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48288    COMPILER_TARGET_BITS_FLAG="-q"
48289    COMPILER_COMMAND_FILE_FLAG="-f"
48290    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48291  else
48292    COMPILER_TARGET_BITS_FLAG="-m"
48293    COMPILER_COMMAND_FILE_FLAG="@"
48294    COMPILER_BINDCMD_FILE_FLAG=""
48295
48296    # The solstudio linker does not support @-files.
48297    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48298      COMPILER_COMMAND_FILE_FLAG=
48299    fi
48300
48301    # Check if @file is supported by gcc
48302    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48304$as_echo_n "checking if @file is supported by gcc... " >&6; }
48305      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48306      $ECHO "" "--version" > command.file
48307      if $CXX @command.file 2>&5 >&5; then
48308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48309$as_echo "yes" >&6; }
48310        COMPILER_COMMAND_FILE_FLAG="@"
48311      else
48312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48313$as_echo "no" >&6; }
48314        COMPILER_COMMAND_FILE_FLAG=
48315      fi
48316      $RM command.file
48317    fi
48318  fi
48319
48320
48321
48322
48323  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48324  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48325    ARFLAGS="-r"
48326  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48327    ARFLAGS="-X64"
48328  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48329    # lib.exe is used as AR to create static libraries.
48330    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48331  else
48332    ARFLAGS=""
48333  fi
48334
48335
48336  ## Setup strip.
48337  # FIXME: should this really be per platform, or should it be per toolchain type?
48338  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48339  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48340  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48341    STRIPFLAGS="-g"
48342  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48343    STRIPFLAGS="-x"
48344  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48345    STRIPFLAGS="-S"
48346  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48347    STRIPFLAGS="-X32_64"
48348  fi
48349
48350
48351
48352  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48353    CC_OUT_OPTION=-Fo
48354    EXE_OUT_OPTION=-out:
48355    LD_OUT_OPTION=-out:
48356    AR_OUT_OPTION=-out:
48357  else
48358    # The option used to specify the target .o,.a or .so file.
48359    # When compiling, how to specify the to be created object file.
48360    CC_OUT_OPTION='-o$(SPACE)'
48361    # When linking, how to specify the to be created executable.
48362    EXE_OUT_OPTION='-o$(SPACE)'
48363    # When linking, how to specify the to be created dynamically linkable library.
48364    LD_OUT_OPTION='-o$(SPACE)'
48365    # When archiving, how to specify the to be create static archive for object files.
48366    AR_OUT_OPTION='rcs$(SPACE)'
48367  fi
48368
48369
48370
48371
48372
48373  # On Windows, we need to set RC flags.
48374  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48375    RC_FLAGS="-nologo -l0x409"
48376    JVM_RCFLAGS="-nologo"
48377    if test "x$DEBUG_LEVEL" = xrelease; then
48378      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48379      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48380    fi
48381
48382    # The version variables used to create RC_FLAGS may be overridden
48383    # in a custom configure script, or possibly the command line.
48384    # Let those variables be expanded at make time in spec.gmk.
48385    # The \$ are escaped to the shell, and the $(...) variables
48386    # are evaluated by make.
48387    RC_FLAGS="$RC_FLAGS \
48388        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48389        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48390        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48391        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48392        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48393        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48394        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48395
48396    JVM_RCFLAGS="$JVM_RCFLAGS \
48397        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48398        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48399        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48400        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48401        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48402        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48403        -D\"HS_FNAME=jvm.dll\" \
48404        -D\"HS_INTERNAL_NAME=jvm\""
48405  fi
48406
48407
48408
48409  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48410    # silence copyright notice and other headers.
48411    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48412  fi
48413
48414
48415# Now we can test some aspects on the target using configure macros.
48416
48417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48418$as_echo_n "checking for ANSI C header files... " >&6; }
48419if ${ac_cv_header_stdc+:} false; then :
48420  $as_echo_n "(cached) " >&6
48421else
48422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48423/* end confdefs.h.  */
48424#include <stdlib.h>
48425#include <stdarg.h>
48426#include <string.h>
48427#include <float.h>
48428
48429int
48430main ()
48431{
48432
48433  ;
48434  return 0;
48435}
48436_ACEOF
48437if ac_fn_cxx_try_compile "$LINENO"; then :
48438  ac_cv_header_stdc=yes
48439else
48440  ac_cv_header_stdc=no
48441fi
48442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48443
48444if test $ac_cv_header_stdc = yes; then
48445  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48447/* end confdefs.h.  */
48448#include <string.h>
48449
48450_ACEOF
48451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48452  $EGREP "memchr" >/dev/null 2>&1; then :
48453
48454else
48455  ac_cv_header_stdc=no
48456fi
48457rm -f conftest*
48458
48459fi
48460
48461if test $ac_cv_header_stdc = yes; then
48462  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48464/* end confdefs.h.  */
48465#include <stdlib.h>
48466
48467_ACEOF
48468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48469  $EGREP "free" >/dev/null 2>&1; then :
48470
48471else
48472  ac_cv_header_stdc=no
48473fi
48474rm -f conftest*
48475
48476fi
48477
48478if test $ac_cv_header_stdc = yes; then
48479  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48480  if test "$cross_compiling" = yes; then :
48481  :
48482else
48483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48484/* end confdefs.h.  */
48485#include <ctype.h>
48486#include <stdlib.h>
48487#if ((' ' & 0x0FF) == 0x020)
48488# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48489# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48490#else
48491# define ISLOWER(c) \
48492		   (('a' <= (c) && (c) <= 'i') \
48493		     || ('j' <= (c) && (c) <= 'r') \
48494		     || ('s' <= (c) && (c) <= 'z'))
48495# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48496#endif
48497
48498#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48499int
48500main ()
48501{
48502  int i;
48503  for (i = 0; i < 256; i++)
48504    if (XOR (islower (i), ISLOWER (i))
48505	|| toupper (i) != TOUPPER (i))
48506      return 2;
48507  return 0;
48508}
48509_ACEOF
48510if ac_fn_cxx_try_run "$LINENO"; then :
48511
48512else
48513  ac_cv_header_stdc=no
48514fi
48515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48516  conftest.$ac_objext conftest.beam conftest.$ac_ext
48517fi
48518
48519fi
48520fi
48521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48522$as_echo "$ac_cv_header_stdc" >&6; }
48523if test $ac_cv_header_stdc = yes; then
48524
48525$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48526
48527fi
48528
48529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48530for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48531		  inttypes.h stdint.h unistd.h
48532do :
48533  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48534ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48535"
48536if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48537  cat >>confdefs.h <<_ACEOF
48538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48539_ACEOF
48540
48541fi
48542
48543done
48544
48545
48546
48547  ###############################################################################
48548  #
48549  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48550  # (The JVM can use 32 or 64 bit Java pointers but that decision
48551  # is made at runtime.)
48552  #
48553
48554  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48555    # Always specify -m flag on Solaris
48556    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48557
48558  # When we add flags to the "official" CFLAGS etc, we need to
48559  # keep track of these additions in ADDED_CFLAGS etc. These
48560  # will later be checked to make sure only controlled additions
48561  # have been made to CFLAGS etc.
48562  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48563  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48564  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48565
48566  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48567  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48568  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48569
48570  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48571  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48572  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48573
48574  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48575  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48576  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48577
48578  elif test "x$COMPILE_TYPE" = xreduced; then
48579    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48580      # Specify -m if running reduced on unix platforms
48581
48582  # When we add flags to the "official" CFLAGS etc, we need to
48583  # keep track of these additions in ADDED_CFLAGS etc. These
48584  # will later be checked to make sure only controlled additions
48585  # have been made to CFLAGS etc.
48586  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48587  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589
48590  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48591  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48592  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48593
48594  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48595  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48596  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48597
48598  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48599  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48600  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48601
48602    fi
48603  fi
48604  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48605    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48606    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48607    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48608  fi
48609
48610  # Make compilation sanity check
48611  for ac_header in stdio.h
48612do :
48613  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48614if test "x$ac_cv_header_stdio_h" = xyes; then :
48615  cat >>confdefs.h <<_ACEOF
48616#define HAVE_STDIO_H 1
48617_ACEOF
48618
48619else
48620
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48622$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48623    if test "x$COMPILE_TYPE" = xreduced; then
48624
48625  # Print a helpful message on how to acquire the necessary build dependency.
48626  # reduced is the help tag: freetype, cups, alsa etc
48627  MISSING_DEPENDENCY=reduced
48628
48629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48630    cygwin_help $MISSING_DEPENDENCY
48631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48632    msys_help $MISSING_DEPENDENCY
48633  else
48634    PKGHANDLER_COMMAND=
48635
48636    case $PKGHANDLER in
48637      apt-get)
48638        apt_help     $MISSING_DEPENDENCY ;;
48639      yum)
48640        yum_help     $MISSING_DEPENDENCY ;;
48641      port)
48642        port_help    $MISSING_DEPENDENCY ;;
48643      pkgutil)
48644        pkgutil_help $MISSING_DEPENDENCY ;;
48645      pkgadd)
48646        pkgadd_help  $MISSING_DEPENDENCY ;;
48647    esac
48648
48649    if test "x$PKGHANDLER_COMMAND" != x; then
48650      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48651    fi
48652  fi
48653
48654      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48655$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48656    elif test "x$COMPILE_TYPE" = xcross; then
48657      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48658$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48659    fi
48660    as_fn_error $? "Cannot continue." "$LINENO" 5
48661
48662fi
48663
48664done
48665
48666
48667  # The cast to long int works around a bug in the HP C Compiler
48668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48670# This bug is HP SR number 8606223364.
48671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48672$as_echo_n "checking size of int *... " >&6; }
48673if ${ac_cv_sizeof_int_p+:} false; then :
48674  $as_echo_n "(cached) " >&6
48675else
48676  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48677
48678else
48679  if test "$ac_cv_type_int_p" = yes; then
48680     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48682as_fn_error 77 "cannot compute sizeof (int *)
48683See \`config.log' for more details" "$LINENO" 5; }
48684   else
48685     ac_cv_sizeof_int_p=0
48686   fi
48687fi
48688
48689fi
48690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48691$as_echo "$ac_cv_sizeof_int_p" >&6; }
48692
48693
48694
48695cat >>confdefs.h <<_ACEOF
48696#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48697_ACEOF
48698
48699
48700
48701  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48702  if test "x$ac_cv_sizeof_int_p" = x; then
48703    # The test failed, lets stick to the assumed value.
48704    { $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
48705$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48706  else
48707    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48708
48709    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48710      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48711      # Let's try to implicitely set the compilers target architecture and retry the test
48712      { $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
48713$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;}
48714      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48715$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48716
48717  # When we add flags to the "official" CFLAGS etc, we need to
48718  # keep track of these additions in ADDED_CFLAGS etc. These
48719  # will later be checked to make sure only controlled additions
48720  # have been made to CFLAGS etc.
48721  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48722  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48723  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48724
48725  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48726  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48727  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48728
48729  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48730  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48731  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48732
48733  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48734  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48735  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48736
48737
48738      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48739      unset ac_cv_sizeof_int_p
48740      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48741      cat >>confdefs.h <<_ACEOF
48742#undef SIZEOF_INT_P
48743_ACEOF
48744
48745      # The cast to long int works around a bug in the HP C Compiler
48746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48748# This bug is HP SR number 8606223364.
48749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48750$as_echo_n "checking size of int *... " >&6; }
48751if ${ac_cv_sizeof_int_p+:} false; then :
48752  $as_echo_n "(cached) " >&6
48753else
48754  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48755
48756else
48757  if test "$ac_cv_type_int_p" = yes; then
48758     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48760as_fn_error 77 "cannot compute sizeof (int *)
48761See \`config.log' for more details" "$LINENO" 5; }
48762   else
48763     ac_cv_sizeof_int_p=0
48764   fi
48765fi
48766
48767fi
48768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48769$as_echo "$ac_cv_sizeof_int_p" >&6; }
48770
48771
48772
48773cat >>confdefs.h <<_ACEOF
48774#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48775_ACEOF
48776
48777
48778
48779      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48780
48781      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48782        { $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
48783$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;}
48784        if test "x$COMPILE_TYPE" = xreduced; then
48785
48786  # Print a helpful message on how to acquire the necessary build dependency.
48787  # reduced is the help tag: freetype, cups, alsa etc
48788  MISSING_DEPENDENCY=reduced
48789
48790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48791    cygwin_help $MISSING_DEPENDENCY
48792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48793    msys_help $MISSING_DEPENDENCY
48794  else
48795    PKGHANDLER_COMMAND=
48796
48797    case $PKGHANDLER in
48798      apt-get)
48799        apt_help     $MISSING_DEPENDENCY ;;
48800      yum)
48801        yum_help     $MISSING_DEPENDENCY ;;
48802      port)
48803        port_help    $MISSING_DEPENDENCY ;;
48804      pkgutil)
48805        pkgutil_help $MISSING_DEPENDENCY ;;
48806      pkgadd)
48807        pkgadd_help  $MISSING_DEPENDENCY ;;
48808    esac
48809
48810    if test "x$PKGHANDLER_COMMAND" != x; then
48811      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48812    fi
48813  fi
48814
48815          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48816$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48817        elif test "x$COMPILE_TYPE" = xcross; then
48818          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48819$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48820        fi
48821        as_fn_error $? "Cannot continue." "$LINENO" 5
48822      fi
48823    fi
48824  fi
48825
48826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48827$as_echo_n "checking for target address size... " >&6; }
48828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48829$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48830
48831
48832  ###############################################################################
48833  #
48834  # Is the target little of big endian?
48835  #
48836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48837$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48838if ${ac_cv_c_bigendian+:} false; then :
48839  $as_echo_n "(cached) " >&6
48840else
48841  ac_cv_c_bigendian=unknown
48842    # See if we're dealing with a universal compiler.
48843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48844/* end confdefs.h.  */
48845#ifndef __APPLE_CC__
48846	       not a universal capable compiler
48847	     #endif
48848	     typedef int dummy;
48849
48850_ACEOF
48851if ac_fn_cxx_try_compile "$LINENO"; then :
48852
48853	# Check for potential -arch flags.  It is not universal unless
48854	# there are at least two -arch flags with different values.
48855	ac_arch=
48856	ac_prev=
48857	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48858	 if test -n "$ac_prev"; then
48859	   case $ac_word in
48860	     i?86 | x86_64 | ppc | ppc64)
48861	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48862		 ac_arch=$ac_word
48863	       else
48864		 ac_cv_c_bigendian=universal
48865		 break
48866	       fi
48867	       ;;
48868	   esac
48869	   ac_prev=
48870	 elif test "x$ac_word" = "x-arch"; then
48871	   ac_prev=arch
48872	 fi
48873       done
48874fi
48875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48876    if test $ac_cv_c_bigendian = unknown; then
48877      # See if sys/param.h defines the BYTE_ORDER macro.
48878      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48879/* end confdefs.h.  */
48880#include <sys/types.h>
48881	     #include <sys/param.h>
48882
48883int
48884main ()
48885{
48886#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48887		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48888		     && LITTLE_ENDIAN)
48889	      bogus endian macros
48890	     #endif
48891
48892  ;
48893  return 0;
48894}
48895_ACEOF
48896if ac_fn_cxx_try_compile "$LINENO"; then :
48897  # It does; now see whether it defined to BIG_ENDIAN or not.
48898	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48899/* end confdefs.h.  */
48900#include <sys/types.h>
48901		#include <sys/param.h>
48902
48903int
48904main ()
48905{
48906#if BYTE_ORDER != BIG_ENDIAN
48907		 not big endian
48908		#endif
48909
48910  ;
48911  return 0;
48912}
48913_ACEOF
48914if ac_fn_cxx_try_compile "$LINENO"; then :
48915  ac_cv_c_bigendian=yes
48916else
48917  ac_cv_c_bigendian=no
48918fi
48919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48920fi
48921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48922    fi
48923    if test $ac_cv_c_bigendian = unknown; then
48924      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48925      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48926/* end confdefs.h.  */
48927#include <limits.h>
48928
48929int
48930main ()
48931{
48932#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48933	      bogus endian macros
48934	     #endif
48935
48936  ;
48937  return 0;
48938}
48939_ACEOF
48940if ac_fn_cxx_try_compile "$LINENO"; then :
48941  # It does; now see whether it defined to _BIG_ENDIAN or not.
48942	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48943/* end confdefs.h.  */
48944#include <limits.h>
48945
48946int
48947main ()
48948{
48949#ifndef _BIG_ENDIAN
48950		 not big endian
48951		#endif
48952
48953  ;
48954  return 0;
48955}
48956_ACEOF
48957if ac_fn_cxx_try_compile "$LINENO"; then :
48958  ac_cv_c_bigendian=yes
48959else
48960  ac_cv_c_bigendian=no
48961fi
48962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48963fi
48964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48965    fi
48966    if test $ac_cv_c_bigendian = unknown; then
48967      # Compile a test program.
48968      if test "$cross_compiling" = yes; then :
48969  # Try to guess by grepping values from an object file.
48970	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48971/* end confdefs.h.  */
48972short int ascii_mm[] =
48973		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48974		short int ascii_ii[] =
48975		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48976		int use_ascii (int i) {
48977		  return ascii_mm[i] + ascii_ii[i];
48978		}
48979		short int ebcdic_ii[] =
48980		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48981		short int ebcdic_mm[] =
48982		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48983		int use_ebcdic (int i) {
48984		  return ebcdic_mm[i] + ebcdic_ii[i];
48985		}
48986		extern int foo;
48987
48988int
48989main ()
48990{
48991return use_ascii (foo) == use_ebcdic (foo);
48992  ;
48993  return 0;
48994}
48995_ACEOF
48996if ac_fn_cxx_try_compile "$LINENO"; then :
48997  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48998	      ac_cv_c_bigendian=yes
48999	    fi
49000	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49001	      if test "$ac_cv_c_bigendian" = unknown; then
49002		ac_cv_c_bigendian=no
49003	      else
49004		# finding both strings is unlikely to happen, but who knows?
49005		ac_cv_c_bigendian=unknown
49006	      fi
49007	    fi
49008fi
49009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49010else
49011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49012/* end confdefs.h.  */
49013$ac_includes_default
49014int
49015main ()
49016{
49017
49018	     /* Are we little or big endian?  From Harbison&Steele.  */
49019	     union
49020	     {
49021	       long int l;
49022	       char c[sizeof (long int)];
49023	     } u;
49024	     u.l = 1;
49025	     return u.c[sizeof (long int) - 1] == 1;
49026
49027  ;
49028  return 0;
49029}
49030_ACEOF
49031if ac_fn_cxx_try_run "$LINENO"; then :
49032  ac_cv_c_bigendian=no
49033else
49034  ac_cv_c_bigendian=yes
49035fi
49036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49037  conftest.$ac_objext conftest.beam conftest.$ac_ext
49038fi
49039
49040    fi
49041fi
49042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49043$as_echo "$ac_cv_c_bigendian" >&6; }
49044 case $ac_cv_c_bigendian in #(
49045   yes)
49046     ENDIAN="big";; #(
49047   no)
49048     ENDIAN="little" ;; #(
49049   universal)
49050     ENDIAN="universal_endianness"
49051     ;; #(
49052   *)
49053     ENDIAN="unknown" ;;
49054 esac
49055
49056
49057  if test "x$ENDIAN" = xuniversal_endianness; then
49058    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49059  fi
49060  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49061    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
49062  fi
49063
49064
49065# Configure flags for the tools
49066
49067  ###############################################################################
49068  #
49069  # How to compile shared libraries.
49070  #
49071
49072  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49073    PICFLAG="-fPIC"
49074    C_FLAG_REORDER=''
49075    CXX_FLAG_REORDER=''
49076
49077    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49078      # Linking is different on MacOSX
49079      if test "x$STATIC_BUILD" = xtrue; then
49080        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49081      else
49082        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49083        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49084      fi
49085      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49086      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49087      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49088      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49089    else
49090      # Default works for linux, might work on other platforms as well.
49091      SHARED_LIBRARY_FLAGS='-shared'
49092      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49093      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49094      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49095      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49096    fi
49097  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49098    C_FLAG_REORDER=''
49099    CXX_FLAG_REORDER=''
49100
49101    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49102      # Linking is different on MacOSX
49103      PICFLAG=''
49104      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49105      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49106      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49107      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49108      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49109
49110      if test "x$STATIC_BUILD" = xfalse; then
49111        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49112      fi
49113    else
49114      # Default works for linux, might work on other platforms as well.
49115      PICFLAG='-fPIC'
49116      SHARED_LIBRARY_FLAGS='-shared'
49117      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49118      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49119      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49120
49121      # arm specific settings
49122      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49123        # '-Wl,-z,origin' isn't used on arm.
49124        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49125      else
49126        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49127      fi
49128
49129    fi
49130  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49131    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49132      PICFLAG="-xcode=pic32"
49133    else
49134      PICFLAG="-KPIC"
49135    fi
49136    C_FLAG_REORDER='-xF'
49137    CXX_FLAG_REORDER='-xF'
49138    SHARED_LIBRARY_FLAGS="-G"
49139    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49140    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49141    SET_SHARED_LIBRARY_NAME='-h $1'
49142    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49143  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49144    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49145    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49146    # will have to patch this single instruction with a call to some out-of-order code which
49147    # does the load from the TOC. This is of course slow. But in that case we also would have
49148    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49149    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49150    # can be patched directly by the linker and does not require a jump to out-of-order code.
49151    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49152    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49153    # loads for accessing a global variable). But there are rumors that this may be seen as a
49154    # 'performance feature' because of improved code locality of the symbols used in a
49155    # compilation unit.
49156    PICFLAG="-qpic"
49157    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49158    C_FLAG_REORDER=''
49159    CXX_FLAG_REORDER=''
49160    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49161    SET_EXECUTABLE_ORIGIN=""
49162    SET_SHARED_LIBRARY_ORIGIN=''
49163    SET_SHARED_LIBRARY_NAME=''
49164    SET_SHARED_LIBRARY_MAPFILE=''
49165  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49166    PICFLAG=""
49167    C_FLAG_REORDER=''
49168    CXX_FLAG_REORDER=''
49169    SHARED_LIBRARY_FLAGS="-dll"
49170    SET_EXECUTABLE_ORIGIN=''
49171    SET_SHARED_LIBRARY_ORIGIN=''
49172    SET_SHARED_LIBRARY_NAME=''
49173    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49174  fi
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184  # The (cross) compiler is now configured, we can now test capabilities
49185  # of the target platform.
49186
49187
49188
49189  ###############################################################################
49190  #
49191  # Setup the opt flags for different compilers
49192  # and different operating systems.
49193  #
49194
49195  # FIXME: this was indirectly the old default, but just inherited.
49196  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49197  #   C_FLAG_DEPS="-MMD -MF"
49198  # fi
49199
49200  # Generate make dependency files
49201  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49202    C_FLAG_DEPS="-MMD -MF"
49203  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49204    C_FLAG_DEPS="-MMD -MF"
49205  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49206    C_FLAG_DEPS="-xMMD -xMF"
49207  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49208    C_FLAG_DEPS="-qmakedep=gcc -MF"
49209  fi
49210  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49211
49212
49213
49214  # Debug symbols
49215  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49216    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49217      # reduce from default "-g2" option to save space
49218      CFLAGS_DEBUG_SYMBOLS="-g1"
49219      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49220    else
49221      CFLAGS_DEBUG_SYMBOLS="-g"
49222      CXXFLAGS_DEBUG_SYMBOLS="-g"
49223    fi
49224  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49225    CFLAGS_DEBUG_SYMBOLS="-g"
49226    CXXFLAGS_DEBUG_SYMBOLS="-g"
49227  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49228    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49229    # -g0 enables debug symbols without disabling inlining.
49230    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49231  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49232    CFLAGS_DEBUG_SYMBOLS="-g"
49233    CXXFLAGS_DEBUG_SYMBOLS="-g"
49234  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49235    CFLAGS_DEBUG_SYMBOLS="-Zi"
49236    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49237  fi
49238
49239
49240
49241  # Debug symbols for JVM_CFLAGS
49242  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49243    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49244    if test "x$DEBUG_LEVEL" = xslowdebug; then
49245      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49246    else
49247      # -g0 does not disable inlining, which -g does.
49248      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49249    fi
49250  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49251    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49252  else
49253    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49254  fi
49255
49256
49257  # bounds, memory and behavior checking options
49258  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49259    case $DEBUG_LEVEL in
49260    release )
49261      # no adjustment
49262      ;;
49263    fastdebug )
49264      # no adjustment
49265      ;;
49266    slowdebug )
49267      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49268      # get's added conditionally on whether we produce debug symbols or not.
49269      # This is most likely not really correct.
49270
49271      # Add runtime stack smashing and undefined behavior checks.
49272      # Not all versions of gcc support -fstack-protector
49273      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316    # Execute function body
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365    # Execute function body
49366
49367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49368$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49369  supports=yes
49370
49371  saved_cflags="$CFLAGS"
49372  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49373  ac_ext=c
49374ac_cpp='$CPP $CPPFLAGS'
49375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49377ac_compiler_gnu=$ac_cv_c_compiler_gnu
49378
49379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49380/* end confdefs.h.  */
49381int i;
49382_ACEOF
49383if ac_fn_c_try_compile "$LINENO"; then :
49384
49385else
49386  supports=no
49387fi
49388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49389  ac_ext=cpp
49390ac_cpp='$CXXCPP $CPPFLAGS'
49391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49394
49395  CFLAGS="$saved_cflags"
49396
49397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49398$as_echo "$supports" >&6; }
49399  if test "x$supports" = "xyes" ; then
49400    :
49401    C_COMP_SUPPORTS="yes"
49402  else
49403    :
49404    C_COMP_SUPPORTS="no"
49405  fi
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465    # Execute function body
49466
49467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49468$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49469  supports=yes
49470
49471  saved_cxxflags="$CXXFLAGS"
49472  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49473  ac_ext=cpp
49474ac_cpp='$CXXCPP $CPPFLAGS'
49475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49478
49479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49480/* end confdefs.h.  */
49481int i;
49482_ACEOF
49483if ac_fn_cxx_try_compile "$LINENO"; then :
49484
49485else
49486  supports=no
49487fi
49488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49489  ac_ext=cpp
49490ac_cpp='$CXXCPP $CPPFLAGS'
49491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49494
49495  CXXFLAGS="$saved_cxxflags"
49496
49497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49498$as_echo "$supports" >&6; }
49499  if test "x$supports" = "xyes" ; then
49500    :
49501    CXX_COMP_SUPPORTS="yes"
49502  else
49503    :
49504    CXX_COMP_SUPPORTS="no"
49505  fi
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517
49518
49519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49520$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49521  supports=no
49522  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49523
49524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49525$as_echo "$supports" >&6; }
49526  if test "x$supports" = "xyes" ; then
49527    :
49528
49529  else
49530    :
49531    STACK_PROTECTOR_CFLAG=""
49532  fi
49533
49534
49535
49536
49537
49538
49539
49540      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49541      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49542      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49543        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49544      fi
49545      ;;
49546    esac
49547  fi
49548
49549  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49550    if test "x$DEBUG_LEVEL" != xrelease; then
49551      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49552        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49553      fi
49554    fi
49555  fi
49556
49557  # Optimization levels
49558  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49559    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49560
49561    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49562      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49563      C_O_FLAG_HIGHEST_JVM="-xO4"
49564      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49565      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49566      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49567      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49568      C_O_FLAG_DEBUG_JVM=""
49569      C_O_FLAG_NONE="-xregs=no%frameptr"
49570      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49571      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49572      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49573      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49574      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49575      CXX_O_FLAG_DEBUG_JVM=""
49576      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49577      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49578        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49579        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49580      fi
49581    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49582      C_O_FLAG_HIGHEST_JVM="-xO4"
49583      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49584      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49585      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49586      C_O_FLAG_DEBUG=""
49587      C_O_FLAG_DEBUG_JVM=""
49588      C_O_FLAG_NONE=""
49589      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49590      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49591      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49592      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49593      CXX_O_FLAG_DEBUG=""
49594      CXX_O_FLAG_DEBUG_JVM=""
49595      CXX_O_FLAG_NONE=""
49596    fi
49597  else
49598    # The remaining toolchains share opt flags between CC and CXX;
49599    # setup for C and duplicate afterwards.
49600    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49601      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49602        # On MacOSX we optimize for size, something
49603        # we should do for all platforms?
49604        C_O_FLAG_HIGHEST_JVM="-Os"
49605        C_O_FLAG_HIGHEST="-Os"
49606        C_O_FLAG_HI="-Os"
49607        C_O_FLAG_NORM="-Os"
49608        C_O_FLAG_SIZE="-Os"
49609      else
49610        C_O_FLAG_HIGHEST_JVM="-O3"
49611        C_O_FLAG_HIGHEST="-O3"
49612        C_O_FLAG_HI="-O3"
49613        C_O_FLAG_NORM="-O2"
49614        C_O_FLAG_SIZE="-Os"
49615      fi
49616      C_O_FLAG_DEBUG="-O0"
49617      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49618        C_O_FLAG_DEBUG_JVM=""
49619      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49620        C_O_FLAG_DEBUG_JVM="-O0"
49621      fi
49622      C_O_FLAG_NONE="-O0"
49623    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49624      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49625        # On MacOSX we optimize for size, something
49626        # we should do for all platforms?
49627        C_O_FLAG_HIGHEST_JVM="-Os"
49628        C_O_FLAG_HIGHEST="-Os"
49629        C_O_FLAG_HI="-Os"
49630        C_O_FLAG_NORM="-Os"
49631        C_O_FLAG_SIZE="-Os"
49632      else
49633        C_O_FLAG_HIGHEST_JVM="-O3"
49634        C_O_FLAG_HIGHEST="-O3"
49635        C_O_FLAG_HI="-O3"
49636        C_O_FLAG_NORM="-O2"
49637        C_O_FLAG_SIZE="-Os"
49638      fi
49639      C_O_FLAG_DEBUG="-O0"
49640      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49641        C_O_FLAG_DEBUG_JVM=""
49642      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49643        C_O_FLAG_DEBUG_JVM="-O0"
49644      fi
49645      C_O_FLAG_NONE="-O0"
49646    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49647      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49648      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49649      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49650      C_O_FLAG_NORM="-O2"
49651      C_O_FLAG_DEBUG="-qnoopt"
49652      # FIXME: Value below not verified.
49653      C_O_FLAG_DEBUG_JVM=""
49654      C_O_FLAG_NONE="-qnoopt"
49655    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49656      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49657      C_O_FLAG_HIGHEST="-O2"
49658      C_O_FLAG_HI="-O1"
49659      C_O_FLAG_NORM="-O1"
49660      C_O_FLAG_DEBUG="-Od"
49661      C_O_FLAG_DEBUG_JVM=""
49662      C_O_FLAG_NONE="-Od"
49663      C_O_FLAG_SIZE="-Os"
49664    fi
49665    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49666    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49667    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49668    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49669    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49670    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49671    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49672    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49673  fi
49674
49675  # Adjust optimization flags according to debug level.
49676  case $DEBUG_LEVEL in
49677    release )
49678      # no adjustment
49679      ;;
49680    fastdebug )
49681      # Not quite so much optimization
49682      C_O_FLAG_HI="$C_O_FLAG_NORM"
49683      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49684      ;;
49685    slowdebug )
49686      # Disable optimization
49687      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49688      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49689      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49690      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49691      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49692      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49693      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49694      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49695      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49696      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49697      ;;
49698  esac
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719# Check whether --with-abi-profile was given.
49720if test "${with_abi_profile+set}" = set; then :
49721  withval=$with_abi_profile;
49722fi
49723
49724
49725  if test "x$with_abi_profile" != x; then
49726    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49727        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49728      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49729    fi
49730
49731    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49733$as_echo_n "checking for ABI profle... " >&6; }
49734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49735$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49736
49737    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49738      ARM_FLOAT_TYPE=vfp-sflt
49739      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49740    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49741      ARM_FLOAT_TYPE=vfp-hflt
49742      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49743    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49744      ARM_FLOAT_TYPE=sflt
49745      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49746    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49747      ARM_FLOAT_TYPE=vfp-sflt
49748      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49749    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49750      ARM_FLOAT_TYPE=vfp-hflt
49751      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49752    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49753      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49754      ARM_FLOAT_TYPE=
49755      ARM_ARCH_TYPE_FLAGS=
49756    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49757      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49758      ARM_FLOAT_TYPE=
49759      ARM_ARCH_TYPE_FLAGS=
49760    else
49761      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49762    fi
49763
49764    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49765      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49766    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49767      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49768    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49769      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49770    fi
49771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49772$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49774$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49775
49776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49777$as_echo_n "checking for arch type flags... " >&6; }
49778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49779$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49780
49781    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49782    # autoconf target triplet.
49783     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49784    # Sanity check that it is a known ABI.
49785    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49786        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49787        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49788          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49789$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49790    fi
49791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49792$as_echo_n "checking for ABI property name... " >&6; }
49793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49794$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49795
49796
49797    # Pass these on to the open part of configure as if they were set using
49798    # --with-extra-c[xx]flags.
49799    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49800    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49801    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49802    # FIXME: This should not really be set using extra_cflags.
49803    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49804        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49805        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49806    fi
49807    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49808    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49809    # And pass the architecture flags to the linker as well
49810    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49811  fi
49812
49813  # When building with an abi profile, the name of that profile is appended on the
49814  # bundle platform, which is used in bundle names.
49815  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49816    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49817  fi
49818
49819
49820  # Special extras...
49821  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49822    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49823      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49824      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49825    fi
49826    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49827    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49828  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49829    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49830    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49831  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49832    CXXSTD_CXXFLAG="-std=gnu++98"
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875    # Execute function body
49876
49877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49878$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49879  supports=yes
49880
49881  saved_cxxflags="$CXXFLAGS"
49882  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49883  ac_ext=cpp
49884ac_cpp='$CXXCPP $CPPFLAGS'
49885ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49886ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49887ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49888
49889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49890/* end confdefs.h.  */
49891int i;
49892_ACEOF
49893if ac_fn_cxx_try_compile "$LINENO"; then :
49894
49895else
49896  supports=no
49897fi
49898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49899  ac_ext=cpp
49900ac_cpp='$CXXCPP $CPPFLAGS'
49901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49904
49905  CXXFLAGS="$saved_cxxflags"
49906
49907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49908$as_echo "$supports" >&6; }
49909  if test "x$supports" = "xyes" ; then
49910    :
49911
49912  else
49913    :
49914    CXXSTD_CXXFLAG=""
49915  fi
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49929    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49930
49931  fi
49932  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49933    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49934    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49935  fi
49936
49937  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49938    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49939    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49940  fi
49941
49942  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49943  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49944  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49945
49946  ###############################################################################
49947  #
49948  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49949  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49950  #
49951
49952  # Setup compiler/platform specific flags into
49953  #    CFLAGS_JDK    - C Compiler flags
49954  #    CXXFLAGS_JDK  - C++ Compiler flags
49955  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49956  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49957    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49958    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49959    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49960    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49961      # Force compatibility with i586 on 32 bit intel platforms.
49962      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49963      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49964    fi
49965    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49966        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49967    case $OPENJDK_TARGET_CPU_ARCH in
49968      arm )
49969        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49970        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49971        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49972        ;;
49973      ppc )
49974        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49975        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49976        ;;
49977      s390 )
49978        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49979        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49980        ;;
49981      * )
49982        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49983        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49984        ;;
49985    esac
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040    # Execute function body
50041
50042  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50043  REFERENCE_VERSION=6
50044
50045  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50046    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50047  fi
50048
50049  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50050    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50051  fi
50052
50053  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50054  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50055
50056  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50057    :
50058
50059  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50060  # runs afoul of the more aggressive versions of these optimisations.
50061  # Notably, value range propagation now assumes that the this pointer of C++
50062  # member functions is non-null.
50063  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50064        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50065        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50066$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50067  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50068  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50069
50070  else
50071    :
50072
50073  fi
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50089    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50090
50091    # Restrict the debug information created by Clang to avoid
50092    # too big object files and speed the build up a little bit
50093    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50094    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50095    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50096      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50097        # Force compatibility with i586 on 32 bit intel platforms.
50098        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50099        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50100      fi
50101      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50102      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50103          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50104      case $OPENJDK_TARGET_CPU_ARCH in
50105        ppc )
50106          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50107          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50108          ;;
50109        * )
50110          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50111          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50112          ;;
50113      esac
50114    fi
50115  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50116    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50117    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50118    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50119      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50120    fi
50121
50122    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50123    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50124  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50125    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50126    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50127    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50128  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50129    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50130        -MD -Zc:wchar_t- -W3 -wd4800 \
50131        -DWIN32_LEAN_AND_MEAN \
50132        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50133        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50134        -DWIN32 -DIAL"
50135    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50136      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50137    else
50138      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50139    fi
50140    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50141    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50142    # studio.
50143    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50144      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50145      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50146      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50147    fi
50148  fi
50149
50150  ###############################################################################
50151
50152  # Adjust flags according to debug level.
50153  case $DEBUG_LEVEL in
50154    fastdebug | slowdebug )
50155      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50156      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50157      ;;
50158    release )
50159      ;;
50160    * )
50161      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50162      ;;
50163  esac
50164
50165  # Set some common defines. These works for all compilers, but assume
50166  # -D is universally accepted.
50167
50168  # Setup endianness
50169  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50170    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50171    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50172    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50173    #   Note: -Dmacro         is the same as    #define macro 1
50174    #         -Dmacro=        is the same as    #define macro
50175    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50176      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50177    else
50178      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50179    fi
50180  else
50181    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50182    # are defined in the system?
50183    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50184      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50185    else
50186      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50187    fi
50188  fi
50189
50190  # Setup target OS define. Use OS target name but in upper case.
50191  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50192  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50193
50194  # Setup target CPU
50195  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50196      $OPENJDK_TARGET_ADD_LP64 \
50197      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50198
50199  # Setup debug/release defines
50200  if test "x$DEBUG_LEVEL" = xrelease; then
50201    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50202    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50203      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50204    fi
50205  else
50206    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50207  fi
50208
50209  # Set some additional per-OS defines.
50210  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50211    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50212    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50213        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50214  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50215    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50216    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50217        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50218  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50219    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50220    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50221    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50222    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50223        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50224        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50225        -fno-omit-frame-pointer"
50226  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50227    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50228    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50229    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50230        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50231        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50232  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50233    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50234  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50235    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50236    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50237  fi
50238
50239  # Set some additional per-CPU defines.
50240  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50241    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50242  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50243    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50244  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50245    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50246      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50247      # fixes `relocation truncated to fit' error for gcc 4.1.
50248      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50249      # Use ppc64 instructions, but schedule for power5
50250      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50251    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50252      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50253    fi
50254  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50255    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50256      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50257      # Little endian machine uses ELFv2 ABI.
50258      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50259      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50260      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50261    fi
50262  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50263    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50264      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50265    fi
50266  fi
50267
50268  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50269    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50270  fi
50271
50272  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50273    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50274      # Solaris does not have _LP64=1 in the old build.
50275      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50276      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50277    fi
50278  fi
50279
50280  # Set JVM_CFLAGS warning handling
50281  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50282    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50283        -Wunused-value -Woverloaded-virtual"
50284
50285    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340    # Execute function body
50341
50342  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50343  REFERENCE_VERSION=4.8
50344
50345  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50346    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50347  fi
50348
50349  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50350    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50351  fi
50352
50353  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50354  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50355
50356  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50357    :
50358
50359            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50360            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50361
50362
50363  else
50364    :
50365
50366  fi
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381    fi
50382    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50383      # Non-zero builds have stricter warnings
50384      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50385    else
50386      if test "x$TOOLCHAIN_TYPE" = xclang; then
50387        # Some versions of llvm do not like -Wundef
50388        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50389      fi
50390    fi
50391  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50392    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50393        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50394  fi
50395
50396  # Additional macosx handling
50397  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50398    # Setting these parameters makes it an error to link to macosx APIs that are
50399    # newer than the given OS version and makes the linked binaries compatible
50400    # even if built on a newer version of the OS.
50401    # The expected format is X.Y.Z
50402    MACOSX_VERSION_MIN=10.7.0
50403
50404
50405    # The macro takes the version with no dots, ex: 1070
50406    # Let the flags variables get resolved in make for easier override on make
50407    # command line.
50408    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50409    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50410  fi
50411
50412  # Setup some hard coded includes
50413  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50414      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50415      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50416      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50417      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50418      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50419      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50420
50421  # The shared libraries are compiled using the picflag.
50422  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50423      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50424  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50425      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50426
50427  # Executable flags
50428  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50429  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50430
50431
50432
50433
50434
50435
50436  # Setup LDFLAGS et al.
50437  #
50438
50439  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50440    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50441    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50442    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50443    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50444      LDFLAGS_SAFESH="-safeseh"
50445      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50446      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50447      # NOTE: Old build added -machine. Probably not needed.
50448      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50449    else
50450      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50451    fi
50452  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50453      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50454      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50455        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50456        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50457    fi
50458  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50459    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50460    # We have previously set HAS_GNU_HASH if this is the case
50461    if test -n "$HAS_GNU_HASH"; then
50462      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50463      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50464      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50465    fi
50466      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50467        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50468    fi
50469    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50470      # And since we now know that the linker is gnu, then add -z defs, to forbid
50471      # undefined symbols in object files.
50472      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50473      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50474      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50475      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50476      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50477      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50478        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50479      fi
50480      case $DEBUG_LEVEL in
50481        release )
50482          # tell linker to optimize libraries.
50483          # Should this be supplied to the OSS linker as well?
50484          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50485          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50486          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50487          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50488            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50489          fi
50490          ;;
50491        slowdebug )
50492          # Hotspot always let the linker optimize
50493          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50494          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50495            # do relocations at load
50496            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50497            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50498            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50499          fi
50500          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50501            # mark relocations read only
50502            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50503            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50504            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50505          fi
50506          ;;
50507        fastdebug )
50508          # Hotspot always let the linker optimize
50509          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50510          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50511            # mark relocations read only
50512            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50513            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50514            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50515          fi
50516          ;;
50517        * )
50518          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50519          ;;
50520        esac
50521    fi
50522  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50523    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50524    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50525    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50526    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50527    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50528    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50529      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50530    fi
50531  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50532    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50533    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50534    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50535  fi
50536
50537  # Customize LDFLAGS for executables
50538
50539  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50540
50541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50542    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50543      LDFLAGS_STACK_SIZE=1048576
50544    else
50545      LDFLAGS_STACK_SIZE=327680
50546    fi
50547    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50548  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50549    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50550  fi
50551
50552  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50553
50554  # Customize LDFLAGS for libs
50555  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50556
50557  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50558  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50559    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50560        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50561    JDKLIB_LIBS=""
50562  else
50563    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50564        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50565
50566    if test "xTARGET" = "xTARGET"; then
50567      # On some platforms (mac) the linker warns about non existing -L dirs.
50568      # For any of the variants server, client or minimal, the dir matches the
50569      # variant name. The "main" variant should be used for linking. For the
50570      # rest, the dir is just server.
50571      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50572          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50573        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50574            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50575      else
50576        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50577            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50578      fi
50579    elif test "xTARGET" = "xBUILD"; then
50580      # When building a buildjdk, it's always only the server variant
50581      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50582          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50583    fi
50584
50585    JDKLIB_LIBS="-ljava -ljvm"
50586    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50587      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50588    fi
50589
50590  fi
50591
50592LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50593
50594  # Set JVM_LIBS (per os)
50595  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50596    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50597  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50598    # FIXME: This hard-coded path is not really proper.
50599    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50600      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50601    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50602      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50603    fi
50604    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50605        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50606  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50607    JVM_LIBS="$JVM_LIBS -lm"
50608  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50609    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50610  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50611    JVM_LIBS="$JVM_LIBS -lm"
50612  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50613    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50614        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50615        wsock32.lib winmm.lib version.lib psapi.lib"
50616    fi
50617
50618  # Set JVM_ASFLAGS
50619  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50620    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50621      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50622    fi
50623  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50624    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50625  fi
50626
50627  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643  # Special extras...
50644  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50645    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50646      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50647      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50648    fi
50649    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50650    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50651  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50652    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50653    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50654  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50655    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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    # Execute function body
50699
50700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50701$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50702  supports=yes
50703
50704  saved_cxxflags="$CXXFLAGS"
50705  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50706  ac_ext=cpp
50707ac_cpp='$CXXCPP $CPPFLAGS'
50708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50711
50712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50713/* end confdefs.h.  */
50714int i;
50715_ACEOF
50716if ac_fn_cxx_try_compile "$LINENO"; then :
50717
50718else
50719  supports=no
50720fi
50721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50722  ac_ext=cpp
50723ac_cpp='$CXXCPP $CPPFLAGS'
50724ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50725ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50726ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50727
50728  CXXFLAGS="$saved_cxxflags"
50729
50730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50731$as_echo "$supports" >&6; }
50732  if test "x$supports" = "xyes" ; then
50733    :
50734
50735  else
50736    :
50737    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50738  fi
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50752    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50753
50754  fi
50755  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50756    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50757    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50758  fi
50759
50760  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50761    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50762    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50763  fi
50764
50765  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50766  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50767  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50768
50769  ###############################################################################
50770  #
50771  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50772  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50773  #
50774
50775  # Setup compiler/platform specific flags into
50776  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50777  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50778  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50779  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50780    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50781    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50782    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50783    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50784      # Force compatibility with i586 on 32 bit intel platforms.
50785      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50786      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50787    fi
50788    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50789        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50790    case $OPENJDK_BUILD_CPU_ARCH in
50791      arm )
50792        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50793        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50794        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50795        ;;
50796      ppc )
50797        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50798        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50799        ;;
50800      s390 )
50801        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50802        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50803        ;;
50804      * )
50805        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50806        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50807        ;;
50808    esac
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848
50849
50850
50851
50852
50853
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863    # Execute function body
50864
50865  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50866  REFERENCE_VERSION=6
50867
50868  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50869    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50870  fi
50871
50872  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50873    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50874  fi
50875
50876  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50877  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50878
50879  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50880    :
50881
50882  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50883  # runs afoul of the more aggressive versions of these optimisations.
50884  # Notably, value range propagation now assumes that the this pointer of C++
50885  # member functions is non-null.
50886  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50887        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50888        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50889$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50890  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50891  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50892
50893  else
50894    :
50895
50896  fi
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50913
50914    # Restrict the debug information created by Clang to avoid
50915    # too big object files and speed the build up a little bit
50916    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50918    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50919      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50920        # Force compatibility with i586 on 32 bit intel platforms.
50921        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50922        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50923      fi
50924      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50925      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50926          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50927      case $OPENJDK_BUILD_CPU_ARCH in
50928        ppc )
50929          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50930          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50931          ;;
50932        * )
50933          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50934          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50935          ;;
50936      esac
50937    fi
50938  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50939    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50940    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50941    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50942      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50943    fi
50944
50945    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50946    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50947  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50948    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50949    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50950    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50951  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50952    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50953        -MD -Zc:wchar_t- -W3 -wd4800 \
50954        -DWIN32_LEAN_AND_MEAN \
50955        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50956        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50957        -DWIN32 -DIAL"
50958    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50959      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50960    else
50961      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50962    fi
50963    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50964    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50965    # studio.
50966    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50967      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50968      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50969      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50970    fi
50971  fi
50972
50973  ###############################################################################
50974
50975  # Adjust flags according to debug level.
50976  case $DEBUG_LEVEL in
50977    fastdebug | slowdebug )
50978      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50979      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50980      ;;
50981    release )
50982      ;;
50983    * )
50984      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50985      ;;
50986  esac
50987
50988  # Set some common defines. These works for all compilers, but assume
50989  # -D is universally accepted.
50990
50991  # Setup endianness
50992  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50993    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50994    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50995    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50996    #   Note: -Dmacro         is the same as    #define macro 1
50997    #         -Dmacro=        is the same as    #define macro
50998    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50999      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51000    else
51001      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51002    fi
51003  else
51004    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51005    # are defined in the system?
51006    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51007      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51008    else
51009      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51010    fi
51011  fi
51012
51013  # Setup target OS define. Use OS target name but in upper case.
51014  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51015  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51016
51017  # Setup target CPU
51018  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51019      $OPENJDK_BUILD_ADD_LP64 \
51020      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51021
51022  # Setup debug/release defines
51023  if test "x$DEBUG_LEVEL" = xrelease; then
51024    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51025    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51026      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51027    fi
51028  else
51029    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51030  fi
51031
51032  # Set some additional per-OS defines.
51033  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51034    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51035    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51036        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51037  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51038    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51039    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51040        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51041  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51042    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51043    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51044    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51045    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51046        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51047        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51048        -fno-omit-frame-pointer"
51049  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51050    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51051    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51052    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51053        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51054        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51055  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51056    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51057  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51058    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51059    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51060  fi
51061
51062  # Set some additional per-CPU defines.
51063  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51064    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51065  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51066    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51067  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51068    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51069      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51070      # fixes `relocation truncated to fit' error for gcc 4.1.
51071      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51072      # Use ppc64 instructions, but schedule for power5
51073      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51074    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51075      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51076    fi
51077  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51078    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51079      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51080      # Little endian machine uses ELFv2 ABI.
51081      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51082      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51083      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51084    fi
51085  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51086    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51087      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51088    fi
51089  fi
51090
51091  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51092    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51093  fi
51094
51095  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51096    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51097      # Solaris does not have _LP64=1 in the old build.
51098      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51099      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51100    fi
51101  fi
51102
51103  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51104  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51105    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51106        -Wunused-value -Woverloaded-virtual"
51107
51108    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163    # Execute function body
51164
51165  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51166  REFERENCE_VERSION=4.8
51167
51168  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51169    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51170  fi
51171
51172  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51173    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51174  fi
51175
51176  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51177  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51178
51179  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51180    :
51181
51182            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51183            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51184
51185
51186  else
51187    :
51188
51189  fi
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204    fi
51205    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51206      # Non-zero builds have stricter warnings
51207      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51208    else
51209      if test "x$TOOLCHAIN_TYPE" = xclang; then
51210        # Some versions of llvm do not like -Wundef
51211        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51212      fi
51213    fi
51214  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51215    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51216        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51217  fi
51218
51219  # Additional macosx handling
51220  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51221    # Setting these parameters makes it an error to link to macosx APIs that are
51222    # newer than the given OS version and makes the linked binaries compatible
51223    # even if built on a newer version of the OS.
51224    # The expected format is X.Y.Z
51225    MACOSX_VERSION_MIN=10.7.0
51226
51227
51228    # The macro takes the version with no dots, ex: 1070
51229    # Let the flags variables get resolved in make for easier override on make
51230    # command line.
51231    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)"
51232    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51233  fi
51234
51235  # Setup some hard coded includes
51236  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51237      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51238      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51239      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51240      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51241      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51242      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51243
51244  # The shared libraries are compiled using the picflag.
51245  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51246      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51247  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51248      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51249
51250  # Executable flags
51251  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51252  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51253
51254
51255
51256
51257
51258
51259  # Setup LDFLAGS et al.
51260  #
51261
51262  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51263    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51264    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51265    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51266    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51267      LDFLAGS_SAFESH="-safeseh"
51268      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51269      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51270      # NOTE: Old build added -machine. Probably not needed.
51271      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51272    else
51273      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51274    fi
51275  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51276      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51277      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51278        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51279        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51280    fi
51281  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51282    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51283    # We have previously set HAS_GNU_HASH if this is the case
51284    if test -n "$HAS_GNU_HASH"; then
51285      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51286      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51287      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51288    fi
51289      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51290        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51291    fi
51292    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51293      # And since we now know that the linker is gnu, then add -z defs, to forbid
51294      # undefined symbols in object files.
51295      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51296      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51297      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51298      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51299      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51300      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51301        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51302      fi
51303      case $DEBUG_LEVEL in
51304        release )
51305          # tell linker to optimize libraries.
51306          # Should this be supplied to the OSS linker as well?
51307          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51308          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51309          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51310          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51311            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51312          fi
51313          ;;
51314        slowdebug )
51315          # Hotspot always let the linker optimize
51316          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51317          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51318            # do relocations at load
51319            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51320            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51321            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51322          fi
51323          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51324            # mark relocations read only
51325            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51326            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51327            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51328          fi
51329          ;;
51330        fastdebug )
51331          # Hotspot always let the linker optimize
51332          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51333          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51334            # mark relocations read only
51335            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51336            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51337            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51338          fi
51339          ;;
51340        * )
51341          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51342          ;;
51343        esac
51344    fi
51345  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51346    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51347    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51348    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51349    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51350    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51351    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51352      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51353    fi
51354  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51355    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51356    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51357    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51358  fi
51359
51360  # Customize LDFLAGS for executables
51361
51362  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51363
51364  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51365    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51366      LDFLAGS_STACK_SIZE=1048576
51367    else
51368      LDFLAGS_STACK_SIZE=327680
51369    fi
51370    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51371  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51372    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51373  fi
51374
51375  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51376
51377  # Customize LDFLAGS for libs
51378  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51379
51380  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51381  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51382    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51383        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51384    OPENJDK_BUILD_JDKLIB_LIBS=""
51385  else
51386    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51387        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51388
51389    if test "xBUILD" = "xTARGET"; then
51390      # On some platforms (mac) the linker warns about non existing -L dirs.
51391      # For any of the variants server, client or minimal, the dir matches the
51392      # variant name. The "main" variant should be used for linking. For the
51393      # rest, the dir is just server.
51394      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51395          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51396        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51397            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51398      else
51399        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51400            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51401      fi
51402    elif test "xBUILD" = "xBUILD"; then
51403      # When building a buildjdk, it's always only the server variant
51404      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51405          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51406    fi
51407
51408    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51409    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51410      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51411    fi
51412
51413  fi
51414
51415OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51416
51417  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51418  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51419    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51420  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51421    # FIXME: This hard-coded path is not really proper.
51422    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51423      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51424    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51425      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51426    fi
51427    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51428        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51429  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51430    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51431  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51432    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51433  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51434    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51435  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51436    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51437        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51438        wsock32.lib winmm.lib version.lib psapi.lib"
51439    fi
51440
51441  # Set OPENJDK_BUILD_JVM_ASFLAGS
51442  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51443    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51444      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51445    fi
51446  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51447    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51448  fi
51449
51450  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466  # Tests are only ever compiled for TARGET
51467  # Flags for compiling test libraries
51468  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51469  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51470
51471  # Flags for compiling test executables
51472  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51473  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51474
51475
51476
51477
51478
51479
51480  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51481  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51482
51483
51484
51485
51486
51487
51488  # Some Zero and Shark settings.
51489  # ZERO_ARCHFLAG tells the compiler which mode to build for
51490  case "${OPENJDK_TARGET_CPU}" in
51491    s390)
51492      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51493      ;;
51494    *)
51495      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51496  esac
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539    # Execute function body
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
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588    # Execute function body
51589
51590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51591$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51592  supports=yes
51593
51594  saved_cflags="$CFLAGS"
51595  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51596  ac_ext=c
51597ac_cpp='$CPP $CPPFLAGS'
51598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51600ac_compiler_gnu=$ac_cv_c_compiler_gnu
51601
51602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51603/* end confdefs.h.  */
51604int i;
51605_ACEOF
51606if ac_fn_c_try_compile "$LINENO"; then :
51607
51608else
51609  supports=no
51610fi
51611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51612  ac_ext=cpp
51613ac_cpp='$CXXCPP $CPPFLAGS'
51614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51617
51618  CFLAGS="$saved_cflags"
51619
51620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51621$as_echo "$supports" >&6; }
51622  if test "x$supports" = "xyes" ; then
51623    :
51624    C_COMP_SUPPORTS="yes"
51625  else
51626    :
51627    C_COMP_SUPPORTS="no"
51628  fi
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688    # Execute function body
51689
51690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51691$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51692  supports=yes
51693
51694  saved_cxxflags="$CXXFLAGS"
51695  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51696  ac_ext=cpp
51697ac_cpp='$CXXCPP $CPPFLAGS'
51698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51701
51702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51703/* end confdefs.h.  */
51704int i;
51705_ACEOF
51706if ac_fn_cxx_try_compile "$LINENO"; then :
51707
51708else
51709  supports=no
51710fi
51711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51712  ac_ext=cpp
51713ac_cpp='$CXXCPP $CPPFLAGS'
51714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51717
51718  CXXFLAGS="$saved_cxxflags"
51719
51720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51721$as_echo "$supports" >&6; }
51722  if test "x$supports" = "xyes" ; then
51723    :
51724    CXX_COMP_SUPPORTS="yes"
51725  else
51726    :
51727    CXX_COMP_SUPPORTS="no"
51728  fi
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51743$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51744  supports=no
51745  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51746
51747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51748$as_echo "$supports" >&6; }
51749  if test "x$supports" = "xyes" ; then
51750    :
51751
51752  else
51753    :
51754    ZERO_ARCHFLAG=""
51755  fi
51756
51757
51758
51759
51760
51761
51762
51763
51764  # Check that the compiler supports -mX (or -qX on AIX) flags
51765  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813    # Execute function body
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862    # Execute function body
51863
51864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51865$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51866  supports=yes
51867
51868  saved_cflags="$CFLAGS"
51869  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51870  ac_ext=c
51871ac_cpp='$CPP $CPPFLAGS'
51872ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51873ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51874ac_compiler_gnu=$ac_cv_c_compiler_gnu
51875
51876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51877/* end confdefs.h.  */
51878int i;
51879_ACEOF
51880if ac_fn_c_try_compile "$LINENO"; then :
51881
51882else
51883  supports=no
51884fi
51885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51886  ac_ext=cpp
51887ac_cpp='$CXXCPP $CPPFLAGS'
51888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51891
51892  CFLAGS="$saved_cflags"
51893
51894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51895$as_echo "$supports" >&6; }
51896  if test "x$supports" = "xyes" ; then
51897    :
51898    C_COMP_SUPPORTS="yes"
51899  else
51900    :
51901    C_COMP_SUPPORTS="no"
51902  fi
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
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962    # Execute function body
51963
51964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51965$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51966  supports=yes
51967
51968  saved_cxxflags="$CXXFLAGS"
51969  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51970  ac_ext=cpp
51971ac_cpp='$CXXCPP $CPPFLAGS'
51972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51975
51976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51977/* end confdefs.h.  */
51978int i;
51979_ACEOF
51980if ac_fn_cxx_try_compile "$LINENO"; then :
51981
51982else
51983  supports=no
51984fi
51985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51986  ac_ext=cpp
51987ac_cpp='$CXXCPP $CPPFLAGS'
51988ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51989ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51990ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51991
51992  CXXFLAGS="$saved_cxxflags"
51993
51994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51995$as_echo "$supports" >&6; }
51996  if test "x$supports" = "xyes" ; then
51997    :
51998    CXX_COMP_SUPPORTS="yes"
51999  else
52000    :
52001    CXX_COMP_SUPPORTS="no"
52002  fi
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52017$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52018  supports=no
52019  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52020
52021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52022$as_echo "$supports" >&6; }
52023  if test "x$supports" = "xyes" ; then
52024    :
52025    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52026  else
52027    :
52028    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52029  fi
52030
52031
52032
52033
52034
52035
52036
52037
52038  # Check whether --enable-warnings-as-errors was given.
52039if test "${enable_warnings_as_errors+set}" = set; then :
52040  enableval=$enable_warnings_as_errors;
52041fi
52042
52043
52044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52045$as_echo_n "checking if native warnings are errors... " >&6; }
52046  if test "x$enable_warnings_as_errors" = "xyes"; then
52047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52048$as_echo "yes (explicitly set)" >&6; }
52049    WARNINGS_AS_ERRORS=true
52050  elif test "x$enable_warnings_as_errors" = "xno"; then
52051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52052$as_echo "no" >&6; }
52053    WARNINGS_AS_ERRORS=false
52054  elif test "x$enable_warnings_as_errors" = "x"; then
52055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52056$as_echo "yes (default)" >&6; }
52057    WARNINGS_AS_ERRORS=true
52058  else
52059    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52060  fi
52061
52062  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52063    # Set legacy hotspot variable
52064    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52065  else
52066    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52067  fi
52068
52069
52070
52071
52072  case "${TOOLCHAIN_TYPE}" in
52073    microsoft)
52074      DISABLE_WARNING_PREFIX="-wd"
52075      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52076      ;;
52077    solstudio)
52078      DISABLE_WARNING_PREFIX="-erroff="
52079      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52080      ;;
52081    gcc)
52082      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130    # Execute function body
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179    # Execute function body
52180
52181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52182$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52183  supports=yes
52184
52185  saved_cflags="$CFLAGS"
52186  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52187  ac_ext=c
52188ac_cpp='$CPP $CPPFLAGS'
52189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52191ac_compiler_gnu=$ac_cv_c_compiler_gnu
52192
52193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52194/* end confdefs.h.  */
52195int i;
52196_ACEOF
52197if ac_fn_c_try_compile "$LINENO"; then :
52198
52199else
52200  supports=no
52201fi
52202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52203  ac_ext=cpp
52204ac_cpp='$CXXCPP $CPPFLAGS'
52205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52208
52209  CFLAGS="$saved_cflags"
52210
52211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52212$as_echo "$supports" >&6; }
52213  if test "x$supports" = "xyes" ; then
52214    :
52215    C_COMP_SUPPORTS="yes"
52216  else
52217    :
52218    C_COMP_SUPPORTS="no"
52219  fi
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279    # Execute function body
52280
52281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52282$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52283  supports=yes
52284
52285  saved_cxxflags="$CXXFLAGS"
52286  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52287  ac_ext=cpp
52288ac_cpp='$CXXCPP $CPPFLAGS'
52289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52292
52293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52294/* end confdefs.h.  */
52295int i;
52296_ACEOF
52297if ac_fn_cxx_try_compile "$LINENO"; then :
52298
52299else
52300  supports=no
52301fi
52302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52303  ac_ext=cpp
52304ac_cpp='$CXXCPP $CPPFLAGS'
52305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52308
52309  CXXFLAGS="$saved_cxxflags"
52310
52311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52312$as_echo "$supports" >&6; }
52313  if test "x$supports" = "xyes" ; then
52314    :
52315    CXX_COMP_SUPPORTS="yes"
52316  else
52317    :
52318    CXX_COMP_SUPPORTS="no"
52319  fi
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52334$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52335  supports=no
52336  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52337
52338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52339$as_echo "$supports" >&6; }
52340  if test "x$supports" = "xyes" ; then
52341    :
52342    GCC_CAN_DISABLE_WARNINGS=true
52343  else
52344    :
52345    GCC_CAN_DISABLE_WARNINGS=false
52346
52347  fi
52348
52349
52350
52351
52352
52353
52354      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52355        DISABLE_WARNING_PREFIX="-Wno-"
52356      else
52357        DISABLE_WARNING_PREFIX=
52358      fi
52359      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52360      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52361      # CFLAGS since any target specific flags will likely not work with the
52362      # build compiler
52363      CC_OLD="$CC"
52364      CXX_OLD="$CXX"
52365      CC="$BUILD_CC"
52366      CXX="$BUILD_CXX"
52367      CFLAGS_OLD="$CFLAGS"
52368      CFLAGS=""
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416    # Execute function body
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465    # Execute function body
52466
52467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52468$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52469  supports=yes
52470
52471  saved_cflags="$CFLAGS"
52472  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52473  ac_ext=c
52474ac_cpp='$CPP $CPPFLAGS'
52475ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52476ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52477ac_compiler_gnu=$ac_cv_c_compiler_gnu
52478
52479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52480/* end confdefs.h.  */
52481int i;
52482_ACEOF
52483if ac_fn_c_try_compile "$LINENO"; then :
52484
52485else
52486  supports=no
52487fi
52488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52489  ac_ext=cpp
52490ac_cpp='$CXXCPP $CPPFLAGS'
52491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52494
52495  CFLAGS="$saved_cflags"
52496
52497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52498$as_echo "$supports" >&6; }
52499  if test "x$supports" = "xyes" ; then
52500    :
52501    C_COMP_SUPPORTS="yes"
52502  else
52503    :
52504    C_COMP_SUPPORTS="no"
52505  fi
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565    # Execute function body
52566
52567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52568$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52569  supports=yes
52570
52571  saved_cxxflags="$CXXFLAGS"
52572  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52573  ac_ext=cpp
52574ac_cpp='$CXXCPP $CPPFLAGS'
52575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52578
52579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52580/* end confdefs.h.  */
52581int i;
52582_ACEOF
52583if ac_fn_cxx_try_compile "$LINENO"; then :
52584
52585else
52586  supports=no
52587fi
52588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52589  ac_ext=cpp
52590ac_cpp='$CXXCPP $CPPFLAGS'
52591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52594
52595  CXXFLAGS="$saved_cxxflags"
52596
52597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52598$as_echo "$supports" >&6; }
52599  if test "x$supports" = "xyes" ; then
52600    :
52601    CXX_COMP_SUPPORTS="yes"
52602  else
52603    :
52604    CXX_COMP_SUPPORTS="no"
52605  fi
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52620$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52621  supports=no
52622  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52623
52624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52625$as_echo "$supports" >&6; }
52626  if test "x$supports" = "xyes" ; then
52627    :
52628    BUILD_CC_CAN_DISABLE_WARNINGS=true
52629  else
52630    :
52631    BUILD_CC_CAN_DISABLE_WARNINGS=false
52632
52633  fi
52634
52635
52636
52637
52638
52639
52640      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52641        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52642      else
52643        BUILD_CC_DISABLE_WARNING_PREFIX=
52644      fi
52645      CC="$CC_OLD"
52646      CXX="$CXX_OLD"
52647      CFLAGS="$CFLAGS_OLD"
52648      ;;
52649    clang)
52650      DISABLE_WARNING_PREFIX="-Wno-"
52651      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52652      ;;
52653    xlc)
52654      DISABLE_WARNING_PREFIX="-qsuppress="
52655      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52656      ;;
52657  esac
52658
52659
52660
52661
52662
52663# Setup debug symbols (need objcopy from the toolchain for that)
52664
52665  #
52666  # NATIVE_DEBUG_SYMBOLS
52667  # This must be done after the toolchain is setup, since we're looking at objcopy.
52668  #
52669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52670$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52671
52672# Check whether --with-native-debug-symbols was given.
52673if test "${with_native_debug_symbols+set}" = set; then :
52674  withval=$with_native_debug_symbols;
52675        if test "x$OPENJDK_TARGET_OS" = xaix; then
52676          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52677            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52678          fi
52679        fi
52680
52681else
52682
52683        if test "x$OPENJDK_TARGET_OS" = xaix; then
52684          # AIX doesn't support 'zipped' so use 'internal' as default
52685          with_native_debug_symbols="internal"
52686        else
52687          if test "x$STATIC_BUILD" = xtrue; then
52688            with_native_debug_symbols="none"
52689          else
52690            with_native_debug_symbols="zipped"
52691          fi
52692        fi
52693
52694fi
52695
52696  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52698$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52699
52700  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52701
52702    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52703      if test "x$OBJCOPY" = x; then
52704        # enabling of enable-debug-symbols and can't find objcopy
52705        # this is an error
52706        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52707      fi
52708    fi
52709
52710    COMPILE_WITH_DEBUG_SYMBOLS=true
52711    COPY_DEBUG_SYMBOLS=true
52712    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52713  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52714    COMPILE_WITH_DEBUG_SYMBOLS=false
52715    COPY_DEBUG_SYMBOLS=false
52716    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52717  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52718    COMPILE_WITH_DEBUG_SYMBOLS=true
52719    COPY_DEBUG_SYMBOLS=false
52720    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52721  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52722
52723    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52724      if test "x$OBJCOPY" = x; then
52725        # enabling of enable-debug-symbols and can't find objcopy
52726        # this is an error
52727        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52728      fi
52729    fi
52730
52731    COMPILE_WITH_DEBUG_SYMBOLS=true
52732    COPY_DEBUG_SYMBOLS=true
52733    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52734  else
52735    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52736  fi
52737
52738  # --enable-debug-symbols is deprecated.
52739  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52740
52741  # Check whether --enable-debug-symbols was given.
52742if test "${enable_debug_symbols+set}" = set; then :
52743  enableval=$enable_debug_symbols;
52744fi
52745
52746  if test "x$enable_debug_symbols" != x; then
52747    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52748$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52749
52750    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52751      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52752$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52753    fi
52754
52755  fi
52756
52757
52758  # --enable-zip-debug-info is deprecated.
52759  # Please use --with-native-debug-symbols=zipped .
52760
52761  # Check whether --enable-zip-debug-info was given.
52762if test "${enable_zip_debug_info+set}" = set; then :
52763  enableval=$enable_zip_debug_info;
52764fi
52765
52766  if test "x$enable_zip_debug_info" != x; then
52767    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52768$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52769
52770    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52771      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52772$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52773    fi
52774
52775  fi
52776
52777
52778
52779
52780
52781
52782
52783  # Check whether --enable-native-coverage was given.
52784if test "${enable_native_coverage+set}" = set; then :
52785  enableval=$enable_native_coverage;
52786fi
52787
52788  GCOV_ENABLED="false"
52789  if test "x$enable_native_coverage" = "xyes"; then
52790    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52792$as_echo_n "checking if native coverage is enabled... " >&6; }
52793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52794$as_echo "yes" >&6; }
52795      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52796      GCOV_LDFLAGS="-fprofile-arcs"
52797      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52798      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52799      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52800      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52801      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52802      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52803      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52804      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52805      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52806      GCOV_ENABLED="true"
52807    else
52808      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52809    fi
52810  elif test "x$enable_native_coverage" = "xno"; then
52811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52812$as_echo_n "checking if native coverage is enabled... " >&6; }
52813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52814$as_echo "no" >&6; }
52815  elif test "x$enable_native_coverage" != "x"; then
52816    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52817  fi
52818
52819
52820
52821
52822# Need toolchain to setup dtrace
52823
52824  # Test for dtrace dependencies
52825  # Check whether --enable-dtrace was given.
52826if test "${enable_dtrace+set}" = set; then :
52827  enableval=$enable_dtrace;
52828fi
52829
52830
52831  DTRACE_DEP_MISSING=false
52832
52833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52834$as_echo_n "checking for dtrace tool... " >&6; }
52835  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52837$as_echo "$DTRACE" >&6; }
52838  else
52839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52840$as_echo "not found, cannot build dtrace" >&6; }
52841    DTRACE_DEP_MISSING=true
52842  fi
52843
52844  for ac_header in sys/sdt.h
52845do :
52846  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52847if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52848  cat >>confdefs.h <<_ACEOF
52849#define HAVE_SYS_SDT_H 1
52850_ACEOF
52851 DTRACE_HEADERS_OK=yes
52852else
52853  DTRACE_HEADERS_OK=no
52854fi
52855
52856done
52857
52858  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52859    DTRACE_DEP_MISSING=true
52860  fi
52861
52862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52863$as_echo_n "checking if dtrace should be built... " >&6; }
52864  if test "x$enable_dtrace" = "xyes"; then
52865    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52867$as_echo "no, missing dependencies" >&6; }
52868
52869  # Print a helpful message on how to acquire the necessary build dependency.
52870  # dtrace is the help tag: freetype, cups, alsa etc
52871  MISSING_DEPENDENCY=dtrace
52872
52873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52874    cygwin_help $MISSING_DEPENDENCY
52875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52876    msys_help $MISSING_DEPENDENCY
52877  else
52878    PKGHANDLER_COMMAND=
52879
52880    case $PKGHANDLER in
52881      apt-get)
52882        apt_help     $MISSING_DEPENDENCY ;;
52883      yum)
52884        yum_help     $MISSING_DEPENDENCY ;;
52885      port)
52886        port_help    $MISSING_DEPENDENCY ;;
52887      pkgutil)
52888        pkgutil_help $MISSING_DEPENDENCY ;;
52889      pkgadd)
52890        pkgadd_help  $MISSING_DEPENDENCY ;;
52891    esac
52892
52893    if test "x$PKGHANDLER_COMMAND" != x; then
52894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52895    fi
52896  fi
52897
52898      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52899    else
52900      INCLUDE_DTRACE=true
52901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52902$as_echo "yes, forced" >&6; }
52903    fi
52904  elif test "x$enable_dtrace" = "xno"; then
52905    INCLUDE_DTRACE=false
52906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52907$as_echo "no, forced" >&6; }
52908  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52909    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52910      INCLUDE_DTRACE=false
52911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52912$as_echo "no, missing dependencies" >&6; }
52913    else
52914      INCLUDE_DTRACE=true
52915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52916$as_echo "yes, dependencies present" >&6; }
52917    fi
52918  else
52919    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52920  fi
52921
52922
52923
52924  # Check whether --enable-aot was given.
52925if test "${enable_aot+set}" = set; then :
52926  enableval=$enable_aot;
52927fi
52928
52929
52930  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52931    ENABLE_AOT="true"
52932  elif test "x$enable_aot" = "xyes"; then
52933    ENABLE_AOT="true"
52934  elif test "x$enable_aot" = "xno"; then
52935    ENABLE_AOT="false"
52936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52937$as_echo_n "checking if aot should be enabled... " >&6; }
52938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52939$as_echo "no, forced" >&6; }
52940  else
52941    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52942  fi
52943
52944  if test "x$ENABLE_AOT" = "xtrue"; then
52945    # Only enable AOT on linux-X64.
52946    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52947      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52948        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52949          ENABLE_AOT="true"
52950        else
52951          ENABLE_AOT="false"
52952          if test "x$enable_aot" = "xyes"; then
52953            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52954          fi
52955        fi
52956      else
52957        ENABLE_AOT="false"
52958        if test "x$enable_aot" = "xyes"; then
52959          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52960        fi
52961      fi
52962    else
52963      ENABLE_AOT="false"
52964      if test "x$enable_aot" = "xyes"; then
52965        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52966      fi
52967    fi
52968  fi
52969
52970
52971
52972
52973  # Check whether --enable-hotspot-gtest was given.
52974if test "${enable_hotspot_gtest+set}" = set; then :
52975  enableval=$enable_hotspot_gtest;
52976fi
52977
52978
52979  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52980    GTEST_DIR_EXISTS="true"
52981  else
52982    GTEST_DIR_EXISTS="false"
52983  fi
52984
52985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52986$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52987  if test "x$enable_hotspot_gtest" = "xyes"; then
52988    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52990$as_echo "yes, forced" >&6; }
52991      BUILD_GTEST="true"
52992    else
52993      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52994    fi
52995  elif test "x$enable_hotspot_gtest" = "xno"; then
52996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52997$as_echo "no, forced" >&6; }
52998    BUILD_GTEST="false"
52999  elif test "x$enable_hotspot_gtest" = "x"; then
53000    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53002$as_echo "yes" >&6; }
53003      BUILD_GTEST="true"
53004    else
53005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53006$as_echo "no" >&6; }
53007      BUILD_GTEST="false"
53008    fi
53009  else
53010    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53011  fi
53012
53013
53014
53015
53016###############################################################################
53017#
53018# Check dependencies for external and internal libraries.
53019#
53020###############################################################################
53021
53022# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53023
53024  # When using cygwin or msys, we need a wrapper binary that renames
53025  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53026  # @files and rewrites these too! This wrapper binary is
53027  # called fixpath.
53028  FIXPATH=
53029  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53031$as_echo_n "checking if fixpath can be created... " >&6; }
53032    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53033    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53034    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53035    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53036      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53037      FIXPATH="$FIXPATH_BIN -c"
53038    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53039      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53040      # @ was chosen as separator to minimize risk of other tools messing around with it
53041      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53042          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53043      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53044      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53045    fi
53046    FIXPATH_SRC_W="$FIXPATH_SRC"
53047    FIXPATH_BIN_W="$FIXPATH_BIN"
53048
53049  unix_path="$FIXPATH_SRC_W"
53050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53051    windows_path=`$CYGPATH -m "$unix_path"`
53052    FIXPATH_SRC_W="$windows_path"
53053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53054    windows_path=`cmd //c echo $unix_path`
53055    FIXPATH_SRC_W="$windows_path"
53056  fi
53057
53058
53059  unix_path="$FIXPATH_BIN_W"
53060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53061    windows_path=`$CYGPATH -m "$unix_path"`
53062    FIXPATH_BIN_W="$windows_path"
53063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53064    windows_path=`cmd //c echo $unix_path`
53065    FIXPATH_BIN_W="$windows_path"
53066  fi
53067
53068    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53069    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53070    cd $FIXPATH_DIR
53071    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53072    cd $CURDIR
53073
53074    if test ! -x $FIXPATH_BIN; then
53075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53076$as_echo "no" >&6; }
53077      cat $FIXPATH_DIR/fixpath1.log
53078      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53079    fi
53080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53081$as_echo "yes" >&6; }
53082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53083$as_echo_n "checking if fixpath.exe works... " >&6; }
53084    cd $FIXPATH_DIR
53085    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53086        > $FIXPATH_DIR/fixpath2.log 2>&1
53087    cd $CURDIR
53088    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53090$as_echo "no" >&6; }
53091      cat $FIXPATH_DIR/fixpath2.log
53092      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53093    fi
53094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53095$as_echo "yes" >&6; }
53096
53097    FIXPATH_DETACH_FLAG="--detach"
53098  fi
53099
53100
53101
53102
53103
53104
53105  # Check if X11 is needed
53106  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53107    # No X11 support on windows or macosx
53108    NEEDS_LIB_X11=false
53109  else
53110    # All other instances need X11, even if building headless only, libawt still
53111    # needs X11 headers.
53112    NEEDS_LIB_X11=true
53113  fi
53114
53115  # Check if cups is needed
53116  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53117    # Windows have a separate print system
53118    NEEDS_LIB_CUPS=false
53119  else
53120    NEEDS_LIB_CUPS=true
53121  fi
53122
53123  # A custom hook may have set this already
53124  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53125    NEEDS_LIB_FREETYPE=true
53126  fi
53127
53128  # Check if alsa is needed
53129  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53130    NEEDS_LIB_ALSA=true
53131  else
53132    NEEDS_LIB_ALSA=false
53133  fi
53134
53135  # Check if ffi is needed
53136  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53137    NEEDS_LIB_FFI=true
53138  else
53139    NEEDS_LIB_FFI=false
53140  fi
53141
53142
53143  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53144  # dynamic build is configured on command line.
53145
53146# Check whether --with-stdc++lib was given.
53147if test "${with_stdc__lib+set}" = set; then :
53148  withval=$with_stdc__lib;
53149        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53150                && test "x$with_stdc__lib" != xdefault; then
53151          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53152        fi
53153
53154else
53155  with_stdc__lib=default
53156
53157fi
53158
53159
53160  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53161    # Test if stdc++ can be linked statically.
53162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53163$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53164    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53165    ac_ext=cpp
53166ac_cpp='$CXXCPP $CPPFLAGS'
53167ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53168ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53169ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53170
53171    OLD_LIBS="$LIBS"
53172    LIBS="$STATIC_STDCXX_FLAGS"
53173    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53174/* end confdefs.h.  */
53175
53176int
53177main ()
53178{
53179return 0;
53180  ;
53181  return 0;
53182}
53183_ACEOF
53184if ac_fn_cxx_try_link "$LINENO"; then :
53185  has_static_libstdcxx=yes
53186else
53187  has_static_libstdcxx=no
53188fi
53189rm -f core conftest.err conftest.$ac_objext \
53190    conftest$ac_exeext conftest.$ac_ext
53191    LIBS="$OLD_LIBS"
53192    ac_ext=cpp
53193ac_cpp='$CXXCPP $CPPFLAGS'
53194ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53195ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53196ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53197
53198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53199$as_echo "$has_static_libstdcxx" >&6; }
53200
53201    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53202      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53203    fi
53204
53205    # If dynamic was requested, it's available since it would fail above otherwise.
53206    # If dynamic wasn't requested, go with static unless it isn't available.
53207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53208$as_echo_n "checking how to link with libstdc++... " >&6; }
53209    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53210        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53212$as_echo "dynamic" >&6; }
53213    else
53214      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53215      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53216      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53217      # just use the same setting as for the TARGET toolchain.
53218      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53220$as_echo "static" >&6; }
53221    fi
53222  fi
53223
53224  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53225  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53226    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53227  fi
53228
53229
53230
53231  # Setup Windows runtime dlls
53232  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53233
53234
53235# Check whether --with-msvcr-dll was given.
53236if test "${with_msvcr_dll+set}" = set; then :
53237  withval=$with_msvcr_dll;
53238fi
53239
53240
53241  if test "x$with_msvcr_dll" != x; then
53242    # If given explicitly by user, do not probe. If not present, fail directly.
53243
53244  DLL_NAME="$MSVCR_NAME"
53245  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53246  METHOD="--with-msvcr-dll"
53247  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53248    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53249$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53250
53251    # Need to check if the found msvcr is correct architecture
53252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53253$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53254    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53256      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53257      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53258      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53259        CORRECT_MSVCR_ARCH="PE32 executable"
53260      else
53261        CORRECT_MSVCR_ARCH="PE32+ executable"
53262      fi
53263    else
53264      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53265        CORRECT_MSVCR_ARCH=386
53266      else
53267        CORRECT_MSVCR_ARCH=x86-64
53268      fi
53269    fi
53270    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53272$as_echo "ok" >&6; }
53273      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53274
53275  # Only process if variable expands to non-empty
53276
53277  if test "x$MSVC_DLL" != x; then
53278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53279
53280  # Input might be given as Windows format, start by converting to
53281  # unix format.
53282  path="$MSVC_DLL"
53283  new_path=`$CYGPATH -u "$path"`
53284
53285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53288  # "foo.exe" is OK but "foo" is an error.
53289  #
53290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53291  # It is also a way to make sure we got the proper file name for the real test later on.
53292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53293  if test "x$test_shortpath" = x; then
53294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53295$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53296    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53297  fi
53298
53299  # Call helper function which possibly converts this using DOS-style short mode.
53300  # If so, the updated path is stored in $new_path.
53301
53302  input_path="$new_path"
53303  # Check if we need to convert this using DOS-style short mode. If the path
53304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53305  # take no chances and rewrite it.
53306  # Note: m4 eats our [], so we need to use [ and ] instead.
53307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53308  if test "x$has_forbidden_chars" != x; then
53309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53313      # Going to short mode and back again did indeed matter. Since short mode is
53314      # case insensitive, let's make it lowercase to improve readability.
53315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53316      # Now convert it back to Unix-style (cygpath)
53317      input_path=`$CYGPATH -u "$shortmode_path"`
53318      new_path="$input_path"
53319    fi
53320  fi
53321
53322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53323  if test "x$test_cygdrive_prefix" = x; then
53324    # As a simple fix, exclude /usr/bin since it's not a real path.
53325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53327      # a path prefixed by /cygdrive for fixpath to work.
53328      new_path="$CYGWIN_ROOT_PATH$input_path"
53329    fi
53330  fi
53331
53332
53333  if test "x$path" != "x$new_path"; then
53334    MSVC_DLL="$new_path"
53335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53336$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53337  fi
53338
53339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53340
53341  path="$MSVC_DLL"
53342  has_colon=`$ECHO $path | $GREP ^.:`
53343  new_path="$path"
53344  if test "x$has_colon" = x; then
53345    # Not in mixed or Windows style, start by that.
53346    new_path=`cmd //c echo $path`
53347  fi
53348
53349
53350  input_path="$new_path"
53351  # Check if we need to convert this using DOS-style short mode. If the path
53352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53353  # take no chances and rewrite it.
53354  # Note: m4 eats our [], so we need to use [ and ] instead.
53355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53356  if test "x$has_forbidden_chars" != x; then
53357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53359  fi
53360
53361
53362  windows_path="$new_path"
53363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53364    unix_path=`$CYGPATH -u "$windows_path"`
53365    new_path="$unix_path"
53366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53368    new_path="$unix_path"
53369  fi
53370
53371  if test "x$path" != "x$new_path"; then
53372    MSVC_DLL="$new_path"
53373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53374$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53375  fi
53376
53377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53379
53380    else
53381      # We're on a unix platform. Hooray! :)
53382      path="$MSVC_DLL"
53383      has_space=`$ECHO "$path" | $GREP " "`
53384      if test "x$has_space" != x; then
53385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53386$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53387        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53388      fi
53389
53390      # Use eval to expand a potential ~
53391      eval path="$path"
53392      if test ! -f "$path" && test ! -d "$path"; then
53393        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53394      fi
53395
53396      if test -d "$path"; then
53397        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53398      else
53399        dir="`$DIRNAME "$path"`"
53400        base="`$BASENAME "$path"`"
53401        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53402      fi
53403    fi
53404  fi
53405
53406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53407$as_echo_n "checking for $DLL_NAME... " >&6; }
53408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53409$as_echo "$MSVC_DLL" >&6; }
53410    else
53411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53412$as_echo "incorrect, ignoring" >&6; }
53413      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53414$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53415    fi
53416  fi
53417
53418    if test "x$MSVC_DLL" = x; then
53419      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53420    fi
53421    MSVCR_DLL="$MSVC_DLL"
53422  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53423
53424  DLL_NAME="$MSVCR_NAME"
53425  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53426  METHOD="devkit"
53427  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53428    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53429$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53430
53431    # Need to check if the found msvcr is correct architecture
53432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53433$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53434    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53436      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53437      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53438      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53439        CORRECT_MSVCR_ARCH="PE32 executable"
53440      else
53441        CORRECT_MSVCR_ARCH="PE32+ executable"
53442      fi
53443    else
53444      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53445        CORRECT_MSVCR_ARCH=386
53446      else
53447        CORRECT_MSVCR_ARCH=x86-64
53448      fi
53449    fi
53450    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53452$as_echo "ok" >&6; }
53453      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53454
53455  # Only process if variable expands to non-empty
53456
53457  if test "x$MSVC_DLL" != x; then
53458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53459
53460  # Input might be given as Windows format, start by converting to
53461  # unix format.
53462  path="$MSVC_DLL"
53463  new_path=`$CYGPATH -u "$path"`
53464
53465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53468  # "foo.exe" is OK but "foo" is an error.
53469  #
53470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53471  # It is also a way to make sure we got the proper file name for the real test later on.
53472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53473  if test "x$test_shortpath" = x; then
53474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53475$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53476    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53477  fi
53478
53479  # Call helper function which possibly converts this using DOS-style short mode.
53480  # If so, the updated path is stored in $new_path.
53481
53482  input_path="$new_path"
53483  # Check if we need to convert this using DOS-style short mode. If the path
53484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53485  # take no chances and rewrite it.
53486  # Note: m4 eats our [], so we need to use [ and ] instead.
53487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53488  if test "x$has_forbidden_chars" != x; then
53489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53493      # Going to short mode and back again did indeed matter. Since short mode is
53494      # case insensitive, let's make it lowercase to improve readability.
53495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53496      # Now convert it back to Unix-style (cygpath)
53497      input_path=`$CYGPATH -u "$shortmode_path"`
53498      new_path="$input_path"
53499    fi
53500  fi
53501
53502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53503  if test "x$test_cygdrive_prefix" = x; then
53504    # As a simple fix, exclude /usr/bin since it's not a real path.
53505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53507      # a path prefixed by /cygdrive for fixpath to work.
53508      new_path="$CYGWIN_ROOT_PATH$input_path"
53509    fi
53510  fi
53511
53512
53513  if test "x$path" != "x$new_path"; then
53514    MSVC_DLL="$new_path"
53515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53516$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53517  fi
53518
53519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53520
53521  path="$MSVC_DLL"
53522  has_colon=`$ECHO $path | $GREP ^.:`
53523  new_path="$path"
53524  if test "x$has_colon" = x; then
53525    # Not in mixed or Windows style, start by that.
53526    new_path=`cmd //c echo $path`
53527  fi
53528
53529
53530  input_path="$new_path"
53531  # Check if we need to convert this using DOS-style short mode. If the path
53532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53533  # take no chances and rewrite it.
53534  # Note: m4 eats our [], so we need to use [ and ] instead.
53535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53536  if test "x$has_forbidden_chars" != x; then
53537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53539  fi
53540
53541
53542  windows_path="$new_path"
53543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53544    unix_path=`$CYGPATH -u "$windows_path"`
53545    new_path="$unix_path"
53546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53548    new_path="$unix_path"
53549  fi
53550
53551  if test "x$path" != "x$new_path"; then
53552    MSVC_DLL="$new_path"
53553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53554$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53555  fi
53556
53557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53559
53560    else
53561      # We're on a unix platform. Hooray! :)
53562      path="$MSVC_DLL"
53563      has_space=`$ECHO "$path" | $GREP " "`
53564      if test "x$has_space" != x; then
53565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53566$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53568      fi
53569
53570      # Use eval to expand a potential ~
53571      eval path="$path"
53572      if test ! -f "$path" && test ! -d "$path"; then
53573        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53574      fi
53575
53576      if test -d "$path"; then
53577        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53578      else
53579        dir="`$DIRNAME "$path"`"
53580        base="`$BASENAME "$path"`"
53581        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53582      fi
53583    fi
53584  fi
53585
53586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53587$as_echo_n "checking for $DLL_NAME... " >&6; }
53588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53589$as_echo "$MSVC_DLL" >&6; }
53590    else
53591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53592$as_echo "incorrect, ignoring" >&6; }
53593      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53594$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53595    fi
53596  fi
53597
53598    if test "x$MSVC_DLL" = x; then
53599      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53600    fi
53601    MSVCR_DLL="$MSVC_DLL"
53602  else
53603
53604  DLL_NAME="${MSVCR_NAME}"
53605  MSVC_DLL=
53606
53607  if test "x$MSVC_DLL" = x; then
53608    # Probe: Using well-known location from Visual Studio 10.0
53609    if test "x$VCINSTALLDIR" != x; then
53610      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53611
53612  windows_path="$CYGWIN_VC_INSTALL_DIR"
53613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53614    unix_path=`$CYGPATH -u "$windows_path"`
53615    CYGWIN_VC_INSTALL_DIR="$unix_path"
53616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53618    CYGWIN_VC_INSTALL_DIR="$unix_path"
53619  fi
53620
53621      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53622        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53623      else
53624        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53625      fi
53626      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53627
53628  DLL_NAME="$DLL_NAME"
53629  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53630  METHOD="well-known location in VCINSTALLDIR"
53631  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53633$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53634
53635    # Need to check if the found msvcr is correct architecture
53636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53637$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53638    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53640      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53641      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53642      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53643        CORRECT_MSVCR_ARCH="PE32 executable"
53644      else
53645        CORRECT_MSVCR_ARCH="PE32+ executable"
53646      fi
53647    else
53648      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53649        CORRECT_MSVCR_ARCH=386
53650      else
53651        CORRECT_MSVCR_ARCH=x86-64
53652      fi
53653    fi
53654    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53656$as_echo "ok" >&6; }
53657      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53658
53659  # Only process if variable expands to non-empty
53660
53661  if test "x$MSVC_DLL" != x; then
53662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53663
53664  # Input might be given as Windows format, start by converting to
53665  # unix format.
53666  path="$MSVC_DLL"
53667  new_path=`$CYGPATH -u "$path"`
53668
53669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53672  # "foo.exe" is OK but "foo" is an error.
53673  #
53674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53675  # It is also a way to make sure we got the proper file name for the real test later on.
53676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53677  if test "x$test_shortpath" = x; then
53678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53679$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53680    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53681  fi
53682
53683  # Call helper function which possibly converts this using DOS-style short mode.
53684  # If so, the updated path is stored in $new_path.
53685
53686  input_path="$new_path"
53687  # Check if we need to convert this using DOS-style short mode. If the path
53688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53689  # take no chances and rewrite it.
53690  # Note: m4 eats our [], so we need to use [ and ] instead.
53691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53692  if test "x$has_forbidden_chars" != x; then
53693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53697      # Going to short mode and back again did indeed matter. Since short mode is
53698      # case insensitive, let's make it lowercase to improve readability.
53699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53700      # Now convert it back to Unix-style (cygpath)
53701      input_path=`$CYGPATH -u "$shortmode_path"`
53702      new_path="$input_path"
53703    fi
53704  fi
53705
53706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53707  if test "x$test_cygdrive_prefix" = x; then
53708    # As a simple fix, exclude /usr/bin since it's not a real path.
53709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53711      # a path prefixed by /cygdrive for fixpath to work.
53712      new_path="$CYGWIN_ROOT_PATH$input_path"
53713    fi
53714  fi
53715
53716
53717  if test "x$path" != "x$new_path"; then
53718    MSVC_DLL="$new_path"
53719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53720$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53721  fi
53722
53723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53724
53725  path="$MSVC_DLL"
53726  has_colon=`$ECHO $path | $GREP ^.:`
53727  new_path="$path"
53728  if test "x$has_colon" = x; then
53729    # Not in mixed or Windows style, start by that.
53730    new_path=`cmd //c echo $path`
53731  fi
53732
53733
53734  input_path="$new_path"
53735  # Check if we need to convert this using DOS-style short mode. If the path
53736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53737  # take no chances and rewrite it.
53738  # Note: m4 eats our [], so we need to use [ and ] instead.
53739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53740  if test "x$has_forbidden_chars" != x; then
53741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53743  fi
53744
53745
53746  windows_path="$new_path"
53747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53748    unix_path=`$CYGPATH -u "$windows_path"`
53749    new_path="$unix_path"
53750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53752    new_path="$unix_path"
53753  fi
53754
53755  if test "x$path" != "x$new_path"; then
53756    MSVC_DLL="$new_path"
53757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53758$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53759  fi
53760
53761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53763
53764    else
53765      # We're on a unix platform. Hooray! :)
53766      path="$MSVC_DLL"
53767      has_space=`$ECHO "$path" | $GREP " "`
53768      if test "x$has_space" != x; then
53769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53770$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53772      fi
53773
53774      # Use eval to expand a potential ~
53775      eval path="$path"
53776      if test ! -f "$path" && test ! -d "$path"; then
53777        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53778      fi
53779
53780      if test -d "$path"; then
53781        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53782      else
53783        dir="`$DIRNAME "$path"`"
53784        base="`$BASENAME "$path"`"
53785        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53786      fi
53787    fi
53788  fi
53789
53790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53791$as_echo_n "checking for $DLL_NAME... " >&6; }
53792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53793$as_echo "$MSVC_DLL" >&6; }
53794    else
53795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53796$as_echo "incorrect, ignoring" >&6; }
53797      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53798$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53799    fi
53800  fi
53801
53802    fi
53803  fi
53804
53805  if test "x$MSVC_DLL" = x; then
53806    # Probe: Check in the Boot JDK directory.
53807    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53808
53809  DLL_NAME="$DLL_NAME"
53810  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53811  METHOD="well-known location in Boot JDK"
53812  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53813    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53814$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53815
53816    # Need to check if the found msvcr is correct architecture
53817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53818$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53819    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53821      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53822      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53823      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53824        CORRECT_MSVCR_ARCH="PE32 executable"
53825      else
53826        CORRECT_MSVCR_ARCH="PE32+ executable"
53827      fi
53828    else
53829      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53830        CORRECT_MSVCR_ARCH=386
53831      else
53832        CORRECT_MSVCR_ARCH=x86-64
53833      fi
53834    fi
53835    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53837$as_echo "ok" >&6; }
53838      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53839
53840  # Only process if variable expands to non-empty
53841
53842  if test "x$MSVC_DLL" != x; then
53843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53844
53845  # Input might be given as Windows format, start by converting to
53846  # unix format.
53847  path="$MSVC_DLL"
53848  new_path=`$CYGPATH -u "$path"`
53849
53850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53853  # "foo.exe" is OK but "foo" is an error.
53854  #
53855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53856  # It is also a way to make sure we got the proper file name for the real test later on.
53857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53858  if test "x$test_shortpath" = x; then
53859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53860$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53861    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53862  fi
53863
53864  # Call helper function which possibly converts this using DOS-style short mode.
53865  # If so, the updated path is stored in $new_path.
53866
53867  input_path="$new_path"
53868  # Check if we need to convert this using DOS-style short mode. If the path
53869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53870  # take no chances and rewrite it.
53871  # Note: m4 eats our [], so we need to use [ and ] instead.
53872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53873  if test "x$has_forbidden_chars" != x; then
53874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53878      # Going to short mode and back again did indeed matter. Since short mode is
53879      # case insensitive, let's make it lowercase to improve readability.
53880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53881      # Now convert it back to Unix-style (cygpath)
53882      input_path=`$CYGPATH -u "$shortmode_path"`
53883      new_path="$input_path"
53884    fi
53885  fi
53886
53887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53888  if test "x$test_cygdrive_prefix" = x; then
53889    # As a simple fix, exclude /usr/bin since it's not a real path.
53890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53892      # a path prefixed by /cygdrive for fixpath to work.
53893      new_path="$CYGWIN_ROOT_PATH$input_path"
53894    fi
53895  fi
53896
53897
53898  if test "x$path" != "x$new_path"; then
53899    MSVC_DLL="$new_path"
53900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53901$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53902  fi
53903
53904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53905
53906  path="$MSVC_DLL"
53907  has_colon=`$ECHO $path | $GREP ^.:`
53908  new_path="$path"
53909  if test "x$has_colon" = x; then
53910    # Not in mixed or Windows style, start by that.
53911    new_path=`cmd //c echo $path`
53912  fi
53913
53914
53915  input_path="$new_path"
53916  # Check if we need to convert this using DOS-style short mode. If the path
53917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53918  # take no chances and rewrite it.
53919  # Note: m4 eats our [], so we need to use [ and ] instead.
53920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53921  if test "x$has_forbidden_chars" != x; then
53922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53924  fi
53925
53926
53927  windows_path="$new_path"
53928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53929    unix_path=`$CYGPATH -u "$windows_path"`
53930    new_path="$unix_path"
53931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53933    new_path="$unix_path"
53934  fi
53935
53936  if test "x$path" != "x$new_path"; then
53937    MSVC_DLL="$new_path"
53938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53939$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53940  fi
53941
53942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53944
53945    else
53946      # We're on a unix platform. Hooray! :)
53947      path="$MSVC_DLL"
53948      has_space=`$ECHO "$path" | $GREP " "`
53949      if test "x$has_space" != x; then
53950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53951$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53953      fi
53954
53955      # Use eval to expand a potential ~
53956      eval path="$path"
53957      if test ! -f "$path" && test ! -d "$path"; then
53958        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53959      fi
53960
53961      if test -d "$path"; then
53962        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53963      else
53964        dir="`$DIRNAME "$path"`"
53965        base="`$BASENAME "$path"`"
53966        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53967      fi
53968    fi
53969  fi
53970
53971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53972$as_echo_n "checking for $DLL_NAME... " >&6; }
53973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53974$as_echo "$MSVC_DLL" >&6; }
53975    else
53976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53977$as_echo "incorrect, ignoring" >&6; }
53978      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53979$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53980    fi
53981  fi
53982
53983  fi
53984
53985  if test "x$MSVC_DLL" = x; then
53986    # Probe: Look in the Windows system32 directory
53987    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53988
53989  windows_path="$CYGWIN_SYSTEMROOT"
53990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53991    unix_path=`$CYGPATH -u "$windows_path"`
53992    CYGWIN_SYSTEMROOT="$unix_path"
53993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53995    CYGWIN_SYSTEMROOT="$unix_path"
53996  fi
53997
53998    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53999
54000  DLL_NAME="$DLL_NAME"
54001  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54002  METHOD="well-known location in SYSTEMROOT"
54003  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54004    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54005$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54006
54007    # Need to check if the found msvcr is correct architecture
54008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54009$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54010    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54012      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54013      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54014      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54015        CORRECT_MSVCR_ARCH="PE32 executable"
54016      else
54017        CORRECT_MSVCR_ARCH="PE32+ executable"
54018      fi
54019    else
54020      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54021        CORRECT_MSVCR_ARCH=386
54022      else
54023        CORRECT_MSVCR_ARCH=x86-64
54024      fi
54025    fi
54026    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54028$as_echo "ok" >&6; }
54029      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54030
54031  # Only process if variable expands to non-empty
54032
54033  if test "x$MSVC_DLL" != x; then
54034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54035
54036  # Input might be given as Windows format, start by converting to
54037  # unix format.
54038  path="$MSVC_DLL"
54039  new_path=`$CYGPATH -u "$path"`
54040
54041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54044  # "foo.exe" is OK but "foo" is an error.
54045  #
54046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54047  # It is also a way to make sure we got the proper file name for the real test later on.
54048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54049  if test "x$test_shortpath" = x; then
54050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54051$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54052    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54053  fi
54054
54055  # Call helper function which possibly converts this using DOS-style short mode.
54056  # If so, the updated path is stored in $new_path.
54057
54058  input_path="$new_path"
54059  # Check if we need to convert this using DOS-style short mode. If the path
54060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54061  # take no chances and rewrite it.
54062  # Note: m4 eats our [], so we need to use [ and ] instead.
54063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54064  if test "x$has_forbidden_chars" != x; then
54065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54069      # Going to short mode and back again did indeed matter. Since short mode is
54070      # case insensitive, let's make it lowercase to improve readability.
54071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54072      # Now convert it back to Unix-style (cygpath)
54073      input_path=`$CYGPATH -u "$shortmode_path"`
54074      new_path="$input_path"
54075    fi
54076  fi
54077
54078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54079  if test "x$test_cygdrive_prefix" = x; then
54080    # As a simple fix, exclude /usr/bin since it's not a real path.
54081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54083      # a path prefixed by /cygdrive for fixpath to work.
54084      new_path="$CYGWIN_ROOT_PATH$input_path"
54085    fi
54086  fi
54087
54088
54089  if test "x$path" != "x$new_path"; then
54090    MSVC_DLL="$new_path"
54091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54092$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54093  fi
54094
54095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54096
54097  path="$MSVC_DLL"
54098  has_colon=`$ECHO $path | $GREP ^.:`
54099  new_path="$path"
54100  if test "x$has_colon" = x; then
54101    # Not in mixed or Windows style, start by that.
54102    new_path=`cmd //c echo $path`
54103  fi
54104
54105
54106  input_path="$new_path"
54107  # Check if we need to convert this using DOS-style short mode. If the path
54108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54109  # take no chances and rewrite it.
54110  # Note: m4 eats our [], so we need to use [ and ] instead.
54111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54112  if test "x$has_forbidden_chars" != x; then
54113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54115  fi
54116
54117
54118  windows_path="$new_path"
54119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54120    unix_path=`$CYGPATH -u "$windows_path"`
54121    new_path="$unix_path"
54122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54124    new_path="$unix_path"
54125  fi
54126
54127  if test "x$path" != "x$new_path"; then
54128    MSVC_DLL="$new_path"
54129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54130$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54131  fi
54132
54133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54135
54136    else
54137      # We're on a unix platform. Hooray! :)
54138      path="$MSVC_DLL"
54139      has_space=`$ECHO "$path" | $GREP " "`
54140      if test "x$has_space" != x; then
54141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54142$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54144      fi
54145
54146      # Use eval to expand a potential ~
54147      eval path="$path"
54148      if test ! -f "$path" && test ! -d "$path"; then
54149        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54150      fi
54151
54152      if test -d "$path"; then
54153        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54154      else
54155        dir="`$DIRNAME "$path"`"
54156        base="`$BASENAME "$path"`"
54157        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54158      fi
54159    fi
54160  fi
54161
54162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54163$as_echo_n "checking for $DLL_NAME... " >&6; }
54164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54165$as_echo "$MSVC_DLL" >&6; }
54166    else
54167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54168$as_echo "incorrect, ignoring" >&6; }
54169      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54170$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54171    fi
54172  fi
54173
54174  fi
54175
54176  if test "x$MSVC_DLL" = x; then
54177    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54178    if test "x$VS100COMNTOOLS" != x; then
54179      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54180
54181  windows_path="$CYGWIN_VS_TOOLS_DIR"
54182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54183    unix_path=`$CYGPATH -u "$windows_path"`
54184    CYGWIN_VS_TOOLS_DIR="$unix_path"
54185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54187    CYGWIN_VS_TOOLS_DIR="$unix_path"
54188  fi
54189
54190      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54191        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54192	    | $GREP -i /x64/ | $HEAD --lines 1`
54193      else
54194        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54195	    | $GREP -i /x86/ | $HEAD --lines 1`
54196      fi
54197
54198  DLL_NAME="$DLL_NAME"
54199  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54200  METHOD="search of VS100COMNTOOLS"
54201  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54202    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54203$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54204
54205    # Need to check if the found msvcr is correct architecture
54206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54207$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54208    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54210      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54211      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54212      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54213        CORRECT_MSVCR_ARCH="PE32 executable"
54214      else
54215        CORRECT_MSVCR_ARCH="PE32+ executable"
54216      fi
54217    else
54218      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54219        CORRECT_MSVCR_ARCH=386
54220      else
54221        CORRECT_MSVCR_ARCH=x86-64
54222      fi
54223    fi
54224    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54226$as_echo "ok" >&6; }
54227      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54228
54229  # Only process if variable expands to non-empty
54230
54231  if test "x$MSVC_DLL" != x; then
54232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54233
54234  # Input might be given as Windows format, start by converting to
54235  # unix format.
54236  path="$MSVC_DLL"
54237  new_path=`$CYGPATH -u "$path"`
54238
54239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54242  # "foo.exe" is OK but "foo" is an error.
54243  #
54244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54245  # It is also a way to make sure we got the proper file name for the real test later on.
54246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54247  if test "x$test_shortpath" = x; then
54248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54249$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54250    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54251  fi
54252
54253  # Call helper function which possibly converts this using DOS-style short mode.
54254  # If so, the updated path is stored in $new_path.
54255
54256  input_path="$new_path"
54257  # Check if we need to convert this using DOS-style short mode. If the path
54258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54259  # take no chances and rewrite it.
54260  # Note: m4 eats our [], so we need to use [ and ] instead.
54261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54262  if test "x$has_forbidden_chars" != x; then
54263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54267      # Going to short mode and back again did indeed matter. Since short mode is
54268      # case insensitive, let's make it lowercase to improve readability.
54269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54270      # Now convert it back to Unix-style (cygpath)
54271      input_path=`$CYGPATH -u "$shortmode_path"`
54272      new_path="$input_path"
54273    fi
54274  fi
54275
54276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54277  if test "x$test_cygdrive_prefix" = x; then
54278    # As a simple fix, exclude /usr/bin since it's not a real path.
54279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54281      # a path prefixed by /cygdrive for fixpath to work.
54282      new_path="$CYGWIN_ROOT_PATH$input_path"
54283    fi
54284  fi
54285
54286
54287  if test "x$path" != "x$new_path"; then
54288    MSVC_DLL="$new_path"
54289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54290$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54291  fi
54292
54293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54294
54295  path="$MSVC_DLL"
54296  has_colon=`$ECHO $path | $GREP ^.:`
54297  new_path="$path"
54298  if test "x$has_colon" = x; then
54299    # Not in mixed or Windows style, start by that.
54300    new_path=`cmd //c echo $path`
54301  fi
54302
54303
54304  input_path="$new_path"
54305  # Check if we need to convert this using DOS-style short mode. If the path
54306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54307  # take no chances and rewrite it.
54308  # Note: m4 eats our [], so we need to use [ and ] instead.
54309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54310  if test "x$has_forbidden_chars" != x; then
54311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54313  fi
54314
54315
54316  windows_path="$new_path"
54317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54318    unix_path=`$CYGPATH -u "$windows_path"`
54319    new_path="$unix_path"
54320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54322    new_path="$unix_path"
54323  fi
54324
54325  if test "x$path" != "x$new_path"; then
54326    MSVC_DLL="$new_path"
54327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54328$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54329  fi
54330
54331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54333
54334    else
54335      # We're on a unix platform. Hooray! :)
54336      path="$MSVC_DLL"
54337      has_space=`$ECHO "$path" | $GREP " "`
54338      if test "x$has_space" != x; then
54339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54340$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54341        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54342      fi
54343
54344      # Use eval to expand a potential ~
54345      eval path="$path"
54346      if test ! -f "$path" && test ! -d "$path"; then
54347        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54348      fi
54349
54350      if test -d "$path"; then
54351        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54352      else
54353        dir="`$DIRNAME "$path"`"
54354        base="`$BASENAME "$path"`"
54355        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54356      fi
54357    fi
54358  fi
54359
54360      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54361$as_echo_n "checking for $DLL_NAME... " >&6; }
54362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54363$as_echo "$MSVC_DLL" >&6; }
54364    else
54365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54366$as_echo "incorrect, ignoring" >&6; }
54367      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54368$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54369    fi
54370  fi
54371
54372    fi
54373  fi
54374
54375  if test "x$MSVC_DLL" = x; then
54376    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54377    # (This was the original behaviour; kept since it might turn something up)
54378    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54379      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54380        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54381	    | $GREP x64 | $HEAD --lines 1`
54382      else
54383        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54384	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54385        if test "x$POSSIBLE_MSVC_DLL" = x; then
54386          # We're grasping at straws now...
54387          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54388	      | $HEAD --lines 1`
54389        fi
54390      fi
54391
54392
54393  DLL_NAME="$DLL_NAME"
54394  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54395  METHOD="search of VCINSTALLDIR"
54396  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54397    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54398$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54399
54400    # Need to check if the found msvcr is correct architecture
54401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54402$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54403    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54405      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54406      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54407      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54408        CORRECT_MSVCR_ARCH="PE32 executable"
54409      else
54410        CORRECT_MSVCR_ARCH="PE32+ executable"
54411      fi
54412    else
54413      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54414        CORRECT_MSVCR_ARCH=386
54415      else
54416        CORRECT_MSVCR_ARCH=x86-64
54417      fi
54418    fi
54419    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54421$as_echo "ok" >&6; }
54422      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54423
54424  # Only process if variable expands to non-empty
54425
54426  if test "x$MSVC_DLL" != x; then
54427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54428
54429  # Input might be given as Windows format, start by converting to
54430  # unix format.
54431  path="$MSVC_DLL"
54432  new_path=`$CYGPATH -u "$path"`
54433
54434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54437  # "foo.exe" is OK but "foo" is an error.
54438  #
54439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54440  # It is also a way to make sure we got the proper file name for the real test later on.
54441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54442  if test "x$test_shortpath" = x; then
54443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54444$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54445    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54446  fi
54447
54448  # Call helper function which possibly converts this using DOS-style short mode.
54449  # If so, the updated path is stored in $new_path.
54450
54451  input_path="$new_path"
54452  # Check if we need to convert this using DOS-style short mode. If the path
54453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54454  # take no chances and rewrite it.
54455  # Note: m4 eats our [], so we need to use [ and ] instead.
54456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54457  if test "x$has_forbidden_chars" != x; then
54458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54462      # Going to short mode and back again did indeed matter. Since short mode is
54463      # case insensitive, let's make it lowercase to improve readability.
54464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54465      # Now convert it back to Unix-style (cygpath)
54466      input_path=`$CYGPATH -u "$shortmode_path"`
54467      new_path="$input_path"
54468    fi
54469  fi
54470
54471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54472  if test "x$test_cygdrive_prefix" = x; then
54473    # As a simple fix, exclude /usr/bin since it's not a real path.
54474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54476      # a path prefixed by /cygdrive for fixpath to work.
54477      new_path="$CYGWIN_ROOT_PATH$input_path"
54478    fi
54479  fi
54480
54481
54482  if test "x$path" != "x$new_path"; then
54483    MSVC_DLL="$new_path"
54484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54485$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54486  fi
54487
54488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54489
54490  path="$MSVC_DLL"
54491  has_colon=`$ECHO $path | $GREP ^.:`
54492  new_path="$path"
54493  if test "x$has_colon" = x; then
54494    # Not in mixed or Windows style, start by that.
54495    new_path=`cmd //c echo $path`
54496  fi
54497
54498
54499  input_path="$new_path"
54500  # Check if we need to convert this using DOS-style short mode. If the path
54501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54502  # take no chances and rewrite it.
54503  # Note: m4 eats our [], so we need to use [ and ] instead.
54504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54505  if test "x$has_forbidden_chars" != x; then
54506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54508  fi
54509
54510
54511  windows_path="$new_path"
54512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54513    unix_path=`$CYGPATH -u "$windows_path"`
54514    new_path="$unix_path"
54515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54517    new_path="$unix_path"
54518  fi
54519
54520  if test "x$path" != "x$new_path"; then
54521    MSVC_DLL="$new_path"
54522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54523$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54524  fi
54525
54526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54528
54529    else
54530      # We're on a unix platform. Hooray! :)
54531      path="$MSVC_DLL"
54532      has_space=`$ECHO "$path" | $GREP " "`
54533      if test "x$has_space" != x; then
54534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54535$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54537      fi
54538
54539      # Use eval to expand a potential ~
54540      eval path="$path"
54541      if test ! -f "$path" && test ! -d "$path"; then
54542        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54543      fi
54544
54545      if test -d "$path"; then
54546        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54547      else
54548        dir="`$DIRNAME "$path"`"
54549        base="`$BASENAME "$path"`"
54550        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54551      fi
54552    fi
54553  fi
54554
54555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54556$as_echo_n "checking for $DLL_NAME... " >&6; }
54557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54558$as_echo "$MSVC_DLL" >&6; }
54559    else
54560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54561$as_echo "incorrect, ignoring" >&6; }
54562      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54563$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54564    fi
54565  fi
54566
54567    fi
54568  fi
54569
54570  if test "x$MSVC_DLL" = x; then
54571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54572$as_echo_n "checking for $DLL_NAME... " >&6; }
54573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54574$as_echo "no" >&6; }
54575    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54576  fi
54577
54578    MSVCR_DLL="$MSVC_DLL"
54579  fi
54580
54581
54582
54583# Check whether --with-msvcp-dll was given.
54584if test "${with_msvcp_dll+set}" = set; then :
54585  withval=$with_msvcp_dll;
54586fi
54587
54588
54589  if test "x$MSVCP_NAME" != "x"; then
54590    if test "x$with_msvcp_dll" != x; then
54591      # If given explicitly by user, do not probe. If not present, fail directly.
54592
54593  DLL_NAME="$MSVCP_NAME"
54594  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54595  METHOD="--with-msvcp-dll"
54596  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54598$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54599
54600    # Need to check if the found msvcr is correct architecture
54601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54602$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54603    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54605      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54606      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54607      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54608        CORRECT_MSVCR_ARCH="PE32 executable"
54609      else
54610        CORRECT_MSVCR_ARCH="PE32+ executable"
54611      fi
54612    else
54613      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54614        CORRECT_MSVCR_ARCH=386
54615      else
54616        CORRECT_MSVCR_ARCH=x86-64
54617      fi
54618    fi
54619    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54621$as_echo "ok" >&6; }
54622      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54623
54624  # Only process if variable expands to non-empty
54625
54626  if test "x$MSVC_DLL" != x; then
54627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54628
54629  # Input might be given as Windows format, start by converting to
54630  # unix format.
54631  path="$MSVC_DLL"
54632  new_path=`$CYGPATH -u "$path"`
54633
54634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54637  # "foo.exe" is OK but "foo" is an error.
54638  #
54639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54640  # It is also a way to make sure we got the proper file name for the real test later on.
54641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54642  if test "x$test_shortpath" = x; then
54643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54644$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54645    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54646  fi
54647
54648  # Call helper function which possibly converts this using DOS-style short mode.
54649  # If so, the updated path is stored in $new_path.
54650
54651  input_path="$new_path"
54652  # Check if we need to convert this using DOS-style short mode. If the path
54653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54654  # take no chances and rewrite it.
54655  # Note: m4 eats our [], so we need to use [ and ] instead.
54656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54657  if test "x$has_forbidden_chars" != x; then
54658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54662      # Going to short mode and back again did indeed matter. Since short mode is
54663      # case insensitive, let's make it lowercase to improve readability.
54664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54665      # Now convert it back to Unix-style (cygpath)
54666      input_path=`$CYGPATH -u "$shortmode_path"`
54667      new_path="$input_path"
54668    fi
54669  fi
54670
54671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54672  if test "x$test_cygdrive_prefix" = x; then
54673    # As a simple fix, exclude /usr/bin since it's not a real path.
54674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54676      # a path prefixed by /cygdrive for fixpath to work.
54677      new_path="$CYGWIN_ROOT_PATH$input_path"
54678    fi
54679  fi
54680
54681
54682  if test "x$path" != "x$new_path"; then
54683    MSVC_DLL="$new_path"
54684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54685$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54686  fi
54687
54688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54689
54690  path="$MSVC_DLL"
54691  has_colon=`$ECHO $path | $GREP ^.:`
54692  new_path="$path"
54693  if test "x$has_colon" = x; then
54694    # Not in mixed or Windows style, start by that.
54695    new_path=`cmd //c echo $path`
54696  fi
54697
54698
54699  input_path="$new_path"
54700  # Check if we need to convert this using DOS-style short mode. If the path
54701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54702  # take no chances and rewrite it.
54703  # Note: m4 eats our [], so we need to use [ and ] instead.
54704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54705  if test "x$has_forbidden_chars" != x; then
54706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54708  fi
54709
54710
54711  windows_path="$new_path"
54712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54713    unix_path=`$CYGPATH -u "$windows_path"`
54714    new_path="$unix_path"
54715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54717    new_path="$unix_path"
54718  fi
54719
54720  if test "x$path" != "x$new_path"; then
54721    MSVC_DLL="$new_path"
54722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54723$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54724  fi
54725
54726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54728
54729    else
54730      # We're on a unix platform. Hooray! :)
54731      path="$MSVC_DLL"
54732      has_space=`$ECHO "$path" | $GREP " "`
54733      if test "x$has_space" != x; then
54734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54735$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54737      fi
54738
54739      # Use eval to expand a potential ~
54740      eval path="$path"
54741      if test ! -f "$path" && test ! -d "$path"; then
54742        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54743      fi
54744
54745      if test -d "$path"; then
54746        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54747      else
54748        dir="`$DIRNAME "$path"`"
54749        base="`$BASENAME "$path"`"
54750        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54751      fi
54752    fi
54753  fi
54754
54755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54756$as_echo_n "checking for $DLL_NAME... " >&6; }
54757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54758$as_echo "$MSVC_DLL" >&6; }
54759    else
54760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54761$as_echo "incorrect, ignoring" >&6; }
54762      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54763$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54764    fi
54765  fi
54766
54767      if test "x$MSVC_DLL" = x; then
54768        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54769      fi
54770      MSVCP_DLL="$MSVC_DLL"
54771    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54772
54773  DLL_NAME="$MSVCP_NAME"
54774  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54775  METHOD="devkit"
54776  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54777    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54778$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54779
54780    # Need to check if the found msvcr is correct architecture
54781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54782$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54783    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54785      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54786      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54787      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54788        CORRECT_MSVCR_ARCH="PE32 executable"
54789      else
54790        CORRECT_MSVCR_ARCH="PE32+ executable"
54791      fi
54792    else
54793      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54794        CORRECT_MSVCR_ARCH=386
54795      else
54796        CORRECT_MSVCR_ARCH=x86-64
54797      fi
54798    fi
54799    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54801$as_echo "ok" >&6; }
54802      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54803
54804  # Only process if variable expands to non-empty
54805
54806  if test "x$MSVC_DLL" != x; then
54807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54808
54809  # Input might be given as Windows format, start by converting to
54810  # unix format.
54811  path="$MSVC_DLL"
54812  new_path=`$CYGPATH -u "$path"`
54813
54814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54817  # "foo.exe" is OK but "foo" is an error.
54818  #
54819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54820  # It is also a way to make sure we got the proper file name for the real test later on.
54821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54822  if test "x$test_shortpath" = x; then
54823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54824$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54825    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54826  fi
54827
54828  # Call helper function which possibly converts this using DOS-style short mode.
54829  # If so, the updated path is stored in $new_path.
54830
54831  input_path="$new_path"
54832  # Check if we need to convert this using DOS-style short mode. If the path
54833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54834  # take no chances and rewrite it.
54835  # Note: m4 eats our [], so we need to use [ and ] instead.
54836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54837  if test "x$has_forbidden_chars" != x; then
54838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54842      # Going to short mode and back again did indeed matter. Since short mode is
54843      # case insensitive, let's make it lowercase to improve readability.
54844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54845      # Now convert it back to Unix-style (cygpath)
54846      input_path=`$CYGPATH -u "$shortmode_path"`
54847      new_path="$input_path"
54848    fi
54849  fi
54850
54851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54852  if test "x$test_cygdrive_prefix" = x; then
54853    # As a simple fix, exclude /usr/bin since it's not a real path.
54854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54856      # a path prefixed by /cygdrive for fixpath to work.
54857      new_path="$CYGWIN_ROOT_PATH$input_path"
54858    fi
54859  fi
54860
54861
54862  if test "x$path" != "x$new_path"; then
54863    MSVC_DLL="$new_path"
54864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54865$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54866  fi
54867
54868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54869
54870  path="$MSVC_DLL"
54871  has_colon=`$ECHO $path | $GREP ^.:`
54872  new_path="$path"
54873  if test "x$has_colon" = x; then
54874    # Not in mixed or Windows style, start by that.
54875    new_path=`cmd //c echo $path`
54876  fi
54877
54878
54879  input_path="$new_path"
54880  # Check if we need to convert this using DOS-style short mode. If the path
54881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54882  # take no chances and rewrite it.
54883  # Note: m4 eats our [], so we need to use [ and ] instead.
54884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54885  if test "x$has_forbidden_chars" != x; then
54886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54888  fi
54889
54890
54891  windows_path="$new_path"
54892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54893    unix_path=`$CYGPATH -u "$windows_path"`
54894    new_path="$unix_path"
54895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54897    new_path="$unix_path"
54898  fi
54899
54900  if test "x$path" != "x$new_path"; then
54901    MSVC_DLL="$new_path"
54902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54903$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54904  fi
54905
54906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54908
54909    else
54910      # We're on a unix platform. Hooray! :)
54911      path="$MSVC_DLL"
54912      has_space=`$ECHO "$path" | $GREP " "`
54913      if test "x$has_space" != x; then
54914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54915$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54917      fi
54918
54919      # Use eval to expand a potential ~
54920      eval path="$path"
54921      if test ! -f "$path" && test ! -d "$path"; then
54922        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54923      fi
54924
54925      if test -d "$path"; then
54926        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54927      else
54928        dir="`$DIRNAME "$path"`"
54929        base="`$BASENAME "$path"`"
54930        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54931      fi
54932    fi
54933  fi
54934
54935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54936$as_echo_n "checking for $DLL_NAME... " >&6; }
54937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54938$as_echo "$MSVC_DLL" >&6; }
54939    else
54940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54941$as_echo "incorrect, ignoring" >&6; }
54942      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54943$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54944    fi
54945  fi
54946
54947      if test "x$MSVC_DLL" = x; then
54948        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54949      fi
54950      MSVCP_DLL="$MSVC_DLL"
54951    else
54952
54953  DLL_NAME="${MSVCP_NAME}"
54954  MSVC_DLL=
54955
54956  if test "x$MSVC_DLL" = x; then
54957    # Probe: Using well-known location from Visual Studio 10.0
54958    if test "x$VCINSTALLDIR" != x; then
54959      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54960
54961  windows_path="$CYGWIN_VC_INSTALL_DIR"
54962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54963    unix_path=`$CYGPATH -u "$windows_path"`
54964    CYGWIN_VC_INSTALL_DIR="$unix_path"
54965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54967    CYGWIN_VC_INSTALL_DIR="$unix_path"
54968  fi
54969
54970      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54971        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54972      else
54973        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54974      fi
54975      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54976
54977  DLL_NAME="$DLL_NAME"
54978  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54979  METHOD="well-known location in VCINSTALLDIR"
54980  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54981    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54982$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54983
54984    # Need to check if the found msvcr is correct architecture
54985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54986$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54987    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54989      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54990      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54991      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54992        CORRECT_MSVCR_ARCH="PE32 executable"
54993      else
54994        CORRECT_MSVCR_ARCH="PE32+ executable"
54995      fi
54996    else
54997      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54998        CORRECT_MSVCR_ARCH=386
54999      else
55000        CORRECT_MSVCR_ARCH=x86-64
55001      fi
55002    fi
55003    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55005$as_echo "ok" >&6; }
55006      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55007
55008  # Only process if variable expands to non-empty
55009
55010  if test "x$MSVC_DLL" != x; then
55011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55012
55013  # Input might be given as Windows format, start by converting to
55014  # unix format.
55015  path="$MSVC_DLL"
55016  new_path=`$CYGPATH -u "$path"`
55017
55018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55021  # "foo.exe" is OK but "foo" is an error.
55022  #
55023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55024  # It is also a way to make sure we got the proper file name for the real test later on.
55025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55026  if test "x$test_shortpath" = x; then
55027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55028$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55029    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55030  fi
55031
55032  # Call helper function which possibly converts this using DOS-style short mode.
55033  # If so, the updated path is stored in $new_path.
55034
55035  input_path="$new_path"
55036  # Check if we need to convert this using DOS-style short mode. If the path
55037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55038  # take no chances and rewrite it.
55039  # Note: m4 eats our [], so we need to use [ and ] instead.
55040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55041  if test "x$has_forbidden_chars" != x; then
55042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55046      # Going to short mode and back again did indeed matter. Since short mode is
55047      # case insensitive, let's make it lowercase to improve readability.
55048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55049      # Now convert it back to Unix-style (cygpath)
55050      input_path=`$CYGPATH -u "$shortmode_path"`
55051      new_path="$input_path"
55052    fi
55053  fi
55054
55055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55056  if test "x$test_cygdrive_prefix" = x; then
55057    # As a simple fix, exclude /usr/bin since it's not a real path.
55058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55060      # a path prefixed by /cygdrive for fixpath to work.
55061      new_path="$CYGWIN_ROOT_PATH$input_path"
55062    fi
55063  fi
55064
55065
55066  if test "x$path" != "x$new_path"; then
55067    MSVC_DLL="$new_path"
55068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55069$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55070  fi
55071
55072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55073
55074  path="$MSVC_DLL"
55075  has_colon=`$ECHO $path | $GREP ^.:`
55076  new_path="$path"
55077  if test "x$has_colon" = x; then
55078    # Not in mixed or Windows style, start by that.
55079    new_path=`cmd //c echo $path`
55080  fi
55081
55082
55083  input_path="$new_path"
55084  # Check if we need to convert this using DOS-style short mode. If the path
55085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55086  # take no chances and rewrite it.
55087  # Note: m4 eats our [], so we need to use [ and ] instead.
55088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55089  if test "x$has_forbidden_chars" != x; then
55090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55092  fi
55093
55094
55095  windows_path="$new_path"
55096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55097    unix_path=`$CYGPATH -u "$windows_path"`
55098    new_path="$unix_path"
55099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55101    new_path="$unix_path"
55102  fi
55103
55104  if test "x$path" != "x$new_path"; then
55105    MSVC_DLL="$new_path"
55106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55107$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55108  fi
55109
55110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55112
55113    else
55114      # We're on a unix platform. Hooray! :)
55115      path="$MSVC_DLL"
55116      has_space=`$ECHO "$path" | $GREP " "`
55117      if test "x$has_space" != x; then
55118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55119$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55121      fi
55122
55123      # Use eval to expand a potential ~
55124      eval path="$path"
55125      if test ! -f "$path" && test ! -d "$path"; then
55126        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55127      fi
55128
55129      if test -d "$path"; then
55130        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55131      else
55132        dir="`$DIRNAME "$path"`"
55133        base="`$BASENAME "$path"`"
55134        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55135      fi
55136    fi
55137  fi
55138
55139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55140$as_echo_n "checking for $DLL_NAME... " >&6; }
55141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55142$as_echo "$MSVC_DLL" >&6; }
55143    else
55144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55145$as_echo "incorrect, ignoring" >&6; }
55146      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55147$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55148    fi
55149  fi
55150
55151    fi
55152  fi
55153
55154  if test "x$MSVC_DLL" = x; then
55155    # Probe: Check in the Boot JDK directory.
55156    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55157
55158  DLL_NAME="$DLL_NAME"
55159  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55160  METHOD="well-known location in Boot JDK"
55161  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55162    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55163$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55164
55165    # Need to check if the found msvcr is correct architecture
55166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55167$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55168    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55170      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55171      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55172      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55173        CORRECT_MSVCR_ARCH="PE32 executable"
55174      else
55175        CORRECT_MSVCR_ARCH="PE32+ executable"
55176      fi
55177    else
55178      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55179        CORRECT_MSVCR_ARCH=386
55180      else
55181        CORRECT_MSVCR_ARCH=x86-64
55182      fi
55183    fi
55184    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55186$as_echo "ok" >&6; }
55187      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55188
55189  # Only process if variable expands to non-empty
55190
55191  if test "x$MSVC_DLL" != x; then
55192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55193
55194  # Input might be given as Windows format, start by converting to
55195  # unix format.
55196  path="$MSVC_DLL"
55197  new_path=`$CYGPATH -u "$path"`
55198
55199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55202  # "foo.exe" is OK but "foo" is an error.
55203  #
55204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55205  # It is also a way to make sure we got the proper file name for the real test later on.
55206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55207  if test "x$test_shortpath" = x; then
55208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55209$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55210    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55211  fi
55212
55213  # Call helper function which possibly converts this using DOS-style short mode.
55214  # If so, the updated path is stored in $new_path.
55215
55216  input_path="$new_path"
55217  # Check if we need to convert this using DOS-style short mode. If the path
55218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55219  # take no chances and rewrite it.
55220  # Note: m4 eats our [], so we need to use [ and ] instead.
55221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55222  if test "x$has_forbidden_chars" != x; then
55223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55227      # Going to short mode and back again did indeed matter. Since short mode is
55228      # case insensitive, let's make it lowercase to improve readability.
55229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55230      # Now convert it back to Unix-style (cygpath)
55231      input_path=`$CYGPATH -u "$shortmode_path"`
55232      new_path="$input_path"
55233    fi
55234  fi
55235
55236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55237  if test "x$test_cygdrive_prefix" = x; then
55238    # As a simple fix, exclude /usr/bin since it's not a real path.
55239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55241      # a path prefixed by /cygdrive for fixpath to work.
55242      new_path="$CYGWIN_ROOT_PATH$input_path"
55243    fi
55244  fi
55245
55246
55247  if test "x$path" != "x$new_path"; then
55248    MSVC_DLL="$new_path"
55249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55250$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55251  fi
55252
55253    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55254
55255  path="$MSVC_DLL"
55256  has_colon=`$ECHO $path | $GREP ^.:`
55257  new_path="$path"
55258  if test "x$has_colon" = x; then
55259    # Not in mixed or Windows style, start by that.
55260    new_path=`cmd //c echo $path`
55261  fi
55262
55263
55264  input_path="$new_path"
55265  # Check if we need to convert this using DOS-style short mode. If the path
55266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55267  # take no chances and rewrite it.
55268  # Note: m4 eats our [], so we need to use [ and ] instead.
55269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55270  if test "x$has_forbidden_chars" != x; then
55271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55273  fi
55274
55275
55276  windows_path="$new_path"
55277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55278    unix_path=`$CYGPATH -u "$windows_path"`
55279    new_path="$unix_path"
55280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55282    new_path="$unix_path"
55283  fi
55284
55285  if test "x$path" != "x$new_path"; then
55286    MSVC_DLL="$new_path"
55287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55288$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55289  fi
55290
55291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55293
55294    else
55295      # We're on a unix platform. Hooray! :)
55296      path="$MSVC_DLL"
55297      has_space=`$ECHO "$path" | $GREP " "`
55298      if test "x$has_space" != x; then
55299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55300$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55301        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55302      fi
55303
55304      # Use eval to expand a potential ~
55305      eval path="$path"
55306      if test ! -f "$path" && test ! -d "$path"; then
55307        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55308      fi
55309
55310      if test -d "$path"; then
55311        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55312      else
55313        dir="`$DIRNAME "$path"`"
55314        base="`$BASENAME "$path"`"
55315        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55316      fi
55317    fi
55318  fi
55319
55320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55321$as_echo_n "checking for $DLL_NAME... " >&6; }
55322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55323$as_echo "$MSVC_DLL" >&6; }
55324    else
55325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55326$as_echo "incorrect, ignoring" >&6; }
55327      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55328$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55329    fi
55330  fi
55331
55332  fi
55333
55334  if test "x$MSVC_DLL" = x; then
55335    # Probe: Look in the Windows system32 directory
55336    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55337
55338  windows_path="$CYGWIN_SYSTEMROOT"
55339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55340    unix_path=`$CYGPATH -u "$windows_path"`
55341    CYGWIN_SYSTEMROOT="$unix_path"
55342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55344    CYGWIN_SYSTEMROOT="$unix_path"
55345  fi
55346
55347    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55348
55349  DLL_NAME="$DLL_NAME"
55350  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55351  METHOD="well-known location in SYSTEMROOT"
55352  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55353    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55354$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55355
55356    # Need to check if the found msvcr is correct architecture
55357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55358$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55359    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55361      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55362      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55363      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55364        CORRECT_MSVCR_ARCH="PE32 executable"
55365      else
55366        CORRECT_MSVCR_ARCH="PE32+ executable"
55367      fi
55368    else
55369      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55370        CORRECT_MSVCR_ARCH=386
55371      else
55372        CORRECT_MSVCR_ARCH=x86-64
55373      fi
55374    fi
55375    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55377$as_echo "ok" >&6; }
55378      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55379
55380  # Only process if variable expands to non-empty
55381
55382  if test "x$MSVC_DLL" != x; then
55383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55384
55385  # Input might be given as Windows format, start by converting to
55386  # unix format.
55387  path="$MSVC_DLL"
55388  new_path=`$CYGPATH -u "$path"`
55389
55390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55393  # "foo.exe" is OK but "foo" is an error.
55394  #
55395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55396  # It is also a way to make sure we got the proper file name for the real test later on.
55397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55398  if test "x$test_shortpath" = x; then
55399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55400$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55401    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55402  fi
55403
55404  # Call helper function which possibly converts this using DOS-style short mode.
55405  # If so, the updated path is stored in $new_path.
55406
55407  input_path="$new_path"
55408  # Check if we need to convert this using DOS-style short mode. If the path
55409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55410  # take no chances and rewrite it.
55411  # Note: m4 eats our [], so we need to use [ and ] instead.
55412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55413  if test "x$has_forbidden_chars" != x; then
55414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55418      # Going to short mode and back again did indeed matter. Since short mode is
55419      # case insensitive, let's make it lowercase to improve readability.
55420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55421      # Now convert it back to Unix-style (cygpath)
55422      input_path=`$CYGPATH -u "$shortmode_path"`
55423      new_path="$input_path"
55424    fi
55425  fi
55426
55427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55428  if test "x$test_cygdrive_prefix" = x; then
55429    # As a simple fix, exclude /usr/bin since it's not a real path.
55430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55432      # a path prefixed by /cygdrive for fixpath to work.
55433      new_path="$CYGWIN_ROOT_PATH$input_path"
55434    fi
55435  fi
55436
55437
55438  if test "x$path" != "x$new_path"; then
55439    MSVC_DLL="$new_path"
55440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55441$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55442  fi
55443
55444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55445
55446  path="$MSVC_DLL"
55447  has_colon=`$ECHO $path | $GREP ^.:`
55448  new_path="$path"
55449  if test "x$has_colon" = x; then
55450    # Not in mixed or Windows style, start by that.
55451    new_path=`cmd //c echo $path`
55452  fi
55453
55454
55455  input_path="$new_path"
55456  # Check if we need to convert this using DOS-style short mode. If the path
55457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55458  # take no chances and rewrite it.
55459  # Note: m4 eats our [], so we need to use [ and ] instead.
55460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55461  if test "x$has_forbidden_chars" != x; then
55462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55464  fi
55465
55466
55467  windows_path="$new_path"
55468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55469    unix_path=`$CYGPATH -u "$windows_path"`
55470    new_path="$unix_path"
55471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55473    new_path="$unix_path"
55474  fi
55475
55476  if test "x$path" != "x$new_path"; then
55477    MSVC_DLL="$new_path"
55478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55479$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55480  fi
55481
55482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55484
55485    else
55486      # We're on a unix platform. Hooray! :)
55487      path="$MSVC_DLL"
55488      has_space=`$ECHO "$path" | $GREP " "`
55489      if test "x$has_space" != x; then
55490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55491$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55493      fi
55494
55495      # Use eval to expand a potential ~
55496      eval path="$path"
55497      if test ! -f "$path" && test ! -d "$path"; then
55498        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55499      fi
55500
55501      if test -d "$path"; then
55502        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55503      else
55504        dir="`$DIRNAME "$path"`"
55505        base="`$BASENAME "$path"`"
55506        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55507      fi
55508    fi
55509  fi
55510
55511      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55512$as_echo_n "checking for $DLL_NAME... " >&6; }
55513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55514$as_echo "$MSVC_DLL" >&6; }
55515    else
55516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55517$as_echo "incorrect, ignoring" >&6; }
55518      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55519$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55520    fi
55521  fi
55522
55523  fi
55524
55525  if test "x$MSVC_DLL" = x; then
55526    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55527    if test "x$VS100COMNTOOLS" != x; then
55528      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55529
55530  windows_path="$CYGWIN_VS_TOOLS_DIR"
55531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55532    unix_path=`$CYGPATH -u "$windows_path"`
55533    CYGWIN_VS_TOOLS_DIR="$unix_path"
55534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55536    CYGWIN_VS_TOOLS_DIR="$unix_path"
55537  fi
55538
55539      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55540        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55541	    | $GREP -i /x64/ | $HEAD --lines 1`
55542      else
55543        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55544	    | $GREP -i /x86/ | $HEAD --lines 1`
55545      fi
55546
55547  DLL_NAME="$DLL_NAME"
55548  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55549  METHOD="search of VS100COMNTOOLS"
55550  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55552$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55553
55554    # Need to check if the found msvcr is correct architecture
55555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55556$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55557    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55559      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55560      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55561      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55562        CORRECT_MSVCR_ARCH="PE32 executable"
55563      else
55564        CORRECT_MSVCR_ARCH="PE32+ executable"
55565      fi
55566    else
55567      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55568        CORRECT_MSVCR_ARCH=386
55569      else
55570        CORRECT_MSVCR_ARCH=x86-64
55571      fi
55572    fi
55573    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55575$as_echo "ok" >&6; }
55576      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55577
55578  # Only process if variable expands to non-empty
55579
55580  if test "x$MSVC_DLL" != x; then
55581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55582
55583  # Input might be given as Windows format, start by converting to
55584  # unix format.
55585  path="$MSVC_DLL"
55586  new_path=`$CYGPATH -u "$path"`
55587
55588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55591  # "foo.exe" is OK but "foo" is an error.
55592  #
55593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55594  # It is also a way to make sure we got the proper file name for the real test later on.
55595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55596  if test "x$test_shortpath" = x; then
55597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55598$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55599    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55600  fi
55601
55602  # Call helper function which possibly converts this using DOS-style short mode.
55603  # If so, the updated path is stored in $new_path.
55604
55605  input_path="$new_path"
55606  # Check if we need to convert this using DOS-style short mode. If the path
55607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55608  # take no chances and rewrite it.
55609  # Note: m4 eats our [], so we need to use [ and ] instead.
55610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55611  if test "x$has_forbidden_chars" != x; then
55612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55616      # Going to short mode and back again did indeed matter. Since short mode is
55617      # case insensitive, let's make it lowercase to improve readability.
55618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55619      # Now convert it back to Unix-style (cygpath)
55620      input_path=`$CYGPATH -u "$shortmode_path"`
55621      new_path="$input_path"
55622    fi
55623  fi
55624
55625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55626  if test "x$test_cygdrive_prefix" = x; then
55627    # As a simple fix, exclude /usr/bin since it's not a real path.
55628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55630      # a path prefixed by /cygdrive for fixpath to work.
55631      new_path="$CYGWIN_ROOT_PATH$input_path"
55632    fi
55633  fi
55634
55635
55636  if test "x$path" != "x$new_path"; then
55637    MSVC_DLL="$new_path"
55638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55640  fi
55641
55642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55643
55644  path="$MSVC_DLL"
55645  has_colon=`$ECHO $path | $GREP ^.:`
55646  new_path="$path"
55647  if test "x$has_colon" = x; then
55648    # Not in mixed or Windows style, start by that.
55649    new_path=`cmd //c echo $path`
55650  fi
55651
55652
55653  input_path="$new_path"
55654  # Check if we need to convert this using DOS-style short mode. If the path
55655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55656  # take no chances and rewrite it.
55657  # Note: m4 eats our [], so we need to use [ and ] instead.
55658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55659  if test "x$has_forbidden_chars" != x; then
55660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55662  fi
55663
55664
55665  windows_path="$new_path"
55666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55667    unix_path=`$CYGPATH -u "$windows_path"`
55668    new_path="$unix_path"
55669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55671    new_path="$unix_path"
55672  fi
55673
55674  if test "x$path" != "x$new_path"; then
55675    MSVC_DLL="$new_path"
55676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55677$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55678  fi
55679
55680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55682
55683    else
55684      # We're on a unix platform. Hooray! :)
55685      path="$MSVC_DLL"
55686      has_space=`$ECHO "$path" | $GREP " "`
55687      if test "x$has_space" != x; then
55688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55689$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55691      fi
55692
55693      # Use eval to expand a potential ~
55694      eval path="$path"
55695      if test ! -f "$path" && test ! -d "$path"; then
55696        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55697      fi
55698
55699      if test -d "$path"; then
55700        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55701      else
55702        dir="`$DIRNAME "$path"`"
55703        base="`$BASENAME "$path"`"
55704        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55705      fi
55706    fi
55707  fi
55708
55709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55710$as_echo_n "checking for $DLL_NAME... " >&6; }
55711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55712$as_echo "$MSVC_DLL" >&6; }
55713    else
55714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55715$as_echo "incorrect, ignoring" >&6; }
55716      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55717$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55718    fi
55719  fi
55720
55721    fi
55722  fi
55723
55724  if test "x$MSVC_DLL" = x; then
55725    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55726    # (This was the original behaviour; kept since it might turn something up)
55727    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55728      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55729        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55730	    | $GREP x64 | $HEAD --lines 1`
55731      else
55732        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55733	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55734        if test "x$POSSIBLE_MSVC_DLL" = x; then
55735          # We're grasping at straws now...
55736          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55737	      | $HEAD --lines 1`
55738        fi
55739      fi
55740
55741
55742  DLL_NAME="$DLL_NAME"
55743  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55744  METHOD="search of VCINSTALLDIR"
55745  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55747$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55748
55749    # Need to check if the found msvcr is correct architecture
55750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55751$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55752    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55754      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55755      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55756      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55757        CORRECT_MSVCR_ARCH="PE32 executable"
55758      else
55759        CORRECT_MSVCR_ARCH="PE32+ executable"
55760      fi
55761    else
55762      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55763        CORRECT_MSVCR_ARCH=386
55764      else
55765        CORRECT_MSVCR_ARCH=x86-64
55766      fi
55767    fi
55768    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55770$as_echo "ok" >&6; }
55771      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55772
55773  # Only process if variable expands to non-empty
55774
55775  if test "x$MSVC_DLL" != x; then
55776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55777
55778  # Input might be given as Windows format, start by converting to
55779  # unix format.
55780  path="$MSVC_DLL"
55781  new_path=`$CYGPATH -u "$path"`
55782
55783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55786  # "foo.exe" is OK but "foo" is an error.
55787  #
55788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55789  # It is also a way to make sure we got the proper file name for the real test later on.
55790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55791  if test "x$test_shortpath" = x; then
55792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55793$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55794    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55795  fi
55796
55797  # Call helper function which possibly converts this using DOS-style short mode.
55798  # If so, the updated path is stored in $new_path.
55799
55800  input_path="$new_path"
55801  # Check if we need to convert this using DOS-style short mode. If the path
55802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55803  # take no chances and rewrite it.
55804  # Note: m4 eats our [], so we need to use [ and ] instead.
55805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55806  if test "x$has_forbidden_chars" != x; then
55807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55811      # Going to short mode and back again did indeed matter. Since short mode is
55812      # case insensitive, let's make it lowercase to improve readability.
55813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55814      # Now convert it back to Unix-style (cygpath)
55815      input_path=`$CYGPATH -u "$shortmode_path"`
55816      new_path="$input_path"
55817    fi
55818  fi
55819
55820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55821  if test "x$test_cygdrive_prefix" = x; then
55822    # As a simple fix, exclude /usr/bin since it's not a real path.
55823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55825      # a path prefixed by /cygdrive for fixpath to work.
55826      new_path="$CYGWIN_ROOT_PATH$input_path"
55827    fi
55828  fi
55829
55830
55831  if test "x$path" != "x$new_path"; then
55832    MSVC_DLL="$new_path"
55833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55834$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55835  fi
55836
55837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55838
55839  path="$MSVC_DLL"
55840  has_colon=`$ECHO $path | $GREP ^.:`
55841  new_path="$path"
55842  if test "x$has_colon" = x; then
55843    # Not in mixed or Windows style, start by that.
55844    new_path=`cmd //c echo $path`
55845  fi
55846
55847
55848  input_path="$new_path"
55849  # Check if we need to convert this using DOS-style short mode. If the path
55850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55851  # take no chances and rewrite it.
55852  # Note: m4 eats our [], so we need to use [ and ] instead.
55853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55854  if test "x$has_forbidden_chars" != x; then
55855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55857  fi
55858
55859
55860  windows_path="$new_path"
55861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55862    unix_path=`$CYGPATH -u "$windows_path"`
55863    new_path="$unix_path"
55864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55866    new_path="$unix_path"
55867  fi
55868
55869  if test "x$path" != "x$new_path"; then
55870    MSVC_DLL="$new_path"
55871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55872$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55873  fi
55874
55875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55877
55878    else
55879      # We're on a unix platform. Hooray! :)
55880      path="$MSVC_DLL"
55881      has_space=`$ECHO "$path" | $GREP " "`
55882      if test "x$has_space" != x; then
55883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55884$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55886      fi
55887
55888      # Use eval to expand a potential ~
55889      eval path="$path"
55890      if test ! -f "$path" && test ! -d "$path"; then
55891        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55892      fi
55893
55894      if test -d "$path"; then
55895        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55896      else
55897        dir="`$DIRNAME "$path"`"
55898        base="`$BASENAME "$path"`"
55899        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55900      fi
55901    fi
55902  fi
55903
55904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55905$as_echo_n "checking for $DLL_NAME... " >&6; }
55906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55907$as_echo "$MSVC_DLL" >&6; }
55908    else
55909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55910$as_echo "incorrect, ignoring" >&6; }
55911      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55912$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55913    fi
55914  fi
55915
55916    fi
55917  fi
55918
55919  if test "x$MSVC_DLL" = x; then
55920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55921$as_echo_n "checking for $DLL_NAME... " >&6; }
55922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55923$as_echo "no" >&6; }
55924    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55925  fi
55926
55927      MSVCP_DLL="$MSVC_DLL"
55928    fi
55929
55930  fi
55931
55932  fi
55933
55934
55935  if test "x$NEEDS_LIB_X11" = xfalse; then
55936    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55937      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55938$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55939    fi
55940    X_CFLAGS=
55941    X_LIBS=
55942  else
55943
55944    if test "x${with_x}" = xno; then
55945      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55946    fi
55947
55948    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55949      # The user has specified a X11 base directory. Use it for includes and
55950      # libraries, unless explicitly overridden.
55951      if test "x$x_includes" = xNONE; then
55952        x_includes="${with_x}/include"
55953      fi
55954      if test "x$x_libraries" = xNONE; then
55955        x_libraries="${with_x}/lib"
55956      fi
55957    else
55958      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55959      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55960      # --x-libraries for the sysroot, if that seems to be correct.
55961      if test "x$SYSROOT" != "x"; then
55962        if test "x$x_includes" = xNONE; then
55963          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55964            x_includes="$SYSROOT/usr/X11R6/include"
55965          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55966            x_includes="$SYSROOT/usr/include"
55967          fi
55968        fi
55969        if test "x$x_libraries" = xNONE; then
55970          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55971            x_libraries="$SYSROOT/usr/X11R6/lib"
55972          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55973            x_libraries="$SYSROOT/usr/lib64"
55974          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55975            x_libraries="$SYSROOT/usr/lib"
55976          fi
55977        fi
55978      fi
55979    fi
55980
55981    # Now let autoconf do it's magic
55982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55983$as_echo_n "checking for X... " >&6; }
55984
55985
55986# Check whether --with-x was given.
55987if test "${with_x+set}" = set; then :
55988  withval=$with_x;
55989fi
55990
55991# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55992if test "x$with_x" = xno; then
55993  # The user explicitly disabled X.
55994  have_x=disabled
55995else
55996  case $x_includes,$x_libraries in #(
55997    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55998    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55999  $as_echo_n "(cached) " >&6
56000else
56001  # One or both of the vars are not set, and there is no cached value.
56002ac_x_includes=no ac_x_libraries=no
56003rm -f -r conftest.dir
56004if mkdir conftest.dir; then
56005  cd conftest.dir
56006  cat >Imakefile <<'_ACEOF'
56007incroot:
56008	@echo incroot='${INCROOT}'
56009usrlibdir:
56010	@echo usrlibdir='${USRLIBDIR}'
56011libdir:
56012	@echo libdir='${LIBDIR}'
56013_ACEOF
56014  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56015    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56016    for ac_var in incroot usrlibdir libdir; do
56017      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56018    done
56019    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56020    for ac_extension in a so sl dylib la dll; do
56021      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56022	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56023	ac_im_usrlibdir=$ac_im_libdir; break
56024      fi
56025    done
56026    # Screen out bogus values from the imake configuration.  They are
56027    # bogus both because they are the default anyway, and because
56028    # using them would break gcc on systems where it needs fixed includes.
56029    case $ac_im_incroot in
56030	/usr/include) ac_x_includes= ;;
56031	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56032    esac
56033    case $ac_im_usrlibdir in
56034	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56035	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56036    esac
56037  fi
56038  cd ..
56039  rm -f -r conftest.dir
56040fi
56041
56042# Standard set of common directories for X headers.
56043# Check X11 before X11Rn because it is often a symlink to the current release.
56044ac_x_header_dirs='
56045/usr/X11/include
56046/usr/X11R7/include
56047/usr/X11R6/include
56048/usr/X11R5/include
56049/usr/X11R4/include
56050
56051/usr/include/X11
56052/usr/include/X11R7
56053/usr/include/X11R6
56054/usr/include/X11R5
56055/usr/include/X11R4
56056
56057/usr/local/X11/include
56058/usr/local/X11R7/include
56059/usr/local/X11R6/include
56060/usr/local/X11R5/include
56061/usr/local/X11R4/include
56062
56063/usr/local/include/X11
56064/usr/local/include/X11R7
56065/usr/local/include/X11R6
56066/usr/local/include/X11R5
56067/usr/local/include/X11R4
56068
56069/usr/X386/include
56070/usr/x386/include
56071/usr/XFree86/include/X11
56072
56073/usr/include
56074/usr/local/include
56075/usr/unsupported/include
56076/usr/athena/include
56077/usr/local/x11r5/include
56078/usr/lpp/Xamples/include
56079
56080/usr/openwin/include
56081/usr/openwin/share/include'
56082
56083if test "$ac_x_includes" = no; then
56084  # Guess where to find include files, by looking for Xlib.h.
56085  # First, try using that file with no special directory specified.
56086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56087/* end confdefs.h.  */
56088#include <X11/Xlib.h>
56089_ACEOF
56090if ac_fn_cxx_try_cpp "$LINENO"; then :
56091  # We can compile using X headers with no special include directory.
56092ac_x_includes=
56093else
56094  for ac_dir in $ac_x_header_dirs; do
56095  if test -r "$ac_dir/X11/Xlib.h"; then
56096    ac_x_includes=$ac_dir
56097    break
56098  fi
56099done
56100fi
56101rm -f conftest.err conftest.i conftest.$ac_ext
56102fi # $ac_x_includes = no
56103
56104if test "$ac_x_libraries" = no; then
56105  # Check for the libraries.
56106  # See if we find them without any special options.
56107  # Don't add to $LIBS permanently.
56108  ac_save_LIBS=$LIBS
56109  LIBS="-lX11 $LIBS"
56110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56111/* end confdefs.h.  */
56112#include <X11/Xlib.h>
56113int
56114main ()
56115{
56116XrmInitialize ()
56117  ;
56118  return 0;
56119}
56120_ACEOF
56121if ac_fn_cxx_try_link "$LINENO"; then :
56122  LIBS=$ac_save_LIBS
56123# We can link X programs with no special library path.
56124ac_x_libraries=
56125else
56126  LIBS=$ac_save_LIBS
56127for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56128do
56129  # Don't even attempt the hair of trying to link an X program!
56130  for ac_extension in a so sl dylib la dll; do
56131    if test -r "$ac_dir/libX11.$ac_extension"; then
56132      ac_x_libraries=$ac_dir
56133      break 2
56134    fi
56135  done
56136done
56137fi
56138rm -f core conftest.err conftest.$ac_objext \
56139    conftest$ac_exeext conftest.$ac_ext
56140fi # $ac_x_libraries = no
56141
56142case $ac_x_includes,$ac_x_libraries in #(
56143  no,* | *,no | *\'*)
56144    # Didn't find X, or a directory has "'" in its name.
56145    ac_cv_have_x="have_x=no";; #(
56146  *)
56147    # Record where we found X for the cache.
56148    ac_cv_have_x="have_x=yes\
56149	ac_x_includes='$ac_x_includes'\
56150	ac_x_libraries='$ac_x_libraries'"
56151esac
56152fi
56153;; #(
56154    *) have_x=yes;;
56155  esac
56156  eval "$ac_cv_have_x"
56157fi # $with_x != no
56158
56159if test "$have_x" != yes; then
56160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56161$as_echo "$have_x" >&6; }
56162  no_x=yes
56163else
56164  # If each of the values was on the command line, it overrides each guess.
56165  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56166  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56167  # Update the cache value to reflect the command line values.
56168  ac_cv_have_x="have_x=yes\
56169	ac_x_includes='$x_includes'\
56170	ac_x_libraries='$x_libraries'"
56171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56172$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56173fi
56174
56175    if test "$no_x" = yes; then
56176  # Not all programs may use this symbol, but it does not hurt to define it.
56177
56178$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56179
56180  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56181else
56182  if test -n "$x_includes"; then
56183    X_CFLAGS="$X_CFLAGS -I$x_includes"
56184  fi
56185
56186  # It would also be nice to do this for all -L options, not just this one.
56187  if test -n "$x_libraries"; then
56188    X_LIBS="$X_LIBS -L$x_libraries"
56189    # For Solaris; some versions of Sun CC require a space after -R and
56190    # others require no space.  Words are not sufficient . . . .
56191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56192$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56193    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56194    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56195    ac_cxx_werror_flag=yes
56196    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56197/* end confdefs.h.  */
56198
56199int
56200main ()
56201{
56202
56203  ;
56204  return 0;
56205}
56206_ACEOF
56207if ac_fn_cxx_try_link "$LINENO"; then :
56208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56209$as_echo "no" >&6; }
56210       X_LIBS="$X_LIBS -R$x_libraries"
56211else
56212  LIBS="$ac_xsave_LIBS -R $x_libraries"
56213       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56214/* end confdefs.h.  */
56215
56216int
56217main ()
56218{
56219
56220  ;
56221  return 0;
56222}
56223_ACEOF
56224if ac_fn_cxx_try_link "$LINENO"; then :
56225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56226$as_echo "yes" >&6; }
56227	  X_LIBS="$X_LIBS -R $x_libraries"
56228else
56229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56230$as_echo "neither works" >&6; }
56231fi
56232rm -f core conftest.err conftest.$ac_objext \
56233    conftest$ac_exeext conftest.$ac_ext
56234fi
56235rm -f core conftest.err conftest.$ac_objext \
56236    conftest$ac_exeext conftest.$ac_ext
56237    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56238    LIBS=$ac_xsave_LIBS
56239  fi
56240
56241  # Check for system-dependent libraries X programs must link with.
56242  # Do this before checking for the system-independent R6 libraries
56243  # (-lICE), since we may need -lsocket or whatever for X linking.
56244
56245  if test "$ISC" = yes; then
56246    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56247  else
56248    # Martyn Johnson says this is needed for Ultrix, if the X
56249    # libraries were built with DECnet support.  And Karl Berry says
56250    # the Alpha needs dnet_stub (dnet does not exist).
56251    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56252    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56253/* end confdefs.h.  */
56254
56255/* Override any GCC internal prototype to avoid an error.
56256   Use char because int might match the return type of a GCC
56257   builtin and then its argument prototype would still apply.  */
56258#ifdef __cplusplus
56259extern "C"
56260#endif
56261char XOpenDisplay ();
56262int
56263main ()
56264{
56265return XOpenDisplay ();
56266  ;
56267  return 0;
56268}
56269_ACEOF
56270if ac_fn_cxx_try_link "$LINENO"; then :
56271
56272else
56273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56274$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56275if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56276  $as_echo_n "(cached) " >&6
56277else
56278  ac_check_lib_save_LIBS=$LIBS
56279LIBS="-ldnet  $LIBS"
56280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56281/* end confdefs.h.  */
56282
56283/* Override any GCC internal prototype to avoid an error.
56284   Use char because int might match the return type of a GCC
56285   builtin and then its argument prototype would still apply.  */
56286#ifdef __cplusplus
56287extern "C"
56288#endif
56289char dnet_ntoa ();
56290int
56291main ()
56292{
56293return dnet_ntoa ();
56294  ;
56295  return 0;
56296}
56297_ACEOF
56298if ac_fn_cxx_try_link "$LINENO"; then :
56299  ac_cv_lib_dnet_dnet_ntoa=yes
56300else
56301  ac_cv_lib_dnet_dnet_ntoa=no
56302fi
56303rm -f core conftest.err conftest.$ac_objext \
56304    conftest$ac_exeext conftest.$ac_ext
56305LIBS=$ac_check_lib_save_LIBS
56306fi
56307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56308$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56309if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56310  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56311fi
56312
56313    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56315$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56316if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56317  $as_echo_n "(cached) " >&6
56318else
56319  ac_check_lib_save_LIBS=$LIBS
56320LIBS="-ldnet_stub  $LIBS"
56321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56322/* end confdefs.h.  */
56323
56324/* Override any GCC internal prototype to avoid an error.
56325   Use char because int might match the return type of a GCC
56326   builtin and then its argument prototype would still apply.  */
56327#ifdef __cplusplus
56328extern "C"
56329#endif
56330char dnet_ntoa ();
56331int
56332main ()
56333{
56334return dnet_ntoa ();
56335  ;
56336  return 0;
56337}
56338_ACEOF
56339if ac_fn_cxx_try_link "$LINENO"; then :
56340  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56341else
56342  ac_cv_lib_dnet_stub_dnet_ntoa=no
56343fi
56344rm -f core conftest.err conftest.$ac_objext \
56345    conftest$ac_exeext conftest.$ac_ext
56346LIBS=$ac_check_lib_save_LIBS
56347fi
56348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56349$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56350if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56351  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56352fi
56353
56354    fi
56355fi
56356rm -f core conftest.err conftest.$ac_objext \
56357    conftest$ac_exeext conftest.$ac_ext
56358    LIBS="$ac_xsave_LIBS"
56359
56360    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56361    # to get the SysV transport functions.
56362    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56363    # needs -lnsl.
56364    # The nsl library prevents programs from opening the X display
56365    # on Irix 5.2, according to T.E. Dickey.
56366    # The functions gethostbyname, getservbyname, and inet_addr are
56367    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56368    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56369if test "x$ac_cv_func_gethostbyname" = xyes; then :
56370
56371fi
56372
56373    if test $ac_cv_func_gethostbyname = no; then
56374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56375$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56376if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56377  $as_echo_n "(cached) " >&6
56378else
56379  ac_check_lib_save_LIBS=$LIBS
56380LIBS="-lnsl  $LIBS"
56381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56382/* end confdefs.h.  */
56383
56384/* Override any GCC internal prototype to avoid an error.
56385   Use char because int might match the return type of a GCC
56386   builtin and then its argument prototype would still apply.  */
56387#ifdef __cplusplus
56388extern "C"
56389#endif
56390char gethostbyname ();
56391int
56392main ()
56393{
56394return gethostbyname ();
56395  ;
56396  return 0;
56397}
56398_ACEOF
56399if ac_fn_cxx_try_link "$LINENO"; then :
56400  ac_cv_lib_nsl_gethostbyname=yes
56401else
56402  ac_cv_lib_nsl_gethostbyname=no
56403fi
56404rm -f core conftest.err conftest.$ac_objext \
56405    conftest$ac_exeext conftest.$ac_ext
56406LIBS=$ac_check_lib_save_LIBS
56407fi
56408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56409$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56410if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56411  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56412fi
56413
56414      if test $ac_cv_lib_nsl_gethostbyname = no; then
56415	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56416$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56417if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56418  $as_echo_n "(cached) " >&6
56419else
56420  ac_check_lib_save_LIBS=$LIBS
56421LIBS="-lbsd  $LIBS"
56422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56423/* end confdefs.h.  */
56424
56425/* Override any GCC internal prototype to avoid an error.
56426   Use char because int might match the return type of a GCC
56427   builtin and then its argument prototype would still apply.  */
56428#ifdef __cplusplus
56429extern "C"
56430#endif
56431char gethostbyname ();
56432int
56433main ()
56434{
56435return gethostbyname ();
56436  ;
56437  return 0;
56438}
56439_ACEOF
56440if ac_fn_cxx_try_link "$LINENO"; then :
56441  ac_cv_lib_bsd_gethostbyname=yes
56442else
56443  ac_cv_lib_bsd_gethostbyname=no
56444fi
56445rm -f core conftest.err conftest.$ac_objext \
56446    conftest$ac_exeext conftest.$ac_ext
56447LIBS=$ac_check_lib_save_LIBS
56448fi
56449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56450$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56451if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56452  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56453fi
56454
56455      fi
56456    fi
56457
56458    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56459    # socket/setsockopt and other routines are undefined under SCO ODT
56460    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56461    # on later versions), says Simon Leinen: it contains gethostby*
56462    # variants that don't use the name server (or something).  -lsocket
56463    # must be given before -lnsl if both are needed.  We assume that
56464    # if connect needs -lnsl, so does gethostbyname.
56465    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56466if test "x$ac_cv_func_connect" = xyes; then :
56467
56468fi
56469
56470    if test $ac_cv_func_connect = no; then
56471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56472$as_echo_n "checking for connect in -lsocket... " >&6; }
56473if ${ac_cv_lib_socket_connect+:} false; then :
56474  $as_echo_n "(cached) " >&6
56475else
56476  ac_check_lib_save_LIBS=$LIBS
56477LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56479/* end confdefs.h.  */
56480
56481/* Override any GCC internal prototype to avoid an error.
56482   Use char because int might match the return type of a GCC
56483   builtin and then its argument prototype would still apply.  */
56484#ifdef __cplusplus
56485extern "C"
56486#endif
56487char connect ();
56488int
56489main ()
56490{
56491return connect ();
56492  ;
56493  return 0;
56494}
56495_ACEOF
56496if ac_fn_cxx_try_link "$LINENO"; then :
56497  ac_cv_lib_socket_connect=yes
56498else
56499  ac_cv_lib_socket_connect=no
56500fi
56501rm -f core conftest.err conftest.$ac_objext \
56502    conftest$ac_exeext conftest.$ac_ext
56503LIBS=$ac_check_lib_save_LIBS
56504fi
56505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56506$as_echo "$ac_cv_lib_socket_connect" >&6; }
56507if test "x$ac_cv_lib_socket_connect" = xyes; then :
56508  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56509fi
56510
56511    fi
56512
56513    # Guillermo Gomez says -lposix is necessary on A/UX.
56514    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56515if test "x$ac_cv_func_remove" = xyes; then :
56516
56517fi
56518
56519    if test $ac_cv_func_remove = no; then
56520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56521$as_echo_n "checking for remove in -lposix... " >&6; }
56522if ${ac_cv_lib_posix_remove+:} false; then :
56523  $as_echo_n "(cached) " >&6
56524else
56525  ac_check_lib_save_LIBS=$LIBS
56526LIBS="-lposix  $LIBS"
56527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56528/* end confdefs.h.  */
56529
56530/* Override any GCC internal prototype to avoid an error.
56531   Use char because int might match the return type of a GCC
56532   builtin and then its argument prototype would still apply.  */
56533#ifdef __cplusplus
56534extern "C"
56535#endif
56536char remove ();
56537int
56538main ()
56539{
56540return remove ();
56541  ;
56542  return 0;
56543}
56544_ACEOF
56545if ac_fn_cxx_try_link "$LINENO"; then :
56546  ac_cv_lib_posix_remove=yes
56547else
56548  ac_cv_lib_posix_remove=no
56549fi
56550rm -f core conftest.err conftest.$ac_objext \
56551    conftest$ac_exeext conftest.$ac_ext
56552LIBS=$ac_check_lib_save_LIBS
56553fi
56554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56555$as_echo "$ac_cv_lib_posix_remove" >&6; }
56556if test "x$ac_cv_lib_posix_remove" = xyes; then :
56557  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56558fi
56559
56560    fi
56561
56562    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56563    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56564if test "x$ac_cv_func_shmat" = xyes; then :
56565
56566fi
56567
56568    if test $ac_cv_func_shmat = no; then
56569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56570$as_echo_n "checking for shmat in -lipc... " >&6; }
56571if ${ac_cv_lib_ipc_shmat+:} false; then :
56572  $as_echo_n "(cached) " >&6
56573else
56574  ac_check_lib_save_LIBS=$LIBS
56575LIBS="-lipc  $LIBS"
56576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56577/* end confdefs.h.  */
56578
56579/* Override any GCC internal prototype to avoid an error.
56580   Use char because int might match the return type of a GCC
56581   builtin and then its argument prototype would still apply.  */
56582#ifdef __cplusplus
56583extern "C"
56584#endif
56585char shmat ();
56586int
56587main ()
56588{
56589return shmat ();
56590  ;
56591  return 0;
56592}
56593_ACEOF
56594if ac_fn_cxx_try_link "$LINENO"; then :
56595  ac_cv_lib_ipc_shmat=yes
56596else
56597  ac_cv_lib_ipc_shmat=no
56598fi
56599rm -f core conftest.err conftest.$ac_objext \
56600    conftest$ac_exeext conftest.$ac_ext
56601LIBS=$ac_check_lib_save_LIBS
56602fi
56603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56604$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56605if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56606  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56607fi
56608
56609    fi
56610  fi
56611
56612  # Check for libraries that X11R6 Xt/Xaw programs need.
56613  ac_save_LDFLAGS=$LDFLAGS
56614  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56615  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56616  # check for ICE first), but we must link in the order -lSM -lICE or
56617  # we get undefined symbols.  So assume we have SM if we have ICE.
56618  # These have to be linked with before -lX11, unlike the other
56619  # libraries we check for below, so use a different variable.
56620  # John Interrante, Karl Berry
56621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56622$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56623if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56624  $as_echo_n "(cached) " >&6
56625else
56626  ac_check_lib_save_LIBS=$LIBS
56627LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56629/* end confdefs.h.  */
56630
56631/* Override any GCC internal prototype to avoid an error.
56632   Use char because int might match the return type of a GCC
56633   builtin and then its argument prototype would still apply.  */
56634#ifdef __cplusplus
56635extern "C"
56636#endif
56637char IceConnectionNumber ();
56638int
56639main ()
56640{
56641return IceConnectionNumber ();
56642  ;
56643  return 0;
56644}
56645_ACEOF
56646if ac_fn_cxx_try_link "$LINENO"; then :
56647  ac_cv_lib_ICE_IceConnectionNumber=yes
56648else
56649  ac_cv_lib_ICE_IceConnectionNumber=no
56650fi
56651rm -f core conftest.err conftest.$ac_objext \
56652    conftest$ac_exeext conftest.$ac_ext
56653LIBS=$ac_check_lib_save_LIBS
56654fi
56655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56656$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56657if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56658  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56659fi
56660
56661  LDFLAGS=$ac_save_LDFLAGS
56662
56663fi
56664
56665
56666    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56667    # this doesn't make sense so we remove it.
56668    if test "x$COMPILE_TYPE" = xcross; then
56669      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56670    fi
56671
56672    if test "x$no_x" = xyes; then
56673
56674  # Print a helpful message on how to acquire the necessary build dependency.
56675  # x11 is the help tag: freetype, cups, alsa etc
56676  MISSING_DEPENDENCY=x11
56677
56678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56679    cygwin_help $MISSING_DEPENDENCY
56680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56681    msys_help $MISSING_DEPENDENCY
56682  else
56683    PKGHANDLER_COMMAND=
56684
56685    case $PKGHANDLER in
56686      apt-get)
56687        apt_help     $MISSING_DEPENDENCY ;;
56688      yum)
56689        yum_help     $MISSING_DEPENDENCY ;;
56690      port)
56691        port_help    $MISSING_DEPENDENCY ;;
56692      pkgutil)
56693        pkgutil_help $MISSING_DEPENDENCY ;;
56694      pkgadd)
56695        pkgadd_help  $MISSING_DEPENDENCY ;;
56696    esac
56697
56698    if test "x$PKGHANDLER_COMMAND" != x; then
56699      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56700    fi
56701  fi
56702
56703      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56704    fi
56705
56706    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56707      OPENWIN_HOME="/usr/openwin"
56708      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56709      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56710          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56711    fi
56712
56713    ac_ext=c
56714ac_cpp='$CPP $CPPFLAGS'
56715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56717ac_compiler_gnu=$ac_cv_c_compiler_gnu
56718
56719    OLD_CFLAGS="$CFLAGS"
56720    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56721
56722    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56723    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56724do :
56725  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56726ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56727          # include <X11/Xlib.h>
56728          # include <X11/Xutil.h>
56729
56730
56731"
56732if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56733  cat >>confdefs.h <<_ACEOF
56734#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56735_ACEOF
56736 X11_HEADERS_OK=yes
56737else
56738  X11_HEADERS_OK=no; break
56739fi
56740
56741done
56742
56743
56744    if test "x$X11_HEADERS_OK" = xno; then
56745
56746  # Print a helpful message on how to acquire the necessary build dependency.
56747  # x11 is the help tag: freetype, cups, alsa etc
56748  MISSING_DEPENDENCY=x11
56749
56750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56751    cygwin_help $MISSING_DEPENDENCY
56752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56753    msys_help $MISSING_DEPENDENCY
56754  else
56755    PKGHANDLER_COMMAND=
56756
56757    case $PKGHANDLER in
56758      apt-get)
56759        apt_help     $MISSING_DEPENDENCY ;;
56760      yum)
56761        yum_help     $MISSING_DEPENDENCY ;;
56762      port)
56763        port_help    $MISSING_DEPENDENCY ;;
56764      pkgutil)
56765        pkgutil_help $MISSING_DEPENDENCY ;;
56766      pkgadd)
56767        pkgadd_help  $MISSING_DEPENDENCY ;;
56768    esac
56769
56770    if test "x$PKGHANDLER_COMMAND" != x; then
56771      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56772    fi
56773  fi
56774
56775      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56776    fi
56777
56778    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56779    # defined in libawt_xawt.
56780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56781$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56782    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56783/* end confdefs.h.  */
56784#include <X11/extensions/Xrender.h>
56785int
56786main ()
56787{
56788XLinearGradient x;
56789  ;
56790  return 0;
56791}
56792_ACEOF
56793if ac_fn_c_try_compile "$LINENO"; then :
56794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56795$as_echo "yes" >&6; }
56796else
56797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56798$as_echo "no" >&6; }
56799         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56800fi
56801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56802
56803    CFLAGS="$OLD_CFLAGS"
56804    ac_ext=cpp
56805ac_cpp='$CXXCPP $CPPFLAGS'
56806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56809
56810  fi # NEEDS_LIB_X11
56811
56812
56813
56814
56815
56816
56817# Check whether --with-cups was given.
56818if test "${with_cups+set}" = set; then :
56819  withval=$with_cups;
56820fi
56821
56822
56823# Check whether --with-cups-include was given.
56824if test "${with_cups_include+set}" = set; then :
56825  withval=$with_cups_include;
56826fi
56827
56828
56829  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56830    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56831        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56832      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56833$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56834    fi
56835    CUPS_CFLAGS=
56836  else
56837    CUPS_FOUND=no
56838
56839    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56840      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56841    fi
56842
56843    if test "x${with_cups}" != x; then
56844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56845$as_echo_n "checking for cups headers... " >&6; }
56846      if test -s "${with_cups}/include/cups/cups.h"; then
56847        CUPS_CFLAGS="-I${with_cups}/include"
56848        CUPS_FOUND=yes
56849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56850$as_echo "$CUPS_FOUND" >&6; }
56851      else
56852        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56853      fi
56854    fi
56855    if test "x${with_cups_include}" != x; then
56856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56857$as_echo_n "checking for cups headers... " >&6; }
56858      if test -s "${with_cups_include}/cups/cups.h"; then
56859        CUPS_CFLAGS="-I${with_cups_include}"
56860        CUPS_FOUND=yes
56861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56862$as_echo "$CUPS_FOUND" >&6; }
56863      else
56864        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56865      fi
56866    fi
56867    if test "x$CUPS_FOUND" = xno; then
56868      # Are the cups headers installed in the default /usr/include location?
56869      for ac_header in cups/cups.h cups/ppd.h
56870do :
56871  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56872ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56873if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56874  cat >>confdefs.h <<_ACEOF
56875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56876_ACEOF
56877
56878          CUPS_FOUND=yes
56879          CUPS_CFLAGS=
56880          DEFAULT_CUPS=yes
56881
56882fi
56883
56884done
56885
56886    fi
56887    if test "x$CUPS_FOUND" = xno; then
56888
56889  # Print a helpful message on how to acquire the necessary build dependency.
56890  # cups is the help tag: freetype, cups, alsa etc
56891  MISSING_DEPENDENCY=cups
56892
56893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56894    cygwin_help $MISSING_DEPENDENCY
56895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56896    msys_help $MISSING_DEPENDENCY
56897  else
56898    PKGHANDLER_COMMAND=
56899
56900    case $PKGHANDLER in
56901      apt-get)
56902        apt_help     $MISSING_DEPENDENCY ;;
56903      yum)
56904        yum_help     $MISSING_DEPENDENCY ;;
56905      port)
56906        port_help    $MISSING_DEPENDENCY ;;
56907      pkgutil)
56908        pkgutil_help $MISSING_DEPENDENCY ;;
56909      pkgadd)
56910        pkgadd_help  $MISSING_DEPENDENCY ;;
56911    esac
56912
56913    if test "x$PKGHANDLER_COMMAND" != x; then
56914      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56915    fi
56916  fi
56917
56918      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56919    fi
56920  fi
56921
56922
56923
56924
56925
56926# Check whether --with-freetype was given.
56927if test "${with_freetype+set}" = set; then :
56928  withval=$with_freetype;
56929fi
56930
56931
56932# Check whether --with-freetype-include was given.
56933if test "${with_freetype_include+set}" = set; then :
56934  withval=$with_freetype_include;
56935fi
56936
56937
56938# Check whether --with-freetype-lib was given.
56939if test "${with_freetype_lib+set}" = set; then :
56940  withval=$with_freetype_lib;
56941fi
56942
56943
56944# Check whether --with-freetype-src was given.
56945if test "${with_freetype_src+set}" = set; then :
56946  withval=$with_freetype_src;
56947fi
56948
56949  # Check whether --enable-freetype-bundling was given.
56950if test "${enable_freetype_bundling+set}" = set; then :
56951  enableval=$enable_freetype_bundling;
56952fi
56953
56954
56955  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56956  FREETYPE_BASE_NAME=freetype
56957  FREETYPE_CFLAGS=
56958  FREETYPE_LIBS=
56959  FREETYPE_BUNDLE_LIB_PATH=
56960
56961  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56962    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56963        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56964        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56965        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56966      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56967$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56968    fi
56969    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56970      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56971$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56972    fi
56973  else
56974    # freetype is needed to build; go get it!
56975
56976    BUNDLE_FREETYPE="$enable_freetype_bundling"
56977
56978    if  test "x$with_freetype_src" != x; then
56979      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56980        # Try to build freetype if --with-freetype-src was given on Windows
56981
56982  FREETYPE_SRC_PATH="$with_freetype_src"
56983  BUILD_FREETYPE=yes
56984
56985  # Check if the freetype sources are acessible..
56986  if ! test -d $FREETYPE_SRC_PATH; then
56987    { $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
56988$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56989    BUILD_FREETYPE=no
56990  fi
56991  # ..and contain a vc2010 project file
56992  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56993  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56994    { $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
56995$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56996    BUILD_FREETYPE=no
56997  fi
56998  # Now check if configure found a version of 'msbuild.exe'
56999  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57000    { $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
57001$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;}
57002    BUILD_FREETYPE=no
57003  fi
57004
57005  # Ready to go..
57006  if test "x$BUILD_FREETYPE" = xyes; then
57007    # msbuild requires trailing slashes for output directories
57008    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57009    freetype_lib_path_unix="$freetype_lib_path"
57010    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57011
57012  unix_path="$vcxproj_path"
57013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57014    windows_path=`$CYGPATH -m "$unix_path"`
57015    vcxproj_path="$windows_path"
57016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57017    windows_path=`cmd //c echo $unix_path`
57018    vcxproj_path="$windows_path"
57019  fi
57020
57021
57022  unix_path="$freetype_lib_path"
57023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57024    windows_path=`$CYGPATH -m "$unix_path"`
57025    freetype_lib_path="$windows_path"
57026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57027    windows_path=`cmd //c echo $unix_path`
57028    freetype_lib_path="$windows_path"
57029  fi
57030
57031
57032  unix_path="$freetype_obj_path"
57033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57034    windows_path=`$CYGPATH -m "$unix_path"`
57035    freetype_obj_path="$windows_path"
57036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57037    windows_path=`cmd //c echo $unix_path`
57038    freetype_obj_path="$windows_path"
57039  fi
57040
57041    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57042      freetype_platform=x64
57043    else
57044      freetype_platform=win32
57045    fi
57046
57047    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57048    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57049    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57050    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57051    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57052$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57053
57054    # First we try to build the freetype.dll
57055    $ECHO -e "@echo off\n"\
57056        "$MSBUILD $vcxproj_path "\
57057        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57058        "/p:Configuration=\"Release Multithreaded\" "\
57059        "/p:Platform=$freetype_platform "\
57060        "/p:ConfigurationType=DynamicLibrary "\
57061        "/p:TargetName=freetype "\
57062        "/p:OutDir=\"$freetype_lib_path\" "\
57063        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57064    cmd /c freetype.bat
57065
57066    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57067      # If that succeeds we also build freetype.lib
57068      $ECHO -e "@echo off\n"\
57069          "$MSBUILD $vcxproj_path "\
57070          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57071          "/p:Configuration=\"Release Multithreaded\" "\
57072          "/p:Platform=$freetype_platform "\
57073          "/p:ConfigurationType=StaticLibrary "\
57074          "/p:TargetName=freetype "\
57075          "/p:OutDir=\"$freetype_lib_path\" "\
57076          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57077      cmd /c freetype.bat
57078
57079      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57080        # Once we build both, lib and dll, set freetype lib and include path appropriately
57081        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57082        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57083        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57084$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57085      else
57086        BUILD_FREETYPE=no
57087      fi
57088    else
57089      BUILD_FREETYPE=no
57090    fi
57091  fi
57092
57093        if test "x$BUILD_FREETYPE" = xyes; then
57094          # Okay, we built it. Check that it works.
57095
57096  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57097  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57098  METHOD="--with-freetype-src"
57099
57100  # Let's start with an optimistic view of the world :-)
57101  FOUND_FREETYPE=yes
57102
57103  # First look for the canonical freetype main include file ft2build.h.
57104  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57105    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57106    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57107    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57108      # Fail.
57109      FOUND_FREETYPE=no
57110    fi
57111  fi
57112
57113  if test "x$FOUND_FREETYPE" = xyes; then
57114    # Include file found, let's continue the sanity check.
57115    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57116$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57117
57118    # Reset to default value
57119    FREETYPE_BASE_NAME=freetype
57120    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57121    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57122      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57123          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57124        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57125        # for the .6 version explicitly.
57126        FREETYPE_BASE_NAME=freetype.6
57127        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57128        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57129$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57130      else
57131        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57132$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57133        FOUND_FREETYPE=no
57134      fi
57135    else
57136      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57137        # On Windows, we will need both .lib and .dll file.
57138        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57139          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57140$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57141          FOUND_FREETYPE=no
57142        fi
57143      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57144          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57145        # Found lib in isa dir, use that instead.
57146        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57147        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57148$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57149      fi
57150    fi
57151  fi
57152
57153  if test "x$FOUND_FREETYPE" = xyes; then
57154
57155  # Only process if variable expands to non-empty
57156
57157  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57159
57160  # Input might be given as Windows format, start by converting to
57161  # unix format.
57162  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57163  new_path=`$CYGPATH -u "$path"`
57164
57165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57168  # "foo.exe" is OK but "foo" is an error.
57169  #
57170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57171  # It is also a way to make sure we got the proper file name for the real test later on.
57172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57173  if test "x$test_shortpath" = x; then
57174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57175$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57176    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57177  fi
57178
57179  # Call helper function which possibly converts this using DOS-style short mode.
57180  # If so, the updated path is stored in $new_path.
57181
57182  input_path="$new_path"
57183  # Check if we need to convert this using DOS-style short mode. If the path
57184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57185  # take no chances and rewrite it.
57186  # Note: m4 eats our [], so we need to use [ and ] instead.
57187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57188  if test "x$has_forbidden_chars" != x; then
57189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57193      # Going to short mode and back again did indeed matter. Since short mode is
57194      # case insensitive, let's make it lowercase to improve readability.
57195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57196      # Now convert it back to Unix-style (cygpath)
57197      input_path=`$CYGPATH -u "$shortmode_path"`
57198      new_path="$input_path"
57199    fi
57200  fi
57201
57202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57203  if test "x$test_cygdrive_prefix" = x; then
57204    # As a simple fix, exclude /usr/bin since it's not a real path.
57205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57207      # a path prefixed by /cygdrive for fixpath to work.
57208      new_path="$CYGWIN_ROOT_PATH$input_path"
57209    fi
57210  fi
57211
57212
57213  if test "x$path" != "x$new_path"; then
57214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57217  fi
57218
57219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57220
57221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57222  has_colon=`$ECHO $path | $GREP ^.:`
57223  new_path="$path"
57224  if test "x$has_colon" = x; then
57225    # Not in mixed or Windows style, start by that.
57226    new_path=`cmd //c echo $path`
57227  fi
57228
57229
57230  input_path="$new_path"
57231  # Check if we need to convert this using DOS-style short mode. If the path
57232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57233  # take no chances and rewrite it.
57234  # Note: m4 eats our [], so we need to use [ and ] instead.
57235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57236  if test "x$has_forbidden_chars" != x; then
57237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57239  fi
57240
57241
57242  windows_path="$new_path"
57243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57244    unix_path=`$CYGPATH -u "$windows_path"`
57245    new_path="$unix_path"
57246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57248    new_path="$unix_path"
57249  fi
57250
57251  if test "x$path" != "x$new_path"; then
57252    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57255  fi
57256
57257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57259
57260    else
57261      # We're on a unix platform. Hooray! :)
57262      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57263      has_space=`$ECHO "$path" | $GREP " "`
57264      if test "x$has_space" != x; then
57265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57267        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57268      fi
57269
57270      # Use eval to expand a potential ~
57271      eval path="$path"
57272      if test ! -f "$path" && test ! -d "$path"; then
57273        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57274      fi
57275
57276      if test -d "$path"; then
57277        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57278      else
57279        dir="`$DIRNAME "$path"`"
57280        base="`$BASENAME "$path"`"
57281        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57282      fi
57283    fi
57284  fi
57285
57286
57287  # Only process if variable expands to non-empty
57288
57289  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57291
57292  # Input might be given as Windows format, start by converting to
57293  # unix format.
57294  path="$POTENTIAL_FREETYPE_LIB_PATH"
57295  new_path=`$CYGPATH -u "$path"`
57296
57297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57300  # "foo.exe" is OK but "foo" is an error.
57301  #
57302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57303  # It is also a way to make sure we got the proper file name for the real test later on.
57304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57305  if test "x$test_shortpath" = x; then
57306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57308    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57309  fi
57310
57311  # Call helper function which possibly converts this using DOS-style short mode.
57312  # If so, the updated path is stored in $new_path.
57313
57314  input_path="$new_path"
57315  # Check if we need to convert this using DOS-style short mode. If the path
57316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57317  # take no chances and rewrite it.
57318  # Note: m4 eats our [], so we need to use [ and ] instead.
57319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57320  if test "x$has_forbidden_chars" != x; then
57321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57325      # Going to short mode and back again did indeed matter. Since short mode is
57326      # case insensitive, let's make it lowercase to improve readability.
57327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57328      # Now convert it back to Unix-style (cygpath)
57329      input_path=`$CYGPATH -u "$shortmode_path"`
57330      new_path="$input_path"
57331    fi
57332  fi
57333
57334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57335  if test "x$test_cygdrive_prefix" = x; then
57336    # As a simple fix, exclude /usr/bin since it's not a real path.
57337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57339      # a path prefixed by /cygdrive for fixpath to work.
57340      new_path="$CYGWIN_ROOT_PATH$input_path"
57341    fi
57342  fi
57343
57344
57345  if test "x$path" != "x$new_path"; then
57346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57349  fi
57350
57351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57352
57353  path="$POTENTIAL_FREETYPE_LIB_PATH"
57354  has_colon=`$ECHO $path | $GREP ^.:`
57355  new_path="$path"
57356  if test "x$has_colon" = x; then
57357    # Not in mixed or Windows style, start by that.
57358    new_path=`cmd //c echo $path`
57359  fi
57360
57361
57362  input_path="$new_path"
57363  # Check if we need to convert this using DOS-style short mode. If the path
57364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57365  # take no chances and rewrite it.
57366  # Note: m4 eats our [], so we need to use [ and ] instead.
57367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57368  if test "x$has_forbidden_chars" != x; then
57369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57371  fi
57372
57373
57374  windows_path="$new_path"
57375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57376    unix_path=`$CYGPATH -u "$windows_path"`
57377    new_path="$unix_path"
57378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57380    new_path="$unix_path"
57381  fi
57382
57383  if test "x$path" != "x$new_path"; then
57384    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57387  fi
57388
57389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57391
57392    else
57393      # We're on a unix platform. Hooray! :)
57394      path="$POTENTIAL_FREETYPE_LIB_PATH"
57395      has_space=`$ECHO "$path" | $GREP " "`
57396      if test "x$has_space" != x; then
57397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57400      fi
57401
57402      # Use eval to expand a potential ~
57403      eval path="$path"
57404      if test ! -f "$path" && test ! -d "$path"; then
57405        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57406      fi
57407
57408      if test -d "$path"; then
57409        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57410      else
57411        dir="`$DIRNAME "$path"`"
57412        base="`$BASENAME "$path"`"
57413        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57414      fi
57415    fi
57416  fi
57417
57418
57419    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57421$as_echo_n "checking for freetype includes... " >&6; }
57422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57423$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57424    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57426$as_echo_n "checking for freetype libraries... " >&6; }
57427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57428$as_echo "$FREETYPE_LIB_PATH" >&6; }
57429  fi
57430
57431          if test "x$FOUND_FREETYPE" != xyes; then
57432            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57433          fi
57434        else
57435          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57436$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57437          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57438        fi
57439      else
57440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57441$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57442      fi
57443    fi
57444
57445    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57446      # User has specified settings
57447
57448      if test "x$BUNDLE_FREETYPE" = x; then
57449        # If not specified, default is to bundle freetype
57450        BUNDLE_FREETYPE=yes
57451      fi
57452
57453      if test "x$with_freetype" != x; then
57454        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57455        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57456      fi
57457
57458      # Allow --with-freetype-lib and --with-freetype-include to override
57459      if test "x$with_freetype_include" != x; then
57460        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57461      fi
57462      if test "x$with_freetype_lib" != x; then
57463        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57464      fi
57465
57466      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57467        # Okay, we got it. Check that it works.
57468
57469  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57470  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57471  METHOD="--with-freetype"
57472
57473  # Let's start with an optimistic view of the world :-)
57474  FOUND_FREETYPE=yes
57475
57476  # First look for the canonical freetype main include file ft2build.h.
57477  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57478    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57479    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57480    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57481      # Fail.
57482      FOUND_FREETYPE=no
57483    fi
57484  fi
57485
57486  if test "x$FOUND_FREETYPE" = xyes; then
57487    # Include file found, let's continue the sanity check.
57488    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57489$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57490
57491    # Reset to default value
57492    FREETYPE_BASE_NAME=freetype
57493    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57494    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57495      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57496          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57497        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57498        # for the .6 version explicitly.
57499        FREETYPE_BASE_NAME=freetype.6
57500        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57501        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57502$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57503      else
57504        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57505$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57506        FOUND_FREETYPE=no
57507      fi
57508    else
57509      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57510        # On Windows, we will need both .lib and .dll file.
57511        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57512          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57513$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57514          FOUND_FREETYPE=no
57515        fi
57516      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57517          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57518        # Found lib in isa dir, use that instead.
57519        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57520        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57521$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57522      fi
57523    fi
57524  fi
57525
57526  if test "x$FOUND_FREETYPE" = xyes; then
57527
57528  # Only process if variable expands to non-empty
57529
57530  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57532
57533  # Input might be given as Windows format, start by converting to
57534  # unix format.
57535  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57536  new_path=`$CYGPATH -u "$path"`
57537
57538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57541  # "foo.exe" is OK but "foo" is an error.
57542  #
57543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57544  # It is also a way to make sure we got the proper file name for the real test later on.
57545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57546  if test "x$test_shortpath" = x; then
57547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57548$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57549    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57550  fi
57551
57552  # Call helper function which possibly converts this using DOS-style short mode.
57553  # If so, the updated path is stored in $new_path.
57554
57555  input_path="$new_path"
57556  # Check if we need to convert this using DOS-style short mode. If the path
57557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57558  # take no chances and rewrite it.
57559  # Note: m4 eats our [], so we need to use [ and ] instead.
57560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57561  if test "x$has_forbidden_chars" != x; then
57562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57566      # Going to short mode and back again did indeed matter. Since short mode is
57567      # case insensitive, let's make it lowercase to improve readability.
57568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57569      # Now convert it back to Unix-style (cygpath)
57570      input_path=`$CYGPATH -u "$shortmode_path"`
57571      new_path="$input_path"
57572    fi
57573  fi
57574
57575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57576  if test "x$test_cygdrive_prefix" = x; then
57577    # As a simple fix, exclude /usr/bin since it's not a real path.
57578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57580      # a path prefixed by /cygdrive for fixpath to work.
57581      new_path="$CYGWIN_ROOT_PATH$input_path"
57582    fi
57583  fi
57584
57585
57586  if test "x$path" != "x$new_path"; then
57587    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57590  fi
57591
57592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57593
57594  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57595  has_colon=`$ECHO $path | $GREP ^.:`
57596  new_path="$path"
57597  if test "x$has_colon" = x; then
57598    # Not in mixed or Windows style, start by that.
57599    new_path=`cmd //c echo $path`
57600  fi
57601
57602
57603  input_path="$new_path"
57604  # Check if we need to convert this using DOS-style short mode. If the path
57605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57606  # take no chances and rewrite it.
57607  # Note: m4 eats our [], so we need to use [ and ] instead.
57608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57609  if test "x$has_forbidden_chars" != x; then
57610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57612  fi
57613
57614
57615  windows_path="$new_path"
57616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57617    unix_path=`$CYGPATH -u "$windows_path"`
57618    new_path="$unix_path"
57619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57621    new_path="$unix_path"
57622  fi
57623
57624  if test "x$path" != "x$new_path"; then
57625    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57627$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57628  fi
57629
57630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57632
57633    else
57634      # We're on a unix platform. Hooray! :)
57635      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57636      has_space=`$ECHO "$path" | $GREP " "`
57637      if test "x$has_space" != x; then
57638        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57639$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57640        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57641      fi
57642
57643      # Use eval to expand a potential ~
57644      eval path="$path"
57645      if test ! -f "$path" && test ! -d "$path"; then
57646        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57647      fi
57648
57649      if test -d "$path"; then
57650        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57651      else
57652        dir="`$DIRNAME "$path"`"
57653        base="`$BASENAME "$path"`"
57654        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57655      fi
57656    fi
57657  fi
57658
57659
57660  # Only process if variable expands to non-empty
57661
57662  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57664
57665  # Input might be given as Windows format, start by converting to
57666  # unix format.
57667  path="$POTENTIAL_FREETYPE_LIB_PATH"
57668  new_path=`$CYGPATH -u "$path"`
57669
57670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57673  # "foo.exe" is OK but "foo" is an error.
57674  #
57675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57676  # It is also a way to make sure we got the proper file name for the real test later on.
57677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57678  if test "x$test_shortpath" = x; then
57679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57681    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57682  fi
57683
57684  # Call helper function which possibly converts this using DOS-style short mode.
57685  # If so, the updated path is stored in $new_path.
57686
57687  input_path="$new_path"
57688  # Check if we need to convert this using DOS-style short mode. If the path
57689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57690  # take no chances and rewrite it.
57691  # Note: m4 eats our [], so we need to use [ and ] instead.
57692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57693  if test "x$has_forbidden_chars" != x; then
57694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57698      # Going to short mode and back again did indeed matter. Since short mode is
57699      # case insensitive, let's make it lowercase to improve readability.
57700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57701      # Now convert it back to Unix-style (cygpath)
57702      input_path=`$CYGPATH -u "$shortmode_path"`
57703      new_path="$input_path"
57704    fi
57705  fi
57706
57707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57708  if test "x$test_cygdrive_prefix" = x; then
57709    # As a simple fix, exclude /usr/bin since it's not a real path.
57710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57712      # a path prefixed by /cygdrive for fixpath to work.
57713      new_path="$CYGWIN_ROOT_PATH$input_path"
57714    fi
57715  fi
57716
57717
57718  if test "x$path" != "x$new_path"; then
57719    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57722  fi
57723
57724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57725
57726  path="$POTENTIAL_FREETYPE_LIB_PATH"
57727  has_colon=`$ECHO $path | $GREP ^.:`
57728  new_path="$path"
57729  if test "x$has_colon" = x; then
57730    # Not in mixed or Windows style, start by that.
57731    new_path=`cmd //c echo $path`
57732  fi
57733
57734
57735  input_path="$new_path"
57736  # Check if we need to convert this using DOS-style short mode. If the path
57737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57738  # take no chances and rewrite it.
57739  # Note: m4 eats our [], so we need to use [ and ] instead.
57740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57741  if test "x$has_forbidden_chars" != x; then
57742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57744  fi
57745
57746
57747  windows_path="$new_path"
57748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57749    unix_path=`$CYGPATH -u "$windows_path"`
57750    new_path="$unix_path"
57751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57753    new_path="$unix_path"
57754  fi
57755
57756  if test "x$path" != "x$new_path"; then
57757    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57760  fi
57761
57762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57764
57765    else
57766      # We're on a unix platform. Hooray! :)
57767      path="$POTENTIAL_FREETYPE_LIB_PATH"
57768      has_space=`$ECHO "$path" | $GREP " "`
57769      if test "x$has_space" != x; then
57770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57773      fi
57774
57775      # Use eval to expand a potential ~
57776      eval path="$path"
57777      if test ! -f "$path" && test ! -d "$path"; then
57778        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57779      fi
57780
57781      if test -d "$path"; then
57782        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57783      else
57784        dir="`$DIRNAME "$path"`"
57785        base="`$BASENAME "$path"`"
57786        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57787      fi
57788    fi
57789  fi
57790
57791
57792    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57794$as_echo_n "checking for freetype includes... " >&6; }
57795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57796$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57797    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57799$as_echo_n "checking for freetype libraries... " >&6; }
57800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57801$as_echo "$FREETYPE_LIB_PATH" >&6; }
57802  fi
57803
57804        if test "x$FOUND_FREETYPE" != xyes; then
57805          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57806        fi
57807      else
57808        # User specified only one of lib or include. This is an error.
57809        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57810          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57811$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57812          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57813        else
57814          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57815$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57816          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57817        fi
57818      fi
57819    else
57820      # User did not specify settings, but we need freetype. Try to locate it.
57821
57822      if test "x$BUNDLE_FREETYPE" = x; then
57823        # If not specified, default is to bundle freetype only on windows
57824        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57825          BUNDLE_FREETYPE=yes
57826        else
57827          BUNDLE_FREETYPE=no
57828        fi
57829      fi
57830
57831      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57832      if test "x$SYSROOT" = x; then
57833        if test "x$FOUND_FREETYPE" != xyes; then
57834          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57835          if test "x$PKG_CONFIG" != x; then
57836
57837pkg_failed=no
57838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57839$as_echo_n "checking for FREETYPE... " >&6; }
57840
57841if test -n "$FREETYPE_CFLAGS"; then
57842    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57843 elif test -n "$PKG_CONFIG"; then
57844    if test -n "$PKG_CONFIG" && \
57845    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57846  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57847  ac_status=$?
57848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57849  test $ac_status = 0; }; then
57850  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57851else
57852  pkg_failed=yes
57853fi
57854 else
57855    pkg_failed=untried
57856fi
57857if test -n "$FREETYPE_LIBS"; then
57858    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57859 elif test -n "$PKG_CONFIG"; then
57860    if test -n "$PKG_CONFIG" && \
57861    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57862  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57863  ac_status=$?
57864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57865  test $ac_status = 0; }; then
57866  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57867else
57868  pkg_failed=yes
57869fi
57870 else
57871    pkg_failed=untried
57872fi
57873
57874
57875
57876if test $pkg_failed = yes; then
57877
57878if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57879        _pkg_short_errors_supported=yes
57880else
57881        _pkg_short_errors_supported=no
57882fi
57883        if test $_pkg_short_errors_supported = yes; then
57884	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57885        else
57886	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57887        fi
57888	# Put the nasty error message in config.log where it belongs
57889	echo "$FREETYPE_PKG_ERRORS" >&5
57890
57891	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57892$as_echo "no" >&6; }
57893                FOUND_FREETYPE=no
57894elif test $pkg_failed = untried; then
57895	FOUND_FREETYPE=no
57896else
57897	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57898	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57900$as_echo "yes" >&6; }
57901	FOUND_FREETYPE=yes
57902fi
57903            if test "x$FOUND_FREETYPE" = xyes; then
57904              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57905              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57906              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57907              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57908                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57909              fi
57910              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57911              if test "x$BUNDLE_FREETYPE" = xyes; then
57912                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57913$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57914                FOUND_FREETYPE=no
57915              else
57916                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57917$as_echo_n "checking for freetype... " >&6; }
57918                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57919$as_echo "yes (using pkg-config)" >&6; }
57920              fi
57921            fi
57922          fi
57923        fi
57924      fi
57925
57926      if test "x$FOUND_FREETYPE" != xyes; then
57927        # Check in well-known locations
57928        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57929          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57930
57931  windows_path="$FREETYPE_BASE_DIR"
57932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57933    unix_path=`$CYGPATH -u "$windows_path"`
57934    FREETYPE_BASE_DIR="$unix_path"
57935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57937    FREETYPE_BASE_DIR="$unix_path"
57938  fi
57939
57940
57941  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57942  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57943  METHOD="well-known location"
57944
57945  # Let's start with an optimistic view of the world :-)
57946  FOUND_FREETYPE=yes
57947
57948  # First look for the canonical freetype main include file ft2build.h.
57949  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57950    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57951    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57952    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57953      # Fail.
57954      FOUND_FREETYPE=no
57955    fi
57956  fi
57957
57958  if test "x$FOUND_FREETYPE" = xyes; then
57959    # Include file found, let's continue the sanity check.
57960    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57961$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57962
57963    # Reset to default value
57964    FREETYPE_BASE_NAME=freetype
57965    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57966    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57967      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57968          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57969        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57970        # for the .6 version explicitly.
57971        FREETYPE_BASE_NAME=freetype.6
57972        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57973        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57974$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57975      else
57976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57977$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57978        FOUND_FREETYPE=no
57979      fi
57980    else
57981      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57982        # On Windows, we will need both .lib and .dll file.
57983        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57984          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57986          FOUND_FREETYPE=no
57987        fi
57988      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57990        # Found lib in isa dir, use that instead.
57991        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57992        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57993$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57994      fi
57995    fi
57996  fi
57997
57998  if test "x$FOUND_FREETYPE" = xyes; then
57999
58000  # Only process if variable expands to non-empty
58001
58002  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58004
58005  # Input might be given as Windows format, start by converting to
58006  # unix format.
58007  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58008  new_path=`$CYGPATH -u "$path"`
58009
58010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58013  # "foo.exe" is OK but "foo" is an error.
58014  #
58015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58016  # It is also a way to make sure we got the proper file name for the real test later on.
58017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58018  if test "x$test_shortpath" = x; then
58019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58021    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58022  fi
58023
58024  # Call helper function which possibly converts this using DOS-style short mode.
58025  # If so, the updated path is stored in $new_path.
58026
58027  input_path="$new_path"
58028  # Check if we need to convert this using DOS-style short mode. If the path
58029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58030  # take no chances and rewrite it.
58031  # Note: m4 eats our [], so we need to use [ and ] instead.
58032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58033  if test "x$has_forbidden_chars" != x; then
58034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58038      # Going to short mode and back again did indeed matter. Since short mode is
58039      # case insensitive, let's make it lowercase to improve readability.
58040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58041      # Now convert it back to Unix-style (cygpath)
58042      input_path=`$CYGPATH -u "$shortmode_path"`
58043      new_path="$input_path"
58044    fi
58045  fi
58046
58047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58048  if test "x$test_cygdrive_prefix" = x; then
58049    # As a simple fix, exclude /usr/bin since it's not a real path.
58050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58052      # a path prefixed by /cygdrive for fixpath to work.
58053      new_path="$CYGWIN_ROOT_PATH$input_path"
58054    fi
58055  fi
58056
58057
58058  if test "x$path" != "x$new_path"; then
58059    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58062  fi
58063
58064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58065
58066  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58067  has_colon=`$ECHO $path | $GREP ^.:`
58068  new_path="$path"
58069  if test "x$has_colon" = x; then
58070    # Not in mixed or Windows style, start by that.
58071    new_path=`cmd //c echo $path`
58072  fi
58073
58074
58075  input_path="$new_path"
58076  # Check if we need to convert this using DOS-style short mode. If the path
58077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58078  # take no chances and rewrite it.
58079  # Note: m4 eats our [], so we need to use [ and ] instead.
58080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58081  if test "x$has_forbidden_chars" != x; then
58082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58084  fi
58085
58086
58087  windows_path="$new_path"
58088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58089    unix_path=`$CYGPATH -u "$windows_path"`
58090    new_path="$unix_path"
58091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58093    new_path="$unix_path"
58094  fi
58095
58096  if test "x$path" != "x$new_path"; then
58097    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58100  fi
58101
58102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58104
58105    else
58106      # We're on a unix platform. Hooray! :)
58107      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58108      has_space=`$ECHO "$path" | $GREP " "`
58109      if test "x$has_space" != x; then
58110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58113      fi
58114
58115      # Use eval to expand a potential ~
58116      eval path="$path"
58117      if test ! -f "$path" && test ! -d "$path"; then
58118        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58119      fi
58120
58121      if test -d "$path"; then
58122        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58123      else
58124        dir="`$DIRNAME "$path"`"
58125        base="`$BASENAME "$path"`"
58126        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58127      fi
58128    fi
58129  fi
58130
58131
58132  # Only process if variable expands to non-empty
58133
58134  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58136
58137  # Input might be given as Windows format, start by converting to
58138  # unix format.
58139  path="$POTENTIAL_FREETYPE_LIB_PATH"
58140  new_path=`$CYGPATH -u "$path"`
58141
58142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58145  # "foo.exe" is OK but "foo" is an error.
58146  #
58147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58148  # It is also a way to make sure we got the proper file name for the real test later on.
58149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58150  if test "x$test_shortpath" = x; then
58151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58153    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58154  fi
58155
58156  # Call helper function which possibly converts this using DOS-style short mode.
58157  # If so, the updated path is stored in $new_path.
58158
58159  input_path="$new_path"
58160  # Check if we need to convert this using DOS-style short mode. If the path
58161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58162  # take no chances and rewrite it.
58163  # Note: m4 eats our [], so we need to use [ and ] instead.
58164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58165  if test "x$has_forbidden_chars" != x; then
58166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58170      # Going to short mode and back again did indeed matter. Since short mode is
58171      # case insensitive, let's make it lowercase to improve readability.
58172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58173      # Now convert it back to Unix-style (cygpath)
58174      input_path=`$CYGPATH -u "$shortmode_path"`
58175      new_path="$input_path"
58176    fi
58177  fi
58178
58179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58180  if test "x$test_cygdrive_prefix" = x; then
58181    # As a simple fix, exclude /usr/bin since it's not a real path.
58182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58184      # a path prefixed by /cygdrive for fixpath to work.
58185      new_path="$CYGWIN_ROOT_PATH$input_path"
58186    fi
58187  fi
58188
58189
58190  if test "x$path" != "x$new_path"; then
58191    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58194  fi
58195
58196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58197
58198  path="$POTENTIAL_FREETYPE_LIB_PATH"
58199  has_colon=`$ECHO $path | $GREP ^.:`
58200  new_path="$path"
58201  if test "x$has_colon" = x; then
58202    # Not in mixed or Windows style, start by that.
58203    new_path=`cmd //c echo $path`
58204  fi
58205
58206
58207  input_path="$new_path"
58208  # Check if we need to convert this using DOS-style short mode. If the path
58209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58210  # take no chances and rewrite it.
58211  # Note: m4 eats our [], so we need to use [ and ] instead.
58212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58213  if test "x$has_forbidden_chars" != x; then
58214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58216  fi
58217
58218
58219  windows_path="$new_path"
58220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58221    unix_path=`$CYGPATH -u "$windows_path"`
58222    new_path="$unix_path"
58223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58225    new_path="$unix_path"
58226  fi
58227
58228  if test "x$path" != "x$new_path"; then
58229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58232  fi
58233
58234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58236
58237    else
58238      # We're on a unix platform. Hooray! :)
58239      path="$POTENTIAL_FREETYPE_LIB_PATH"
58240      has_space=`$ECHO "$path" | $GREP " "`
58241      if test "x$has_space" != x; then
58242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58244        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58245      fi
58246
58247      # Use eval to expand a potential ~
58248      eval path="$path"
58249      if test ! -f "$path" && test ! -d "$path"; then
58250        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58251      fi
58252
58253      if test -d "$path"; then
58254        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58255      else
58256        dir="`$DIRNAME "$path"`"
58257        base="`$BASENAME "$path"`"
58258        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58259      fi
58260    fi
58261  fi
58262
58263
58264    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58266$as_echo_n "checking for freetype includes... " >&6; }
58267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58268$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58269    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58271$as_echo_n "checking for freetype libraries... " >&6; }
58272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58273$as_echo "$FREETYPE_LIB_PATH" >&6; }
58274  fi
58275
58276          if test "x$FOUND_FREETYPE" != xyes; then
58277            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58278
58279  windows_path="$FREETYPE_BASE_DIR"
58280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58281    unix_path=`$CYGPATH -u "$windows_path"`
58282    FREETYPE_BASE_DIR="$unix_path"
58283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58285    FREETYPE_BASE_DIR="$unix_path"
58286  fi
58287
58288
58289  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58290  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58291  METHOD="well-known location"
58292
58293  # Let's start with an optimistic view of the world :-)
58294  FOUND_FREETYPE=yes
58295
58296  # First look for the canonical freetype main include file ft2build.h.
58297  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58298    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58299    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58300    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58301      # Fail.
58302      FOUND_FREETYPE=no
58303    fi
58304  fi
58305
58306  if test "x$FOUND_FREETYPE" = xyes; then
58307    # Include file found, let's continue the sanity check.
58308    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58309$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58310
58311    # Reset to default value
58312    FREETYPE_BASE_NAME=freetype
58313    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58314    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58315      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58316          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58317        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58318        # for the .6 version explicitly.
58319        FREETYPE_BASE_NAME=freetype.6
58320        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58321        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58322$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58323      else
58324        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58325$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58326        FOUND_FREETYPE=no
58327      fi
58328    else
58329      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58330        # On Windows, we will need both .lib and .dll file.
58331        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58332          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58333$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58334          FOUND_FREETYPE=no
58335        fi
58336      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58337          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58338        # Found lib in isa dir, use that instead.
58339        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58340        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58341$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58342      fi
58343    fi
58344  fi
58345
58346  if test "x$FOUND_FREETYPE" = xyes; then
58347
58348  # Only process if variable expands to non-empty
58349
58350  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58352
58353  # Input might be given as Windows format, start by converting to
58354  # unix format.
58355  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58356  new_path=`$CYGPATH -u "$path"`
58357
58358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58361  # "foo.exe" is OK but "foo" is an error.
58362  #
58363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58364  # It is also a way to make sure we got the proper file name for the real test later on.
58365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58366  if test "x$test_shortpath" = x; then
58367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58368$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58369    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58370  fi
58371
58372  # Call helper function which possibly converts this using DOS-style short mode.
58373  # If so, the updated path is stored in $new_path.
58374
58375  input_path="$new_path"
58376  # Check if we need to convert this using DOS-style short mode. If the path
58377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58378  # take no chances and rewrite it.
58379  # Note: m4 eats our [], so we need to use [ and ] instead.
58380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58381  if test "x$has_forbidden_chars" != x; then
58382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58386      # Going to short mode and back again did indeed matter. Since short mode is
58387      # case insensitive, let's make it lowercase to improve readability.
58388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58389      # Now convert it back to Unix-style (cygpath)
58390      input_path=`$CYGPATH -u "$shortmode_path"`
58391      new_path="$input_path"
58392    fi
58393  fi
58394
58395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58396  if test "x$test_cygdrive_prefix" = x; then
58397    # As a simple fix, exclude /usr/bin since it's not a real path.
58398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58400      # a path prefixed by /cygdrive for fixpath to work.
58401      new_path="$CYGWIN_ROOT_PATH$input_path"
58402    fi
58403  fi
58404
58405
58406  if test "x$path" != "x$new_path"; then
58407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58410  fi
58411
58412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58413
58414  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58415  has_colon=`$ECHO $path | $GREP ^.:`
58416  new_path="$path"
58417  if test "x$has_colon" = x; then
58418    # Not in mixed or Windows style, start by that.
58419    new_path=`cmd //c echo $path`
58420  fi
58421
58422
58423  input_path="$new_path"
58424  # Check if we need to convert this using DOS-style short mode. If the path
58425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58426  # take no chances and rewrite it.
58427  # Note: m4 eats our [], so we need to use [ and ] instead.
58428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58429  if test "x$has_forbidden_chars" != x; then
58430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58432  fi
58433
58434
58435  windows_path="$new_path"
58436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58437    unix_path=`$CYGPATH -u "$windows_path"`
58438    new_path="$unix_path"
58439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58441    new_path="$unix_path"
58442  fi
58443
58444  if test "x$path" != "x$new_path"; then
58445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58448  fi
58449
58450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58452
58453    else
58454      # We're on a unix platform. Hooray! :)
58455      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58456      has_space=`$ECHO "$path" | $GREP " "`
58457      if test "x$has_space" != x; then
58458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58461      fi
58462
58463      # Use eval to expand a potential ~
58464      eval path="$path"
58465      if test ! -f "$path" && test ! -d "$path"; then
58466        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58467      fi
58468
58469      if test -d "$path"; then
58470        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58471      else
58472        dir="`$DIRNAME "$path"`"
58473        base="`$BASENAME "$path"`"
58474        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58475      fi
58476    fi
58477  fi
58478
58479
58480  # Only process if variable expands to non-empty
58481
58482  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58484
58485  # Input might be given as Windows format, start by converting to
58486  # unix format.
58487  path="$POTENTIAL_FREETYPE_LIB_PATH"
58488  new_path=`$CYGPATH -u "$path"`
58489
58490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58493  # "foo.exe" is OK but "foo" is an error.
58494  #
58495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58496  # It is also a way to make sure we got the proper file name for the real test later on.
58497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58498  if test "x$test_shortpath" = x; then
58499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58501    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58502  fi
58503
58504  # Call helper function which possibly converts this using DOS-style short mode.
58505  # If so, the updated path is stored in $new_path.
58506
58507  input_path="$new_path"
58508  # Check if we need to convert this using DOS-style short mode. If the path
58509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58510  # take no chances and rewrite it.
58511  # Note: m4 eats our [], so we need to use [ and ] instead.
58512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58513  if test "x$has_forbidden_chars" != x; then
58514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58518      # Going to short mode and back again did indeed matter. Since short mode is
58519      # case insensitive, let's make it lowercase to improve readability.
58520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58521      # Now convert it back to Unix-style (cygpath)
58522      input_path=`$CYGPATH -u "$shortmode_path"`
58523      new_path="$input_path"
58524    fi
58525  fi
58526
58527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58528  if test "x$test_cygdrive_prefix" = x; then
58529    # As a simple fix, exclude /usr/bin since it's not a real path.
58530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58532      # a path prefixed by /cygdrive for fixpath to work.
58533      new_path="$CYGWIN_ROOT_PATH$input_path"
58534    fi
58535  fi
58536
58537
58538  if test "x$path" != "x$new_path"; then
58539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58542  fi
58543
58544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58545
58546  path="$POTENTIAL_FREETYPE_LIB_PATH"
58547  has_colon=`$ECHO $path | $GREP ^.:`
58548  new_path="$path"
58549  if test "x$has_colon" = x; then
58550    # Not in mixed or Windows style, start by that.
58551    new_path=`cmd //c echo $path`
58552  fi
58553
58554
58555  input_path="$new_path"
58556  # Check if we need to convert this using DOS-style short mode. If the path
58557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58558  # take no chances and rewrite it.
58559  # Note: m4 eats our [], so we need to use [ and ] instead.
58560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58561  if test "x$has_forbidden_chars" != x; then
58562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58564  fi
58565
58566
58567  windows_path="$new_path"
58568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58569    unix_path=`$CYGPATH -u "$windows_path"`
58570    new_path="$unix_path"
58571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58573    new_path="$unix_path"
58574  fi
58575
58576  if test "x$path" != "x$new_path"; then
58577    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58580  fi
58581
58582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58584
58585    else
58586      # We're on a unix platform. Hooray! :)
58587      path="$POTENTIAL_FREETYPE_LIB_PATH"
58588      has_space=`$ECHO "$path" | $GREP " "`
58589      if test "x$has_space" != x; then
58590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58593      fi
58594
58595      # Use eval to expand a potential ~
58596      eval path="$path"
58597      if test ! -f "$path" && test ! -d "$path"; then
58598        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58599      fi
58600
58601      if test -d "$path"; then
58602        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58603      else
58604        dir="`$DIRNAME "$path"`"
58605        base="`$BASENAME "$path"`"
58606        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58607      fi
58608    fi
58609  fi
58610
58611
58612    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58614$as_echo_n "checking for freetype includes... " >&6; }
58615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58616$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58617    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58619$as_echo_n "checking for freetype libraries... " >&6; }
58620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58621$as_echo "$FREETYPE_LIB_PATH" >&6; }
58622  fi
58623
58624          fi
58625          if test "x$FOUND_FREETYPE" != xyes; then
58626            FREETYPE_BASE_DIR="$HOME/freetype"
58627
58628  windows_path="$FREETYPE_BASE_DIR"
58629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58630    unix_path=`$CYGPATH -u "$windows_path"`
58631    FREETYPE_BASE_DIR="$unix_path"
58632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58634    FREETYPE_BASE_DIR="$unix_path"
58635  fi
58636
58637            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58638
58639  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58640  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58641  METHOD="well-known location"
58642
58643  # Let's start with an optimistic view of the world :-)
58644  FOUND_FREETYPE=yes
58645
58646  # First look for the canonical freetype main include file ft2build.h.
58647  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58648    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58649    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58650    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58651      # Fail.
58652      FOUND_FREETYPE=no
58653    fi
58654  fi
58655
58656  if test "x$FOUND_FREETYPE" = xyes; then
58657    # Include file found, let's continue the sanity check.
58658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58659$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58660
58661    # Reset to default value
58662    FREETYPE_BASE_NAME=freetype
58663    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58664    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58665      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58666          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58667        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58668        # for the .6 version explicitly.
58669        FREETYPE_BASE_NAME=freetype.6
58670        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58671        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58672$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58673      else
58674        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58675$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58676        FOUND_FREETYPE=no
58677      fi
58678    else
58679      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58680        # On Windows, we will need both .lib and .dll file.
58681        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58682          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58683$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58684          FOUND_FREETYPE=no
58685        fi
58686      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58687          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58688        # Found lib in isa dir, use that instead.
58689        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58690        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58691$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58692      fi
58693    fi
58694  fi
58695
58696  if test "x$FOUND_FREETYPE" = xyes; then
58697
58698  # Only process if variable expands to non-empty
58699
58700  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58702
58703  # Input might be given as Windows format, start by converting to
58704  # unix format.
58705  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58706  new_path=`$CYGPATH -u "$path"`
58707
58708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58711  # "foo.exe" is OK but "foo" is an error.
58712  #
58713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58714  # It is also a way to make sure we got the proper file name for the real test later on.
58715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58716  if test "x$test_shortpath" = x; then
58717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58719    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58720  fi
58721
58722  # Call helper function which possibly converts this using DOS-style short mode.
58723  # If so, the updated path is stored in $new_path.
58724
58725  input_path="$new_path"
58726  # Check if we need to convert this using DOS-style short mode. If the path
58727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58728  # take no chances and rewrite it.
58729  # Note: m4 eats our [], so we need to use [ and ] instead.
58730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58731  if test "x$has_forbidden_chars" != x; then
58732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58736      # Going to short mode and back again did indeed matter. Since short mode is
58737      # case insensitive, let's make it lowercase to improve readability.
58738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58739      # Now convert it back to Unix-style (cygpath)
58740      input_path=`$CYGPATH -u "$shortmode_path"`
58741      new_path="$input_path"
58742    fi
58743  fi
58744
58745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58746  if test "x$test_cygdrive_prefix" = x; then
58747    # As a simple fix, exclude /usr/bin since it's not a real path.
58748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58750      # a path prefixed by /cygdrive for fixpath to work.
58751      new_path="$CYGWIN_ROOT_PATH$input_path"
58752    fi
58753  fi
58754
58755
58756  if test "x$path" != "x$new_path"; then
58757    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58760  fi
58761
58762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58763
58764  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58765  has_colon=`$ECHO $path | $GREP ^.:`
58766  new_path="$path"
58767  if test "x$has_colon" = x; then
58768    # Not in mixed or Windows style, start by that.
58769    new_path=`cmd //c echo $path`
58770  fi
58771
58772
58773  input_path="$new_path"
58774  # Check if we need to convert this using DOS-style short mode. If the path
58775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58776  # take no chances and rewrite it.
58777  # Note: m4 eats our [], so we need to use [ and ] instead.
58778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58779  if test "x$has_forbidden_chars" != x; then
58780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58782  fi
58783
58784
58785  windows_path="$new_path"
58786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58787    unix_path=`$CYGPATH -u "$windows_path"`
58788    new_path="$unix_path"
58789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58791    new_path="$unix_path"
58792  fi
58793
58794  if test "x$path" != "x$new_path"; then
58795    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58797$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58798  fi
58799
58800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58802
58803    else
58804      # We're on a unix platform. Hooray! :)
58805      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58806      has_space=`$ECHO "$path" | $GREP " "`
58807      if test "x$has_space" != x; then
58808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58811      fi
58812
58813      # Use eval to expand a potential ~
58814      eval path="$path"
58815      if test ! -f "$path" && test ! -d "$path"; then
58816        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58817      fi
58818
58819      if test -d "$path"; then
58820        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58821      else
58822        dir="`$DIRNAME "$path"`"
58823        base="`$BASENAME "$path"`"
58824        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58825      fi
58826    fi
58827  fi
58828
58829
58830  # Only process if variable expands to non-empty
58831
58832  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58834
58835  # Input might be given as Windows format, start by converting to
58836  # unix format.
58837  path="$POTENTIAL_FREETYPE_LIB_PATH"
58838  new_path=`$CYGPATH -u "$path"`
58839
58840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58843  # "foo.exe" is OK but "foo" is an error.
58844  #
58845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58846  # It is also a way to make sure we got the proper file name for the real test later on.
58847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58848  if test "x$test_shortpath" = x; then
58849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58851    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58852  fi
58853
58854  # Call helper function which possibly converts this using DOS-style short mode.
58855  # If so, the updated path is stored in $new_path.
58856
58857  input_path="$new_path"
58858  # Check if we need to convert this using DOS-style short mode. If the path
58859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58860  # take no chances and rewrite it.
58861  # Note: m4 eats our [], so we need to use [ and ] instead.
58862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58863  if test "x$has_forbidden_chars" != x; then
58864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58868      # Going to short mode and back again did indeed matter. Since short mode is
58869      # case insensitive, let's make it lowercase to improve readability.
58870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58871      # Now convert it back to Unix-style (cygpath)
58872      input_path=`$CYGPATH -u "$shortmode_path"`
58873      new_path="$input_path"
58874    fi
58875  fi
58876
58877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58878  if test "x$test_cygdrive_prefix" = x; then
58879    # As a simple fix, exclude /usr/bin since it's not a real path.
58880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58882      # a path prefixed by /cygdrive for fixpath to work.
58883      new_path="$CYGWIN_ROOT_PATH$input_path"
58884    fi
58885  fi
58886
58887
58888  if test "x$path" != "x$new_path"; then
58889    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58892  fi
58893
58894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58895
58896  path="$POTENTIAL_FREETYPE_LIB_PATH"
58897  has_colon=`$ECHO $path | $GREP ^.:`
58898  new_path="$path"
58899  if test "x$has_colon" = x; then
58900    # Not in mixed or Windows style, start by that.
58901    new_path=`cmd //c echo $path`
58902  fi
58903
58904
58905  input_path="$new_path"
58906  # Check if we need to convert this using DOS-style short mode. If the path
58907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58908  # take no chances and rewrite it.
58909  # Note: m4 eats our [], so we need to use [ and ] instead.
58910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58911  if test "x$has_forbidden_chars" != x; then
58912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58914  fi
58915
58916
58917  windows_path="$new_path"
58918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58919    unix_path=`$CYGPATH -u "$windows_path"`
58920    new_path="$unix_path"
58921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58923    new_path="$unix_path"
58924  fi
58925
58926  if test "x$path" != "x$new_path"; then
58927    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58930  fi
58931
58932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58934
58935    else
58936      # We're on a unix platform. Hooray! :)
58937      path="$POTENTIAL_FREETYPE_LIB_PATH"
58938      has_space=`$ECHO "$path" | $GREP " "`
58939      if test "x$has_space" != x; then
58940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58943      fi
58944
58945      # Use eval to expand a potential ~
58946      eval path="$path"
58947      if test ! -f "$path" && test ! -d "$path"; then
58948        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58949      fi
58950
58951      if test -d "$path"; then
58952        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58953      else
58954        dir="`$DIRNAME "$path"`"
58955        base="`$BASENAME "$path"`"
58956        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58957      fi
58958    fi
58959  fi
58960
58961
58962    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58964$as_echo_n "checking for freetype includes... " >&6; }
58965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58966$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58967    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58969$as_echo_n "checking for freetype libraries... " >&6; }
58970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58971$as_echo "$FREETYPE_LIB_PATH" >&6; }
58972  fi
58973
58974            else
58975
58976  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58977  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58978  METHOD="well-known location"
58979
58980  # Let's start with an optimistic view of the world :-)
58981  FOUND_FREETYPE=yes
58982
58983  # First look for the canonical freetype main include file ft2build.h.
58984  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58985    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58986    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58987    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58988      # Fail.
58989      FOUND_FREETYPE=no
58990    fi
58991  fi
58992
58993  if test "x$FOUND_FREETYPE" = xyes; then
58994    # Include file found, let's continue the sanity check.
58995    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58996$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58997
58998    # Reset to default value
58999    FREETYPE_BASE_NAME=freetype
59000    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59001    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59002      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59003          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59004        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59005        # for the .6 version explicitly.
59006        FREETYPE_BASE_NAME=freetype.6
59007        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59008        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59009$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59010      else
59011        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59012$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59013        FOUND_FREETYPE=no
59014      fi
59015    else
59016      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59017        # On Windows, we will need both .lib and .dll file.
59018        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59019          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59020$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59021          FOUND_FREETYPE=no
59022        fi
59023      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59024          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59025        # Found lib in isa dir, use that instead.
59026        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59027        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59028$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59029      fi
59030    fi
59031  fi
59032
59033  if test "x$FOUND_FREETYPE" = xyes; then
59034
59035  # Only process if variable expands to non-empty
59036
59037  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59039
59040  # Input might be given as Windows format, start by converting to
59041  # unix format.
59042  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59043  new_path=`$CYGPATH -u "$path"`
59044
59045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59048  # "foo.exe" is OK but "foo" is an error.
59049  #
59050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59051  # It is also a way to make sure we got the proper file name for the real test later on.
59052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59053  if test "x$test_shortpath" = x; then
59054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59056    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59057  fi
59058
59059  # Call helper function which possibly converts this using DOS-style short mode.
59060  # If so, the updated path is stored in $new_path.
59061
59062  input_path="$new_path"
59063  # Check if we need to convert this using DOS-style short mode. If the path
59064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59065  # take no chances and rewrite it.
59066  # Note: m4 eats our [], so we need to use [ and ] instead.
59067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59068  if test "x$has_forbidden_chars" != x; then
59069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59073      # Going to short mode and back again did indeed matter. Since short mode is
59074      # case insensitive, let's make it lowercase to improve readability.
59075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59076      # Now convert it back to Unix-style (cygpath)
59077      input_path=`$CYGPATH -u "$shortmode_path"`
59078      new_path="$input_path"
59079    fi
59080  fi
59081
59082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59083  if test "x$test_cygdrive_prefix" = x; then
59084    # As a simple fix, exclude /usr/bin since it's not a real path.
59085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59087      # a path prefixed by /cygdrive for fixpath to work.
59088      new_path="$CYGWIN_ROOT_PATH$input_path"
59089    fi
59090  fi
59091
59092
59093  if test "x$path" != "x$new_path"; then
59094    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59096$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59097  fi
59098
59099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59100
59101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59102  has_colon=`$ECHO $path | $GREP ^.:`
59103  new_path="$path"
59104  if test "x$has_colon" = x; then
59105    # Not in mixed or Windows style, start by that.
59106    new_path=`cmd //c echo $path`
59107  fi
59108
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59119  fi
59120
59121
59122  windows_path="$new_path"
59123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59124    unix_path=`$CYGPATH -u "$windows_path"`
59125    new_path="$unix_path"
59126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59128    new_path="$unix_path"
59129  fi
59130
59131  if test "x$path" != "x$new_path"; then
59132    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59134$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59135  fi
59136
59137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59139
59140    else
59141      # We're on a unix platform. Hooray! :)
59142      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59143      has_space=`$ECHO "$path" | $GREP " "`
59144      if test "x$has_space" != x; then
59145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59146$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59147        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59148      fi
59149
59150      # Use eval to expand a potential ~
59151      eval path="$path"
59152      if test ! -f "$path" && test ! -d "$path"; then
59153        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59154      fi
59155
59156      if test -d "$path"; then
59157        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59158      else
59159        dir="`$DIRNAME "$path"`"
59160        base="`$BASENAME "$path"`"
59161        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59162      fi
59163    fi
59164  fi
59165
59166
59167  # Only process if variable expands to non-empty
59168
59169  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59171
59172  # Input might be given as Windows format, start by converting to
59173  # unix format.
59174  path="$POTENTIAL_FREETYPE_LIB_PATH"
59175  new_path=`$CYGPATH -u "$path"`
59176
59177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59180  # "foo.exe" is OK but "foo" is an error.
59181  #
59182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59183  # It is also a way to make sure we got the proper file name for the real test later on.
59184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59185  if test "x$test_shortpath" = x; then
59186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59188    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59189  fi
59190
59191  # Call helper function which possibly converts this using DOS-style short mode.
59192  # If so, the updated path is stored in $new_path.
59193
59194  input_path="$new_path"
59195  # Check if we need to convert this using DOS-style short mode. If the path
59196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59197  # take no chances and rewrite it.
59198  # Note: m4 eats our [], so we need to use [ and ] instead.
59199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59200  if test "x$has_forbidden_chars" != x; then
59201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59205      # Going to short mode and back again did indeed matter. Since short mode is
59206      # case insensitive, let's make it lowercase to improve readability.
59207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59208      # Now convert it back to Unix-style (cygpath)
59209      input_path=`$CYGPATH -u "$shortmode_path"`
59210      new_path="$input_path"
59211    fi
59212  fi
59213
59214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59215  if test "x$test_cygdrive_prefix" = x; then
59216    # As a simple fix, exclude /usr/bin since it's not a real path.
59217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59219      # a path prefixed by /cygdrive for fixpath to work.
59220      new_path="$CYGWIN_ROOT_PATH$input_path"
59221    fi
59222  fi
59223
59224
59225  if test "x$path" != "x$new_path"; then
59226    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59229  fi
59230
59231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59232
59233  path="$POTENTIAL_FREETYPE_LIB_PATH"
59234  has_colon=`$ECHO $path | $GREP ^.:`
59235  new_path="$path"
59236  if test "x$has_colon" = x; then
59237    # Not in mixed or Windows style, start by that.
59238    new_path=`cmd //c echo $path`
59239  fi
59240
59241
59242  input_path="$new_path"
59243  # Check if we need to convert this using DOS-style short mode. If the path
59244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59245  # take no chances and rewrite it.
59246  # Note: m4 eats our [], so we need to use [ and ] instead.
59247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59248  if test "x$has_forbidden_chars" != x; then
59249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59251  fi
59252
59253
59254  windows_path="$new_path"
59255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59256    unix_path=`$CYGPATH -u "$windows_path"`
59257    new_path="$unix_path"
59258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59260    new_path="$unix_path"
59261  fi
59262
59263  if test "x$path" != "x$new_path"; then
59264    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59266$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59267  fi
59268
59269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59271
59272    else
59273      # We're on a unix platform. Hooray! :)
59274      path="$POTENTIAL_FREETYPE_LIB_PATH"
59275      has_space=`$ECHO "$path" | $GREP " "`
59276      if test "x$has_space" != x; then
59277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59278$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59280      fi
59281
59282      # Use eval to expand a potential ~
59283      eval path="$path"
59284      if test ! -f "$path" && test ! -d "$path"; then
59285        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59286      fi
59287
59288      if test -d "$path"; then
59289        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59290      else
59291        dir="`$DIRNAME "$path"`"
59292        base="`$BASENAME "$path"`"
59293        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59294      fi
59295    fi
59296  fi
59297
59298
59299    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59301$as_echo_n "checking for freetype includes... " >&6; }
59302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59303$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59304    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59306$as_echo_n "checking for freetype libraries... " >&6; }
59307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59308$as_echo "$FREETYPE_LIB_PATH" >&6; }
59309  fi
59310
59311            fi
59312            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59313                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59314              # Source is available, as a last resort try to build freetype in default location
59315
59316  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59317  BUILD_FREETYPE=yes
59318
59319  # Check if the freetype sources are acessible..
59320  if ! test -d $FREETYPE_SRC_PATH; then
59321    { $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
59322$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59323    BUILD_FREETYPE=no
59324  fi
59325  # ..and contain a vc2010 project file
59326  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59327  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59328    { $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
59329$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59330    BUILD_FREETYPE=no
59331  fi
59332  # Now check if configure found a version of 'msbuild.exe'
59333  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59334    { $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
59335$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;}
59336    BUILD_FREETYPE=no
59337  fi
59338
59339  # Ready to go..
59340  if test "x$BUILD_FREETYPE" = xyes; then
59341    # msbuild requires trailing slashes for output directories
59342    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59343    freetype_lib_path_unix="$freetype_lib_path"
59344    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59345
59346  unix_path="$vcxproj_path"
59347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59348    windows_path=`$CYGPATH -m "$unix_path"`
59349    vcxproj_path="$windows_path"
59350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59351    windows_path=`cmd //c echo $unix_path`
59352    vcxproj_path="$windows_path"
59353  fi
59354
59355
59356  unix_path="$freetype_lib_path"
59357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59358    windows_path=`$CYGPATH -m "$unix_path"`
59359    freetype_lib_path="$windows_path"
59360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59361    windows_path=`cmd //c echo $unix_path`
59362    freetype_lib_path="$windows_path"
59363  fi
59364
59365
59366  unix_path="$freetype_obj_path"
59367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59368    windows_path=`$CYGPATH -m "$unix_path"`
59369    freetype_obj_path="$windows_path"
59370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59371    windows_path=`cmd //c echo $unix_path`
59372    freetype_obj_path="$windows_path"
59373  fi
59374
59375    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59376      freetype_platform=x64
59377    else
59378      freetype_platform=win32
59379    fi
59380
59381    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59382    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59383    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59384    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59385    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59386$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59387
59388    # First we try to build the freetype.dll
59389    $ECHO -e "@echo off\n"\
59390        "$MSBUILD $vcxproj_path "\
59391        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59392        "/p:Configuration=\"Release Multithreaded\" "\
59393        "/p:Platform=$freetype_platform "\
59394        "/p:ConfigurationType=DynamicLibrary "\
59395        "/p:TargetName=freetype "\
59396        "/p:OutDir=\"$freetype_lib_path\" "\
59397        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59398    cmd /c freetype.bat
59399
59400    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59401      # If that succeeds we also build freetype.lib
59402      $ECHO -e "@echo off\n"\
59403          "$MSBUILD $vcxproj_path "\
59404          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59405          "/p:Configuration=\"Release Multithreaded\" "\
59406          "/p:Platform=$freetype_platform "\
59407          "/p:ConfigurationType=StaticLibrary "\
59408          "/p:TargetName=freetype "\
59409          "/p:OutDir=\"$freetype_lib_path\" "\
59410          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59411      cmd /c freetype.bat
59412
59413      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59414        # Once we build both, lib and dll, set freetype lib and include path appropriately
59415        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59416        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59417        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59418$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59419      else
59420        BUILD_FREETYPE=no
59421      fi
59422    else
59423      BUILD_FREETYPE=no
59424    fi
59425  fi
59426
59427              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59428
59429  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59430  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59431  METHOD="well-known location"
59432
59433  # Let's start with an optimistic view of the world :-)
59434  FOUND_FREETYPE=yes
59435
59436  # First look for the canonical freetype main include file ft2build.h.
59437  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59438    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59439    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59440    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59441      # Fail.
59442      FOUND_FREETYPE=no
59443    fi
59444  fi
59445
59446  if test "x$FOUND_FREETYPE" = xyes; then
59447    # Include file found, let's continue the sanity check.
59448    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59449$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59450
59451    # Reset to default value
59452    FREETYPE_BASE_NAME=freetype
59453    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59454    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59455      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59457        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59458        # for the .6 version explicitly.
59459        FREETYPE_BASE_NAME=freetype.6
59460        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59461        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59462$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59463      else
59464        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59466        FOUND_FREETYPE=no
59467      fi
59468    else
59469      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59470        # On Windows, we will need both .lib and .dll file.
59471        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59472          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59474          FOUND_FREETYPE=no
59475        fi
59476      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59477          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59478        # Found lib in isa dir, use that instead.
59479        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59480        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59481$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59482      fi
59483    fi
59484  fi
59485
59486  if test "x$FOUND_FREETYPE" = xyes; then
59487
59488  # Only process if variable expands to non-empty
59489
59490  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59492
59493  # Input might be given as Windows format, start by converting to
59494  # unix format.
59495  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59496  new_path=`$CYGPATH -u "$path"`
59497
59498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59501  # "foo.exe" is OK but "foo" is an error.
59502  #
59503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59504  # It is also a way to make sure we got the proper file name for the real test later on.
59505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59506  if test "x$test_shortpath" = x; then
59507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59510  fi
59511
59512  # Call helper function which possibly converts this using DOS-style short mode.
59513  # If so, the updated path is stored in $new_path.
59514
59515  input_path="$new_path"
59516  # Check if we need to convert this using DOS-style short mode. If the path
59517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59518  # take no chances and rewrite it.
59519  # Note: m4 eats our [], so we need to use [ and ] instead.
59520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59521  if test "x$has_forbidden_chars" != x; then
59522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59526      # Going to short mode and back again did indeed matter. Since short mode is
59527      # case insensitive, let's make it lowercase to improve readability.
59528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59529      # Now convert it back to Unix-style (cygpath)
59530      input_path=`$CYGPATH -u "$shortmode_path"`
59531      new_path="$input_path"
59532    fi
59533  fi
59534
59535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59536  if test "x$test_cygdrive_prefix" = x; then
59537    # As a simple fix, exclude /usr/bin since it's not a real path.
59538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59540      # a path prefixed by /cygdrive for fixpath to work.
59541      new_path="$CYGWIN_ROOT_PATH$input_path"
59542    fi
59543  fi
59544
59545
59546  if test "x$path" != "x$new_path"; then
59547    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59550  fi
59551
59552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59553
59554  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59555  has_colon=`$ECHO $path | $GREP ^.:`
59556  new_path="$path"
59557  if test "x$has_colon" = x; then
59558    # Not in mixed or Windows style, start by that.
59559    new_path=`cmd //c echo $path`
59560  fi
59561
59562
59563  input_path="$new_path"
59564  # Check if we need to convert this using DOS-style short mode. If the path
59565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59566  # take no chances and rewrite it.
59567  # Note: m4 eats our [], so we need to use [ and ] instead.
59568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59569  if test "x$has_forbidden_chars" != x; then
59570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59572  fi
59573
59574
59575  windows_path="$new_path"
59576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59577    unix_path=`$CYGPATH -u "$windows_path"`
59578    new_path="$unix_path"
59579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59581    new_path="$unix_path"
59582  fi
59583
59584  if test "x$path" != "x$new_path"; then
59585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59588  fi
59589
59590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59592
59593    else
59594      # We're on a unix platform. Hooray! :)
59595      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59596      has_space=`$ECHO "$path" | $GREP " "`
59597      if test "x$has_space" != x; then
59598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59601      fi
59602
59603      # Use eval to expand a potential ~
59604      eval path="$path"
59605      if test ! -f "$path" && test ! -d "$path"; then
59606        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59607      fi
59608
59609      if test -d "$path"; then
59610        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59611      else
59612        dir="`$DIRNAME "$path"`"
59613        base="`$BASENAME "$path"`"
59614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59615      fi
59616    fi
59617  fi
59618
59619
59620  # Only process if variable expands to non-empty
59621
59622  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59624
59625  # Input might be given as Windows format, start by converting to
59626  # unix format.
59627  path="$POTENTIAL_FREETYPE_LIB_PATH"
59628  new_path=`$CYGPATH -u "$path"`
59629
59630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59633  # "foo.exe" is OK but "foo" is an error.
59634  #
59635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59636  # It is also a way to make sure we got the proper file name for the real test later on.
59637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59638  if test "x$test_shortpath" = x; then
59639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59642  fi
59643
59644  # Call helper function which possibly converts this using DOS-style short mode.
59645  # If so, the updated path is stored in $new_path.
59646
59647  input_path="$new_path"
59648  # Check if we need to convert this using DOS-style short mode. If the path
59649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59650  # take no chances and rewrite it.
59651  # Note: m4 eats our [], so we need to use [ and ] instead.
59652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59653  if test "x$has_forbidden_chars" != x; then
59654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59658      # Going to short mode and back again did indeed matter. Since short mode is
59659      # case insensitive, let's make it lowercase to improve readability.
59660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59661      # Now convert it back to Unix-style (cygpath)
59662      input_path=`$CYGPATH -u "$shortmode_path"`
59663      new_path="$input_path"
59664    fi
59665  fi
59666
59667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59668  if test "x$test_cygdrive_prefix" = x; then
59669    # As a simple fix, exclude /usr/bin since it's not a real path.
59670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59672      # a path prefixed by /cygdrive for fixpath to work.
59673      new_path="$CYGWIN_ROOT_PATH$input_path"
59674    fi
59675  fi
59676
59677
59678  if test "x$path" != "x$new_path"; then
59679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59682  fi
59683
59684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59685
59686  path="$POTENTIAL_FREETYPE_LIB_PATH"
59687  has_colon=`$ECHO $path | $GREP ^.:`
59688  new_path="$path"
59689  if test "x$has_colon" = x; then
59690    # Not in mixed or Windows style, start by that.
59691    new_path=`cmd //c echo $path`
59692  fi
59693
59694
59695  input_path="$new_path"
59696  # Check if we need to convert this using DOS-style short mode. If the path
59697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59698  # take no chances and rewrite it.
59699  # Note: m4 eats our [], so we need to use [ and ] instead.
59700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59701  if test "x$has_forbidden_chars" != x; then
59702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59704  fi
59705
59706
59707  windows_path="$new_path"
59708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59709    unix_path=`$CYGPATH -u "$windows_path"`
59710    new_path="$unix_path"
59711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59713    new_path="$unix_path"
59714  fi
59715
59716  if test "x$path" != "x$new_path"; then
59717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59720  fi
59721
59722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59724
59725    else
59726      # We're on a unix platform. Hooray! :)
59727      path="$POTENTIAL_FREETYPE_LIB_PATH"
59728      has_space=`$ECHO "$path" | $GREP " "`
59729      if test "x$has_space" != x; then
59730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59733      fi
59734
59735      # Use eval to expand a potential ~
59736      eval path="$path"
59737      if test ! -f "$path" && test ! -d "$path"; then
59738        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59739      fi
59740
59741      if test -d "$path"; then
59742        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59743      else
59744        dir="`$DIRNAME "$path"`"
59745        base="`$BASENAME "$path"`"
59746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59747      fi
59748    fi
59749  fi
59750
59751
59752    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59754$as_echo_n "checking for freetype includes... " >&6; }
59755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59756$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59757    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59759$as_echo_n "checking for freetype libraries... " >&6; }
59760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59761$as_echo "$FREETYPE_LIB_PATH" >&6; }
59762  fi
59763
59764              else
59765
59766  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59767  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59768  METHOD="well-known location"
59769
59770  # Let's start with an optimistic view of the world :-)
59771  FOUND_FREETYPE=yes
59772
59773  # First look for the canonical freetype main include file ft2build.h.
59774  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59775    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59776    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59777    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59778      # Fail.
59779      FOUND_FREETYPE=no
59780    fi
59781  fi
59782
59783  if test "x$FOUND_FREETYPE" = xyes; then
59784    # Include file found, let's continue the sanity check.
59785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59786$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59787
59788    # Reset to default value
59789    FREETYPE_BASE_NAME=freetype
59790    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59791    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59792      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59794        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59795        # for the .6 version explicitly.
59796        FREETYPE_BASE_NAME=freetype.6
59797        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59798        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59799$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59800      else
59801        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59802$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59803        FOUND_FREETYPE=no
59804      fi
59805    else
59806      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59807        # On Windows, we will need both .lib and .dll file.
59808        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59809          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59811          FOUND_FREETYPE=no
59812        fi
59813      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59814          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59815        # Found lib in isa dir, use that instead.
59816        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59817        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59818$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59819      fi
59820    fi
59821  fi
59822
59823  if test "x$FOUND_FREETYPE" = xyes; then
59824
59825  # Only process if variable expands to non-empty
59826
59827  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59829
59830  # Input might be given as Windows format, start by converting to
59831  # unix format.
59832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59833  new_path=`$CYGPATH -u "$path"`
59834
59835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59838  # "foo.exe" is OK but "foo" is an error.
59839  #
59840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59841  # It is also a way to make sure we got the proper file name for the real test later on.
59842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59843  if test "x$test_shortpath" = x; then
59844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59846    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59847  fi
59848
59849  # Call helper function which possibly converts this using DOS-style short mode.
59850  # If so, the updated path is stored in $new_path.
59851
59852  input_path="$new_path"
59853  # Check if we need to convert this using DOS-style short mode. If the path
59854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59855  # take no chances and rewrite it.
59856  # Note: m4 eats our [], so we need to use [ and ] instead.
59857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59858  if test "x$has_forbidden_chars" != x; then
59859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59863      # Going to short mode and back again did indeed matter. Since short mode is
59864      # case insensitive, let's make it lowercase to improve readability.
59865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59866      # Now convert it back to Unix-style (cygpath)
59867      input_path=`$CYGPATH -u "$shortmode_path"`
59868      new_path="$input_path"
59869    fi
59870  fi
59871
59872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59873  if test "x$test_cygdrive_prefix" = x; then
59874    # As a simple fix, exclude /usr/bin since it's not a real path.
59875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59877      # a path prefixed by /cygdrive for fixpath to work.
59878      new_path="$CYGWIN_ROOT_PATH$input_path"
59879    fi
59880  fi
59881
59882
59883  if test "x$path" != "x$new_path"; then
59884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59887  fi
59888
59889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59890
59891  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59892  has_colon=`$ECHO $path | $GREP ^.:`
59893  new_path="$path"
59894  if test "x$has_colon" = x; then
59895    # Not in mixed or Windows style, start by that.
59896    new_path=`cmd //c echo $path`
59897  fi
59898
59899
59900  input_path="$new_path"
59901  # Check if we need to convert this using DOS-style short mode. If the path
59902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59903  # take no chances and rewrite it.
59904  # Note: m4 eats our [], so we need to use [ and ] instead.
59905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59906  if test "x$has_forbidden_chars" != x; then
59907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59909  fi
59910
59911
59912  windows_path="$new_path"
59913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59914    unix_path=`$CYGPATH -u "$windows_path"`
59915    new_path="$unix_path"
59916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59918    new_path="$unix_path"
59919  fi
59920
59921  if test "x$path" != "x$new_path"; then
59922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59925  fi
59926
59927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59929
59930    else
59931      # We're on a unix platform. Hooray! :)
59932      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59933      has_space=`$ECHO "$path" | $GREP " "`
59934      if test "x$has_space" != x; then
59935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59938      fi
59939
59940      # Use eval to expand a potential ~
59941      eval path="$path"
59942      if test ! -f "$path" && test ! -d "$path"; then
59943        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59944      fi
59945
59946      if test -d "$path"; then
59947        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59948      else
59949        dir="`$DIRNAME "$path"`"
59950        base="`$BASENAME "$path"`"
59951        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59952      fi
59953    fi
59954  fi
59955
59956
59957  # Only process if variable expands to non-empty
59958
59959  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59961
59962  # Input might be given as Windows format, start by converting to
59963  # unix format.
59964  path="$POTENTIAL_FREETYPE_LIB_PATH"
59965  new_path=`$CYGPATH -u "$path"`
59966
59967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59970  # "foo.exe" is OK but "foo" is an error.
59971  #
59972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59973  # It is also a way to make sure we got the proper file name for the real test later on.
59974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59975  if test "x$test_shortpath" = x; then
59976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59978    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59979  fi
59980
59981  # Call helper function which possibly converts this using DOS-style short mode.
59982  # If so, the updated path is stored in $new_path.
59983
59984  input_path="$new_path"
59985  # Check if we need to convert this using DOS-style short mode. If the path
59986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59987  # take no chances and rewrite it.
59988  # Note: m4 eats our [], so we need to use [ and ] instead.
59989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59990  if test "x$has_forbidden_chars" != x; then
59991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59995      # Going to short mode and back again did indeed matter. Since short mode is
59996      # case insensitive, let's make it lowercase to improve readability.
59997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59998      # Now convert it back to Unix-style (cygpath)
59999      input_path=`$CYGPATH -u "$shortmode_path"`
60000      new_path="$input_path"
60001    fi
60002  fi
60003
60004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60005  if test "x$test_cygdrive_prefix" = x; then
60006    # As a simple fix, exclude /usr/bin since it's not a real path.
60007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60009      # a path prefixed by /cygdrive for fixpath to work.
60010      new_path="$CYGWIN_ROOT_PATH$input_path"
60011    fi
60012  fi
60013
60014
60015  if test "x$path" != "x$new_path"; then
60016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60019  fi
60020
60021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60022
60023  path="$POTENTIAL_FREETYPE_LIB_PATH"
60024  has_colon=`$ECHO $path | $GREP ^.:`
60025  new_path="$path"
60026  if test "x$has_colon" = x; then
60027    # Not in mixed or Windows style, start by that.
60028    new_path=`cmd //c echo $path`
60029  fi
60030
60031
60032  input_path="$new_path"
60033  # Check if we need to convert this using DOS-style short mode. If the path
60034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60035  # take no chances and rewrite it.
60036  # Note: m4 eats our [], so we need to use [ and ] instead.
60037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60038  if test "x$has_forbidden_chars" != x; then
60039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60041  fi
60042
60043
60044  windows_path="$new_path"
60045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60046    unix_path=`$CYGPATH -u "$windows_path"`
60047    new_path="$unix_path"
60048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60050    new_path="$unix_path"
60051  fi
60052
60053  if test "x$path" != "x$new_path"; then
60054    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60057  fi
60058
60059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60061
60062    else
60063      # We're on a unix platform. Hooray! :)
60064      path="$POTENTIAL_FREETYPE_LIB_PATH"
60065      has_space=`$ECHO "$path" | $GREP " "`
60066      if test "x$has_space" != x; then
60067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60070      fi
60071
60072      # Use eval to expand a potential ~
60073      eval path="$path"
60074      if test ! -f "$path" && test ! -d "$path"; then
60075        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60076      fi
60077
60078      if test -d "$path"; then
60079        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60080      else
60081        dir="`$DIRNAME "$path"`"
60082        base="`$BASENAME "$path"`"
60083        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60084      fi
60085    fi
60086  fi
60087
60088
60089    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60091$as_echo_n "checking for freetype includes... " >&6; }
60092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60093$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60094    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60096$as_echo_n "checking for freetype libraries... " >&6; }
60097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60098$as_echo "$FREETYPE_LIB_PATH" >&6; }
60099  fi
60100
60101              fi
60102            fi
60103          fi
60104        else
60105          FREETYPE_BASE_DIR="$SYSROOT/usr"
60106
60107  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60108  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60109  METHOD="well-known location"
60110
60111  # Let's start with an optimistic view of the world :-)
60112  FOUND_FREETYPE=yes
60113
60114  # First look for the canonical freetype main include file ft2build.h.
60115  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60116    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60117    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60118    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60119      # Fail.
60120      FOUND_FREETYPE=no
60121    fi
60122  fi
60123
60124  if test "x$FOUND_FREETYPE" = xyes; then
60125    # Include file found, let's continue the sanity check.
60126    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60127$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60128
60129    # Reset to default value
60130    FREETYPE_BASE_NAME=freetype
60131    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60132    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60133      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60134          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60135        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60136        # for the .6 version explicitly.
60137        FREETYPE_BASE_NAME=freetype.6
60138        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60139        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60140$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60141      else
60142        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60143$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60144        FOUND_FREETYPE=no
60145      fi
60146    else
60147      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60148        # On Windows, we will need both .lib and .dll file.
60149        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60150          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60151$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60152          FOUND_FREETYPE=no
60153        fi
60154      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60155          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60156        # Found lib in isa dir, use that instead.
60157        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60158        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60159$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60160      fi
60161    fi
60162  fi
60163
60164  if test "x$FOUND_FREETYPE" = xyes; then
60165
60166  # Only process if variable expands to non-empty
60167
60168  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60170
60171  # Input might be given as Windows format, start by converting to
60172  # unix format.
60173  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60174  new_path=`$CYGPATH -u "$path"`
60175
60176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60179  # "foo.exe" is OK but "foo" is an error.
60180  #
60181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60182  # It is also a way to make sure we got the proper file name for the real test later on.
60183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60184  if test "x$test_shortpath" = x; then
60185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60187    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60188  fi
60189
60190  # Call helper function which possibly converts this using DOS-style short mode.
60191  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60204      # Going to short mode and back again did indeed matter. Since short mode is
60205      # case insensitive, let's make it lowercase to improve readability.
60206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60207      # Now convert it back to Unix-style (cygpath)
60208      input_path=`$CYGPATH -u "$shortmode_path"`
60209      new_path="$input_path"
60210    fi
60211  fi
60212
60213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60214  if test "x$test_cygdrive_prefix" = x; then
60215    # As a simple fix, exclude /usr/bin since it's not a real path.
60216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60218      # a path prefixed by /cygdrive for fixpath to work.
60219      new_path="$CYGWIN_ROOT_PATH$input_path"
60220    fi
60221  fi
60222
60223
60224  if test "x$path" != "x$new_path"; then
60225    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60228  fi
60229
60230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60231
60232  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60233  has_colon=`$ECHO $path | $GREP ^.:`
60234  new_path="$path"
60235  if test "x$has_colon" = x; then
60236    # Not in mixed or Windows style, start by that.
60237    new_path=`cmd //c echo $path`
60238  fi
60239
60240
60241  input_path="$new_path"
60242  # Check if we need to convert this using DOS-style short mode. If the path
60243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60244  # take no chances and rewrite it.
60245  # Note: m4 eats our [], so we need to use [ and ] instead.
60246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60247  if test "x$has_forbidden_chars" != x; then
60248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60250  fi
60251
60252
60253  windows_path="$new_path"
60254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60255    unix_path=`$CYGPATH -u "$windows_path"`
60256    new_path="$unix_path"
60257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60259    new_path="$unix_path"
60260  fi
60261
60262  if test "x$path" != "x$new_path"; then
60263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60266  fi
60267
60268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60270
60271    else
60272      # We're on a unix platform. Hooray! :)
60273      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60274      has_space=`$ECHO "$path" | $GREP " "`
60275      if test "x$has_space" != x; then
60276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60279      fi
60280
60281      # Use eval to expand a potential ~
60282      eval path="$path"
60283      if test ! -f "$path" && test ! -d "$path"; then
60284        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60285      fi
60286
60287      if test -d "$path"; then
60288        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60289      else
60290        dir="`$DIRNAME "$path"`"
60291        base="`$BASENAME "$path"`"
60292        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60293      fi
60294    fi
60295  fi
60296
60297
60298  # Only process if variable expands to non-empty
60299
60300  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60302
60303  # Input might be given as Windows format, start by converting to
60304  # unix format.
60305  path="$POTENTIAL_FREETYPE_LIB_PATH"
60306  new_path=`$CYGPATH -u "$path"`
60307
60308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60311  # "foo.exe" is OK but "foo" is an error.
60312  #
60313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60314  # It is also a way to make sure we got the proper file name for the real test later on.
60315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60316  if test "x$test_shortpath" = x; then
60317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60319    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60320  fi
60321
60322  # Call helper function which possibly converts this using DOS-style short mode.
60323  # If so, the updated path is stored in $new_path.
60324
60325  input_path="$new_path"
60326  # Check if we need to convert this using DOS-style short mode. If the path
60327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60328  # take no chances and rewrite it.
60329  # Note: m4 eats our [], so we need to use [ and ] instead.
60330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60331  if test "x$has_forbidden_chars" != x; then
60332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60336      # Going to short mode and back again did indeed matter. Since short mode is
60337      # case insensitive, let's make it lowercase to improve readability.
60338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60339      # Now convert it back to Unix-style (cygpath)
60340      input_path=`$CYGPATH -u "$shortmode_path"`
60341      new_path="$input_path"
60342    fi
60343  fi
60344
60345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60346  if test "x$test_cygdrive_prefix" = x; then
60347    # As a simple fix, exclude /usr/bin since it's not a real path.
60348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60350      # a path prefixed by /cygdrive for fixpath to work.
60351      new_path="$CYGWIN_ROOT_PATH$input_path"
60352    fi
60353  fi
60354
60355
60356  if test "x$path" != "x$new_path"; then
60357    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60360  fi
60361
60362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60363
60364  path="$POTENTIAL_FREETYPE_LIB_PATH"
60365  has_colon=`$ECHO $path | $GREP ^.:`
60366  new_path="$path"
60367  if test "x$has_colon" = x; then
60368    # Not in mixed or Windows style, start by that.
60369    new_path=`cmd //c echo $path`
60370  fi
60371
60372
60373  input_path="$new_path"
60374  # Check if we need to convert this using DOS-style short mode. If the path
60375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60376  # take no chances and rewrite it.
60377  # Note: m4 eats our [], so we need to use [ and ] instead.
60378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60379  if test "x$has_forbidden_chars" != x; then
60380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60382  fi
60383
60384
60385  windows_path="$new_path"
60386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60387    unix_path=`$CYGPATH -u "$windows_path"`
60388    new_path="$unix_path"
60389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60391    new_path="$unix_path"
60392  fi
60393
60394  if test "x$path" != "x$new_path"; then
60395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60398  fi
60399
60400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60402
60403    else
60404      # We're on a unix platform. Hooray! :)
60405      path="$POTENTIAL_FREETYPE_LIB_PATH"
60406      has_space=`$ECHO "$path" | $GREP " "`
60407      if test "x$has_space" != x; then
60408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60411      fi
60412
60413      # Use eval to expand a potential ~
60414      eval path="$path"
60415      if test ! -f "$path" && test ! -d "$path"; then
60416        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60417      fi
60418
60419      if test -d "$path"; then
60420        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60421      else
60422        dir="`$DIRNAME "$path"`"
60423        base="`$BASENAME "$path"`"
60424        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60425      fi
60426    fi
60427  fi
60428
60429
60430    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60432$as_echo_n "checking for freetype includes... " >&6; }
60433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60434$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60435    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60437$as_echo_n "checking for freetype libraries... " >&6; }
60438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60439$as_echo "$FREETYPE_LIB_PATH" >&6; }
60440  fi
60441
60442
60443          if test "x$FOUND_FREETYPE" != xyes; then
60444            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60445
60446  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60447  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60448  METHOD="well-known location"
60449
60450  # Let's start with an optimistic view of the world :-)
60451  FOUND_FREETYPE=yes
60452
60453  # First look for the canonical freetype main include file ft2build.h.
60454  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60455    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60456    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60457    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60458      # Fail.
60459      FOUND_FREETYPE=no
60460    fi
60461  fi
60462
60463  if test "x$FOUND_FREETYPE" = xyes; then
60464    # Include file found, let's continue the sanity check.
60465    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60466$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60467
60468    # Reset to default value
60469    FREETYPE_BASE_NAME=freetype
60470    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60471    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60472      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60473          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60474        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60475        # for the .6 version explicitly.
60476        FREETYPE_BASE_NAME=freetype.6
60477        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60478        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60479$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60480      else
60481        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60483        FOUND_FREETYPE=no
60484      fi
60485    else
60486      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60487        # On Windows, we will need both .lib and .dll file.
60488        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60489          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60490$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60491          FOUND_FREETYPE=no
60492        fi
60493      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60494          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60495        # Found lib in isa dir, use that instead.
60496        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60497        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60498$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60499      fi
60500    fi
60501  fi
60502
60503  if test "x$FOUND_FREETYPE" = xyes; then
60504
60505  # Only process if variable expands to non-empty
60506
60507  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60509
60510  # Input might be given as Windows format, start by converting to
60511  # unix format.
60512  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60513  new_path=`$CYGPATH -u "$path"`
60514
60515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60518  # "foo.exe" is OK but "foo" is an error.
60519  #
60520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60521  # It is also a way to make sure we got the proper file name for the real test later on.
60522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60523  if test "x$test_shortpath" = x; then
60524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60526    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60527  fi
60528
60529  # Call helper function which possibly converts this using DOS-style short mode.
60530  # If so, the updated path is stored in $new_path.
60531
60532  input_path="$new_path"
60533  # Check if we need to convert this using DOS-style short mode. If the path
60534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60535  # take no chances and rewrite it.
60536  # Note: m4 eats our [], so we need to use [ and ] instead.
60537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60538  if test "x$has_forbidden_chars" != x; then
60539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60543      # Going to short mode and back again did indeed matter. Since short mode is
60544      # case insensitive, let's make it lowercase to improve readability.
60545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60546      # Now convert it back to Unix-style (cygpath)
60547      input_path=`$CYGPATH -u "$shortmode_path"`
60548      new_path="$input_path"
60549    fi
60550  fi
60551
60552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60553  if test "x$test_cygdrive_prefix" = x; then
60554    # As a simple fix, exclude /usr/bin since it's not a real path.
60555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60557      # a path prefixed by /cygdrive for fixpath to work.
60558      new_path="$CYGWIN_ROOT_PATH$input_path"
60559    fi
60560  fi
60561
60562
60563  if test "x$path" != "x$new_path"; then
60564    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60567  fi
60568
60569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60570
60571  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60572  has_colon=`$ECHO $path | $GREP ^.:`
60573  new_path="$path"
60574  if test "x$has_colon" = x; then
60575    # Not in mixed or Windows style, start by that.
60576    new_path=`cmd //c echo $path`
60577  fi
60578
60579
60580  input_path="$new_path"
60581  # Check if we need to convert this using DOS-style short mode. If the path
60582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60583  # take no chances and rewrite it.
60584  # Note: m4 eats our [], so we need to use [ and ] instead.
60585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60586  if test "x$has_forbidden_chars" != x; then
60587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60589  fi
60590
60591
60592  windows_path="$new_path"
60593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60594    unix_path=`$CYGPATH -u "$windows_path"`
60595    new_path="$unix_path"
60596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60598    new_path="$unix_path"
60599  fi
60600
60601  if test "x$path" != "x$new_path"; then
60602    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60605  fi
60606
60607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60609
60610    else
60611      # We're on a unix platform. Hooray! :)
60612      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60613      has_space=`$ECHO "$path" | $GREP " "`
60614      if test "x$has_space" != x; then
60615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60618      fi
60619
60620      # Use eval to expand a potential ~
60621      eval path="$path"
60622      if test ! -f "$path" && test ! -d "$path"; then
60623        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60624      fi
60625
60626      if test -d "$path"; then
60627        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60628      else
60629        dir="`$DIRNAME "$path"`"
60630        base="`$BASENAME "$path"`"
60631        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60632      fi
60633    fi
60634  fi
60635
60636
60637  # Only process if variable expands to non-empty
60638
60639  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60641
60642  # Input might be given as Windows format, start by converting to
60643  # unix format.
60644  path="$POTENTIAL_FREETYPE_LIB_PATH"
60645  new_path=`$CYGPATH -u "$path"`
60646
60647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60650  # "foo.exe" is OK but "foo" is an error.
60651  #
60652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60653  # It is also a way to make sure we got the proper file name for the real test later on.
60654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60655  if test "x$test_shortpath" = x; then
60656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60658    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60659  fi
60660
60661  # Call helper function which possibly converts this using DOS-style short mode.
60662  # If so, the updated path is stored in $new_path.
60663
60664  input_path="$new_path"
60665  # Check if we need to convert this using DOS-style short mode. If the path
60666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60667  # take no chances and rewrite it.
60668  # Note: m4 eats our [], so we need to use [ and ] instead.
60669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60670  if test "x$has_forbidden_chars" != x; then
60671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60675      # Going to short mode and back again did indeed matter. Since short mode is
60676      # case insensitive, let's make it lowercase to improve readability.
60677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60678      # Now convert it back to Unix-style (cygpath)
60679      input_path=`$CYGPATH -u "$shortmode_path"`
60680      new_path="$input_path"
60681    fi
60682  fi
60683
60684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60685  if test "x$test_cygdrive_prefix" = x; then
60686    # As a simple fix, exclude /usr/bin since it's not a real path.
60687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60689      # a path prefixed by /cygdrive for fixpath to work.
60690      new_path="$CYGWIN_ROOT_PATH$input_path"
60691    fi
60692  fi
60693
60694
60695  if test "x$path" != "x$new_path"; then
60696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60699  fi
60700
60701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60702
60703  path="$POTENTIAL_FREETYPE_LIB_PATH"
60704  has_colon=`$ECHO $path | $GREP ^.:`
60705  new_path="$path"
60706  if test "x$has_colon" = x; then
60707    # Not in mixed or Windows style, start by that.
60708    new_path=`cmd //c echo $path`
60709  fi
60710
60711
60712  input_path="$new_path"
60713  # Check if we need to convert this using DOS-style short mode. If the path
60714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60715  # take no chances and rewrite it.
60716  # Note: m4 eats our [], so we need to use [ and ] instead.
60717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60718  if test "x$has_forbidden_chars" != x; then
60719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60721  fi
60722
60723
60724  windows_path="$new_path"
60725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60726    unix_path=`$CYGPATH -u "$windows_path"`
60727    new_path="$unix_path"
60728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60730    new_path="$unix_path"
60731  fi
60732
60733  if test "x$path" != "x$new_path"; then
60734    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60737  fi
60738
60739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60741
60742    else
60743      # We're on a unix platform. Hooray! :)
60744      path="$POTENTIAL_FREETYPE_LIB_PATH"
60745      has_space=`$ECHO "$path" | $GREP " "`
60746      if test "x$has_space" != x; then
60747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60750      fi
60751
60752      # Use eval to expand a potential ~
60753      eval path="$path"
60754      if test ! -f "$path" && test ! -d "$path"; then
60755        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60756      fi
60757
60758      if test -d "$path"; then
60759        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60760      else
60761        dir="`$DIRNAME "$path"`"
60762        base="`$BASENAME "$path"`"
60763        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60764      fi
60765    fi
60766  fi
60767
60768
60769    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60771$as_echo_n "checking for freetype includes... " >&6; }
60772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60773$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60774    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60776$as_echo_n "checking for freetype libraries... " >&6; }
60777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60778$as_echo "$FREETYPE_LIB_PATH" >&6; }
60779  fi
60780
60781          fi
60782
60783          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60784            if test "x$FOUND_FREETYPE" != xyes; then
60785              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60786              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60787
60788  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60789  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60790  METHOD="well-known location"
60791
60792  # Let's start with an optimistic view of the world :-)
60793  FOUND_FREETYPE=yes
60794
60795  # First look for the canonical freetype main include file ft2build.h.
60796  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60797    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60798    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60799    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60800      # Fail.
60801      FOUND_FREETYPE=no
60802    fi
60803  fi
60804
60805  if test "x$FOUND_FREETYPE" = xyes; then
60806    # Include file found, let's continue the sanity check.
60807    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60808$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60809
60810    # Reset to default value
60811    FREETYPE_BASE_NAME=freetype
60812    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60813    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60814      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60815          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60816        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60817        # for the .6 version explicitly.
60818        FREETYPE_BASE_NAME=freetype.6
60819        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60820        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60821$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60822      else
60823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60824$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60825        FOUND_FREETYPE=no
60826      fi
60827    else
60828      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60829        # On Windows, we will need both .lib and .dll file.
60830        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60831          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60832$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60833          FOUND_FREETYPE=no
60834        fi
60835      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60836          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60837        # Found lib in isa dir, use that instead.
60838        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60839        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60840$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60841      fi
60842    fi
60843  fi
60844
60845  if test "x$FOUND_FREETYPE" = xyes; then
60846
60847  # Only process if variable expands to non-empty
60848
60849  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60851
60852  # Input might be given as Windows format, start by converting to
60853  # unix format.
60854  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60855  new_path=`$CYGPATH -u "$path"`
60856
60857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60860  # "foo.exe" is OK but "foo" is an error.
60861  #
60862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60863  # It is also a way to make sure we got the proper file name for the real test later on.
60864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60865  if test "x$test_shortpath" = x; then
60866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60868    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60869  fi
60870
60871  # Call helper function which possibly converts this using DOS-style short mode.
60872  # If so, the updated path is stored in $new_path.
60873
60874  input_path="$new_path"
60875  # Check if we need to convert this using DOS-style short mode. If the path
60876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60877  # take no chances and rewrite it.
60878  # Note: m4 eats our [], so we need to use [ and ] instead.
60879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60880  if test "x$has_forbidden_chars" != x; then
60881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60885      # Going to short mode and back again did indeed matter. Since short mode is
60886      # case insensitive, let's make it lowercase to improve readability.
60887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60888      # Now convert it back to Unix-style (cygpath)
60889      input_path=`$CYGPATH -u "$shortmode_path"`
60890      new_path="$input_path"
60891    fi
60892  fi
60893
60894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60895  if test "x$test_cygdrive_prefix" = x; then
60896    # As a simple fix, exclude /usr/bin since it's not a real path.
60897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60899      # a path prefixed by /cygdrive for fixpath to work.
60900      new_path="$CYGWIN_ROOT_PATH$input_path"
60901    fi
60902  fi
60903
60904
60905  if test "x$path" != "x$new_path"; then
60906    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60909  fi
60910
60911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60912
60913  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60914  has_colon=`$ECHO $path | $GREP ^.:`
60915  new_path="$path"
60916  if test "x$has_colon" = x; then
60917    # Not in mixed or Windows style, start by that.
60918    new_path=`cmd //c echo $path`
60919  fi
60920
60921
60922  input_path="$new_path"
60923  # Check if we need to convert this using DOS-style short mode. If the path
60924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60925  # take no chances and rewrite it.
60926  # Note: m4 eats our [], so we need to use [ and ] instead.
60927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60928  if test "x$has_forbidden_chars" != x; then
60929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60931  fi
60932
60933
60934  windows_path="$new_path"
60935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60936    unix_path=`$CYGPATH -u "$windows_path"`
60937    new_path="$unix_path"
60938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60940    new_path="$unix_path"
60941  fi
60942
60943  if test "x$path" != "x$new_path"; then
60944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60947  fi
60948
60949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60951
60952    else
60953      # We're on a unix platform. Hooray! :)
60954      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60955      has_space=`$ECHO "$path" | $GREP " "`
60956      if test "x$has_space" != x; then
60957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60960      fi
60961
60962      # Use eval to expand a potential ~
60963      eval path="$path"
60964      if test ! -f "$path" && test ! -d "$path"; then
60965        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60966      fi
60967
60968      if test -d "$path"; then
60969        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60970      else
60971        dir="`$DIRNAME "$path"`"
60972        base="`$BASENAME "$path"`"
60973        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60974      fi
60975    fi
60976  fi
60977
60978
60979  # Only process if variable expands to non-empty
60980
60981  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60983
60984  # Input might be given as Windows format, start by converting to
60985  # unix format.
60986  path="$POTENTIAL_FREETYPE_LIB_PATH"
60987  new_path=`$CYGPATH -u "$path"`
60988
60989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60992  # "foo.exe" is OK but "foo" is an error.
60993  #
60994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60995  # It is also a way to make sure we got the proper file name for the real test later on.
60996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60997  if test "x$test_shortpath" = x; then
60998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61000    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61001  fi
61002
61003  # Call helper function which possibly converts this using DOS-style short mode.
61004  # If so, the updated path is stored in $new_path.
61005
61006  input_path="$new_path"
61007  # Check if we need to convert this using DOS-style short mode. If the path
61008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61009  # take no chances and rewrite it.
61010  # Note: m4 eats our [], so we need to use [ and ] instead.
61011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61012  if test "x$has_forbidden_chars" != x; then
61013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61017      # Going to short mode and back again did indeed matter. Since short mode is
61018      # case insensitive, let's make it lowercase to improve readability.
61019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61020      # Now convert it back to Unix-style (cygpath)
61021      input_path=`$CYGPATH -u "$shortmode_path"`
61022      new_path="$input_path"
61023    fi
61024  fi
61025
61026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61027  if test "x$test_cygdrive_prefix" = x; then
61028    # As a simple fix, exclude /usr/bin since it's not a real path.
61029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61031      # a path prefixed by /cygdrive for fixpath to work.
61032      new_path="$CYGWIN_ROOT_PATH$input_path"
61033    fi
61034  fi
61035
61036
61037  if test "x$path" != "x$new_path"; then
61038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61041  fi
61042
61043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61044
61045  path="$POTENTIAL_FREETYPE_LIB_PATH"
61046  has_colon=`$ECHO $path | $GREP ^.:`
61047  new_path="$path"
61048  if test "x$has_colon" = x; then
61049    # Not in mixed or Windows style, start by that.
61050    new_path=`cmd //c echo $path`
61051  fi
61052
61053
61054  input_path="$new_path"
61055  # Check if we need to convert this using DOS-style short mode. If the path
61056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61057  # take no chances and rewrite it.
61058  # Note: m4 eats our [], so we need to use [ and ] instead.
61059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61060  if test "x$has_forbidden_chars" != x; then
61061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61063  fi
61064
61065
61066  windows_path="$new_path"
61067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61068    unix_path=`$CYGPATH -u "$windows_path"`
61069    new_path="$unix_path"
61070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61072    new_path="$unix_path"
61073  fi
61074
61075  if test "x$path" != "x$new_path"; then
61076    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61079  fi
61080
61081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61083
61084    else
61085      # We're on a unix platform. Hooray! :)
61086      path="$POTENTIAL_FREETYPE_LIB_PATH"
61087      has_space=`$ECHO "$path" | $GREP " "`
61088      if test "x$has_space" != x; then
61089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61092      fi
61093
61094      # Use eval to expand a potential ~
61095      eval path="$path"
61096      if test ! -f "$path" && test ! -d "$path"; then
61097        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61098      fi
61099
61100      if test -d "$path"; then
61101        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61102      else
61103        dir="`$DIRNAME "$path"`"
61104        base="`$BASENAME "$path"`"
61105        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61106      fi
61107    fi
61108  fi
61109
61110
61111    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61113$as_echo_n "checking for freetype includes... " >&6; }
61114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61115$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61116    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61118$as_echo_n "checking for freetype libraries... " >&6; }
61119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61120$as_echo "$FREETYPE_LIB_PATH" >&6; }
61121  fi
61122
61123            fi
61124          fi
61125
61126          if test "x$FOUND_FREETYPE" != xyes; then
61127            FREETYPE_BASE_DIR="$SYSROOT/usr"
61128            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61129
61130  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61131  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61132  METHOD="well-known location"
61133
61134  # Let's start with an optimistic view of the world :-)
61135  FOUND_FREETYPE=yes
61136
61137  # First look for the canonical freetype main include file ft2build.h.
61138  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61139    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61140    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61141    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61142      # Fail.
61143      FOUND_FREETYPE=no
61144    fi
61145  fi
61146
61147  if test "x$FOUND_FREETYPE" = xyes; then
61148    # Include file found, let's continue the sanity check.
61149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61150$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61151
61152    # Reset to default value
61153    FREETYPE_BASE_NAME=freetype
61154    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61155    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61156      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61157          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61158        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61159        # for the .6 version explicitly.
61160        FREETYPE_BASE_NAME=freetype.6
61161        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61162        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61163$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61164      else
61165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61167        FOUND_FREETYPE=no
61168      fi
61169    else
61170      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61171        # On Windows, we will need both .lib and .dll file.
61172        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61173          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61174$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61175          FOUND_FREETYPE=no
61176        fi
61177      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61178          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61179        # Found lib in isa dir, use that instead.
61180        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61181        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61182$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61183      fi
61184    fi
61185  fi
61186
61187  if test "x$FOUND_FREETYPE" = xyes; then
61188
61189  # Only process if variable expands to non-empty
61190
61191  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61193
61194  # Input might be given as Windows format, start by converting to
61195  # unix format.
61196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61197  new_path=`$CYGPATH -u "$path"`
61198
61199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61202  # "foo.exe" is OK but "foo" is an error.
61203  #
61204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61205  # It is also a way to make sure we got the proper file name for the real test later on.
61206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61207  if test "x$test_shortpath" = x; then
61208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61209$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61210    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61211  fi
61212
61213  # Call helper function which possibly converts this using DOS-style short mode.
61214  # If so, the updated path is stored in $new_path.
61215
61216  input_path="$new_path"
61217  # Check if we need to convert this using DOS-style short mode. If the path
61218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61219  # take no chances and rewrite it.
61220  # Note: m4 eats our [], so we need to use [ and ] instead.
61221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61222  if test "x$has_forbidden_chars" != x; then
61223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61227      # Going to short mode and back again did indeed matter. Since short mode is
61228      # case insensitive, let's make it lowercase to improve readability.
61229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61230      # Now convert it back to Unix-style (cygpath)
61231      input_path=`$CYGPATH -u "$shortmode_path"`
61232      new_path="$input_path"
61233    fi
61234  fi
61235
61236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61237  if test "x$test_cygdrive_prefix" = x; then
61238    # As a simple fix, exclude /usr/bin since it's not a real path.
61239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61241      # a path prefixed by /cygdrive for fixpath to work.
61242      new_path="$CYGWIN_ROOT_PATH$input_path"
61243    fi
61244  fi
61245
61246
61247  if test "x$path" != "x$new_path"; then
61248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61251  fi
61252
61253    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61254
61255  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61256  has_colon=`$ECHO $path | $GREP ^.:`
61257  new_path="$path"
61258  if test "x$has_colon" = x; then
61259    # Not in mixed or Windows style, start by that.
61260    new_path=`cmd //c echo $path`
61261  fi
61262
61263
61264  input_path="$new_path"
61265  # Check if we need to convert this using DOS-style short mode. If the path
61266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61267  # take no chances and rewrite it.
61268  # Note: m4 eats our [], so we need to use [ and ] instead.
61269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61270  if test "x$has_forbidden_chars" != x; then
61271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61273  fi
61274
61275
61276  windows_path="$new_path"
61277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61278    unix_path=`$CYGPATH -u "$windows_path"`
61279    new_path="$unix_path"
61280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61282    new_path="$unix_path"
61283  fi
61284
61285  if test "x$path" != "x$new_path"; then
61286    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61289  fi
61290
61291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61293
61294    else
61295      # We're on a unix platform. Hooray! :)
61296      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61297      has_space=`$ECHO "$path" | $GREP " "`
61298      if test "x$has_space" != x; then
61299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61301        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61302      fi
61303
61304      # Use eval to expand a potential ~
61305      eval path="$path"
61306      if test ! -f "$path" && test ! -d "$path"; then
61307        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61308      fi
61309
61310      if test -d "$path"; then
61311        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61312      else
61313        dir="`$DIRNAME "$path"`"
61314        base="`$BASENAME "$path"`"
61315        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61316      fi
61317    fi
61318  fi
61319
61320
61321  # Only process if variable expands to non-empty
61322
61323  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61325
61326  # Input might be given as Windows format, start by converting to
61327  # unix format.
61328  path="$POTENTIAL_FREETYPE_LIB_PATH"
61329  new_path=`$CYGPATH -u "$path"`
61330
61331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61334  # "foo.exe" is OK but "foo" is an error.
61335  #
61336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61337  # It is also a way to make sure we got the proper file name for the real test later on.
61338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61339  if test "x$test_shortpath" = x; then
61340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61342    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61343  fi
61344
61345  # Call helper function which possibly converts this using DOS-style short mode.
61346  # If so, the updated path is stored in $new_path.
61347
61348  input_path="$new_path"
61349  # Check if we need to convert this using DOS-style short mode. If the path
61350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61351  # take no chances and rewrite it.
61352  # Note: m4 eats our [], so we need to use [ and ] instead.
61353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61354  if test "x$has_forbidden_chars" != x; then
61355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61359      # Going to short mode and back again did indeed matter. Since short mode is
61360      # case insensitive, let's make it lowercase to improve readability.
61361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61362      # Now convert it back to Unix-style (cygpath)
61363      input_path=`$CYGPATH -u "$shortmode_path"`
61364      new_path="$input_path"
61365    fi
61366  fi
61367
61368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61369  if test "x$test_cygdrive_prefix" = x; then
61370    # As a simple fix, exclude /usr/bin since it's not a real path.
61371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61373      # a path prefixed by /cygdrive for fixpath to work.
61374      new_path="$CYGWIN_ROOT_PATH$input_path"
61375    fi
61376  fi
61377
61378
61379  if test "x$path" != "x$new_path"; then
61380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61383  fi
61384
61385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61386
61387  path="$POTENTIAL_FREETYPE_LIB_PATH"
61388  has_colon=`$ECHO $path | $GREP ^.:`
61389  new_path="$path"
61390  if test "x$has_colon" = x; then
61391    # Not in mixed or Windows style, start by that.
61392    new_path=`cmd //c echo $path`
61393  fi
61394
61395
61396  input_path="$new_path"
61397  # Check if we need to convert this using DOS-style short mode. If the path
61398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61399  # take no chances and rewrite it.
61400  # Note: m4 eats our [], so we need to use [ and ] instead.
61401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61402  if test "x$has_forbidden_chars" != x; then
61403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61405  fi
61406
61407
61408  windows_path="$new_path"
61409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61410    unix_path=`$CYGPATH -u "$windows_path"`
61411    new_path="$unix_path"
61412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61414    new_path="$unix_path"
61415  fi
61416
61417  if test "x$path" != "x$new_path"; then
61418    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61421  fi
61422
61423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61425
61426    else
61427      # We're on a unix platform. Hooray! :)
61428      path="$POTENTIAL_FREETYPE_LIB_PATH"
61429      has_space=`$ECHO "$path" | $GREP " "`
61430      if test "x$has_space" != x; then
61431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61434      fi
61435
61436      # Use eval to expand a potential ~
61437      eval path="$path"
61438      if test ! -f "$path" && test ! -d "$path"; then
61439        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61440      fi
61441
61442      if test -d "$path"; then
61443        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61444      else
61445        dir="`$DIRNAME "$path"`"
61446        base="`$BASENAME "$path"`"
61447        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61448      fi
61449    fi
61450  fi
61451
61452
61453    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61455$as_echo_n "checking for freetype includes... " >&6; }
61456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61457$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61458    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61460$as_echo_n "checking for freetype libraries... " >&6; }
61461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61462$as_echo "$FREETYPE_LIB_PATH" >&6; }
61463  fi
61464
61465            else
61466
61467  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61468  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61469  METHOD="well-known location"
61470
61471  # Let's start with an optimistic view of the world :-)
61472  FOUND_FREETYPE=yes
61473
61474  # First look for the canonical freetype main include file ft2build.h.
61475  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61476    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61477    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61478    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61479      # Fail.
61480      FOUND_FREETYPE=no
61481    fi
61482  fi
61483
61484  if test "x$FOUND_FREETYPE" = xyes; then
61485    # Include file found, let's continue the sanity check.
61486    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61487$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61488
61489    # Reset to default value
61490    FREETYPE_BASE_NAME=freetype
61491    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61492    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61493      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61494          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61495        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61496        # for the .6 version explicitly.
61497        FREETYPE_BASE_NAME=freetype.6
61498        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61499        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61500$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61501      else
61502        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61503$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61504        FOUND_FREETYPE=no
61505      fi
61506    else
61507      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61508        # On Windows, we will need both .lib and .dll file.
61509        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61510          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61512          FOUND_FREETYPE=no
61513        fi
61514      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61515          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61516        # Found lib in isa dir, use that instead.
61517        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61518        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61519$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61520      fi
61521    fi
61522  fi
61523
61524  if test "x$FOUND_FREETYPE" = xyes; then
61525
61526  # Only process if variable expands to non-empty
61527
61528  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61530
61531  # Input might be given as Windows format, start by converting to
61532  # unix format.
61533  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61534  new_path=`$CYGPATH -u "$path"`
61535
61536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61539  # "foo.exe" is OK but "foo" is an error.
61540  #
61541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61542  # It is also a way to make sure we got the proper file name for the real test later on.
61543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61544  if test "x$test_shortpath" = x; then
61545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61547    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61548  fi
61549
61550  # Call helper function which possibly converts this using DOS-style short mode.
61551  # If so, the updated path is stored in $new_path.
61552
61553  input_path="$new_path"
61554  # Check if we need to convert this using DOS-style short mode. If the path
61555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61556  # take no chances and rewrite it.
61557  # Note: m4 eats our [], so we need to use [ and ] instead.
61558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61559  if test "x$has_forbidden_chars" != x; then
61560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61564      # Going to short mode and back again did indeed matter. Since short mode is
61565      # case insensitive, let's make it lowercase to improve readability.
61566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61567      # Now convert it back to Unix-style (cygpath)
61568      input_path=`$CYGPATH -u "$shortmode_path"`
61569      new_path="$input_path"
61570    fi
61571  fi
61572
61573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61574  if test "x$test_cygdrive_prefix" = x; then
61575    # As a simple fix, exclude /usr/bin since it's not a real path.
61576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61578      # a path prefixed by /cygdrive for fixpath to work.
61579      new_path="$CYGWIN_ROOT_PATH$input_path"
61580    fi
61581  fi
61582
61583
61584  if test "x$path" != "x$new_path"; then
61585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61588  fi
61589
61590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61591
61592  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61593  has_colon=`$ECHO $path | $GREP ^.:`
61594  new_path="$path"
61595  if test "x$has_colon" = x; then
61596    # Not in mixed or Windows style, start by that.
61597    new_path=`cmd //c echo $path`
61598  fi
61599
61600
61601  input_path="$new_path"
61602  # Check if we need to convert this using DOS-style short mode. If the path
61603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61604  # take no chances and rewrite it.
61605  # Note: m4 eats our [], so we need to use [ and ] instead.
61606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61607  if test "x$has_forbidden_chars" != x; then
61608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61610  fi
61611
61612
61613  windows_path="$new_path"
61614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61615    unix_path=`$CYGPATH -u "$windows_path"`
61616    new_path="$unix_path"
61617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61619    new_path="$unix_path"
61620  fi
61621
61622  if test "x$path" != "x$new_path"; then
61623    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61625$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61626  fi
61627
61628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61630
61631    else
61632      # We're on a unix platform. Hooray! :)
61633      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61634      has_space=`$ECHO "$path" | $GREP " "`
61635      if test "x$has_space" != x; then
61636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61639      fi
61640
61641      # Use eval to expand a potential ~
61642      eval path="$path"
61643      if test ! -f "$path" && test ! -d "$path"; then
61644        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61645      fi
61646
61647      if test -d "$path"; then
61648        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61649      else
61650        dir="`$DIRNAME "$path"`"
61651        base="`$BASENAME "$path"`"
61652        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61653      fi
61654    fi
61655  fi
61656
61657
61658  # Only process if variable expands to non-empty
61659
61660  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61662
61663  # Input might be given as Windows format, start by converting to
61664  # unix format.
61665  path="$POTENTIAL_FREETYPE_LIB_PATH"
61666  new_path=`$CYGPATH -u "$path"`
61667
61668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61671  # "foo.exe" is OK but "foo" is an error.
61672  #
61673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61674  # It is also a way to make sure we got the proper file name for the real test later on.
61675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61676  if test "x$test_shortpath" = x; then
61677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61680  fi
61681
61682  # Call helper function which possibly converts this using DOS-style short mode.
61683  # If so, the updated path is stored in $new_path.
61684
61685  input_path="$new_path"
61686  # Check if we need to convert this using DOS-style short mode. If the path
61687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61688  # take no chances and rewrite it.
61689  # Note: m4 eats our [], so we need to use [ and ] instead.
61690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61691  if test "x$has_forbidden_chars" != x; then
61692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61696      # Going to short mode and back again did indeed matter. Since short mode is
61697      # case insensitive, let's make it lowercase to improve readability.
61698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61699      # Now convert it back to Unix-style (cygpath)
61700      input_path=`$CYGPATH -u "$shortmode_path"`
61701      new_path="$input_path"
61702    fi
61703  fi
61704
61705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61706  if test "x$test_cygdrive_prefix" = x; then
61707    # As a simple fix, exclude /usr/bin since it's not a real path.
61708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61710      # a path prefixed by /cygdrive for fixpath to work.
61711      new_path="$CYGWIN_ROOT_PATH$input_path"
61712    fi
61713  fi
61714
61715
61716  if test "x$path" != "x$new_path"; then
61717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61720  fi
61721
61722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61723
61724  path="$POTENTIAL_FREETYPE_LIB_PATH"
61725  has_colon=`$ECHO $path | $GREP ^.:`
61726  new_path="$path"
61727  if test "x$has_colon" = x; then
61728    # Not in mixed or Windows style, start by that.
61729    new_path=`cmd //c echo $path`
61730  fi
61731
61732
61733  input_path="$new_path"
61734  # Check if we need to convert this using DOS-style short mode. If the path
61735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61736  # take no chances and rewrite it.
61737  # Note: m4 eats our [], so we need to use [ and ] instead.
61738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61739  if test "x$has_forbidden_chars" != x; then
61740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61742  fi
61743
61744
61745  windows_path="$new_path"
61746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61747    unix_path=`$CYGPATH -u "$windows_path"`
61748    new_path="$unix_path"
61749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61751    new_path="$unix_path"
61752  fi
61753
61754  if test "x$path" != "x$new_path"; then
61755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61758  fi
61759
61760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61762
61763    else
61764      # We're on a unix platform. Hooray! :)
61765      path="$POTENTIAL_FREETYPE_LIB_PATH"
61766      has_space=`$ECHO "$path" | $GREP " "`
61767      if test "x$has_space" != x; then
61768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61771      fi
61772
61773      # Use eval to expand a potential ~
61774      eval path="$path"
61775      if test ! -f "$path" && test ! -d "$path"; then
61776        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61777      fi
61778
61779      if test -d "$path"; then
61780        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61781      else
61782        dir="`$DIRNAME "$path"`"
61783        base="`$BASENAME "$path"`"
61784        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61785      fi
61786    fi
61787  fi
61788
61789
61790    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61792$as_echo_n "checking for freetype includes... " >&6; }
61793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61794$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61795    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61797$as_echo_n "checking for freetype libraries... " >&6; }
61798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61799$as_echo "$FREETYPE_LIB_PATH" >&6; }
61800  fi
61801
61802              if test "x$FOUND_FREETYPE" != xyes; then
61803
61804  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61805  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61806  METHOD="well-known location"
61807
61808  # Let's start with an optimistic view of the world :-)
61809  FOUND_FREETYPE=yes
61810
61811  # First look for the canonical freetype main include file ft2build.h.
61812  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61813    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61814    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61815    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61816      # Fail.
61817      FOUND_FREETYPE=no
61818    fi
61819  fi
61820
61821  if test "x$FOUND_FREETYPE" = xyes; then
61822    # Include file found, let's continue the sanity check.
61823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61824$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61825
61826    # Reset to default value
61827    FREETYPE_BASE_NAME=freetype
61828    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61829    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61830      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61831          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61832        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61833        # for the .6 version explicitly.
61834        FREETYPE_BASE_NAME=freetype.6
61835        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61836        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61837$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61838      else
61839        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61840$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61841        FOUND_FREETYPE=no
61842      fi
61843    else
61844      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61845        # On Windows, we will need both .lib and .dll file.
61846        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61847          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61848$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61849          FOUND_FREETYPE=no
61850        fi
61851      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61852          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61853        # Found lib in isa dir, use that instead.
61854        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61855        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61856$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61857      fi
61858    fi
61859  fi
61860
61861  if test "x$FOUND_FREETYPE" = xyes; then
61862
61863  # Only process if variable expands to non-empty
61864
61865  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61867
61868  # Input might be given as Windows format, start by converting to
61869  # unix format.
61870  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61871  new_path=`$CYGPATH -u "$path"`
61872
61873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61876  # "foo.exe" is OK but "foo" is an error.
61877  #
61878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61879  # It is also a way to make sure we got the proper file name for the real test later on.
61880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61881  if test "x$test_shortpath" = x; then
61882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61883$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61884    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61885  fi
61886
61887  # Call helper function which possibly converts this using DOS-style short mode.
61888  # If so, the updated path is stored in $new_path.
61889
61890  input_path="$new_path"
61891  # Check if we need to convert this using DOS-style short mode. If the path
61892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61893  # take no chances and rewrite it.
61894  # Note: m4 eats our [], so we need to use [ and ] instead.
61895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61896  if test "x$has_forbidden_chars" != x; then
61897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61901      # Going to short mode and back again did indeed matter. Since short mode is
61902      # case insensitive, let's make it lowercase to improve readability.
61903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61904      # Now convert it back to Unix-style (cygpath)
61905      input_path=`$CYGPATH -u "$shortmode_path"`
61906      new_path="$input_path"
61907    fi
61908  fi
61909
61910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61911  if test "x$test_cygdrive_prefix" = x; then
61912    # As a simple fix, exclude /usr/bin since it's not a real path.
61913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61915      # a path prefixed by /cygdrive for fixpath to work.
61916      new_path="$CYGWIN_ROOT_PATH$input_path"
61917    fi
61918  fi
61919
61920
61921  if test "x$path" != "x$new_path"; then
61922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61925  fi
61926
61927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61928
61929  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61930  has_colon=`$ECHO $path | $GREP ^.:`
61931  new_path="$path"
61932  if test "x$has_colon" = x; then
61933    # Not in mixed or Windows style, start by that.
61934    new_path=`cmd //c echo $path`
61935  fi
61936
61937
61938  input_path="$new_path"
61939  # Check if we need to convert this using DOS-style short mode. If the path
61940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61941  # take no chances and rewrite it.
61942  # Note: m4 eats our [], so we need to use [ and ] instead.
61943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61944  if test "x$has_forbidden_chars" != x; then
61945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61947  fi
61948
61949
61950  windows_path="$new_path"
61951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61952    unix_path=`$CYGPATH -u "$windows_path"`
61953    new_path="$unix_path"
61954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61956    new_path="$unix_path"
61957  fi
61958
61959  if test "x$path" != "x$new_path"; then
61960    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61962$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61963  fi
61964
61965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61967
61968    else
61969      # We're on a unix platform. Hooray! :)
61970      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61971      has_space=`$ECHO "$path" | $GREP " "`
61972      if test "x$has_space" != x; then
61973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61976      fi
61977
61978      # Use eval to expand a potential ~
61979      eval path="$path"
61980      if test ! -f "$path" && test ! -d "$path"; then
61981        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61982      fi
61983
61984      if test -d "$path"; then
61985        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61986      else
61987        dir="`$DIRNAME "$path"`"
61988        base="`$BASENAME "$path"`"
61989        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61990      fi
61991    fi
61992  fi
61993
61994
61995  # Only process if variable expands to non-empty
61996
61997  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61999
62000  # Input might be given as Windows format, start by converting to
62001  # unix format.
62002  path="$POTENTIAL_FREETYPE_LIB_PATH"
62003  new_path=`$CYGPATH -u "$path"`
62004
62005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62008  # "foo.exe" is OK but "foo" is an error.
62009  #
62010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62011  # It is also a way to make sure we got the proper file name for the real test later on.
62012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62013  if test "x$test_shortpath" = x; then
62014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62016    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62017  fi
62018
62019  # Call helper function which possibly converts this using DOS-style short mode.
62020  # If so, the updated path is stored in $new_path.
62021
62022  input_path="$new_path"
62023  # Check if we need to convert this using DOS-style short mode. If the path
62024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62025  # take no chances and rewrite it.
62026  # Note: m4 eats our [], so we need to use [ and ] instead.
62027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62028  if test "x$has_forbidden_chars" != x; then
62029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62033      # Going to short mode and back again did indeed matter. Since short mode is
62034      # case insensitive, let's make it lowercase to improve readability.
62035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62036      # Now convert it back to Unix-style (cygpath)
62037      input_path=`$CYGPATH -u "$shortmode_path"`
62038      new_path="$input_path"
62039    fi
62040  fi
62041
62042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62043  if test "x$test_cygdrive_prefix" = x; then
62044    # As a simple fix, exclude /usr/bin since it's not a real path.
62045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62047      # a path prefixed by /cygdrive for fixpath to work.
62048      new_path="$CYGWIN_ROOT_PATH$input_path"
62049    fi
62050  fi
62051
62052
62053  if test "x$path" != "x$new_path"; then
62054    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62057  fi
62058
62059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62060
62061  path="$POTENTIAL_FREETYPE_LIB_PATH"
62062  has_colon=`$ECHO $path | $GREP ^.:`
62063  new_path="$path"
62064  if test "x$has_colon" = x; then
62065    # Not in mixed or Windows style, start by that.
62066    new_path=`cmd //c echo $path`
62067  fi
62068
62069
62070  input_path="$new_path"
62071  # Check if we need to convert this using DOS-style short mode. If the path
62072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62073  # take no chances and rewrite it.
62074  # Note: m4 eats our [], so we need to use [ and ] instead.
62075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62076  if test "x$has_forbidden_chars" != x; then
62077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62079  fi
62080
62081
62082  windows_path="$new_path"
62083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62084    unix_path=`$CYGPATH -u "$windows_path"`
62085    new_path="$unix_path"
62086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62088    new_path="$unix_path"
62089  fi
62090
62091  if test "x$path" != "x$new_path"; then
62092    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62095  fi
62096
62097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62099
62100    else
62101      # We're on a unix platform. Hooray! :)
62102      path="$POTENTIAL_FREETYPE_LIB_PATH"
62103      has_space=`$ECHO "$path" | $GREP " "`
62104      if test "x$has_space" != x; then
62105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62108      fi
62109
62110      # Use eval to expand a potential ~
62111      eval path="$path"
62112      if test ! -f "$path" && test ! -d "$path"; then
62113        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62114      fi
62115
62116      if test -d "$path"; then
62117        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62118      else
62119        dir="`$DIRNAME "$path"`"
62120        base="`$BASENAME "$path"`"
62121        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62122      fi
62123    fi
62124  fi
62125
62126
62127    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62129$as_echo_n "checking for freetype includes... " >&6; }
62130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62131$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62132    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62134$as_echo_n "checking for freetype libraries... " >&6; }
62135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62136$as_echo "$FREETYPE_LIB_PATH" >&6; }
62137  fi
62138
62139              fi
62140            fi
62141          fi
62142        fi
62143      fi # end check in well-known locations
62144
62145      if test "x$FOUND_FREETYPE" != xyes; then
62146
62147  # Print a helpful message on how to acquire the necessary build dependency.
62148  # freetype is the help tag: freetype, cups, alsa etc
62149  MISSING_DEPENDENCY=freetype
62150
62151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62152    cygwin_help $MISSING_DEPENDENCY
62153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62154    msys_help $MISSING_DEPENDENCY
62155  else
62156    PKGHANDLER_COMMAND=
62157
62158    case $PKGHANDLER in
62159      apt-get)
62160        apt_help     $MISSING_DEPENDENCY ;;
62161      yum)
62162        yum_help     $MISSING_DEPENDENCY ;;
62163      port)
62164        port_help    $MISSING_DEPENDENCY ;;
62165      pkgutil)
62166        pkgutil_help $MISSING_DEPENDENCY ;;
62167      pkgadd)
62168        pkgadd_help  $MISSING_DEPENDENCY ;;
62169    esac
62170
62171    if test "x$PKGHANDLER_COMMAND" != x; then
62172      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62173    fi
62174  fi
62175
62176        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62177      fi
62178    fi # end user specified settings
62179
62180    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62181    if test "x$FREETYPE_CFLAGS" = x; then
62182
62183  # Only process if variable expands to non-empty
62184
62185  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62187
62188  # Input might be given as Windows format, start by converting to
62189  # unix format.
62190  path="$FREETYPE_INCLUDE_PATH"
62191  new_path=`$CYGPATH -u "$path"`
62192
62193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62196  # "foo.exe" is OK but "foo" is an error.
62197  #
62198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62199  # It is also a way to make sure we got the proper file name for the real test later on.
62200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62201  if test "x$test_shortpath" = x; then
62202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62203$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62204    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62205  fi
62206
62207  # Call helper function which possibly converts this using DOS-style short mode.
62208  # If so, the updated path is stored in $new_path.
62209
62210  input_path="$new_path"
62211  # Check if we need to convert this using DOS-style short mode. If the path
62212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62213  # take no chances and rewrite it.
62214  # Note: m4 eats our [], so we need to use [ and ] instead.
62215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62216  if test "x$has_forbidden_chars" != x; then
62217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62221      # Going to short mode and back again did indeed matter. Since short mode is
62222      # case insensitive, let's make it lowercase to improve readability.
62223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62224      # Now convert it back to Unix-style (cygpath)
62225      input_path=`$CYGPATH -u "$shortmode_path"`
62226      new_path="$input_path"
62227    fi
62228  fi
62229
62230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62231  if test "x$test_cygdrive_prefix" = x; then
62232    # As a simple fix, exclude /usr/bin since it's not a real path.
62233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62235      # a path prefixed by /cygdrive for fixpath to work.
62236      new_path="$CYGWIN_ROOT_PATH$input_path"
62237    fi
62238  fi
62239
62240
62241  if test "x$path" != "x$new_path"; then
62242    FREETYPE_INCLUDE_PATH="$new_path"
62243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62244$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62245  fi
62246
62247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62248
62249  path="$FREETYPE_INCLUDE_PATH"
62250  has_colon=`$ECHO $path | $GREP ^.:`
62251  new_path="$path"
62252  if test "x$has_colon" = x; then
62253    # Not in mixed or Windows style, start by that.
62254    new_path=`cmd //c echo $path`
62255  fi
62256
62257
62258  input_path="$new_path"
62259  # Check if we need to convert this using DOS-style short mode. If the path
62260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62261  # take no chances and rewrite it.
62262  # Note: m4 eats our [], so we need to use [ and ] instead.
62263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62264  if test "x$has_forbidden_chars" != x; then
62265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62267  fi
62268
62269
62270  windows_path="$new_path"
62271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62272    unix_path=`$CYGPATH -u "$windows_path"`
62273    new_path="$unix_path"
62274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62276    new_path="$unix_path"
62277  fi
62278
62279  if test "x$path" != "x$new_path"; then
62280    FREETYPE_INCLUDE_PATH="$new_path"
62281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62282$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62283  fi
62284
62285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62287
62288    else
62289      # We're on a unix platform. Hooray! :)
62290      path="$FREETYPE_INCLUDE_PATH"
62291      has_space=`$ECHO "$path" | $GREP " "`
62292      if test "x$has_space" != x; then
62293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62294$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62296      fi
62297
62298      # Use eval to expand a potential ~
62299      eval path="$path"
62300      if test ! -f "$path" && test ! -d "$path"; then
62301        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62302      fi
62303
62304      if test -d "$path"; then
62305        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62306      else
62307        dir="`$DIRNAME "$path"`"
62308        base="`$BASENAME "$path"`"
62309        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62310      fi
62311    fi
62312  fi
62313
62314      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62315        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62316      else
62317        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62318      fi
62319    fi
62320
62321    if test "x$FREETYPE_LIBS" = x; then
62322
62323  # Only process if variable expands to non-empty
62324
62325  if test "x$FREETYPE_LIB_PATH" != x; then
62326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62327
62328  # Input might be given as Windows format, start by converting to
62329  # unix format.
62330  path="$FREETYPE_LIB_PATH"
62331  new_path=`$CYGPATH -u "$path"`
62332
62333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62336  # "foo.exe" is OK but "foo" is an error.
62337  #
62338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62339  # It is also a way to make sure we got the proper file name for the real test later on.
62340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62341  if test "x$test_shortpath" = x; then
62342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62343$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62344    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62345  fi
62346
62347  # Call helper function which possibly converts this using DOS-style short mode.
62348  # If so, the updated path is stored in $new_path.
62349
62350  input_path="$new_path"
62351  # Check if we need to convert this using DOS-style short mode. If the path
62352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62353  # take no chances and rewrite it.
62354  # Note: m4 eats our [], so we need to use [ and ] instead.
62355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62356  if test "x$has_forbidden_chars" != x; then
62357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62361      # Going to short mode and back again did indeed matter. Since short mode is
62362      # case insensitive, let's make it lowercase to improve readability.
62363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62364      # Now convert it back to Unix-style (cygpath)
62365      input_path=`$CYGPATH -u "$shortmode_path"`
62366      new_path="$input_path"
62367    fi
62368  fi
62369
62370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62371  if test "x$test_cygdrive_prefix" = x; then
62372    # As a simple fix, exclude /usr/bin since it's not a real path.
62373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62375      # a path prefixed by /cygdrive for fixpath to work.
62376      new_path="$CYGWIN_ROOT_PATH$input_path"
62377    fi
62378  fi
62379
62380
62381  if test "x$path" != "x$new_path"; then
62382    FREETYPE_LIB_PATH="$new_path"
62383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62384$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62385  fi
62386
62387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62388
62389  path="$FREETYPE_LIB_PATH"
62390  has_colon=`$ECHO $path | $GREP ^.:`
62391  new_path="$path"
62392  if test "x$has_colon" = x; then
62393    # Not in mixed or Windows style, start by that.
62394    new_path=`cmd //c echo $path`
62395  fi
62396
62397
62398  input_path="$new_path"
62399  # Check if we need to convert this using DOS-style short mode. If the path
62400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62401  # take no chances and rewrite it.
62402  # Note: m4 eats our [], so we need to use [ and ] instead.
62403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62404  if test "x$has_forbidden_chars" != x; then
62405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62407  fi
62408
62409
62410  windows_path="$new_path"
62411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62412    unix_path=`$CYGPATH -u "$windows_path"`
62413    new_path="$unix_path"
62414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62416    new_path="$unix_path"
62417  fi
62418
62419  if test "x$path" != "x$new_path"; then
62420    FREETYPE_LIB_PATH="$new_path"
62421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62422$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62423  fi
62424
62425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62427
62428    else
62429      # We're on a unix platform. Hooray! :)
62430      path="$FREETYPE_LIB_PATH"
62431      has_space=`$ECHO "$path" | $GREP " "`
62432      if test "x$has_space" != x; then
62433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62434$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62436      fi
62437
62438      # Use eval to expand a potential ~
62439      eval path="$path"
62440      if test ! -f "$path" && test ! -d "$path"; then
62441        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62442      fi
62443
62444      if test -d "$path"; then
62445        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62446      else
62447        dir="`$DIRNAME "$path"`"
62448        base="`$BASENAME "$path"`"
62449        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62450      fi
62451    fi
62452  fi
62453
62454      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62455        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62456      else
62457        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62458      fi
62459    fi
62460
62461    # Try to compile it
62462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62463$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62464    ac_ext=cpp
62465ac_cpp='$CXXCPP $CPPFLAGS'
62466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62469
62470    PREV_CXXCFLAGS="$CXXFLAGS"
62471    PREV_LIBS="$LIBS"
62472    PREV_CXX="$CXX"
62473    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62474    LIBS="$LIBS $FREETYPE_LIBS"
62475    CXX="$FIXPATH $CXX"
62476    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62477/* end confdefs.h.  */
62478
62479          #include<ft2build.h>
62480          #include FT_FREETYPE_H
62481          int main () {
62482            FT_Init_FreeType(NULL);
62483            return 0;
62484          }
62485
62486_ACEOF
62487if ac_fn_cxx_try_link "$LINENO"; then :
62488
62489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62490$as_echo "yes" >&6; }
62491
62492else
62493
62494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62495$as_echo "no" >&6; }
62496          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62497$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62498          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62499$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62500
62501
62502  # Print a helpful message on how to acquire the necessary build dependency.
62503  # freetype is the help tag: freetype, cups, alsa etc
62504  MISSING_DEPENDENCY=freetype
62505
62506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62507    cygwin_help $MISSING_DEPENDENCY
62508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62509    msys_help $MISSING_DEPENDENCY
62510  else
62511    PKGHANDLER_COMMAND=
62512
62513    case $PKGHANDLER in
62514      apt-get)
62515        apt_help     $MISSING_DEPENDENCY ;;
62516      yum)
62517        yum_help     $MISSING_DEPENDENCY ;;
62518      port)
62519        port_help    $MISSING_DEPENDENCY ;;
62520      pkgutil)
62521        pkgutil_help $MISSING_DEPENDENCY ;;
62522      pkgadd)
62523        pkgadd_help  $MISSING_DEPENDENCY ;;
62524    esac
62525
62526    if test "x$PKGHANDLER_COMMAND" != x; then
62527      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62528    fi
62529  fi
62530
62531
62532          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62533
62534
62535fi
62536rm -f core conftest.err conftest.$ac_objext \
62537    conftest$ac_exeext conftest.$ac_ext
62538    CXXCFLAGS="$PREV_CXXFLAGS"
62539    LIBS="$PREV_LIBS"
62540    CXX="$PREV_CXX"
62541    ac_ext=cpp
62542ac_cpp='$CXXCPP $CPPFLAGS'
62543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62546
62547
62548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62549$as_echo_n "checking if we should bundle freetype... " >&6; }
62550    if test "x$BUNDLE_FREETYPE" = xyes; then
62551      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62552    fi
62553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62554$as_echo "$BUNDLE_FREETYPE" >&6; }
62555
62556  fi # end freetype needed
62557
62558
62559
62560
62561
62562
62563
62564# Check whether --with-alsa was given.
62565if test "${with_alsa+set}" = set; then :
62566  withval=$with_alsa;
62567fi
62568
62569
62570# Check whether --with-alsa-include was given.
62571if test "${with_alsa_include+set}" = set; then :
62572  withval=$with_alsa_include;
62573fi
62574
62575
62576# Check whether --with-alsa-lib was given.
62577if test "${with_alsa_lib+set}" = set; then :
62578  withval=$with_alsa_lib;
62579fi
62580
62581
62582  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62583    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62584        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62585        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62586      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62587$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62588    fi
62589    ALSA_CFLAGS=
62590    ALSA_LIBS=
62591  else
62592    ALSA_FOUND=no
62593
62594    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62595      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62596    fi
62597
62598    if test "x${with_alsa}" != x; then
62599      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62600      ALSA_CFLAGS="-I${with_alsa}/include"
62601      ALSA_FOUND=yes
62602    fi
62603    if test "x${with_alsa_include}" != x; then
62604      ALSA_CFLAGS="-I${with_alsa_include}"
62605      ALSA_FOUND=yes
62606    fi
62607    if test "x${with_alsa_lib}" != x; then
62608      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62609      ALSA_FOUND=yes
62610    fi
62611    # Do not try pkg-config if we have a sysroot set.
62612    if test "x$SYSROOT" = x; then
62613      if test "x$ALSA_FOUND" = xno; then
62614
62615pkg_failed=no
62616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62617$as_echo_n "checking for ALSA... " >&6; }
62618
62619if test -n "$ALSA_CFLAGS"; then
62620    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62621 elif test -n "$PKG_CONFIG"; then
62622    if test -n "$PKG_CONFIG" && \
62623    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62624  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62625  ac_status=$?
62626  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62627  test $ac_status = 0; }; then
62628  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62629else
62630  pkg_failed=yes
62631fi
62632 else
62633    pkg_failed=untried
62634fi
62635if test -n "$ALSA_LIBS"; then
62636    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62637 elif test -n "$PKG_CONFIG"; then
62638    if test -n "$PKG_CONFIG" && \
62639    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62640  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62641  ac_status=$?
62642  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62643  test $ac_status = 0; }; then
62644  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62645else
62646  pkg_failed=yes
62647fi
62648 else
62649    pkg_failed=untried
62650fi
62651
62652
62653
62654if test $pkg_failed = yes; then
62655
62656if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62657        _pkg_short_errors_supported=yes
62658else
62659        _pkg_short_errors_supported=no
62660fi
62661        if test $_pkg_short_errors_supported = yes; then
62662	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62663        else
62664	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62665        fi
62666	# Put the nasty error message in config.log where it belongs
62667	echo "$ALSA_PKG_ERRORS" >&5
62668
62669	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62670$as_echo "no" >&6; }
62671                ALSA_FOUND=no
62672elif test $pkg_failed = untried; then
62673	ALSA_FOUND=no
62674else
62675	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62676	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62678$as_echo "yes" >&6; }
62679	ALSA_FOUND=yes
62680fi
62681      fi
62682    fi
62683    if test "x$ALSA_FOUND" = xno; then
62684      for ac_header in alsa/asoundlib.h
62685do :
62686  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62687if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62688  cat >>confdefs.h <<_ACEOF
62689#define HAVE_ALSA_ASOUNDLIB_H 1
62690_ACEOF
62691
62692            ALSA_FOUND=yes
62693            ALSA_CFLAGS=-Iignoreme
62694            ALSA_LIBS=-lasound
62695            DEFAULT_ALSA=yes
62696
62697else
62698  ALSA_FOUND=no
62699
62700fi
62701
62702done
62703
62704    fi
62705    if test "x$ALSA_FOUND" = xno; then
62706
62707  # Print a helpful message on how to acquire the necessary build dependency.
62708  # alsa is the help tag: freetype, cups, alsa etc
62709  MISSING_DEPENDENCY=alsa
62710
62711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62712    cygwin_help $MISSING_DEPENDENCY
62713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62714    msys_help $MISSING_DEPENDENCY
62715  else
62716    PKGHANDLER_COMMAND=
62717
62718    case $PKGHANDLER in
62719      apt-get)
62720        apt_help     $MISSING_DEPENDENCY ;;
62721      yum)
62722        yum_help     $MISSING_DEPENDENCY ;;
62723      port)
62724        port_help    $MISSING_DEPENDENCY ;;
62725      pkgutil)
62726        pkgutil_help $MISSING_DEPENDENCY ;;
62727      pkgadd)
62728        pkgadd_help  $MISSING_DEPENDENCY ;;
62729    esac
62730
62731    if test "x$PKGHANDLER_COMMAND" != x; then
62732      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62733    fi
62734  fi
62735
62736      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62737    fi
62738  fi
62739
62740
62741
62742
62743
62744
62745# Check whether --with-libffi was given.
62746if test "${with_libffi+set}" = set; then :
62747  withval=$with_libffi;
62748fi
62749
62750
62751# Check whether --with-libffi-include was given.
62752if test "${with_libffi_include+set}" = set; then :
62753  withval=$with_libffi_include;
62754fi
62755
62756
62757# Check whether --with-libffi-lib was given.
62758if test "${with_libffi_lib+set}" = set; then :
62759  withval=$with_libffi_lib;
62760fi
62761
62762  # Check whether --enable-libffi-bundling was given.
62763if test "${enable_libffi_bundling+set}" = set; then :
62764  enableval=$enable_libffi_bundling;
62765fi
62766
62767
62768  if test "x$NEEDS_LIB_FFI" = xfalse; then
62769    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62770        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62771        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62772      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62773$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62774    fi
62775    LIBFFI_CFLAGS=
62776    LIBFFI_LIBS=
62777  else
62778    LIBFFI_FOUND=no
62779
62780    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62781      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62782    fi
62783
62784    if test "x${with_libffi}" != x; then
62785      LIBFFI_LIB_PATH="${with_libffi}/lib"
62786      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62787      LIBFFI_CFLAGS="-I${with_libffi}/include"
62788      LIBFFI_FOUND=yes
62789    fi
62790    if test "x${with_libffi_include}" != x; then
62791      LIBFFI_CFLAGS="-I${with_libffi_include}"
62792      LIBFFI_FOUND=yes
62793    fi
62794    if test "x${with_libffi_lib}" != x; then
62795      LIBFFI_LIB_PATH="${with_libffi_lib}"
62796      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62797      LIBFFI_FOUND=yes
62798    fi
62799    # Do not try pkg-config if we have a sysroot set.
62800    if test "x$SYSROOT" = x; then
62801      if test "x$LIBFFI_FOUND" = xno; then
62802        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62803
62804pkg_failed=no
62805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62806$as_echo_n "checking for LIBFFI... " >&6; }
62807
62808if test -n "$LIBFFI_CFLAGS"; then
62809    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62810 elif test -n "$PKG_CONFIG"; then
62811    if test -n "$PKG_CONFIG" && \
62812    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62813  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62814  ac_status=$?
62815  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62816  test $ac_status = 0; }; then
62817  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62818else
62819  pkg_failed=yes
62820fi
62821 else
62822    pkg_failed=untried
62823fi
62824if test -n "$LIBFFI_LIBS"; then
62825    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62826 elif test -n "$PKG_CONFIG"; then
62827    if test -n "$PKG_CONFIG" && \
62828    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62829  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62830  ac_status=$?
62831  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62832  test $ac_status = 0; }; then
62833  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62834else
62835  pkg_failed=yes
62836fi
62837 else
62838    pkg_failed=untried
62839fi
62840
62841
62842
62843if test $pkg_failed = yes; then
62844
62845if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62846        _pkg_short_errors_supported=yes
62847else
62848        _pkg_short_errors_supported=no
62849fi
62850        if test $_pkg_short_errors_supported = yes; then
62851	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62852        else
62853	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62854        fi
62855	# Put the nasty error message in config.log where it belongs
62856	echo "$LIBFFI_PKG_ERRORS" >&5
62857
62858	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62859$as_echo "no" >&6; }
62860                LIBFFI_FOUND=no
62861elif test $pkg_failed = untried; then
62862	LIBFFI_FOUND=no
62863else
62864	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62865	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62867$as_echo "yes" >&6; }
62868	LIBFFI_FOUND=yes
62869fi
62870      fi
62871    fi
62872    if test "x$LIBFFI_FOUND" = xno; then
62873      for ac_header in ffi.h
62874do :
62875  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62876if test "x$ac_cv_header_ffi_h" = xyes; then :
62877  cat >>confdefs.h <<_ACEOF
62878#define HAVE_FFI_H 1
62879_ACEOF
62880
62881            LIBFFI_FOUND=yes
62882            LIBFFI_CFLAGS=
62883            LIBFFI_LIBS=-lffi
62884
62885else
62886  LIBFFI_FOUND=no
62887
62888fi
62889
62890done
62891
62892    fi
62893    if test "x$LIBFFI_FOUND" = xno; then
62894
62895  # Print a helpful message on how to acquire the necessary build dependency.
62896  # ffi is the help tag: freetype, cups, alsa etc
62897  MISSING_DEPENDENCY=ffi
62898
62899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62900    cygwin_help $MISSING_DEPENDENCY
62901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62902    msys_help $MISSING_DEPENDENCY
62903  else
62904    PKGHANDLER_COMMAND=
62905
62906    case $PKGHANDLER in
62907      apt-get)
62908        apt_help     $MISSING_DEPENDENCY ;;
62909      yum)
62910        yum_help     $MISSING_DEPENDENCY ;;
62911      port)
62912        port_help    $MISSING_DEPENDENCY ;;
62913      pkgutil)
62914        pkgutil_help $MISSING_DEPENDENCY ;;
62915      pkgadd)
62916        pkgadd_help  $MISSING_DEPENDENCY ;;
62917    esac
62918
62919    if test "x$PKGHANDLER_COMMAND" != x; then
62920      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62921    fi
62922  fi
62923
62924      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62925    fi
62926
62927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62928$as_echo_n "checking if libffi works... " >&6; }
62929    ac_ext=c
62930ac_cpp='$CPP $CPPFLAGS'
62931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62933ac_compiler_gnu=$ac_cv_c_compiler_gnu
62934
62935    OLD_CFLAGS="$CFLAGS"
62936    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62937    OLD_LIBS="$LIBS"
62938    LIBS="$LIBS $LIBFFI_LIBS"
62939    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62940/* end confdefs.h.  */
62941#include <ffi.h>
62942int
62943main ()
62944{
62945
62946          ffi_call(NULL, NULL, NULL, NULL);
62947          return 0;
62948
62949  ;
62950  return 0;
62951}
62952_ACEOF
62953if ac_fn_c_try_link "$LINENO"; then :
62954  LIBFFI_WORKS=yes
62955else
62956  LIBFFI_WORKS=no
62957
62958fi
62959rm -f core conftest.err conftest.$ac_objext \
62960    conftest$ac_exeext conftest.$ac_ext
62961    CFLAGS="$OLD_CFLAGS"
62962    LIBS="$OLD_LIBS"
62963    ac_ext=cpp
62964ac_cpp='$CXXCPP $CPPFLAGS'
62965ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62966ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62967ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62968
62969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62970$as_echo "$LIBFFI_WORKS" >&6; }
62971
62972    if test "x$LIBFFI_WORKS" = xno; then
62973
62974  # Print a helpful message on how to acquire the necessary build dependency.
62975  # ffi is the help tag: freetype, cups, alsa etc
62976  MISSING_DEPENDENCY=ffi
62977
62978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62979    cygwin_help $MISSING_DEPENDENCY
62980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62981    msys_help $MISSING_DEPENDENCY
62982  else
62983    PKGHANDLER_COMMAND=
62984
62985    case $PKGHANDLER in
62986      apt-get)
62987        apt_help     $MISSING_DEPENDENCY ;;
62988      yum)
62989        yum_help     $MISSING_DEPENDENCY ;;
62990      port)
62991        port_help    $MISSING_DEPENDENCY ;;
62992      pkgutil)
62993        pkgutil_help $MISSING_DEPENDENCY ;;
62994      pkgadd)
62995        pkgadd_help  $MISSING_DEPENDENCY ;;
62996    esac
62997
62998    if test "x$PKGHANDLER_COMMAND" != x; then
62999      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63000    fi
63001  fi
63002
63003      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63004    fi
63005
63006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63007$as_echo_n "checking if libffi should be bundled... " >&6; }
63008    if test "x$enable_libffi_bundling" = "x"; then
63009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63010$as_echo "no" >&6; }
63011      ENABLE_LIBFFI_BUNDLING=false
63012    elif  test "x$enable_libffi_bundling" = "xno"; then
63013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63014$as_echo "no, forced" >&6; }
63015      ENABLE_LIBFFI_BUNDLING=false
63016    elif  test "x$enable_libffi_bundling" = "xyes"; then
63017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63018$as_echo "yes, forced" >&6; }
63019      ENABLE_LIBFFI_BUNDLING=true
63020    else
63021      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63022    fi
63023
63024    # Find the libffi.so.X to bundle
63025    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63026      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63027$as_echo_n "checking for libffi lib file location... " >&6; }
63028      if test "x${LIBFFI_LIB_PATH}" != x; then
63029        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63030          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63031        else
63032          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63033        fi
63034      else
63035        # If we don't have an explicit path, look in a few obvious places
63036        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63037          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63038            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63039          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63040            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63041          else
63042            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63043          fi
63044        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63045          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63046            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63047          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63048            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63049          else
63050            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63051          fi
63052        else
63053          # Fallback on the default /usr/lib dir
63054          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63055            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63056          else
63057            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63058          fi
63059        fi
63060      fi
63061      # Make sure the wildcard is evaluated
63062      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63064$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63065    fi
63066  fi
63067
63068
63069
63070
63071
63072
63073
63074  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63075    # Extract the first word of "llvm-config", so it can be a program name with args.
63076set dummy llvm-config; ac_word=$2
63077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63078$as_echo_n "checking for $ac_word... " >&6; }
63079if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63080  $as_echo_n "(cached) " >&6
63081else
63082  if test -n "$LLVM_CONFIG"; then
63083  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63084else
63085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63086for as_dir in $PATH
63087do
63088  IFS=$as_save_IFS
63089  test -z "$as_dir" && as_dir=.
63090    for ac_exec_ext in '' $ac_executable_extensions; do
63091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63092    ac_cv_prog_LLVM_CONFIG="llvm-config"
63093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63094    break 2
63095  fi
63096done
63097  done
63098IFS=$as_save_IFS
63099
63100fi
63101fi
63102LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63103if test -n "$LLVM_CONFIG"; then
63104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63105$as_echo "$LLVM_CONFIG" >&6; }
63106else
63107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63108$as_echo "no" >&6; }
63109fi
63110
63111
63112
63113    if test "x$LLVM_CONFIG" != xllvm-config; then
63114      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63115    fi
63116
63117    llvm_components="jit mcjit engine nativecodegen native"
63118    unset LLVM_CFLAGS
63119    for flag in $("$LLVM_CONFIG" --cxxflags); do
63120      if echo "${flag}" | grep -q '^-[ID]'; then
63121        if test "${flag}" != "-D_DEBUG" ; then
63122          if test "${LLVM_CFLAGS}" != "" ; then
63123            LLVM_CFLAGS="${LLVM_CFLAGS} "
63124          fi
63125          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63126        fi
63127      fi
63128    done
63129    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63130    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63131
63132    unset LLVM_LDFLAGS
63133    for flag in $("${LLVM_CONFIG}" --ldflags); do
63134      if echo "${flag}" | grep -q '^-L'; then
63135        if test "${LLVM_LDFLAGS}" != ""; then
63136          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63137        fi
63138        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63139      fi
63140    done
63141
63142    unset LLVM_LIBS
63143    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63144      if echo "${flag}" | grep -q '^-l'; then
63145        if test "${LLVM_LIBS}" != ""; then
63146          LLVM_LIBS="${LLVM_LIBS} "
63147        fi
63148        LLVM_LIBS="${LLVM_LIBS}${flag}"
63149      fi
63150    done
63151
63152    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63153    # always properly detect -ltinfo
63154    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63155
63156
63157
63158
63159  fi
63160
63161
63162
63163# Check whether --with-libjpeg was given.
63164if test "${with_libjpeg+set}" = set; then :
63165  withval=$with_libjpeg;
63166fi
63167
63168
63169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63170$as_echo_n "checking for which libjpeg to use... " >&6; }
63171  # default is bundled
63172  DEFAULT_LIBJPEG=bundled
63173  # if user didn't specify, use DEFAULT_LIBJPEG
63174  if test "x${with_libjpeg}" = "x"; then
63175    with_libjpeg=${DEFAULT_LIBJPEG}
63176  fi
63177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63178$as_echo "${with_libjpeg}" >&6; }
63179
63180  if test "x${with_libjpeg}" = "xbundled"; then
63181    USE_EXTERNAL_LIBJPEG=false
63182  elif test "x${with_libjpeg}" = "xsystem"; then
63183    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63184if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63185
63186else
63187   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63188fi
63189
63190
63191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63192$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63193if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63194  $as_echo_n "(cached) " >&6
63195else
63196  ac_check_lib_save_LIBS=$LIBS
63197LIBS="-ljpeg  $LIBS"
63198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63199/* end confdefs.h.  */
63200
63201/* Override any GCC internal prototype to avoid an error.
63202   Use char because int might match the return type of a GCC
63203   builtin and then its argument prototype would still apply.  */
63204#ifdef __cplusplus
63205extern "C"
63206#endif
63207char jpeg_CreateDecompress ();
63208int
63209main ()
63210{
63211return jpeg_CreateDecompress ();
63212  ;
63213  return 0;
63214}
63215_ACEOF
63216if ac_fn_cxx_try_link "$LINENO"; then :
63217  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63218else
63219  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63220fi
63221rm -f core conftest.err conftest.$ac_objext \
63222    conftest$ac_exeext conftest.$ac_ext
63223LIBS=$ac_check_lib_save_LIBS
63224fi
63225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63226$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63227if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63228  cat >>confdefs.h <<_ACEOF
63229#define HAVE_LIBJPEG 1
63230_ACEOF
63231
63232  LIBS="-ljpeg $LIBS"
63233
63234else
63235   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63236fi
63237
63238
63239    USE_EXTERNAL_LIBJPEG=true
63240  else
63241    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63242  fi
63243
63244
63245
63246
63247
63248# Check whether --with-giflib was given.
63249if test "${with_giflib+set}" = set; then :
63250  withval=$with_giflib;
63251fi
63252
63253
63254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63255$as_echo_n "checking for which giflib to use... " >&6; }
63256  # default is bundled
63257  DEFAULT_GIFLIB=bundled
63258  # if user didn't specify, use DEFAULT_GIFLIB
63259  if test "x${with_giflib}" = "x"; then
63260    with_giflib=${DEFAULT_GIFLIB}
63261  fi
63262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63263$as_echo "${with_giflib}" >&6; }
63264
63265  if test "x${with_giflib}" = "xbundled"; then
63266    USE_EXTERNAL_LIBGIF=false
63267  elif test "x${with_giflib}" = "xsystem"; then
63268    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63269if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63270
63271else
63272   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63273fi
63274
63275
63276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63277$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63278if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63279  $as_echo_n "(cached) " >&6
63280else
63281  ac_check_lib_save_LIBS=$LIBS
63282LIBS="-lgif  $LIBS"
63283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63284/* end confdefs.h.  */
63285
63286/* Override any GCC internal prototype to avoid an error.
63287   Use char because int might match the return type of a GCC
63288   builtin and then its argument prototype would still apply.  */
63289#ifdef __cplusplus
63290extern "C"
63291#endif
63292char DGifGetCode ();
63293int
63294main ()
63295{
63296return DGifGetCode ();
63297  ;
63298  return 0;
63299}
63300_ACEOF
63301if ac_fn_cxx_try_link "$LINENO"; then :
63302  ac_cv_lib_gif_DGifGetCode=yes
63303else
63304  ac_cv_lib_gif_DGifGetCode=no
63305fi
63306rm -f core conftest.err conftest.$ac_objext \
63307    conftest$ac_exeext conftest.$ac_ext
63308LIBS=$ac_check_lib_save_LIBS
63309fi
63310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63311$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63312if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63313  cat >>confdefs.h <<_ACEOF
63314#define HAVE_LIBGIF 1
63315_ACEOF
63316
63317  LIBS="-lgif $LIBS"
63318
63319else
63320   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63321fi
63322
63323
63324    USE_EXTERNAL_LIBGIF=true
63325  else
63326    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63327  fi
63328
63329
63330
63331
63332
63333# Check whether --with-libpng was given.
63334if test "${with_libpng+set}" = set; then :
63335  withval=$with_libpng;
63336fi
63337
63338
63339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63340$as_echo_n "checking for which libpng to use... " >&6; }
63341
63342  # default is bundled
63343  DEFAULT_LIBPNG=bundled
63344  # if user didn't specify, use DEFAULT_LIBPNG
63345  if test "x${with_libpng}" = "x"; then
63346      with_libpng=${DEFAULT_LIBPNG}
63347  fi
63348
63349  if test "x${with_libpng}" = "xbundled"; then
63350      USE_EXTERNAL_LIBPNG=false
63351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63352$as_echo "bundled" >&6; }
63353  elif test "x${with_libpng}" = "xsystem"; then
63354
63355pkg_failed=no
63356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63357$as_echo_n "checking for PNG... " >&6; }
63358
63359if test -n "$PNG_CFLAGS"; then
63360    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63361 elif test -n "$PKG_CONFIG"; then
63362    if test -n "$PKG_CONFIG" && \
63363    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63364  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63365  ac_status=$?
63366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63367  test $ac_status = 0; }; then
63368  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63369else
63370  pkg_failed=yes
63371fi
63372 else
63373    pkg_failed=untried
63374fi
63375if test -n "$PNG_LIBS"; then
63376    pkg_cv_PNG_LIBS="$PNG_LIBS"
63377 elif test -n "$PKG_CONFIG"; then
63378    if test -n "$PKG_CONFIG" && \
63379    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63380  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63381  ac_status=$?
63382  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63383  test $ac_status = 0; }; then
63384  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63385else
63386  pkg_failed=yes
63387fi
63388 else
63389    pkg_failed=untried
63390fi
63391
63392
63393
63394if test $pkg_failed = yes; then
63395
63396if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63397        _pkg_short_errors_supported=yes
63398else
63399        _pkg_short_errors_supported=no
63400fi
63401        if test $_pkg_short_errors_supported = yes; then
63402	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63403        else
63404	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63405        fi
63406	# Put the nasty error message in config.log where it belongs
63407	echo "$PNG_PKG_ERRORS" >&5
63408
63409	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63410$as_echo "no" >&6; }
63411                 LIBPNG_FOUND=no
63412elif test $pkg_failed = untried; then
63413	 LIBPNG_FOUND=no
63414else
63415	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63416	PNG_LIBS=$pkg_cv_PNG_LIBS
63417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63418$as_echo "yes" >&6; }
63419	 LIBPNG_FOUND=yes
63420fi
63421      if test "x${LIBPNG_FOUND}" = "xyes"; then
63422          USE_EXTERNAL_LIBPNG=true
63423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63424$as_echo "system" >&6; }
63425      else
63426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63427$as_echo "system not found" >&6; }
63428          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63429      fi
63430  else
63431      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63432  fi
63433
63434
63435
63436
63437
63438# Check whether --with-zlib was given.
63439if test "${with_zlib+set}" = set; then :
63440  withval=$with_zlib;
63441fi
63442
63443
63444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63445$as_echo_n "checking for compress in -lz... " >&6; }
63446if ${ac_cv_lib_z_compress+:} false; then :
63447  $as_echo_n "(cached) " >&6
63448else
63449  ac_check_lib_save_LIBS=$LIBS
63450LIBS="-lz  $LIBS"
63451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63452/* end confdefs.h.  */
63453
63454/* Override any GCC internal prototype to avoid an error.
63455   Use char because int might match the return type of a GCC
63456   builtin and then its argument prototype would still apply.  */
63457#ifdef __cplusplus
63458extern "C"
63459#endif
63460char compress ();
63461int
63462main ()
63463{
63464return compress ();
63465  ;
63466  return 0;
63467}
63468_ACEOF
63469if ac_fn_cxx_try_link "$LINENO"; then :
63470  ac_cv_lib_z_compress=yes
63471else
63472  ac_cv_lib_z_compress=no
63473fi
63474rm -f core conftest.err conftest.$ac_objext \
63475    conftest$ac_exeext conftest.$ac_ext
63476LIBS=$ac_check_lib_save_LIBS
63477fi
63478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63479$as_echo "$ac_cv_lib_z_compress" >&6; }
63480if test "x$ac_cv_lib_z_compress" = xyes; then :
63481   ZLIB_FOUND=yes
63482else
63483   ZLIB_FOUND=no
63484fi
63485
63486
63487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63488$as_echo_n "checking for which zlib to use... " >&6; }
63489
63490  DEFAULT_ZLIB=system
63491  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63492    # On windows default is bundled...on others default is system
63493    DEFAULT_ZLIB=bundled
63494  fi
63495
63496  if test "x${ZLIB_FOUND}" != "xyes"; then
63497    # If we don't find any system...set default to bundled
63498    DEFAULT_ZLIB=bundled
63499  fi
63500
63501  # If user didn't specify, use DEFAULT_ZLIB
63502  if test "x${with_zlib}" = "x"; then
63503    with_zlib=${DEFAULT_ZLIB}
63504  fi
63505
63506  if test "x${with_zlib}" = "xbundled"; then
63507    USE_EXTERNAL_LIBZ=false
63508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63509$as_echo "bundled" >&6; }
63510  elif test "x${with_zlib}" = "xsystem"; then
63511    if test "x${ZLIB_FOUND}" = "xyes"; then
63512      USE_EXTERNAL_LIBZ=true
63513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63514$as_echo "system" >&6; }
63515    else
63516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63517$as_echo "system not found" >&6; }
63518      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63519    fi
63520  else
63521    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63522  fi
63523
63524
63525
63526
63527
63528# Check whether --with-lcms was given.
63529if test "${with_lcms+set}" = set; then :
63530  withval=$with_lcms;
63531fi
63532
63533
63534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63535$as_echo_n "checking for which lcms to use... " >&6; }
63536
63537  DEFAULT_LCMS=bundled
63538  # If user didn't specify, use DEFAULT_LCMS
63539  if test "x${with_lcms}" = "x"; then
63540      with_lcms=${DEFAULT_LCMS}
63541  fi
63542
63543  if test "x${with_lcms}" = "xbundled"; then
63544    USE_EXTERNAL_LCMS=false
63545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63546$as_echo "bundled" >&6; }
63547  elif test "x${with_lcms}" = "xsystem"; then
63548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63549$as_echo "system" >&6; }
63550
63551pkg_failed=no
63552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63553$as_echo_n "checking for LCMS... " >&6; }
63554
63555if test -n "$LCMS_CFLAGS"; then
63556    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63557 elif test -n "$PKG_CONFIG"; then
63558    if test -n "$PKG_CONFIG" && \
63559    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63560  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63561  ac_status=$?
63562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63563  test $ac_status = 0; }; then
63564  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63565else
63566  pkg_failed=yes
63567fi
63568 else
63569    pkg_failed=untried
63570fi
63571if test -n "$LCMS_LIBS"; then
63572    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63573 elif test -n "$PKG_CONFIG"; then
63574    if test -n "$PKG_CONFIG" && \
63575    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63576  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63577  ac_status=$?
63578  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63579  test $ac_status = 0; }; then
63580  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63581else
63582  pkg_failed=yes
63583fi
63584 else
63585    pkg_failed=untried
63586fi
63587
63588
63589
63590if test $pkg_failed = yes; then
63591
63592if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63593        _pkg_short_errors_supported=yes
63594else
63595        _pkg_short_errors_supported=no
63596fi
63597        if test $_pkg_short_errors_supported = yes; then
63598	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63599        else
63600	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63601        fi
63602	# Put the nasty error message in config.log where it belongs
63603	echo "$LCMS_PKG_ERRORS" >&5
63604
63605	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63606$as_echo "no" >&6; }
63607                LCMS_FOUND=no
63608elif test $pkg_failed = untried; then
63609	LCMS_FOUND=no
63610else
63611	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63612	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63614$as_echo "yes" >&6; }
63615	LCMS_FOUND=yes
63616fi
63617    if test "x${LCMS_FOUND}" = "xyes"; then
63618      USE_EXTERNAL_LCMS=true
63619    else
63620      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63621    fi
63622  else
63623    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63624  fi
63625
63626
63627
63628
63629
63630
63631
63632
63633
63634
63635
63636  # Setup libm (the maths library)
63637  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63639$as_echo_n "checking for cos in -lm... " >&6; }
63640if ${ac_cv_lib_m_cos+:} false; then :
63641  $as_echo_n "(cached) " >&6
63642else
63643  ac_check_lib_save_LIBS=$LIBS
63644LIBS="-lm  $LIBS"
63645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63646/* end confdefs.h.  */
63647
63648/* Override any GCC internal prototype to avoid an error.
63649   Use char because int might match the return type of a GCC
63650   builtin and then its argument prototype would still apply.  */
63651#ifdef __cplusplus
63652extern "C"
63653#endif
63654char cos ();
63655int
63656main ()
63657{
63658return cos ();
63659  ;
63660  return 0;
63661}
63662_ACEOF
63663if ac_fn_cxx_try_link "$LINENO"; then :
63664  ac_cv_lib_m_cos=yes
63665else
63666  ac_cv_lib_m_cos=no
63667fi
63668rm -f core conftest.err conftest.$ac_objext \
63669    conftest$ac_exeext conftest.$ac_ext
63670LIBS=$ac_check_lib_save_LIBS
63671fi
63672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63673$as_echo "$ac_cv_lib_m_cos" >&6; }
63674if test "x$ac_cv_lib_m_cos" = xyes; then :
63675  cat >>confdefs.h <<_ACEOF
63676#define HAVE_LIBM 1
63677_ACEOF
63678
63679  LIBS="-lm $LIBS"
63680
63681else
63682
63683        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63684$as_echo "$as_me: Maths library was not found" >&6;}
63685
63686fi
63687
63688    LIBM="-lm"
63689  else
63690    LIBM=""
63691  fi
63692
63693
63694  # Setup libdl (for dynamic library loading)
63695  save_LIBS="$LIBS"
63696  LIBS=""
63697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63698$as_echo_n "checking for dlopen in -ldl... " >&6; }
63699if ${ac_cv_lib_dl_dlopen+:} false; then :
63700  $as_echo_n "(cached) " >&6
63701else
63702  ac_check_lib_save_LIBS=$LIBS
63703LIBS="-ldl  $LIBS"
63704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63705/* end confdefs.h.  */
63706
63707/* Override any GCC internal prototype to avoid an error.
63708   Use char because int might match the return type of a GCC
63709   builtin and then its argument prototype would still apply.  */
63710#ifdef __cplusplus
63711extern "C"
63712#endif
63713char dlopen ();
63714int
63715main ()
63716{
63717return dlopen ();
63718  ;
63719  return 0;
63720}
63721_ACEOF
63722if ac_fn_cxx_try_link "$LINENO"; then :
63723  ac_cv_lib_dl_dlopen=yes
63724else
63725  ac_cv_lib_dl_dlopen=no
63726fi
63727rm -f core conftest.err conftest.$ac_objext \
63728    conftest$ac_exeext conftest.$ac_ext
63729LIBS=$ac_check_lib_save_LIBS
63730fi
63731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63732$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63733if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63734  cat >>confdefs.h <<_ACEOF
63735#define HAVE_LIBDL 1
63736_ACEOF
63737
63738  LIBS="-ldl $LIBS"
63739
63740fi
63741
63742  LIBDL="$LIBS"
63743
63744  LIBS="$save_LIBS"
63745
63746  # Deprecated libraries, keep the flags for backwards compatibility
63747  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63748
63749
63750# Check whether --with-dxsdk was given.
63751if test "${with_dxsdk+set}" = set; then :
63752  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63753$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63754fi
63755
63756
63757
63758
63759# Check whether --with-dxsdk-lib was given.
63760if test "${with_dxsdk_lib+set}" = set; then :
63761  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63762$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63763fi
63764
63765
63766
63767
63768# Check whether --with-dxsdk-include was given.
63769if test "${with_dxsdk_include+set}" = set; then :
63770  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63771$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63772fi
63773
63774
63775  fi
63776
63777  # Control if libzip can use mmap. Available for purposes of overriding.
63778  LIBZIP_CAN_USE_MMAP=true
63779
63780
63781
63782  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63783    # Find the root of the Solaris Studio installation from the compiler path
63784    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63785    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63787$as_echo_n "checking for libstlport.so.1... " >&6; }
63788    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63789      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63790      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63791    fi
63792    if test -f "$STLPORT_LIB"; then
63793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63794$as_echo "yes, $STLPORT_LIB" >&6; }
63795
63796  # Only process if variable expands to non-empty
63797
63798  if test "x$STLPORT_LIB" != x; then
63799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63800
63801  # Input might be given as Windows format, start by converting to
63802  # unix format.
63803  path="$STLPORT_LIB"
63804  new_path=`$CYGPATH -u "$path"`
63805
63806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63809  # "foo.exe" is OK but "foo" is an error.
63810  #
63811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63812  # It is also a way to make sure we got the proper file name for the real test later on.
63813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63814  if test "x$test_shortpath" = x; then
63815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63816$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63817    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63818  fi
63819
63820  # Call helper function which possibly converts this using DOS-style short mode.
63821  # If so, the updated path is stored in $new_path.
63822
63823  input_path="$new_path"
63824  # Check if we need to convert this using DOS-style short mode. If the path
63825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63826  # take no chances and rewrite it.
63827  # Note: m4 eats our [], so we need to use [ and ] instead.
63828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63829  if test "x$has_forbidden_chars" != x; then
63830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63834      # Going to short mode and back again did indeed matter. Since short mode is
63835      # case insensitive, let's make it lowercase to improve readability.
63836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63837      # Now convert it back to Unix-style (cygpath)
63838      input_path=`$CYGPATH -u "$shortmode_path"`
63839      new_path="$input_path"
63840    fi
63841  fi
63842
63843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63844  if test "x$test_cygdrive_prefix" = x; then
63845    # As a simple fix, exclude /usr/bin since it's not a real path.
63846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63848      # a path prefixed by /cygdrive for fixpath to work.
63849      new_path="$CYGWIN_ROOT_PATH$input_path"
63850    fi
63851  fi
63852
63853
63854  if test "x$path" != "x$new_path"; then
63855    STLPORT_LIB="$new_path"
63856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63857$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63858  fi
63859
63860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63861
63862  path="$STLPORT_LIB"
63863  has_colon=`$ECHO $path | $GREP ^.:`
63864  new_path="$path"
63865  if test "x$has_colon" = x; then
63866    # Not in mixed or Windows style, start by that.
63867    new_path=`cmd //c echo $path`
63868  fi
63869
63870
63871  input_path="$new_path"
63872  # Check if we need to convert this using DOS-style short mode. If the path
63873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63874  # take no chances and rewrite it.
63875  # Note: m4 eats our [], so we need to use [ and ] instead.
63876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63877  if test "x$has_forbidden_chars" != x; then
63878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63880  fi
63881
63882
63883  windows_path="$new_path"
63884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63885    unix_path=`$CYGPATH -u "$windows_path"`
63886    new_path="$unix_path"
63887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63889    new_path="$unix_path"
63890  fi
63891
63892  if test "x$path" != "x$new_path"; then
63893    STLPORT_LIB="$new_path"
63894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63895$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63896  fi
63897
63898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63900
63901    else
63902      # We're on a unix platform. Hooray! :)
63903      path="$STLPORT_LIB"
63904      has_space=`$ECHO "$path" | $GREP " "`
63905      if test "x$has_space" != x; then
63906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63907$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63909      fi
63910
63911      # Use eval to expand a potential ~
63912      eval path="$path"
63913      if test ! -f "$path" && test ! -d "$path"; then
63914        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63915      fi
63916
63917      if test -d "$path"; then
63918        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63919      else
63920        dir="`$DIRNAME "$path"`"
63921        base="`$BASENAME "$path"`"
63922        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63923      fi
63924    fi
63925  fi
63926
63927    else
63928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63929$as_echo "no, not found at $STLPORT_LIB" >&6; }
63930      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63931    fi
63932
63933  fi
63934
63935
63936
63937# Check whether --with-libelf was given.
63938if test "${with_libelf+set}" = set; then :
63939  withval=$with_libelf;
63940fi
63941
63942
63943# Check whether --with-libelf-include was given.
63944if test "${with_libelf_include+set}" = set; then :
63945  withval=$with_libelf_include;
63946fi
63947
63948
63949# Check whether --with-libelf-lib was given.
63950if test "${with_libelf_lib+set}" = set; then :
63951  withval=$with_libelf_lib;
63952fi
63953
63954
63955  if test "x$ENABLE_AOT" = xfalse; then
63956    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
63957        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
63958        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
63959      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
63960$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
63961    fi
63962    LIBELF_CFLAGS=
63963    LIBELF_LIBS=
63964  else
63965    LIBELF_FOUND=no
63966
63967    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
63968      ENABLE_AOT="false"
63969      if test "x${enable_aot}" = xyes; then
63970        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
63971      fi
63972    else
63973      if test "x${with_libelf}" != x; then
63974        ELF_LIBS="-L${with_libelf}/lib -lelf"
63975        ELF_CFLAGS="-I${with_libelf}/include"
63976        LIBELF_FOUND=yes
63977      fi
63978      if test "x${with_libelf_include}" != x; then
63979        ELF_CFLAGS="-I${with_libelf_include}"
63980        LIBELF_FOUND=yes
63981      fi
63982      if test "x${with_libelf_lib}" != x; then
63983        ELF_LIBS="-L${with_libelf_lib} -lelf"
63984        LIBELF_FOUND=yes
63985      fi
63986      # Do not try pkg-config if we have a sysroot set.
63987      if test "x$SYSROOT" = x; then
63988        if test "x$LIBELF_FOUND" = xno; then
63989          # Figure out ELF_CFLAGS and ELF_LIBS
63990
63991pkg_failed=no
63992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
63993$as_echo_n "checking for ELF... " >&6; }
63994
63995if test -n "$ELF_CFLAGS"; then
63996    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
63997 elif test -n "$PKG_CONFIG"; then
63998    if test -n "$PKG_CONFIG" && \
63999    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64000  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64001  ac_status=$?
64002  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64003  test $ac_status = 0; }; then
64004  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64005else
64006  pkg_failed=yes
64007fi
64008 else
64009    pkg_failed=untried
64010fi
64011if test -n "$ELF_LIBS"; then
64012    pkg_cv_ELF_LIBS="$ELF_LIBS"
64013 elif test -n "$PKG_CONFIG"; then
64014    if test -n "$PKG_CONFIG" && \
64015    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64016  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64017  ac_status=$?
64018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64019  test $ac_status = 0; }; then
64020  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64021else
64022  pkg_failed=yes
64023fi
64024 else
64025    pkg_failed=untried
64026fi
64027
64028
64029
64030if test $pkg_failed = yes; then
64031
64032if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64033        _pkg_short_errors_supported=yes
64034else
64035        _pkg_short_errors_supported=no
64036fi
64037        if test $_pkg_short_errors_supported = yes; then
64038	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64039        else
64040	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64041        fi
64042	# Put the nasty error message in config.log where it belongs
64043	echo "$ELF_PKG_ERRORS" >&5
64044
64045	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64046$as_echo "no" >&6; }
64047                LIBELF_FOUND=no
64048elif test $pkg_failed = untried; then
64049	LIBELF_FOUND=no
64050else
64051	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64052	ELF_LIBS=$pkg_cv_ELF_LIBS
64053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64054$as_echo "yes" >&6; }
64055	LIBELF_FOUND=yes
64056fi
64057        fi
64058      fi
64059      if test "x$LIBELF_FOUND" = xno; then
64060        for ac_header in libelf.h
64061do :
64062  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64063if test "x$ac_cv_header_libelf_h" = xyes; then :
64064  cat >>confdefs.h <<_ACEOF
64065#define HAVE_LIBELF_H 1
64066_ACEOF
64067
64068              LIBELF_FOUND=yes
64069              ELF_CFLAGS=
64070              ELF_LIBS=-lelf
64071
64072else
64073  LIBELF_FOUND=no
64074
64075fi
64076
64077done
64078
64079      fi
64080      if test "x$LIBELF_FOUND" = xno; then
64081        ENABLE_AOT="false"
64082
64083  # Print a helpful message on how to acquire the necessary build dependency.
64084  # elf is the help tag: freetype, cups, alsa etc
64085  MISSING_DEPENDENCY=elf
64086
64087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64088    cygwin_help $MISSING_DEPENDENCY
64089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64090    msys_help $MISSING_DEPENDENCY
64091  else
64092    PKGHANDLER_COMMAND=
64093
64094    case $PKGHANDLER in
64095      apt-get)
64096        apt_help     $MISSING_DEPENDENCY ;;
64097      yum)
64098        yum_help     $MISSING_DEPENDENCY ;;
64099      port)
64100        port_help    $MISSING_DEPENDENCY ;;
64101      pkgutil)
64102        pkgutil_help $MISSING_DEPENDENCY ;;
64103      pkgadd)
64104        pkgadd_help  $MISSING_DEPENDENCY ;;
64105    esac
64106
64107    if test "x$PKGHANDLER_COMMAND" != x; then
64108      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64109    fi
64110  fi
64111
64112        if test "x${enable_aot}" = xyes; then
64113          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64114        else
64115          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64116$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64117        fi
64118      else
64119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64120$as_echo_n "checking if libelf works... " >&6; }
64121        ac_ext=c
64122ac_cpp='$CPP $CPPFLAGS'
64123ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64124ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64125ac_compiler_gnu=$ac_cv_c_compiler_gnu
64126
64127        OLD_CFLAGS="$CFLAGS"
64128        CFLAGS="$CFLAGS $ELF_CFLAGS"
64129        OLD_LIBS="$LIBS"
64130        LIBS="$LIBS $ELF_LIBS"
64131        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64132/* end confdefs.h.  */
64133#include <libelf.h>
64134int
64135main ()
64136{
64137
64138              elf_version(0);
64139              return 0;
64140
64141  ;
64142  return 0;
64143}
64144_ACEOF
64145if ac_fn_c_try_link "$LINENO"; then :
64146  LIBELF_WORKS=yes
64147else
64148  LIBELF_WORKS=no
64149
64150fi
64151rm -f core conftest.err conftest.$ac_objext \
64152    conftest$ac_exeext conftest.$ac_ext
64153        CFLAGS="$OLD_CFLAGS"
64154        LIBS="$OLD_LIBS"
64155        ac_ext=cpp
64156ac_cpp='$CXXCPP $CPPFLAGS'
64157ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64158ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64159ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64160
64161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64162$as_echo "$LIBELF_WORKS" >&6; }
64163
64164        if test "x$LIBELF_WORKS" = xno; then
64165          ENABLE_AOT="false"
64166
64167  # Print a helpful message on how to acquire the necessary build dependency.
64168  # elf is the help tag: freetype, cups, alsa etc
64169  MISSING_DEPENDENCY=elf
64170
64171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64172    cygwin_help $MISSING_DEPENDENCY
64173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64174    msys_help $MISSING_DEPENDENCY
64175  else
64176    PKGHANDLER_COMMAND=
64177
64178    case $PKGHANDLER in
64179      apt-get)
64180        apt_help     $MISSING_DEPENDENCY ;;
64181      yum)
64182        yum_help     $MISSING_DEPENDENCY ;;
64183      port)
64184        port_help    $MISSING_DEPENDENCY ;;
64185      pkgutil)
64186        pkgutil_help $MISSING_DEPENDENCY ;;
64187      pkgadd)
64188        pkgadd_help  $MISSING_DEPENDENCY ;;
64189    esac
64190
64191    if test "x$PKGHANDLER_COMMAND" != x; then
64192      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64193    fi
64194  fi
64195
64196          if test "x$enable_aot" = "xyes"; then
64197            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64198          else
64199            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64200$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64201          fi
64202        fi
64203      fi
64204    fi
64205  fi
64206
64207
64208
64209
64210
64211
64212
64213
64214
64215
64216
64217
64218
64219
64220
64221
64222
64223
64224# Hotspot setup depends on lib checks (AOT needs libelf).
64225
64226
64227  # The user can in some cases supply additional jvm features. For the custom
64228  # variant, this defines the entire variant.
64229
64230# Check whether --with-jvm-features was given.
64231if test "${with_jvm_features+set}" = set; then :
64232  withval=$with_jvm_features;
64233fi
64234
64235  if test "x$with_jvm_features" != x; then
64236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64237$as_echo_n "checking additional JVM features... " >&6; }
64238    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64240$as_echo "$JVM_FEATURES" >&6; }
64241  fi
64242
64243  # Override hotspot cpu definitions for ARM platforms
64244  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64245    HOTSPOT_TARGET_CPU=arm_32
64246    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64247    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64248    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64249  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64250    HOTSPOT_TARGET_CPU=arm_64
64251    HOTSPOT_TARGET_CPU_ARCH=arm
64252    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64253    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64254  fi
64255
64256  # Verify that dependencies are met for explicitly set features.
64257  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64258    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64259  fi
64260
64261  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64262    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64263  fi
64264
64265  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64266    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64267  fi
64268
64269  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64270    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64271  fi
64272
64273  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64274    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64275  fi
64276
64277  # Turn on additional features based on other parts of configure
64278  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64279    JVM_FEATURES="$JVM_FEATURES dtrace"
64280  else
64281    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64282      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64283    fi
64284  fi
64285
64286  if test "x$STATIC_BUILD" = "xtrue"; then
64287    JVM_FEATURES="$JVM_FEATURES static-build"
64288  else
64289    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64290      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64291    fi
64292  fi
64293
64294  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64295    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64296      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64297    fi
64298  fi
64299
64300  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64301    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64302      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64303    fi
64304  fi
64305
64306  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64307  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64308     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64309     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64310    JVM_FEATURES_jvmci="jvmci"
64311  else
64312    JVM_FEATURES_jvmci=""
64313  fi
64314
64315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64316$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64317  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64319$as_echo "yes, forced" >&6; }
64320    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64321      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64322    fi
64323    INCLUDE_GRAAL="true"
64324  else
64325    # By default enable graal build where AOT is available
64326    if test "x$ENABLE_AOT" = "xtrue"; then
64327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64328$as_echo "yes" >&6; }
64329      JVM_FEATURES_graal="graal"
64330      INCLUDE_GRAAL="true"
64331    else
64332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64333$as_echo "no" >&6; }
64334      JVM_FEATURES_graal=""
64335      INCLUDE_GRAAL="false"
64336    fi
64337  fi
64338
64339
64340
64341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64342$as_echo_n "checking if aot should be enabled... " >&6; }
64343  if test "x$ENABLE_AOT" = "xtrue"; then
64344    if test "x$enable_aot" = "xyes"; then
64345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64346$as_echo "yes, forced" >&6; }
64347    else
64348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64349$as_echo "yes" >&6; }
64350    fi
64351    JVM_FEATURES_aot="aot"
64352  else
64353    if test "x$enable_aot" = "xno"; then
64354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64355$as_echo "no, forced" >&6; }
64356    else
64357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64358$as_echo "no" >&6; }
64359    fi
64360    JVM_FEATURES_aot=""
64361  fi
64362
64363  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64364    # Default to use link time optimizations on minimal on arm
64365    JVM_FEATURES_link_time_opt="link-time-opt"
64366  else
64367    JVM_FEATURES_link_time_opt=""
64368  fi
64369
64370  # All variants but minimal (and custom) get these features
64371  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64372
64373  # Enable features depending on variant.
64374  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64375  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64376  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64377  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64378  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64379  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64380  JVM_FEATURES_custom="$JVM_FEATURES"
64381
64382
64383
64384
64385
64386
64387
64388
64389
64390  # Used for verification of Makefiles by check-jvm-feature
64391
64392
64393  # We don't support --with-jvm-interpreter anymore, use zero instead.
64394
64395
64396# Check whether --with-jvm-interpreter was given.
64397if test "${with_jvm_interpreter+set}" = set; then :
64398  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64399$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64400fi
64401
64402
64403
64404
64405###############################################################################
64406#
64407# We need to do some final tweaking, when everything else is done.
64408#
64409###############################################################################
64410
64411
64412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64413$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64414
64415  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64416    ENABLE_INTREE_EC=yes
64417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64418$as_echo "yes" >&6; }
64419  else
64420    ENABLE_INTREE_EC=no
64421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64422$as_echo "no" >&6; }
64423  fi
64424
64425
64426
64427
64428  # Check whether --enable-jtreg-failure-handler was given.
64429if test "${enable_jtreg_failure_handler+set}" = set; then :
64430  enableval=$enable_jtreg_failure_handler;
64431fi
64432
64433
64434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64435$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64436
64437  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64438    if test "x$JT_HOME" = "x"; then
64439      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64440    else
64441      BUILD_FAILURE_HANDLER=true
64442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64443$as_echo "yes, forced" >&6; }
64444    fi
64445  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64446    BUILD_FAILURE_HANDLER=false
64447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64448$as_echo "no, forced" >&6; }
64449  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64450      || test "x$enable_jtreg_failure_handler" = "x"; then
64451    if test "x$JT_HOME" = "x"; then
64452      BUILD_FAILURE_HANDLER=false
64453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64454$as_echo "no, missing jtreg" >&6; }
64455    else
64456      BUILD_FAILURE_HANDLER=true
64457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64458$as_echo "yes, jtreg present" >&6; }
64459    fi
64460  else
64461    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64462  fi
64463
64464
64465
64466
64467  # Check whether --enable-generate-classlist was given.
64468if test "${enable_generate_classlist+set}" = set; then :
64469  enableval=$enable_generate_classlist;
64470fi
64471
64472
64473  # Check if it's likely that it's possible to generate the classlist. Depending
64474  # on exact jvm configuration it could be possible anyway.
64475  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64476    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64477  else
64478    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64479  fi
64480
64481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64482$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64483  if test "x$enable_generate_classlist" = "xyes"; then
64484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64485$as_echo "yes, forced" >&6; }
64486    ENABLE_GENERATE_CLASSLIST="true"
64487    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64488      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64489$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64490    fi
64491  elif test "x$enable_generate_classlist" = "xno"; then
64492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64493$as_echo "no, forced" >&6; }
64494    ENABLE_GENERATE_CLASSLIST="false"
64495  elif test "x$enable_generate_classlist" = "x"; then
64496    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64498$as_echo "yes" >&6; }
64499      ENABLE_GENERATE_CLASSLIST="true"
64500    else
64501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64502$as_echo "no" >&6; }
64503      ENABLE_GENERATE_CLASSLIST="false"
64504    fi
64505  else
64506    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64507  fi
64508
64509
64510
64511
64512###############################################################################
64513#
64514# Configure parts of the build that only affect the build performance,
64515# not the result.
64516#
64517###############################################################################
64518
64519
64520  # How many cores do we have on this build system?
64521
64522# Check whether --with-num-cores was given.
64523if test "${with_num_cores+set}" = set; then :
64524  withval=$with_num_cores;
64525fi
64526
64527  if test "x$with_num_cores" = x; then
64528    # The number of cores were not specified, try to probe them.
64529
64530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64531$as_echo_n "checking for number of cores... " >&6; }
64532  NUM_CORES=1
64533  FOUND_CORES=no
64534
64535  if test -f /proc/cpuinfo; then
64536    # Looks like a Linux (or cygwin) system
64537    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64538    FOUND_CORES=yes
64539  elif test -x /usr/sbin/psrinfo; then
64540    # Looks like a Solaris system
64541    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64542    FOUND_CORES=yes
64543  elif test -x /usr/sbin/sysctl; then
64544    # Looks like a MacOSX system
64545    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64546    FOUND_CORES=yes
64547  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64548    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64549    FOUND_CORES=yes
64550  elif test -n "$NUMBER_OF_PROCESSORS"; then
64551    # On windows, look in the env
64552    NUM_CORES=$NUMBER_OF_PROCESSORS
64553    FOUND_CORES=yes
64554  fi
64555
64556  if test "x$FOUND_CORES" = xyes; then
64557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64558$as_echo "$NUM_CORES" >&6; }
64559  else
64560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64561$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64562    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64563$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64564  fi
64565
64566  else
64567    NUM_CORES=$with_num_cores
64568  fi
64569
64570
64571
64572  # How much memory do we have on this build system?
64573
64574# Check whether --with-memory-size was given.
64575if test "${with_memory_size+set}" = set; then :
64576  withval=$with_memory_size;
64577fi
64578
64579  if test "x$with_memory_size" = x; then
64580    # The memory size was not specified, try to probe it.
64581
64582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64583$as_echo_n "checking for memory size... " >&6; }
64584  # Default to 1024 MB
64585  MEMORY_SIZE=1024
64586  FOUND_MEM=no
64587
64588  if test -f /proc/meminfo; then
64589    # Looks like a Linux (or cygwin) system
64590    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64591    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64592    FOUND_MEM=yes
64593  elif test -x /usr/sbin/prtconf; then
64594    # Looks like a Solaris or AIX system
64595    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64596    FOUND_MEM=yes
64597  elif test -x /usr/sbin/sysctl; then
64598    # Looks like a MacOSX system
64599    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64600    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64601    FOUND_MEM=yes
64602  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64603    # Windows, but without cygwin
64604    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64605    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64606    FOUND_MEM=yes
64607  fi
64608
64609  if test "x$FOUND_MEM" = xyes; then
64610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64611$as_echo "$MEMORY_SIZE MB" >&6; }
64612  else
64613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64614$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64616$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64617  fi
64618
64619  else
64620    MEMORY_SIZE=$with_memory_size
64621  fi
64622
64623
64624
64625  # Provide a decent default number of parallel jobs for make depending on
64626  # number of cores, amount of memory and machine architecture.
64627
64628# Check whether --with-jobs was given.
64629if test "${with_jobs+set}" = set; then :
64630  withval=$with_jobs;
64631fi
64632
64633  if test "x$with_jobs" = x; then
64634    # Number of jobs was not specified, calculate.
64635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64636$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64637    # Approximate memory in GB.
64638    memory_gb=`expr $MEMORY_SIZE / 1024`
64639    # Pick the lowest of memory in gb and number of cores.
64640    if test "$memory_gb" -lt "$NUM_CORES"; then
64641      JOBS="$memory_gb"
64642    else
64643      JOBS="$NUM_CORES"
64644    fi
64645    if test "$JOBS" -eq "0"; then
64646      JOBS=1
64647    fi
64648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64649$as_echo "$JOBS" >&6; }
64650  else
64651    JOBS=$with_jobs
64652  fi
64653
64654
64655
64656  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64657
64658# Check whether --with-test-jobs was given.
64659if test "${with_test_jobs+set}" = set; then :
64660  withval=$with_test_jobs;
64661fi
64662
64663  if test "x$with_test_jobs" = x; then
64664      TEST_JOBS=0
64665  else
64666      TEST_JOBS=$with_test_jobs
64667  fi
64668
64669
64670
64671# Setup arguments for the boot jdk (after cores and memory have been setup)
64672
64673  ##############################################################################
64674  #
64675  # Specify jvm options for anything that is run with the Boot JDK.
64676  # Not all JVM:s accept the same arguments on the command line.
64677  #
64678
64679# Check whether --with-boot-jdk-jvmargs was given.
64680if test "${with_boot_jdk_jvmargs+set}" = set; then :
64681  withval=$with_boot_jdk_jvmargs;
64682fi
64683
64684
64685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64686$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64687
64688  # Disable special log output when a debug build is used as Boot JDK...
64689
64690  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64691  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64692  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64693  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64694  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64695  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64696    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64697    JVM_ARG_OK=true
64698  else
64699    $ECHO "Arg failed:" >&5
64700    $ECHO "$OUTPUT" >&5
64701    JVM_ARG_OK=false
64702  fi
64703
64704
64705  # Force en-US environment
64706
64707  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64708  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64709  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64710  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64711  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64712  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64713    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64714    JVM_ARG_OK=true
64715  else
64716    $ECHO "Arg failed:" >&5
64717    $ECHO "$OUTPUT" >&5
64718    JVM_ARG_OK=false
64719  fi
64720
64721
64722  # Apply user provided options.
64723
64724  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64725  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64726  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64727  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64728  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64729  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64730    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64731    JVM_ARG_OK=true
64732  else
64733    $ECHO "Arg failed:" >&5
64734    $ECHO "$OUTPUT" >&5
64735    JVM_ARG_OK=false
64736  fi
64737
64738
64739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64740$as_echo "$boot_jdk_jvmargs" >&6; }
64741
64742  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64743  JAVA_FLAGS=$boot_jdk_jvmargs
64744
64745
64746
64747  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64748$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64749
64750  # Starting amount of heap memory.
64751
64752  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64753  $ECHO "Command: $JAVA -Xms64M -version" >&5
64754  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64755  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64756  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64757  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64758    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64759    JVM_ARG_OK=true
64760  else
64761    $ECHO "Arg failed:" >&5
64762    $ECHO "$OUTPUT" >&5
64763    JVM_ARG_OK=false
64764  fi
64765
64766  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64767
64768  # Maximum amount of heap memory and stack size.
64769  JVM_HEAP_LIMIT_32="1024"
64770  # Running a 64 bit JVM allows for and requires a bigger heap
64771  JVM_HEAP_LIMIT_64="1600"
64772  STACK_SIZE_32=768
64773  STACK_SIZE_64=1536
64774  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64775  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64776    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64777  fi
64778  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64779    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64780  fi
64781  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64782    JVM_HEAP_LIMIT_32=512
64783    JVM_HEAP_LIMIT_64=512
64784  fi
64785
64786  if test "x$BOOT_JDK_BITS" = "x32"; then
64787    STACK_SIZE=$STACK_SIZE_32
64788    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64789  else
64790    STACK_SIZE=$STACK_SIZE_64
64791    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64792  fi
64793
64794  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64795  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64796  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64797  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64798  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64799  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64800    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64801    JVM_ARG_OK=true
64802  else
64803    $ECHO "Arg failed:" >&5
64804    $ECHO "$OUTPUT" >&5
64805    JVM_ARG_OK=false
64806  fi
64807
64808
64809  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64810  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64811  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64812  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64813  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64814  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64815    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64816    JVM_ARG_OK=true
64817  else
64818    $ECHO "Arg failed:" >&5
64819    $ECHO "$OUTPUT" >&5
64820    JVM_ARG_OK=false
64821  fi
64822
64823
64824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64825$as_echo "$boot_jdk_jvmargs_big" >&6; }
64826
64827  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64828
64829
64830  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64831    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64832    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64833  else
64834    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64835    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64836  fi
64837  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64838  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64840$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64842$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64843
64844
64845  # By default, the main javac compilations use big
64846  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64847
64848
64849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64850$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64851
64852  # Use serial gc for small short lived tools if possible
64853
64854  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64855  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64856  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64857  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64858  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64859  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64860    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64861    JVM_ARG_OK=true
64862  else
64863    $ECHO "Arg failed:" >&5
64864    $ECHO "$OUTPUT" >&5
64865    JVM_ARG_OK=false
64866  fi
64867
64868
64869  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64870  $ECHO "Command: $JAVA -Xms32M -version" >&5
64871  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64872  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64873  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64874  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64875    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64876    JVM_ARG_OK=true
64877  else
64878    $ECHO "Arg failed:" >&5
64879    $ECHO "$OUTPUT" >&5
64880    JVM_ARG_OK=false
64881  fi
64882
64883
64884  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64885  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64886  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64887  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64888  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64889  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64890    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64891    JVM_ARG_OK=true
64892  else
64893    $ECHO "Arg failed:" >&5
64894    $ECHO "$OUTPUT" >&5
64895    JVM_ARG_OK=false
64896  fi
64897
64898
64899  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64900  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64901  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64902  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64903  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64904  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64905    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64906    JVM_ARG_OK=true
64907  else
64908    $ECHO "Arg failed:" >&5
64909    $ECHO "$OUTPUT" >&5
64910    JVM_ARG_OK=false
64911  fi
64912
64913
64914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64915$as_echo "$boot_jdk_jvmargs_small" >&6; }
64916
64917  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64918
64919
64920  JAVA_TOOL_FLAGS_SMALL=""
64921  for f in $JAVA_FLAGS_SMALL; do
64922    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64923  done
64924
64925
64926
64927# Setup smart javac (after cores and memory have been setup)
64928
64929
64930# Check whether --with-sjavac-server-java was given.
64931if test "${with_sjavac_server_java+set}" = set; then :
64932  withval=$with_sjavac_server_java;
64933fi
64934
64935
64936  if test "x$with_sjavac_server_java" != x; then
64937    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64938    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64939    if test "x$FOUND_VERSION" = x; then
64940      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64941    fi
64942  else
64943    SJAVAC_SERVER_JAVA="$JAVA"
64944  fi
64945
64946
64947  if test "$MEMORY_SIZE" -gt "3000"; then
64948
64949  $ECHO "Check if jvm arg is ok: -d64" >&5
64950  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64951  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64952  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64953  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64954  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64955    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64956    JVM_ARG_OK=true
64957  else
64958    $ECHO "Arg failed:" >&5
64959    $ECHO "$OUTPUT" >&5
64960    JVM_ARG_OK=false
64961  fi
64962
64963    if test "$JVM_ARG_OK" = true; then
64964      JVM_64BIT=true
64965      JVM_ARG_OK=false
64966    fi
64967  fi
64968
64969  MX_VALUE=`expr $MEMORY_SIZE / 2`
64970  if test "$JVM_64BIT" = true; then
64971    # Set ms lower than mx since more than one instance of the server might
64972    # get launched at the same time before they figure out which instance won.
64973    MS_VALUE=512
64974    if test "$MX_VALUE" -gt "2048"; then
64975      MX_VALUE=2048
64976    fi
64977  else
64978    MS_VALUE=256
64979    if test "$MX_VALUE" -gt "1500"; then
64980      MX_VALUE=1500
64981    fi
64982  fi
64983  if test "$MX_VALUE" -lt "512"; then
64984    MX_VALUE=512
64985  fi
64986
64987  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64988  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64989  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64990  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64991  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64992  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64993    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64994    JVM_ARG_OK=true
64995  else
64996    $ECHO "Arg failed:" >&5
64997    $ECHO "$OUTPUT" >&5
64998    JVM_ARG_OK=false
64999  fi
65000
65001
65002
65003  # Check whether --enable-sjavac was given.
65004if test "${enable_sjavac+set}" = set; then :
65005  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65006else
65007  ENABLE_SJAVAC="no"
65008fi
65009
65010  if test "x$JVM_ARG_OK" = "xfalse"; then
65011    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65012$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65013    ENABLE_SJAVAC="no"
65014  fi
65015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65016$as_echo_n "checking whether to use sjavac... " >&6; }
65017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65018$as_echo "$ENABLE_SJAVAC" >&6; }
65019
65020
65021  # Check whether --enable-javac-server was given.
65022if test "${enable_javac_server+set}" = set; then :
65023  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65024else
65025  ENABLE_JAVAC_SERVER="yes"
65026fi
65027
65028  if test "x$JVM_ARG_OK" = "xfalse"; then
65029    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65030$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65031    ENABLE_JAVAC_SERVER="no"
65032  fi
65033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65034$as_echo_n "checking whether to use javac server... " >&6; }
65035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65036$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65037
65038
65039  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65040    # When using a server javac, the small client instances do not need much
65041    # resources.
65042    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65043  fi
65044
65045
65046# Setup use of icecc if requested
65047
65048  # Check whether --enable-icecc was given.
65049if test "${enable_icecc+set}" = set; then :
65050  enableval=$enable_icecc;
65051fi
65052
65053
65054  if test "x${enable_icecc}" = "xyes"; then
65055
65056
65057
65058  # Publish this variable in the help.
65059
65060
65061  if [ -z "${ICECC_CMD+x}" ]; then
65062    # The variable is not set by user, try to locate tool using the code snippet
65063    for ac_prog in icecc
65064do
65065  # Extract the first word of "$ac_prog", so it can be a program name with args.
65066set dummy $ac_prog; ac_word=$2
65067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65068$as_echo_n "checking for $ac_word... " >&6; }
65069if ${ac_cv_path_ICECC_CMD+:} false; then :
65070  $as_echo_n "(cached) " >&6
65071else
65072  case $ICECC_CMD in
65073  [\\/]* | ?:[\\/]*)
65074  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65075  ;;
65076  *)
65077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65078for as_dir in $PATH
65079do
65080  IFS=$as_save_IFS
65081  test -z "$as_dir" && as_dir=.
65082    for ac_exec_ext in '' $ac_executable_extensions; do
65083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65084    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65086    break 2
65087  fi
65088done
65089  done
65090IFS=$as_save_IFS
65091
65092  ;;
65093esac
65094fi
65095ICECC_CMD=$ac_cv_path_ICECC_CMD
65096if test -n "$ICECC_CMD"; then
65097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65098$as_echo "$ICECC_CMD" >&6; }
65099else
65100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65101$as_echo "no" >&6; }
65102fi
65103
65104
65105  test -n "$ICECC_CMD" && break
65106done
65107
65108  else
65109    # The variable is set, but is it from the command line or the environment?
65110
65111    # Try to remove the string !ICECC_CMD! from our list.
65112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65114      # If it failed, the variable was not from the command line. Ignore it,
65115      # but warn the user (except for BASH, which is always set by the calling BASH).
65116      if test "xICECC_CMD" != xBASH; then
65117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65118$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65119      fi
65120      # Try to locate tool using the code snippet
65121      for ac_prog in icecc
65122do
65123  # Extract the first word of "$ac_prog", so it can be a program name with args.
65124set dummy $ac_prog; ac_word=$2
65125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65126$as_echo_n "checking for $ac_word... " >&6; }
65127if ${ac_cv_path_ICECC_CMD+:} false; then :
65128  $as_echo_n "(cached) " >&6
65129else
65130  case $ICECC_CMD in
65131  [\\/]* | ?:[\\/]*)
65132  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65133  ;;
65134  *)
65135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65136for as_dir in $PATH
65137do
65138  IFS=$as_save_IFS
65139  test -z "$as_dir" && as_dir=.
65140    for ac_exec_ext in '' $ac_executable_extensions; do
65141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65142    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65144    break 2
65145  fi
65146done
65147  done
65148IFS=$as_save_IFS
65149
65150  ;;
65151esac
65152fi
65153ICECC_CMD=$ac_cv_path_ICECC_CMD
65154if test -n "$ICECC_CMD"; then
65155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65156$as_echo "$ICECC_CMD" >&6; }
65157else
65158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65159$as_echo "no" >&6; }
65160fi
65161
65162
65163  test -n "$ICECC_CMD" && break
65164done
65165
65166    else
65167      # If it succeeded, then it was overridden by the user. We will use it
65168      # for the tool.
65169
65170      # First remove it from the list of overridden variables, so we can test
65171      # for unknown variables in the end.
65172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65173
65174      # Check if we try to supply an empty value
65175      if test "x$ICECC_CMD" = x; then
65176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65177$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65179$as_echo_n "checking for ICECC_CMD... " >&6; }
65180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65181$as_echo "disabled" >&6; }
65182      else
65183        # Check if the provided tool contains a complete path.
65184        tool_specified="$ICECC_CMD"
65185        tool_basename="${tool_specified##*/}"
65186        if test "x$tool_basename" = "x$tool_specified"; then
65187          # A command without a complete path is provided, search $PATH.
65188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65189$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65190          # Extract the first word of "$tool_basename", so it can be a program name with args.
65191set dummy $tool_basename; ac_word=$2
65192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65193$as_echo_n "checking for $ac_word... " >&6; }
65194if ${ac_cv_path_ICECC_CMD+:} false; then :
65195  $as_echo_n "(cached) " >&6
65196else
65197  case $ICECC_CMD in
65198  [\\/]* | ?:[\\/]*)
65199  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65200  ;;
65201  *)
65202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65203for as_dir in $PATH
65204do
65205  IFS=$as_save_IFS
65206  test -z "$as_dir" && as_dir=.
65207    for ac_exec_ext in '' $ac_executable_extensions; do
65208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65209    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65211    break 2
65212  fi
65213done
65214  done
65215IFS=$as_save_IFS
65216
65217  ;;
65218esac
65219fi
65220ICECC_CMD=$ac_cv_path_ICECC_CMD
65221if test -n "$ICECC_CMD"; then
65222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65223$as_echo "$ICECC_CMD" >&6; }
65224else
65225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65226$as_echo "no" >&6; }
65227fi
65228
65229
65230          if test "x$ICECC_CMD" = x; then
65231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65232          fi
65233        else
65234          # Otherwise we believe it is a complete path. Use it as it is.
65235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65236$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65238$as_echo_n "checking for ICECC_CMD... " >&6; }
65239          if test ! -x "$tool_specified"; then
65240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65241$as_echo "not found" >&6; }
65242            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65243          fi
65244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65245$as_echo "$tool_specified" >&6; }
65246        fi
65247      fi
65248    fi
65249
65250  fi
65251
65252
65253
65254  if test "x$ICECC_CMD" = x; then
65255    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65256  fi
65257
65258
65259    old_path="$PATH"
65260
65261    # Look for icecc-create-env in some known places
65262    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65263
65264
65265
65266  # Publish this variable in the help.
65267
65268
65269  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65270    # The variable is not set by user, try to locate tool using the code snippet
65271    for ac_prog in icecc-create-env
65272do
65273  # Extract the first word of "$ac_prog", so it can be a program name with args.
65274set dummy $ac_prog; ac_word=$2
65275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65276$as_echo_n "checking for $ac_word... " >&6; }
65277if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65278  $as_echo_n "(cached) " >&6
65279else
65280  case $ICECC_CREATE_ENV in
65281  [\\/]* | ?:[\\/]*)
65282  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65283  ;;
65284  *)
65285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65286for as_dir in $PATH
65287do
65288  IFS=$as_save_IFS
65289  test -z "$as_dir" && as_dir=.
65290    for ac_exec_ext in '' $ac_executable_extensions; do
65291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65292    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65294    break 2
65295  fi
65296done
65297  done
65298IFS=$as_save_IFS
65299
65300  ;;
65301esac
65302fi
65303ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65304if test -n "$ICECC_CREATE_ENV"; then
65305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65306$as_echo "$ICECC_CREATE_ENV" >&6; }
65307else
65308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65309$as_echo "no" >&6; }
65310fi
65311
65312
65313  test -n "$ICECC_CREATE_ENV" && break
65314done
65315
65316  else
65317    # The variable is set, but is it from the command line or the environment?
65318
65319    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65322      # If it failed, the variable was not from the command line. Ignore it,
65323      # but warn the user (except for BASH, which is always set by the calling BASH).
65324      if test "xICECC_CREATE_ENV" != xBASH; then
65325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65326$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65327      fi
65328      # Try to locate tool using the code snippet
65329      for ac_prog in icecc-create-env
65330do
65331  # Extract the first word of "$ac_prog", so it can be a program name with args.
65332set dummy $ac_prog; ac_word=$2
65333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65334$as_echo_n "checking for $ac_word... " >&6; }
65335if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65336  $as_echo_n "(cached) " >&6
65337else
65338  case $ICECC_CREATE_ENV in
65339  [\\/]* | ?:[\\/]*)
65340  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65341  ;;
65342  *)
65343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65344for as_dir in $PATH
65345do
65346  IFS=$as_save_IFS
65347  test -z "$as_dir" && as_dir=.
65348    for ac_exec_ext in '' $ac_executable_extensions; do
65349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65350    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65352    break 2
65353  fi
65354done
65355  done
65356IFS=$as_save_IFS
65357
65358  ;;
65359esac
65360fi
65361ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65362if test -n "$ICECC_CREATE_ENV"; then
65363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65364$as_echo "$ICECC_CREATE_ENV" >&6; }
65365else
65366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65367$as_echo "no" >&6; }
65368fi
65369
65370
65371  test -n "$ICECC_CREATE_ENV" && break
65372done
65373
65374    else
65375      # If it succeeded, then it was overridden by the user. We will use it
65376      # for the tool.
65377
65378      # First remove it from the list of overridden variables, so we can test
65379      # for unknown variables in the end.
65380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65381
65382      # Check if we try to supply an empty value
65383      if test "x$ICECC_CREATE_ENV" = x; then
65384        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65385$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65387$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65389$as_echo "disabled" >&6; }
65390      else
65391        # Check if the provided tool contains a complete path.
65392        tool_specified="$ICECC_CREATE_ENV"
65393        tool_basename="${tool_specified##*/}"
65394        if test "x$tool_basename" = "x$tool_specified"; then
65395          # A command without a complete path is provided, search $PATH.
65396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65397$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65398          # Extract the first word of "$tool_basename", so it can be a program name with args.
65399set dummy $tool_basename; ac_word=$2
65400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65401$as_echo_n "checking for $ac_word... " >&6; }
65402if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65403  $as_echo_n "(cached) " >&6
65404else
65405  case $ICECC_CREATE_ENV in
65406  [\\/]* | ?:[\\/]*)
65407  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65408  ;;
65409  *)
65410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65411for as_dir in $PATH
65412do
65413  IFS=$as_save_IFS
65414  test -z "$as_dir" && as_dir=.
65415    for ac_exec_ext in '' $ac_executable_extensions; do
65416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65417    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65419    break 2
65420  fi
65421done
65422  done
65423IFS=$as_save_IFS
65424
65425  ;;
65426esac
65427fi
65428ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65429if test -n "$ICECC_CREATE_ENV"; then
65430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65431$as_echo "$ICECC_CREATE_ENV" >&6; }
65432else
65433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65434$as_echo "no" >&6; }
65435fi
65436
65437
65438          if test "x$ICECC_CREATE_ENV" = x; then
65439            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65440          fi
65441        else
65442          # Otherwise we believe it is a complete path. Use it as it is.
65443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65444$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65445          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65446$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65447          if test ! -x "$tool_specified"; then
65448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65449$as_echo "not found" >&6; }
65450            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65451          fi
65452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65453$as_echo "$tool_specified" >&6; }
65454        fi
65455      fi
65456    fi
65457
65458  fi
65459
65460
65461
65462  if test "x$ICECC_CREATE_ENV" = x; then
65463    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65464  fi
65465
65466
65467    # Use icecc-create-env to create a minimal compilation environment that can
65468    # be sent to the other hosts in the icecream cluster.
65469    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65470    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65471    # Older versions of icecc does not have the --gcc parameter
65472    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65473      icecc_gcc_arg="--gcc"
65474    fi
65475    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65476
65477  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65478      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65479          ${icecc_create_env_log} 2>&1 )
65480  if test "$?" != "0"; then
65481    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65482$as_echo "$as_me: icecc-create-env output:" >&6;}
65483    cat \
65484          ${icecc_create_env_log}
65485    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65486  fi
65487
65488    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65489      # For clang, the icecc compilerwrapper is needed. It usually resides next
65490      # to icecc-create-env.
65491
65492
65493
65494  # Publish this variable in the help.
65495
65496
65497  if [ -z "${ICECC_WRAPPER+x}" ]; then
65498    # The variable is not set by user, try to locate tool using the code snippet
65499    for ac_prog in compilerwrapper
65500do
65501  # Extract the first word of "$ac_prog", so it can be a program name with args.
65502set dummy $ac_prog; ac_word=$2
65503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65504$as_echo_n "checking for $ac_word... " >&6; }
65505if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65506  $as_echo_n "(cached) " >&6
65507else
65508  case $ICECC_WRAPPER in
65509  [\\/]* | ?:[\\/]*)
65510  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65511  ;;
65512  *)
65513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65514for as_dir in $PATH
65515do
65516  IFS=$as_save_IFS
65517  test -z "$as_dir" && as_dir=.
65518    for ac_exec_ext in '' $ac_executable_extensions; do
65519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65520    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65522    break 2
65523  fi
65524done
65525  done
65526IFS=$as_save_IFS
65527
65528  ;;
65529esac
65530fi
65531ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65532if test -n "$ICECC_WRAPPER"; then
65533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65534$as_echo "$ICECC_WRAPPER" >&6; }
65535else
65536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65537$as_echo "no" >&6; }
65538fi
65539
65540
65541  test -n "$ICECC_WRAPPER" && break
65542done
65543
65544  else
65545    # The variable is set, but is it from the command line or the environment?
65546
65547    # Try to remove the string !ICECC_WRAPPER! from our list.
65548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65550      # If it failed, the variable was not from the command line. Ignore it,
65551      # but warn the user (except for BASH, which is always set by the calling BASH).
65552      if test "xICECC_WRAPPER" != xBASH; then
65553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65554$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65555      fi
65556      # Try to locate tool using the code snippet
65557      for ac_prog in compilerwrapper
65558do
65559  # Extract the first word of "$ac_prog", so it can be a program name with args.
65560set dummy $ac_prog; ac_word=$2
65561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65562$as_echo_n "checking for $ac_word... " >&6; }
65563if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65564  $as_echo_n "(cached) " >&6
65565else
65566  case $ICECC_WRAPPER in
65567  [\\/]* | ?:[\\/]*)
65568  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65569  ;;
65570  *)
65571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65572for as_dir in $PATH
65573do
65574  IFS=$as_save_IFS
65575  test -z "$as_dir" && as_dir=.
65576    for ac_exec_ext in '' $ac_executable_extensions; do
65577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65578    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65580    break 2
65581  fi
65582done
65583  done
65584IFS=$as_save_IFS
65585
65586  ;;
65587esac
65588fi
65589ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65590if test -n "$ICECC_WRAPPER"; then
65591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65592$as_echo "$ICECC_WRAPPER" >&6; }
65593else
65594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65595$as_echo "no" >&6; }
65596fi
65597
65598
65599  test -n "$ICECC_WRAPPER" && break
65600done
65601
65602    else
65603      # If it succeeded, then it was overridden by the user. We will use it
65604      # for the tool.
65605
65606      # First remove it from the list of overridden variables, so we can test
65607      # for unknown variables in the end.
65608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65609
65610      # Check if we try to supply an empty value
65611      if test "x$ICECC_WRAPPER" = x; then
65612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65613$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65615$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65617$as_echo "disabled" >&6; }
65618      else
65619        # Check if the provided tool contains a complete path.
65620        tool_specified="$ICECC_WRAPPER"
65621        tool_basename="${tool_specified##*/}"
65622        if test "x$tool_basename" = "x$tool_specified"; then
65623          # A command without a complete path is provided, search $PATH.
65624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65625$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65626          # Extract the first word of "$tool_basename", so it can be a program name with args.
65627set dummy $tool_basename; ac_word=$2
65628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65629$as_echo_n "checking for $ac_word... " >&6; }
65630if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65631  $as_echo_n "(cached) " >&6
65632else
65633  case $ICECC_WRAPPER in
65634  [\\/]* | ?:[\\/]*)
65635  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65636  ;;
65637  *)
65638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65639for as_dir in $PATH
65640do
65641  IFS=$as_save_IFS
65642  test -z "$as_dir" && as_dir=.
65643    for ac_exec_ext in '' $ac_executable_extensions; do
65644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65645    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65647    break 2
65648  fi
65649done
65650  done
65651IFS=$as_save_IFS
65652
65653  ;;
65654esac
65655fi
65656ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65657if test -n "$ICECC_WRAPPER"; then
65658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65659$as_echo "$ICECC_WRAPPER" >&6; }
65660else
65661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65662$as_echo "no" >&6; }
65663fi
65664
65665
65666          if test "x$ICECC_WRAPPER" = x; then
65667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65668          fi
65669        else
65670          # Otherwise we believe it is a complete path. Use it as it is.
65671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65672$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65674$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65675          if test ! -x "$tool_specified"; then
65676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65677$as_echo "not found" >&6; }
65678            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65679          fi
65680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65681$as_echo "$tool_specified" >&6; }
65682        fi
65683      fi
65684    fi
65685
65686  fi
65687
65688
65689
65690  if test "x$ICECC_WRAPPER" = x; then
65691    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65692  fi
65693
65694
65695
65696  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65697      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65698  if test "$?" != "0"; then
65699    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65700$as_echo "$as_me: icecc-create-env output:" >&6;}
65701    cat ${icecc_create_env_log}
65702    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65703  fi
65704
65705    else
65706      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65707    fi
65708    PATH="$old_path"
65709    # The bundle with the compiler gets a name based on checksums. Parse log file
65710    # to find it.
65711    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65712    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65713    if test ! -f ${ICECC_ENV_BUNDLE}; then
65714      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65715    fi
65716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65717$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65719$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65720    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65721
65722    if test "x${COMPILE_TYPE}" = "xcross"; then
65723      # If cross compiling, create a separate env package for the build compiler
65724      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65725      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65726      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65727
65728  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65729      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65730            ${icecc_create_env_log_build} 2>&1 )
65731  if test "$?" != "0"; then
65732    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65733$as_echo "$as_me: icecc-create-env output:" >&6;}
65734    cat \
65735            ${icecc_create_env_log_build}
65736    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65737  fi
65738
65739      elif test "x${BUILD_CC##*/}" = "xclang"; then
65740
65741  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65742      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65743  if test "$?" != "0"; then
65744    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65745$as_echo "$as_me: icecc-create-env output:" >&6;}
65746    cat ${icecc_create_env_log_build}
65747    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65748  fi
65749
65750      else
65751        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65752      fi
65753      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65754      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65755      if test ! -f ${ICECC_ENV_BUNDLE}; then
65756        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65757      fi
65758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65759$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65761$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65762      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65763          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65764    else
65765      BUILD_ICECC="${ICECC}"
65766    fi
65767
65768
65769  fi
65770
65771
65772# Can the C/C++ compiler use precompiled headers?
65773
65774
65775  ###############################################################################
65776  #
65777  # Can the C/C++ compiler use precompiled headers?
65778  #
65779  # Check whether --enable-precompiled-headers was given.
65780if test "${enable_precompiled_headers+set}" = set; then :
65781  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65782else
65783  ENABLE_PRECOMPH=yes
65784fi
65785
65786
65787  USE_PRECOMPILED_HEADER=1
65788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65789$as_echo_n "checking If precompiled header is enabled... " >&6; }
65790  if test "x$ENABLE_PRECOMPH" = xno; then
65791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65792$as_echo "no, forced" >&6; }
65793    USE_PRECOMPILED_HEADER=0
65794  elif test "x$ICECC" != "x"; then
65795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65796$as_echo "no, does not work effectively with icecc" >&6; }
65797    USE_PRECOMPILED_HEADER=0
65798  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65800$as_echo "no, does not work with Solaris Studio" >&6; }
65801    USE_PRECOMPILED_HEADER=0
65802  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65804$as_echo "no, does not work with xlc" >&6; }
65805    USE_PRECOMPILED_HEADER=0
65806  else
65807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65808$as_echo "yes" >&6; }
65809  fi
65810
65811  if test "x$ENABLE_PRECOMPH" = xyes; then
65812    # Check that the compiler actually supports precomp headers.
65813    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65815$as_echo_n "checking that precompiled headers work... " >&6; }
65816      echo "int alfa();" > conftest.h
65817      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65818      if test ! -f conftest.hpp.gch; then
65819        USE_PRECOMPILED_HEADER=0
65820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65821$as_echo "no" >&6; }
65822      else
65823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65824$as_echo "yes" >&6; }
65825      fi
65826      $RM conftest.h conftest.hpp.gch
65827    fi
65828  fi
65829
65830
65831
65832
65833# Setup use of ccache, if available
65834
65835  # Check whether --enable-ccache was given.
65836if test "${enable_ccache+set}" = set; then :
65837  enableval=$enable_ccache;
65838fi
65839
65840
65841  CCACHE_STATUS=
65842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65843$as_echo_n "checking is ccache enabled... " >&6; }
65844  if test "x$enable_ccache" = xyes; then
65845    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65847$as_echo "yes" >&6; }
65848      OLD_PATH="$PATH"
65849      if test "x$TOOLCHAIN_PATH" != x; then
65850        PATH=$TOOLCHAIN_PATH:$PATH
65851      fi
65852
65853
65854
65855  # Publish this variable in the help.
65856
65857
65858  if [ -z "${CCACHE+x}" ]; then
65859    # The variable is not set by user, try to locate tool using the code snippet
65860    for ac_prog in ccache
65861do
65862  # Extract the first word of "$ac_prog", so it can be a program name with args.
65863set dummy $ac_prog; ac_word=$2
65864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65865$as_echo_n "checking for $ac_word... " >&6; }
65866if ${ac_cv_path_CCACHE+:} false; then :
65867  $as_echo_n "(cached) " >&6
65868else
65869  case $CCACHE in
65870  [\\/]* | ?:[\\/]*)
65871  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65872  ;;
65873  *)
65874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65875for as_dir in $PATH
65876do
65877  IFS=$as_save_IFS
65878  test -z "$as_dir" && as_dir=.
65879    for ac_exec_ext in '' $ac_executable_extensions; do
65880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65881    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65883    break 2
65884  fi
65885done
65886  done
65887IFS=$as_save_IFS
65888
65889  ;;
65890esac
65891fi
65892CCACHE=$ac_cv_path_CCACHE
65893if test -n "$CCACHE"; then
65894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65895$as_echo "$CCACHE" >&6; }
65896else
65897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65898$as_echo "no" >&6; }
65899fi
65900
65901
65902  test -n "$CCACHE" && break
65903done
65904
65905  else
65906    # The variable is set, but is it from the command line or the environment?
65907
65908    # Try to remove the string !CCACHE! from our list.
65909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65911      # If it failed, the variable was not from the command line. Ignore it,
65912      # but warn the user (except for BASH, which is always set by the calling BASH).
65913      if test "xCCACHE" != xBASH; then
65914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65915$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65916      fi
65917      # Try to locate tool using the code snippet
65918      for ac_prog in ccache
65919do
65920  # Extract the first word of "$ac_prog", so it can be a program name with args.
65921set dummy $ac_prog; ac_word=$2
65922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65923$as_echo_n "checking for $ac_word... " >&6; }
65924if ${ac_cv_path_CCACHE+:} false; then :
65925  $as_echo_n "(cached) " >&6
65926else
65927  case $CCACHE in
65928  [\\/]* | ?:[\\/]*)
65929  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65930  ;;
65931  *)
65932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65933for as_dir in $PATH
65934do
65935  IFS=$as_save_IFS
65936  test -z "$as_dir" && as_dir=.
65937    for ac_exec_ext in '' $ac_executable_extensions; do
65938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65939    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65941    break 2
65942  fi
65943done
65944  done
65945IFS=$as_save_IFS
65946
65947  ;;
65948esac
65949fi
65950CCACHE=$ac_cv_path_CCACHE
65951if test -n "$CCACHE"; then
65952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65953$as_echo "$CCACHE" >&6; }
65954else
65955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65956$as_echo "no" >&6; }
65957fi
65958
65959
65960  test -n "$CCACHE" && break
65961done
65962
65963    else
65964      # If it succeeded, then it was overridden by the user. We will use it
65965      # for the tool.
65966
65967      # First remove it from the list of overridden variables, so we can test
65968      # for unknown variables in the end.
65969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65970
65971      # Check if we try to supply an empty value
65972      if test "x$CCACHE" = x; then
65973        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65974$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65976$as_echo_n "checking for CCACHE... " >&6; }
65977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65978$as_echo "disabled" >&6; }
65979      else
65980        # Check if the provided tool contains a complete path.
65981        tool_specified="$CCACHE"
65982        tool_basename="${tool_specified##*/}"
65983        if test "x$tool_basename" = "x$tool_specified"; then
65984          # A command without a complete path is provided, search $PATH.
65985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65986$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65987          # Extract the first word of "$tool_basename", so it can be a program name with args.
65988set dummy $tool_basename; ac_word=$2
65989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65990$as_echo_n "checking for $ac_word... " >&6; }
65991if ${ac_cv_path_CCACHE+:} false; then :
65992  $as_echo_n "(cached) " >&6
65993else
65994  case $CCACHE in
65995  [\\/]* | ?:[\\/]*)
65996  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65997  ;;
65998  *)
65999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66000for as_dir in $PATH
66001do
66002  IFS=$as_save_IFS
66003  test -z "$as_dir" && as_dir=.
66004    for ac_exec_ext in '' $ac_executable_extensions; do
66005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66006    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66008    break 2
66009  fi
66010done
66011  done
66012IFS=$as_save_IFS
66013
66014  ;;
66015esac
66016fi
66017CCACHE=$ac_cv_path_CCACHE
66018if test -n "$CCACHE"; then
66019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66020$as_echo "$CCACHE" >&6; }
66021else
66022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66023$as_echo "no" >&6; }
66024fi
66025
66026
66027          if test "x$CCACHE" = x; then
66028            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66029          fi
66030        else
66031          # Otherwise we believe it is a complete path. Use it as it is.
66032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66033$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66034          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66035$as_echo_n "checking for CCACHE... " >&6; }
66036          if test ! -x "$tool_specified"; then
66037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66038$as_echo "not found" >&6; }
66039            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66040          fi
66041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66042$as_echo "$tool_specified" >&6; }
66043        fi
66044      fi
66045    fi
66046
66047  fi
66048
66049
66050
66051  if test "x$CCACHE" = x; then
66052    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66053  fi
66054
66055
66056      PATH="$OLD_PATH"
66057      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66058      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66059    else
66060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66061$as_echo "no" >&6; }
66062      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66063$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66064    fi
66065  elif test "x$enable_ccache" = xno; then
66066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66067$as_echo "no, explicitly disabled" >&6; }
66068    CCACHE_STATUS="Disabled"
66069  elif test "x$enable_ccache" = x; then
66070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66071$as_echo "no" >&6; }
66072  else
66073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66074$as_echo "unknown" >&6; }
66075    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66076  fi
66077
66078
66079
66080# Check whether --with-ccache-dir was given.
66081if test "${with_ccache_dir+set}" = set; then :
66082  withval=$with_ccache_dir;
66083fi
66084
66085
66086  if test "x$with_ccache_dir" != x; then
66087    # When using a non home ccache directory, assume the use is to share ccache files
66088    # with other users. Thus change the umask.
66089    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66090    if test "x$CCACHE" = x; then
66091      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66092$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66093    fi
66094  fi
66095
66096  if test "x$CCACHE" != x; then
66097
66098  if test "x$CCACHE" != x; then
66099    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66100      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66101          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66102      if test "x$HAS_BAD_CCACHE" != "x"; then
66103        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66104      fi
66105    fi
66106    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66107      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66108          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66109      if test "x$HAS_BAD_CCACHE" != "x"; then
66110        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66111      fi
66112      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66113$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66114      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66115      PUSHED_FLAGS="$CXXFLAGS"
66116      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66117      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66118/* end confdefs.h.  */
66119
66120int
66121main ()
66122{
66123
66124  ;
66125  return 0;
66126}
66127_ACEOF
66128if ac_fn_cxx_try_compile "$LINENO"; then :
66129  CC_KNOWS_CCACHE_TRICK=yes
66130else
66131  CC_KNOWS_CCACHE_TRICK=no
66132fi
66133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66134      CXXFLAGS="$PUSHED_FLAGS"
66135      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66137$as_echo "yes" >&6; }
66138        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66139
66140        CCACHE_SLOPPINESS=pch_defines,time_macros
66141      else
66142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66143$as_echo "no" >&6; }
66144        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66145      fi
66146    fi
66147
66148    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66149        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66150
66151    if test "x$SET_CCACHE_DIR" != x; then
66152      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66153      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66154    fi
66155  fi
66156
66157  fi
66158
66159
66160###############################################################################
66161#
66162# And now the finish...
66163#
66164###############################################################################
66165
66166# Check for some common pitfalls
66167
66168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66169    file_to_test="$SRC_ROOT/LICENSE"
66170    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66171      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
66172    fi
66173  fi
66174
66175
66176  # Did user specify any unknown variables?
66177
66178  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66179    # Replace the separating ! with spaces before presenting for end user.
66180    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66181    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66182$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66183  fi
66184
66185
66186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66187$as_echo_n "checking if build directory is on local disk... " >&6; }
66188
66189  # df -l lists only local disks; if the given directory is not found then
66190  # a non-zero exit code is given
66191  if test "x$DF" = x; then
66192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66193      # msys does not have df; use Windows "net use" instead.
66194      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66195      if test "x$IS_NETWORK_DISK" = x; then
66196        OUTPUT_DIR_IS_LOCAL="yes"
66197      else
66198        OUTPUT_DIR_IS_LOCAL="no"
66199      fi
66200    else
66201      # No df here, say it's local
66202      OUTPUT_DIR_IS_LOCAL="yes"
66203    fi
66204  else
66205    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66206      OUTPUT_DIR_IS_LOCAL="yes"
66207    else
66208      OUTPUT_DIR_IS_LOCAL="no"
66209    fi
66210  fi
66211
66212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66213$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66214
66215
66216
66217  # Check if the user has any old-style ALT_ variables set.
66218  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66219
66220  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66221  # Since we can't properly handle the dependencies for this, warn the user about the situation
66222  if test -e $OUTPUT_ROOT/spec.gmk; then
66223    IS_RECONFIGURE=yes
66224  else
66225    IS_RECONFIGURE=no
66226  fi
66227
66228
66229# At the end, call the custom hook. (Dummy macro if no custom sources available)
66230
66231
66232# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66233
66234  # Keep feature lists sorted and free of duplicates
66235  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66236  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66237  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66238  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66239  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66240  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66241  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66242
66243  # Validate features
66244  for variant in $JVM_VARIANTS; do
66245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66246$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66247    features_var_name=JVM_FEATURES_$variant
66248    JVM_FEATURES_TO_TEST=${!features_var_name}
66249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66250$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66251    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66252    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66253    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66254    if test "x$INVALID_FEATURES" != x; then
66255      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66256    fi
66257  done
66258
66259
66260# We're messing a bit with internal autoconf variables to put the config.status
66261# in the output directory instead of the current directory.
66262CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66263
66264# Create the actual output files. Now the main work of configure is done.
66265cat >confcache <<\_ACEOF
66266# This file is a shell script that caches the results of configure
66267# tests run on this system so they can be shared between configure
66268# scripts and configure runs, see configure's option --config-cache.
66269# It is not useful on other systems.  If it contains results you don't
66270# want to keep, you may remove or edit it.
66271#
66272# config.status only pays attention to the cache file if you give it
66273# the --recheck option to rerun configure.
66274#
66275# `ac_cv_env_foo' variables (set or unset) will be overridden when
66276# loading this file, other *unset* `ac_cv_foo' will be assigned the
66277# following values.
66278
66279_ACEOF
66280
66281# The following way of writing the cache mishandles newlines in values,
66282# but we know of no workaround that is simple, portable, and efficient.
66283# So, we kill variables containing newlines.
66284# Ultrix sh set writes to stderr and can't be redirected directly,
66285# and sets the high bit in the cache file unless we assign to the vars.
66286(
66287  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66288    eval ac_val=\$$ac_var
66289    case $ac_val in #(
66290    *${as_nl}*)
66291      case $ac_var in #(
66292      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66293$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66294      esac
66295      case $ac_var in #(
66296      _ | IFS | as_nl) ;; #(
66297      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66298      *) { eval $ac_var=; unset $ac_var;} ;;
66299      esac ;;
66300    esac
66301  done
66302
66303  (set) 2>&1 |
66304    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66305    *${as_nl}ac_space=\ *)
66306      # `set' does not quote correctly, so add quotes: double-quote
66307      # substitution turns \\\\ into \\, and sed turns \\ into \.
66308      sed -n \
66309	"s/'/'\\\\''/g;
66310	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66311      ;; #(
66312    *)
66313      # `set' quotes correctly as required by POSIX, so do not add quotes.
66314      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66315      ;;
66316    esac |
66317    sort
66318) |
66319  sed '
66320     /^ac_cv_env_/b end
66321     t clear
66322     :clear
66323     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66324     t end
66325     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66326     :end' >>confcache
66327if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66328  if test -w "$cache_file"; then
66329    if test "x$cache_file" != "x/dev/null"; then
66330      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66331$as_echo "$as_me: updating cache $cache_file" >&6;}
66332      if test ! -f "$cache_file" || test -h "$cache_file"; then
66333	cat confcache >"$cache_file"
66334      else
66335        case $cache_file in #(
66336        */* | ?:*)
66337	  mv -f confcache "$cache_file"$$ &&
66338	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66339        *)
66340	  mv -f confcache "$cache_file" ;;
66341	esac
66342      fi
66343    fi
66344  else
66345    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66346$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66347  fi
66348fi
66349rm -f confcache
66350
66351test "x$prefix" = xNONE && prefix=$ac_default_prefix
66352# Let make expand exec_prefix.
66353test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66354
66355# Transform confdefs.h into DEFS.
66356# Protect against shell expansion while executing Makefile rules.
66357# Protect against Makefile macro expansion.
66358#
66359# If the first sed substitution is executed (which looks for macros that
66360# take arguments), then branch to the quote section.  Otherwise,
66361# look for a macro that doesn't take arguments.
66362ac_script='
66363:mline
66364/\\$/{
66365 N
66366 s,\\\n,,
66367 b mline
66368}
66369t clear
66370:clear
66371s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66372t quote
66373s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66374t quote
66375b any
66376:quote
66377s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66378s/\[/\\&/g
66379s/\]/\\&/g
66380s/\$/$$/g
66381H
66382:any
66383${
66384	g
66385	s/^\n//
66386	s/\n/ /g
66387	p
66388}
66389'
66390DEFS=`sed -n "$ac_script" confdefs.h`
66391
66392
66393ac_libobjs=
66394ac_ltlibobjs=
66395U=
66396for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66397  # 1. Remove the extension, and $U if already installed.
66398  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66399  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66400  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66401  #    will be set to the directory where LIBOBJS objects are built.
66402  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66403  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66404done
66405LIBOBJS=$ac_libobjs
66406
66407LTLIBOBJS=$ac_ltlibobjs
66408
66409
66410
66411: "${CONFIG_STATUS=./config.status}"
66412ac_write_fail=0
66413ac_clean_files_save=$ac_clean_files
66414ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66415{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66416$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66417as_write_fail=0
66418cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66419#! $SHELL
66420# Generated by $as_me.
66421# Run this file to recreate the current configuration.
66422# Compiler output produced by configure, useful for debugging
66423# configure, is in config.log if it exists.
66424
66425debug=false
66426ac_cs_recheck=false
66427ac_cs_silent=false
66428
66429SHELL=\${CONFIG_SHELL-$SHELL}
66430export SHELL
66431_ASEOF
66432cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66433## -------------------- ##
66434## M4sh Initialization. ##
66435## -------------------- ##
66436
66437# Be more Bourne compatible
66438DUALCASE=1; export DUALCASE # for MKS sh
66439if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66440  emulate sh
66441  NULLCMD=:
66442  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66443  # is contrary to our usage.  Disable this feature.
66444  alias -g '${1+"$@"}'='"$@"'
66445  setopt NO_GLOB_SUBST
66446else
66447  case `(set -o) 2>/dev/null` in #(
66448  *posix*) :
66449    set -o posix ;; #(
66450  *) :
66451     ;;
66452esac
66453fi
66454
66455
66456as_nl='
66457'
66458export as_nl
66459# Printing a long string crashes Solaris 7 /usr/bin/printf.
66460as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66461as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66462as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66463# Prefer a ksh shell builtin over an external printf program on Solaris,
66464# but without wasting forks for bash or zsh.
66465if test -z "$BASH_VERSION$ZSH_VERSION" \
66466    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66467  as_echo='print -r --'
66468  as_echo_n='print -rn --'
66469elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66470  as_echo='printf %s\n'
66471  as_echo_n='printf %s'
66472else
66473  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66474    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66475    as_echo_n='/usr/ucb/echo -n'
66476  else
66477    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66478    as_echo_n_body='eval
66479      arg=$1;
66480      case $arg in #(
66481      *"$as_nl"*)
66482	expr "X$arg" : "X\\(.*\\)$as_nl";
66483	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66484      esac;
66485      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66486    '
66487    export as_echo_n_body
66488    as_echo_n='sh -c $as_echo_n_body as_echo'
66489  fi
66490  export as_echo_body
66491  as_echo='sh -c $as_echo_body as_echo'
66492fi
66493
66494# The user is always right.
66495if test "${PATH_SEPARATOR+set}" != set; then
66496  PATH_SEPARATOR=:
66497  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66498    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66499      PATH_SEPARATOR=';'
66500  }
66501fi
66502
66503
66504# IFS
66505# We need space, tab and new line, in precisely that order.  Quoting is
66506# there to prevent editors from complaining about space-tab.
66507# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66508# splitting by setting IFS to empty value.)
66509IFS=" ""	$as_nl"
66510
66511# Find who we are.  Look in the path if we contain no directory separator.
66512as_myself=
66513case $0 in #((
66514  *[\\/]* ) as_myself=$0 ;;
66515  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66516for as_dir in $PATH
66517do
66518  IFS=$as_save_IFS
66519  test -z "$as_dir" && as_dir=.
66520    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66521  done
66522IFS=$as_save_IFS
66523
66524     ;;
66525esac
66526# We did not find ourselves, most probably we were run as `sh COMMAND'
66527# in which case we are not to be found in the path.
66528if test "x$as_myself" = x; then
66529  as_myself=$0
66530fi
66531if test ! -f "$as_myself"; then
66532  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66533  exit 1
66534fi
66535
66536# Unset variables that we do not need and which cause bugs (e.g. in
66537# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66538# suppresses any "Segmentation fault" message there.  '((' could
66539# trigger a bug in pdksh 5.2.14.
66540for as_var in BASH_ENV ENV MAIL MAILPATH
66541do eval test x\${$as_var+set} = xset \
66542  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66543done
66544PS1='$ '
66545PS2='> '
66546PS4='+ '
66547
66548# NLS nuisances.
66549LC_ALL=C
66550export LC_ALL
66551LANGUAGE=C
66552export LANGUAGE
66553
66554# CDPATH.
66555(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66556
66557
66558# as_fn_error STATUS ERROR [LINENO LOG_FD]
66559# ----------------------------------------
66560# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66561# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66562# script with STATUS, using 1 if that was 0.
66563as_fn_error ()
66564{
66565  as_status=$1; test $as_status -eq 0 && as_status=1
66566  if test "$4"; then
66567    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66568    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66569  fi
66570  $as_echo "$as_me: error: $2" >&2
66571  as_fn_exit $as_status
66572} # as_fn_error
66573
66574
66575# as_fn_set_status STATUS
66576# -----------------------
66577# Set $? to STATUS, without forking.
66578as_fn_set_status ()
66579{
66580  return $1
66581} # as_fn_set_status
66582
66583# as_fn_exit STATUS
66584# -----------------
66585# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66586as_fn_exit ()
66587{
66588  set +e
66589  as_fn_set_status $1
66590  exit $1
66591} # as_fn_exit
66592
66593# as_fn_unset VAR
66594# ---------------
66595# Portably unset VAR.
66596as_fn_unset ()
66597{
66598  { eval $1=; unset $1;}
66599}
66600as_unset=as_fn_unset
66601# as_fn_append VAR VALUE
66602# ----------------------
66603# Append the text in VALUE to the end of the definition contained in VAR. Take
66604# advantage of any shell optimizations that allow amortized linear growth over
66605# repeated appends, instead of the typical quadratic growth present in naive
66606# implementations.
66607if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66608  eval 'as_fn_append ()
66609  {
66610    eval $1+=\$2
66611  }'
66612else
66613  as_fn_append ()
66614  {
66615    eval $1=\$$1\$2
66616  }
66617fi # as_fn_append
66618
66619# as_fn_arith ARG...
66620# ------------------
66621# Perform arithmetic evaluation on the ARGs, and store the result in the
66622# global $as_val. Take advantage of shells that can avoid forks. The arguments
66623# must be portable across $(()) and expr.
66624if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66625  eval 'as_fn_arith ()
66626  {
66627    as_val=$(( $* ))
66628  }'
66629else
66630  as_fn_arith ()
66631  {
66632    as_val=`expr "$@" || test $? -eq 1`
66633  }
66634fi # as_fn_arith
66635
66636
66637if expr a : '\(a\)' >/dev/null 2>&1 &&
66638   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66639  as_expr=expr
66640else
66641  as_expr=false
66642fi
66643
66644if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66645  as_basename=basename
66646else
66647  as_basename=false
66648fi
66649
66650if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66651  as_dirname=dirname
66652else
66653  as_dirname=false
66654fi
66655
66656as_me=`$as_basename -- "$0" ||
66657$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66658	 X"$0" : 'X\(//\)$' \| \
66659	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66660$as_echo X/"$0" |
66661    sed '/^.*\/\([^/][^/]*\)\/*$/{
66662	    s//\1/
66663	    q
66664	  }
66665	  /^X\/\(\/\/\)$/{
66666	    s//\1/
66667	    q
66668	  }
66669	  /^X\/\(\/\).*/{
66670	    s//\1/
66671	    q
66672	  }
66673	  s/.*/./; q'`
66674
66675# Avoid depending upon Character Ranges.
66676as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66677as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66678as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66679as_cr_digits='0123456789'
66680as_cr_alnum=$as_cr_Letters$as_cr_digits
66681
66682ECHO_C= ECHO_N= ECHO_T=
66683case `echo -n x` in #(((((
66684-n*)
66685  case `echo 'xy\c'` in
66686  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66687  xy)  ECHO_C='\c';;
66688  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66689       ECHO_T='	';;
66690  esac;;
66691*)
66692  ECHO_N='-n';;
66693esac
66694
66695rm -f conf$$ conf$$.exe conf$$.file
66696if test -d conf$$.dir; then
66697  rm -f conf$$.dir/conf$$.file
66698else
66699  rm -f conf$$.dir
66700  mkdir conf$$.dir 2>/dev/null
66701fi
66702if (echo >conf$$.file) 2>/dev/null; then
66703  if ln -s conf$$.file conf$$ 2>/dev/null; then
66704    as_ln_s='ln -s'
66705    # ... but there are two gotchas:
66706    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66707    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66708    # In both cases, we have to default to `cp -pR'.
66709    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66710      as_ln_s='cp -pR'
66711  elif ln conf$$.file conf$$ 2>/dev/null; then
66712    as_ln_s=ln
66713  else
66714    as_ln_s='cp -pR'
66715  fi
66716else
66717  as_ln_s='cp -pR'
66718fi
66719rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66720rmdir conf$$.dir 2>/dev/null
66721
66722
66723# as_fn_mkdir_p
66724# -------------
66725# Create "$as_dir" as a directory, including parents if necessary.
66726as_fn_mkdir_p ()
66727{
66728
66729  case $as_dir in #(
66730  -*) as_dir=./$as_dir;;
66731  esac
66732  test -d "$as_dir" || eval $as_mkdir_p || {
66733    as_dirs=
66734    while :; do
66735      case $as_dir in #(
66736      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66737      *) as_qdir=$as_dir;;
66738      esac
66739      as_dirs="'$as_qdir' $as_dirs"
66740      as_dir=`$as_dirname -- "$as_dir" ||
66741$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66742	 X"$as_dir" : 'X\(//\)[^/]' \| \
66743	 X"$as_dir" : 'X\(//\)$' \| \
66744	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66745$as_echo X"$as_dir" |
66746    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66747	    s//\1/
66748	    q
66749	  }
66750	  /^X\(\/\/\)[^/].*/{
66751	    s//\1/
66752	    q
66753	  }
66754	  /^X\(\/\/\)$/{
66755	    s//\1/
66756	    q
66757	  }
66758	  /^X\(\/\).*/{
66759	    s//\1/
66760	    q
66761	  }
66762	  s/.*/./; q'`
66763      test -d "$as_dir" && break
66764    done
66765    test -z "$as_dirs" || eval "mkdir $as_dirs"
66766  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66767
66768
66769} # as_fn_mkdir_p
66770if mkdir -p . 2>/dev/null; then
66771  as_mkdir_p='mkdir -p "$as_dir"'
66772else
66773  test -d ./-p && rmdir ./-p
66774  as_mkdir_p=false
66775fi
66776
66777
66778# as_fn_executable_p FILE
66779# -----------------------
66780# Test if FILE is an executable regular file.
66781as_fn_executable_p ()
66782{
66783  test -f "$1" && test -x "$1"
66784} # as_fn_executable_p
66785as_test_x='test -x'
66786as_executable_p=as_fn_executable_p
66787
66788# Sed expression to map a string onto a valid CPP name.
66789as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66790
66791# Sed expression to map a string onto a valid variable name.
66792as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66793
66794
66795exec 6>&1
66796## ----------------------------------- ##
66797## Main body of $CONFIG_STATUS script. ##
66798## ----------------------------------- ##
66799_ASEOF
66800test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66801
66802cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66803# Save the log message, to keep $0 and so on meaningful, and to
66804# report actual input values of CONFIG_FILES etc. instead of their
66805# values after options handling.
66806ac_log="
66807This file was extended by OpenJDK $as_me jdk9, which was
66808generated by GNU Autoconf 2.69.  Invocation command line was
66809
66810  CONFIG_FILES    = $CONFIG_FILES
66811  CONFIG_HEADERS  = $CONFIG_HEADERS
66812  CONFIG_LINKS    = $CONFIG_LINKS
66813  CONFIG_COMMANDS = $CONFIG_COMMANDS
66814  $ $0 $@
66815
66816on `(hostname || uname -n) 2>/dev/null | sed 1q`
66817"
66818
66819_ACEOF
66820
66821case $ac_config_files in *"
66822"*) set x $ac_config_files; shift; ac_config_files=$*;;
66823esac
66824
66825
66826
66827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66828# Files that config.status was made for.
66829config_files="$ac_config_files"
66830
66831_ACEOF
66832
66833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66834ac_cs_usage="\
66835\`$as_me' instantiates files and other configuration actions
66836from templates according to the current configuration.  Unless the files
66837and actions are specified as TAGs, all are instantiated by default.
66838
66839Usage: $0 [OPTION]... [TAG]...
66840
66841  -h, --help       print this help, then exit
66842  -V, --version    print version number and configuration settings, then exit
66843      --config     print configuration, then exit
66844  -q, --quiet, --silent
66845                   do not print progress messages
66846  -d, --debug      don't remove temporary files
66847      --recheck    update $as_me by reconfiguring in the same conditions
66848      --file=FILE[:TEMPLATE]
66849                   instantiate the configuration file FILE
66850
66851Configuration files:
66852$config_files
66853
66854Report bugs to <build-dev@openjdk.java.net>.
66855OpenJDK home page: <http://openjdk.java.net>."
66856
66857_ACEOF
66858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66859ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66860ac_cs_version="\\
66861OpenJDK config.status jdk9
66862configured by $0, generated by GNU Autoconf 2.69,
66863  with options \\"\$ac_cs_config\\"
66864
66865Copyright (C) 2012 Free Software Foundation, Inc.
66866This config.status script is free software; the Free Software Foundation
66867gives unlimited permission to copy, distribute and modify it."
66868
66869ac_pwd='$ac_pwd'
66870srcdir='$srcdir'
66871AWK='$AWK'
66872test -n "\$AWK" || AWK=awk
66873_ACEOF
66874
66875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66876# The default lists apply if the user does not specify any file.
66877ac_need_defaults=:
66878while test $# != 0
66879do
66880  case $1 in
66881  --*=?*)
66882    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66883    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66884    ac_shift=:
66885    ;;
66886  --*=)
66887    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66888    ac_optarg=
66889    ac_shift=:
66890    ;;
66891  *)
66892    ac_option=$1
66893    ac_optarg=$2
66894    ac_shift=shift
66895    ;;
66896  esac
66897
66898  case $ac_option in
66899  # Handling of the options.
66900  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66901    ac_cs_recheck=: ;;
66902  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66903    $as_echo "$ac_cs_version"; exit ;;
66904  --config | --confi | --conf | --con | --co | --c )
66905    $as_echo "$ac_cs_config"; exit ;;
66906  --debug | --debu | --deb | --de | --d | -d )
66907    debug=: ;;
66908  --file | --fil | --fi | --f )
66909    $ac_shift
66910    case $ac_optarg in
66911    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66912    '') as_fn_error $? "missing file argument" ;;
66913    esac
66914    as_fn_append CONFIG_FILES " '$ac_optarg'"
66915    ac_need_defaults=false;;
66916  --he | --h |  --help | --hel | -h )
66917    $as_echo "$ac_cs_usage"; exit ;;
66918  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66919  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66920    ac_cs_silent=: ;;
66921
66922  # This is an error.
66923  -*) as_fn_error $? "unrecognized option: \`$1'
66924Try \`$0 --help' for more information." ;;
66925
66926  *) as_fn_append ac_config_targets " $1"
66927     ac_need_defaults=false ;;
66928
66929  esac
66930  shift
66931done
66932
66933ac_configure_extra_args=
66934
66935if $ac_cs_silent; then
66936  exec 6>/dev/null
66937  ac_configure_extra_args="$ac_configure_extra_args --silent"
66938fi
66939
66940_ACEOF
66941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66942if \$ac_cs_recheck; then
66943  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66944  shift
66945  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66946  CONFIG_SHELL='$SHELL'
66947  export CONFIG_SHELL
66948  exec "\$@"
66949fi
66950
66951_ACEOF
66952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66953exec 5>>config.log
66954{
66955  echo
66956  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66957## Running $as_me. ##
66958_ASBOX
66959  $as_echo "$ac_log"
66960} >&5
66961
66962_ACEOF
66963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66964_ACEOF
66965
66966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66967
66968# Handling of arguments.
66969for ac_config_target in $ac_config_targets
66970do
66971  case $ac_config_target in
66972    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66973    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66974    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66975    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66976    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66977
66978  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66979  esac
66980done
66981
66982
66983# If the user did not use the arguments to specify the items to instantiate,
66984# then the envvar interface is used.  Set only those that are not.
66985# We use the long form for the default assignment because of an extremely
66986# bizarre bug on SunOS 4.1.3.
66987if $ac_need_defaults; then
66988  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66989fi
66990
66991# Have a temporary directory for convenience.  Make it in the build tree
66992# simply because there is no reason against having it here, and in addition,
66993# creating and moving files from /tmp can sometimes cause problems.
66994# Hook for its removal unless debugging.
66995# Note that there is a small window in which the directory will not be cleaned:
66996# after its creation but before its name has been assigned to `$tmp'.
66997$debug ||
66998{
66999  tmp= ac_tmp=
67000  trap 'exit_status=$?
67001  : "${ac_tmp:=$tmp}"
67002  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67003' 0
67004  trap 'as_fn_exit 1' 1 2 13 15
67005}
67006# Create a (secure) tmp directory for tmp files.
67007
67008{
67009  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67010  test -d "$tmp"
67011}  ||
67012{
67013  tmp=./conf$$-$RANDOM
67014  (umask 077 && mkdir "$tmp")
67015} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67016ac_tmp=$tmp
67017
67018# Set up the scripts for CONFIG_FILES section.
67019# No need to generate them if there are no CONFIG_FILES.
67020# This happens for instance with `./config.status config.h'.
67021if test -n "$CONFIG_FILES"; then
67022
67023
67024ac_cr=`echo X | tr X '\015'`
67025# On cygwin, bash can eat \r inside `` if the user requested igncr.
67026# But we know of no other shell where ac_cr would be empty at this
67027# point, so we can use a bashism as a fallback.
67028if test "x$ac_cr" = x; then
67029  eval ac_cr=\$\'\\r\'
67030fi
67031ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67032if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67033  ac_cs_awk_cr='\\r'
67034else
67035  ac_cs_awk_cr=$ac_cr
67036fi
67037
67038echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67039_ACEOF
67040
67041
67042{
67043  echo "cat >conf$$subs.awk <<_ACEOF" &&
67044  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67045  echo "_ACEOF"
67046} >conf$$subs.sh ||
67047  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67048ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67049ac_delim='%!_!# '
67050for ac_last_try in false false false false false :; do
67051  . ./conf$$subs.sh ||
67052    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67053
67054  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67055  if test $ac_delim_n = $ac_delim_num; then
67056    break
67057  elif $ac_last_try; then
67058    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67059  else
67060    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67061  fi
67062done
67063rm -f conf$$subs.sh
67064
67065cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67066cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67067_ACEOF
67068sed -n '
67069h
67070s/^/S["/; s/!.*/"]=/
67071p
67072g
67073s/^[^!]*!//
67074:repl
67075t repl
67076s/'"$ac_delim"'$//
67077t delim
67078:nl
67079h
67080s/\(.\{148\}\)..*/\1/
67081t more1
67082s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67083p
67084n
67085b repl
67086:more1
67087s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67088p
67089g
67090s/.\{148\}//
67091t nl
67092:delim
67093h
67094s/\(.\{148\}\)..*/\1/
67095t more2
67096s/["\\]/\\&/g; s/^/"/; s/$/"/
67097p
67098b
67099:more2
67100s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67101p
67102g
67103s/.\{148\}//
67104t delim
67105' <conf$$subs.awk | sed '
67106/^[^""]/{
67107  N
67108  s/\n//
67109}
67110' >>$CONFIG_STATUS || ac_write_fail=1
67111rm -f conf$$subs.awk
67112cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67113_ACAWK
67114cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67115  for (key in S) S_is_set[key] = 1
67116  FS = ""
67117
67118}
67119{
67120  line = $ 0
67121  nfields = split(line, field, "@")
67122  substed = 0
67123  len = length(field[1])
67124  for (i = 2; i < nfields; i++) {
67125    key = field[i]
67126    keylen = length(key)
67127    if (S_is_set[key]) {
67128      value = S[key]
67129      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67130      len += length(value) + length(field[++i])
67131      substed = 1
67132    } else
67133      len += 1 + keylen
67134  }
67135
67136  print line
67137}
67138
67139_ACAWK
67140_ACEOF
67141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67142if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67143  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67144else
67145  cat
67146fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67147  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67148_ACEOF
67149
67150# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67151# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67152# trailing colons and then remove the whole line if VPATH becomes empty
67153# (actually we leave an empty line to preserve line numbers).
67154if test "x$srcdir" = x.; then
67155  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67156h
67157s///
67158s/^/:/
67159s/[	 ]*$/:/
67160s/:\$(srcdir):/:/g
67161s/:\${srcdir}:/:/g
67162s/:@srcdir@:/:/g
67163s/^:*//
67164s/:*$//
67165x
67166s/\(=[	 ]*\).*/\1/
67167G
67168s/\n//
67169s/^[^=]*=[	 ]*$//
67170}'
67171fi
67172
67173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67174fi # test -n "$CONFIG_FILES"
67175
67176
67177eval set X "  :F $CONFIG_FILES      "
67178shift
67179for ac_tag
67180do
67181  case $ac_tag in
67182  :[FHLC]) ac_mode=$ac_tag; continue;;
67183  esac
67184  case $ac_mode$ac_tag in
67185  :[FHL]*:*);;
67186  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67187  :[FH]-) ac_tag=-:-;;
67188  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67189  esac
67190  ac_save_IFS=$IFS
67191  IFS=:
67192  set x $ac_tag
67193  IFS=$ac_save_IFS
67194  shift
67195  ac_file=$1
67196  shift
67197
67198  case $ac_mode in
67199  :L) ac_source=$1;;
67200  :[FH])
67201    ac_file_inputs=
67202    for ac_f
67203    do
67204      case $ac_f in
67205      -) ac_f="$ac_tmp/stdin";;
67206      *) # Look for the file first in the build tree, then in the source tree
67207	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67208	 # because $ac_f cannot contain `:'.
67209	 test -f "$ac_f" ||
67210	   case $ac_f in
67211	   [\\/$]*) false;;
67212	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67213	   esac ||
67214	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67215      esac
67216      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67217      as_fn_append ac_file_inputs " '$ac_f'"
67218    done
67219
67220    # Let's still pretend it is `configure' which instantiates (i.e., don't
67221    # use $as_me), people would be surprised to read:
67222    #    /* config.h.  Generated by config.status.  */
67223    configure_input='Generated from '`
67224	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67225	`' by configure.'
67226    if test x"$ac_file" != x-; then
67227      configure_input="$ac_file.  $configure_input"
67228      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67229$as_echo "$as_me: creating $ac_file" >&6;}
67230    fi
67231    # Neutralize special characters interpreted by sed in replacement strings.
67232    case $configure_input in #(
67233    *\&* | *\|* | *\\* )
67234       ac_sed_conf_input=`$as_echo "$configure_input" |
67235       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67236    *) ac_sed_conf_input=$configure_input;;
67237    esac
67238
67239    case $ac_tag in
67240    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67241      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67242    esac
67243    ;;
67244  esac
67245
67246  ac_dir=`$as_dirname -- "$ac_file" ||
67247$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67248	 X"$ac_file" : 'X\(//\)[^/]' \| \
67249	 X"$ac_file" : 'X\(//\)$' \| \
67250	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67251$as_echo X"$ac_file" |
67252    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67253	    s//\1/
67254	    q
67255	  }
67256	  /^X\(\/\/\)[^/].*/{
67257	    s//\1/
67258	    q
67259	  }
67260	  /^X\(\/\/\)$/{
67261	    s//\1/
67262	    q
67263	  }
67264	  /^X\(\/\).*/{
67265	    s//\1/
67266	    q
67267	  }
67268	  s/.*/./; q'`
67269  as_dir="$ac_dir"; as_fn_mkdir_p
67270  ac_builddir=.
67271
67272case "$ac_dir" in
67273.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67274*)
67275  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67276  # A ".." for each directory in $ac_dir_suffix.
67277  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67278  case $ac_top_builddir_sub in
67279  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67280  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67281  esac ;;
67282esac
67283ac_abs_top_builddir=$ac_pwd
67284ac_abs_builddir=$ac_pwd$ac_dir_suffix
67285# for backward compatibility:
67286ac_top_builddir=$ac_top_build_prefix
67287
67288case $srcdir in
67289  .)  # We are building in place.
67290    ac_srcdir=.
67291    ac_top_srcdir=$ac_top_builddir_sub
67292    ac_abs_top_srcdir=$ac_pwd ;;
67293  [\\/]* | ?:[\\/]* )  # Absolute name.
67294    ac_srcdir=$srcdir$ac_dir_suffix;
67295    ac_top_srcdir=$srcdir
67296    ac_abs_top_srcdir=$srcdir ;;
67297  *) # Relative name.
67298    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67299    ac_top_srcdir=$ac_top_build_prefix$srcdir
67300    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67301esac
67302ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67303
67304
67305  case $ac_mode in
67306  :F)
67307  #
67308  # CONFIG_FILE
67309  #
67310
67311_ACEOF
67312
67313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67314# If the template does not know about datarootdir, expand it.
67315# FIXME: This hack should be removed a few years after 2.60.
67316ac_datarootdir_hack=; ac_datarootdir_seen=
67317ac_sed_dataroot='
67318/datarootdir/ {
67319  p
67320  q
67321}
67322/@datadir@/p
67323/@docdir@/p
67324/@infodir@/p
67325/@localedir@/p
67326/@mandir@/p'
67327case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67328*datarootdir*) ac_datarootdir_seen=yes;;
67329*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67330  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67331$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67332_ACEOF
67333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67334  ac_datarootdir_hack='
67335  s&@datadir@&$datadir&g
67336  s&@docdir@&$docdir&g
67337  s&@infodir@&$infodir&g
67338  s&@localedir@&$localedir&g
67339  s&@mandir@&$mandir&g
67340  s&\\\${datarootdir}&$datarootdir&g' ;;
67341esac
67342_ACEOF
67343
67344# Neutralize VPATH when `$srcdir' = `.'.
67345# Shell code in configure.ac might set extrasub.
67346# FIXME: do we really want to maintain this feature?
67347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67348ac_sed_extra="$ac_vpsub
67349$extrasub
67350_ACEOF
67351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67352:t
67353/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67354s|@configure_input@|$ac_sed_conf_input|;t t
67355s&@top_builddir@&$ac_top_builddir_sub&;t t
67356s&@top_build_prefix@&$ac_top_build_prefix&;t t
67357s&@srcdir@&$ac_srcdir&;t t
67358s&@abs_srcdir@&$ac_abs_srcdir&;t t
67359s&@top_srcdir@&$ac_top_srcdir&;t t
67360s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67361s&@builddir@&$ac_builddir&;t t
67362s&@abs_builddir@&$ac_abs_builddir&;t t
67363s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67364$ac_datarootdir_hack
67365"
67366eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67367  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67368
67369test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67370  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67371  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67372      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67373  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67374which seems to be undefined.  Please make sure it is defined" >&5
67375$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67376which seems to be undefined.  Please make sure it is defined" >&2;}
67377
67378  rm -f "$ac_tmp/stdin"
67379  case $ac_file in
67380  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67381  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67382  esac \
67383  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67384 ;;
67385
67386
67387
67388  esac
67389
67390done # for ac_tag
67391
67392
67393as_fn_exit 0
67394_ACEOF
67395ac_clean_files=$ac_clean_files_save
67396
67397test $ac_write_fail = 0 ||
67398  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67399
67400
67401# configure is writing to config.log, and then calls config.status.
67402# config.status does its own redirection, appending to config.log.
67403# Unfortunately, on DOS this fails, as config.log is still kept open
67404# by configure, so config.status won't be able to write to it; its
67405# output is simply discarded.  So we exec the FD to /dev/null,
67406# effectively closing config.log, so it can be properly (re)opened and
67407# appended to by config.status.  When coming back to configure, we
67408# need to make the FD available again.
67409if test "$no_create" != yes; then
67410  ac_cs_success=:
67411  ac_config_status_args=
67412  test "$silent" = yes &&
67413    ac_config_status_args="$ac_config_status_args --quiet"
67414  exec 5>/dev/null
67415  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67416  exec 5>>config.log
67417  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67418  # would make configure fail if this is the last instruction.
67419  $ac_cs_success || as_fn_exit 1
67420fi
67421if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67422  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67423$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67424fi
67425
67426
67427# After AC_OUTPUT, we need to do final work
67428
67429
67430  # Try to move config.log (generated by autoconf) to the configure-support directory.
67431  if test -e ./config.log; then
67432    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67433  fi
67434
67435  # Rotate our log file (configure.log)
67436  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67437    $RM -f "$OUTPUT_ROOT/configure.log.old"
67438  fi
67439  if test -e "$OUTPUT_ROOT/configure.log"; then
67440    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67441  fi
67442
67443  # Move configure.log from current directory to the build output root
67444  if test -e ./configure.log; then
67445    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67446  fi
67447
67448  # Make the compare script executable
67449  $CHMOD +x $OUTPUT_ROOT/compare.sh
67450
67451
67452# Finally output some useful information to the user
67453
67454  # Finally output some useful information to the user
67455
67456  printf "\n"
67457  printf "====================================================\n"
67458  if test "x$no_create" != "xyes"; then
67459    if test "x$IS_RECONFIGURE" != "xyes"; then
67460      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67461    else
67462      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67463    fi
67464  else
67465    if test "x$IS_RECONFIGURE" != "xyes"; then
67466      printf "A configuration has been successfully checked but not created\n"
67467    else
67468      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67469    fi
67470  fi
67471  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67472    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67473  else
67474    printf "using default settings.\n"
67475  fi
67476
67477  printf "\n"
67478  printf "Configuration summary:\n"
67479  printf "* Debug level:    $DEBUG_LEVEL\n"
67480  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67481  printf "* JDK variant:    $JDK_VARIANT\n"
67482  printf "* JVM variants:   $JVM_VARIANTS\n"
67483  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67484  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67485
67486  printf "\n"
67487  printf "Tools summary:\n"
67488  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67489    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67490  fi
67491  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67492  if test "x$TOOLCHAIN_VERSION" != "x"; then
67493    print_version=" $TOOLCHAIN_VERSION"
67494  fi
67495  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67496  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67497  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67498
67499  printf "\n"
67500  printf "Build performance summary:\n"
67501  printf "* Cores to use:   $JOBS\n"
67502  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67503  if test "x$CCACHE_STATUS" != "x"; then
67504    printf "* ccache status:  $CCACHE_STATUS\n"
67505  fi
67506  printf "\n"
67507
67508  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67509    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67510    printf "will result in longer build times.\n"
67511    printf "\n"
67512  fi
67513
67514  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67515    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67516    printf "These are not respected, and will be ignored. It is recommended\n"
67517    printf "that you clean your environment. The following variables are set:\n"
67518    printf "$FOUND_ALT_VARIABLES\n"
67519    printf "\n"
67520  fi
67521
67522  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67523    printf "WARNING: Your build output directory is not on a local disk.\n"
67524    printf "This will severely degrade build performance!\n"
67525    printf "It is recommended that you create an output directory on a local disk,\n"
67526    printf "and run the configure script again from that directory.\n"
67527    printf "\n"
67528  fi
67529
67530  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67531    printf "WARNING: The result of this configuration has overridden an older\n"
67532    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67533    printf "proper build. Failure to do so might result in strange build problems.\n"
67534    printf "\n"
67535  fi
67536
67537  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67538    printf "WARNING: The result of this configuration was not saved.\n"
67539    printf "You should run without '--no-create | -n' to create the configuration.\n"
67540    printf "\n"
67541  fi
67542
67543
67544
67545  # Locate config.log.
67546  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67547    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67548  elif test -e "./config.log"; then
67549    CONFIG_LOG_PATH="."
67550  fi
67551
67552  if test -e "$CONFIG_LOG_PATH/config.log"; then
67553    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67554    if test $? -eq 0; then
67555      printf "The following warnings were produced. Repeated here for convenience:\n"
67556      # We must quote sed expression (using []) to stop m4 from eating the [].
67557      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67558      printf "\n"
67559    fi
67560  fi
67561
67562